shift_curves

petrophys.preprocessing.quality.shift_curves

Also available as petrophys.preprocessing.shift_curves

shift_curves(well, curves, shift)[source]

Return a copy of well with curves moved by shift.

shift is one correction in well depth units, a correction per sample, or a DepthMatch: the moved curve at depth z is the recorded curve at z - shift, so a reading recorded at z moves to z + shift and a negative shift moves a curve up. Values are interpolated onto the well’s depth index; depths the moved curve does not reach become NaN, and gaps stay gaps. Each moved curve’s description records the shift.

Examples

>>> import petrophys as pp
>>> from petrophys.preprocessing import find_log_depth_shift, shift_curves
>>> hw3 = pp.read(pp.sample("HW-3"))
>>> aligned = shift_curves(hw3, ["RHOB", "DTC"], find_log_depth_shift(hw3, "RHOB", "NPHI").shift)