xdas.signal.detrend#

xdas.signal.detrend(da, type='linear', dim='last', parallel=None)[source]#

Detrend data along given dimension.

Parameters:
  • da (DataArray) – The data to detrend.

  • type (str) – Either “linear” or “constant”.

  • dim (str) – The dimension along which to detrend the data.

  • parallel (bool or int, optional) – Number of threads to use. True uses all cores, False uses one, an int uses that many, None defers to the global xdas configuration. Default is None.

Returns:

The detrended data.

Return type:

DataArray

Notes

Splits on data discontinuities along dim.