t2_fraction_below_cutoff

petrophys.interpretation.nmr.t2_fraction_below_cutoff

t2_fraction_below_cutoff(t2_centers, cutoff_ms)[source]

Fraction of each T2 bin below the cutoff, interpolated in log T2.

Each bin spans the log-T2 interval between the geometric means of its centre and its neighbours’ (the outer bins extend as far beyond their centre as inward), so a cutoff inside a bin splits that bin by log-T2 width and the partition changes continuously with the cutoff. A single bin counts whole, by its centre.

Parameters:
  • t2_centers (np.ndarray) – T2 bin centres (ms), increasing.

  • cutoff_ms (float or np.ndarray) – T2 cutoff (ms), or one cutoff per depth.

Returns:

Shape (n_bins,), or (n_depth, n_bins) for per-depth cutoffs.

Return type:

np.ndarray

Examples

>>> t2 = np.array([4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0])
>>> np.round(t2_fraction_below_cutoff(t2, 33.0), 3)[2:5].tolist()
[1.0, 0.544, 0.0]