find_log_depth_shift¶
petrophys.preprocessing.quality.find_log_depth_shift
Also available as petrophys.preprocessing.find_log_depth_shift
- find_log_depth_shift(
- well,
- curve,
- reference,
- *,
- max_shift=None,
- top=None,
- bottom=None,
- sign=None,
- min_points=200,
Find the depth shift that lines
curveup withreference.Every whole-sample lag up to
max_shiftis tried; at each, the Pearson correlation of the two curves over their common samples is computed. The lag with the strongest correlation wins.- Parameters:
well (Well) – Well carrying both curves, on one depth index.
curve (str) – Curve to move, e.g.
"RHOB".reference (str) – Curve taken as on depth, e.g.
"NPHI"or"GR".max_shift (float, optional) – Largest shift to try either way, in well depth units. Default 20 m (65.6 ft).
top (float, optional) – Depth window of the comparison, in well depth units. Default: the whole log.
bottom (float, optional) – Depth window of the comparison, in well depth units. Default: the whole log.
sign ({"positive", "negative"}, optional) – Expected sign of the correlation when on depth:
"negative"for density against neutron,"positive"for neutron against gamma ray. Default: the strongest correlation of either sign.min_points (int, default 200) – Fewest sample pairs a lag needs to be scored.
- Returns:
.shiftto pass toshift_curves(), the correlation as recorded and shifted, and.off_depthwhen the shift is clear.- Return type:
Examples
>>> import petrophys as pp >>> from petrophys.preprocessing import find_log_depth_shift >>> hw3 = pp.read(pp.sample("HW-3")) >>> found = find_log_depth_shift(hw3, "RHOB", "NPHI") >>> round(found.shift), round(found.correlation, 2), found.off_depth (-55, -0.79, True)