detrend

function of dascore.proc.detrend source

detrend(
    patch: Patch ,
    dim ,
    type ,
)-> Patch

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

Parameters

Parameter Description
PatchType The patch instance you’re applying the detrend function.
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 = dascore.proc.detrend(pa, "distance") # detrend in the distance dimension