find_held_readings

petrophys.preprocessing.quality.find_held_readings

Also available as petrophys.preprocessing.find_held_readings

find_held_readings(
well,
curves=None,
*,
min_run=10,
tolerance=0.0,
top=None,
bottom=None,
)[source]

Find held (stuck or padded) readings in the curves of a well.

Parameters:
  • well (Well) – Well to check.

  • curves (iterable of str, optional) – Curves to check. Defaults to every curve on the well.

  • min_run (int, default 10) – Minimum run length in samples (see held_reading_mask()).

  • tolerance (float, default 0.0) – Repeat tolerance in each curve’s unit.

  • top (float, optional) – Depth window to check, in well depth units (inclusive). Defaults to the whole well.

  • bottom (float, optional) – Depth window to check, in well depth units (inclusive). Defaults to the whole well.

Returns:

Per-curve flags, the list of runs and a per-curve summary. Use result.shallowest_depth to end an analysis window above the first held sample.

Return type:

HeldReadings

Raises:

ValueError – If a requested curve is missing or the settings are invalid.

Examples

>>> import petrophys as pp
>>> well = pp.read(pp.sample("25_5-1"))
>>> held = find_held_readings(well, ["GR", "THOR", "URAN"])
>>> held.summary()["held_samples"].to_dict()
{'GR': 57, 'THOR': 45, 'URAN': 45}
>>> round(held.shallowest_depth, 1)
3423.4