WellboreQC

petrophys.preprocessing.quality.WellboreQC

class WellboreQC(
drho_threshold=0.15,
cali_variation_threshold=0.5,
washout_threshold=1.5,
bitsize_exclusion_distance=50.0,
)[source]

Bad-hole detection using caliper roughness, washout and DRHO fallback.

cali_variation_threshold is the roughness limit in inches per metre (the rolling standard deviation of dCALI/dDepth, with the depth converted to metres whatever the well’s depth unit); washout_threshold is the overgauge limit in inches, flagging CALI - BS above it; drho_threshold is the |DRHO| limit in g/cc used where the caliper cannot be evaluated.

Attributes

Methods

analyze

Flag bad hole sample by sample and summarize it by interval.

Parameters:
  • drho_threshold (float)

  • cali_variation_threshold (float)

  • washout_threshold (float)

  • bitsize_exclusion_distance (float)

CATEGORY_KEY = 'WELLBORE_QUALITY_CONTROL'
analyze(well, add_curves=True)[source]

Flag bad hole sample by sample and summarize it by interval.

A sample is bad hole where the caliper roughness exceeds cali_variation_threshold or CALI - BS exceeds washout_threshold; the caliper is used when at least 5 samples have CALI and BS. Where the caliper gives no flag, |DRHO| above drho_threshold flags the sample.

Parameters:
  • well (Well) – Well with a caliper (CALI) and bit size (BS), or DRHO.

  • add_curves (bool, default True) – Add the derived curves that hold values to well, replacing curves of the same name: CALI_SMOOTH (in), CALI_ROUGHNESS (in/m) and BAD_HOLE (1 bad hole, 0 good hole).

Returns:

Section bad_hole_detection with the depth intervals labelled GOOD_HOLE, BAD_HOLE and NO_QC_DATA; the derived curves in derived_curves; and metadata["qc_summary"] with bad_hole_percentage, bad_hole_intervals, detection_method_counts and bit_size_exclusion_zones.

Return type:

CategoryAnalysisResult