TwoCurveBands

petrophys.model.TwoCurveBands

class TwoCurveBands(base, steps)[source]

A two-curve classification: base for every sample where both curves are valid, then each (label, x_above, y_above) step in order where x > x_above and y > y_above; later steps win.

Examples

>>> b = TwoCurveBands("LOW", (("MID", 0.1, 1.0), ("HIGH", 0.2, 10.0)))
>>> list(b.classify([0.05, 0.15, 0.25, 0.25], [50.0, 50.0, 5.0, 50.0]))
['LOW', 'MID', 'MID', 'HIGH']

Attributes

labels

The labels from the lowest to the highest grade.

base

steps

Methods

classify

The label of every sample (missing where either value is not valid; default validity: both finite).

Parameters:
base: str
steps: Tuple[Tuple[str, float, float], ...]
classify(x, y, valid=None, missing='NO_DATA')[source]

The label of every sample (missing where either value is not valid; default validity: both finite).

Parameters:
Return type:

ndarray

property labels: Tuple[str, ...]

The labels from the lowest to the highest grade.