gstools.transform.discrete
- gstools.transform.discrete(fld, values, thresholds='arithmetic', field='field', store=True, process=False, keep_mean=True)[source]
Discrete transformation.
After this transformation, the field has only len(values) discrete values.
- Parameters
fld (
Field
) – Field class containing a generated field.values (
numpy.ndarray
) – The discrete values the field will takethresholds (
str
ornumpy.ndarray
, optional) – the thresholds, where the value classes are separated possible values are: * “arithmetic”: the mean of the 2 neighbouring values * “equal”: divide the field into equal parts * an array of explicitly given thresholds Default: “arithmetic”field (
str
, optional) – Name of field to be transformed. The default is “field”.store (
str
orbool
, optional) – Whether to store field inplace (True/False) or under a given name. The default is True.process (
bool
, optional) – Whether to process in/out fields with trend, normalizer and mean of given Field instance. The default is False.keep_mean (
bool
, optional) – Whether to keep the mean of the field if process=True. The default is True.
- Returns
Transformed field.
- Return type