detrend

function of dascore.proc.detrend source

detrend(
    patch: Patch ,
    dim ,
    type = linear,
)-> ‘PatchType’

Perform detrending along a given dimension (distance or time) of a patch.

Parameters

Parameter Description
dim The dimension (“distance” or “time”) along where detrending is applied.
type Specifies least-squares fit type for detrend,
with “linear” (default) or “constant” as options.

Returns

The Patch instance after applying the detrend function.

Examples

import dascore # import dascore library
pa = dascore.get_example_patch() # generate example patch
out = pa.detrend("time") # detrend along the time dimension