gstools.normalizer.remove_trend_norm_mean
- gstools.normalizer.remove_trend_norm_mean(pos, field, mean=None, normalizer=None, trend=None, mesh_type='unstructured', value_type='scalar', check_shape=True, stacked=False, fit_normalizer=False)[source]
Remove trend, de-normalization and mean from given field.
- Parameters
pos (
iterable
) – Position tuple, containing main direction and transversal directions.field (
numpy.ndarray
orlist
ofnumpy.ndarray
) – The spatially distributed data. You can pass a list of fields, that will be used simultaneously. Then you need to setstacked=True
.mean (
None
orfloat
orcallable
, optional) – Mean of the field if wanted. Could also be a callable. The default is None.normalizer (
None
orNormalizer
, optional) – Normalizer to be applied to the field. The default is None.trend (
None
orfloat
orcallable
, optional) – Trend of the denormalized fields. If no normalizer is applied, this behaves equal to ‘mean’. The default is None.mesh_type (
str
, optional) – ‘structured’ / ‘unstructured’ Default: ‘unstructured’value_type (
str
, optional) – Value type of the field. Either “scalar” or “vector”. The default is “scalar”.check_shape (
bool
, optional) – Whether to check pos and field shapes. The default is True.stacked (
bool
, optional) – Whether the field is stacked or not. The default is False.fit_normalizer (
bool
, optional) – Whether to fit the data-normalizer to the given (detrended) field. Default: False
- Returns
field (
numpy.ndarray
) – The cleaned field.normalizer (
Normalizer
, optional) – The fitted normalizer for the given data. Only provided if fit_normalizer is True.