import dascore as dc
= dc.get_example_patch()
patch
# Example 1
# An auto-correlation of the example patch
= patch.dft("time", real=True)
dft = dft * dft.conj()
dft_sq = dft_sq.idft()
idft = idft.correlate_shift(dim="time") auto_patch
correlate_shift
correlate_shift(
patch ,
dim ,
undo_weighting = True,
)
Apply a shift to the patch data to undo correlation in frequency domain.
Also adds the appropriate coordinate prefixed with “lag” and has a datatype of float.
Parameters
Parameter | Description |
---|---|
patch | The input patch |
dim | The dimension name that was correlated in the freq. domain. |
undo_weighting |
If True, also undo the weighting artifact caused by DASCore’s dft weighting. This is done by simply dividing by the coordinate step. See dft note for more details. |