gstools.transform.apply_function(fld, function, field='field', store=True, process=False, keep_mean=True, **kwargs)[source]

Apply function as field transformation.

  • fld (Field) – Field class containing a generated field.

  • function (callable) – Function to use.

  • field (str, optional) – Name of field to be transformed. The default is “field”.

  • store (str or bool, 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.

  • **kwargs – Keyword arguments forwarded to given function.


ValueError – When function is not callable.


Transformed field.

Return type