assign_flow_units¶
petrophys.evaluation.flow_units.assign_flow_units
Also available as petrophys.evaluation.assign_flow_units
- assign_flow_units(fzi, n_units=None, method='kmeans', fzi_cutoffs=None, max_units=6)[source]¶
Partition samples into hydraulic flow units from their FZI.
- Parameters:
fzi (array) – Flow Zone Indicator per sample (microns).
n_units (int, optional) – Number of units. If
None(and no cutoffs) it is chosen automatically.method ({"kmeans", "cutoffs"}) –
kmeansclusters log10(FZI);cutoffsusesfzi_cutoffs.fzi_cutoffs (sequence of float, optional) – Ascending FZI boundaries (used when method=”cutoffs” or when provided).
max_units (int) – Cap on the number of units for automatic selection.
- Returns:
labels (numpy.ndarray) – Unit of each sample, 1..n_units; 0 where FZI is missing or not positive.
unit_mean_fzi (numpy.ndarray) – Geometric mean FZI of each unit.
boundaries (numpy.ndarray) – FZI boundaries between adjacent units: the sorted cutoffs, or the geometric midpoints between the k-means unit centres.