best_and_weakest¶
petrophys.evaluation.summaries.best_and_weakest
- best_and_weakest(values, direction, *, bad_hole=None, max_bad_hole_fraction=0.5)[source]¶
The best and the weakest of zone values, in a property’s better direction.
Zones whose bad-hole share is above
max_bad_hole_fractionare left out; when that leaves none, every zone is ranked (andbasissays so). Fewer than two zones are not ranked: one zone is not both best and weakest.- Parameters:
values (sequence of float) – One value per zone (e.g. zone means); non-finite values are not ranked.
direction ({"higher", "lower"}) – The better direction (
property_direction()).bad_hole (sequence of float, optional) – Bad-hole share per zone; an unknown (None or NaN) share keeps the zone.
max_bad_hole_fraction (float) – The largest bad-hole share a ranked zone may have.
- Returns:
bestandweakest(zone indices, None when not ranked) andbasis:"good_hole","all_in_bad_hole"(every zone with a value is in bad hole, so all are ranked) or"too_few".- Return type:
Examples
>>> best_and_weakest([0.2, 0.1, 0.3], "higher", bad_hole=[0.0, 0.0, 0.9]) {'best': 0, 'weakest': 1, 'basis': 'good_hole'}