function of dascore.proc.correlate source

    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.


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.


import dascore as dc
patch = dc.get_example_patch()

# Example 1
# An auto-correlation of the example patch
dft = patch.dft("time", real=True)
dft_sq = dft * dft.conj()
idft = dft_sq.idft()
auto_patch = idft.correlate_shift(dim="time")