|
User Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox dcfshift.pro
dcfshift |
Function to calculate the shift, in channels, necessary to align in frequency a data container with the data container template in an ongoing accumulation.
If the frame is not set, the one implied by the data header is used. Use dcxshift to align using the current settings of the plotter's x-axis.
a={accum_struct} getps,30 dcaccum, a, !g.s[0] ; start an accum, no alignment needed yet getps,31 fs = dcfshift(a,!g.s[0]) ; what is the shift to align 31 with 30? ; get a copy of data at !g.s[0] data_copy,!g.s[0], d dcshift, d, fs ; actually shift the data dcaccum, a, d ; and add it in getps, 32 data_copy,!g.s[0], d dcshift, d, dcfshift(a, d) ; all in one line, shift 32 to align with 30 dcaccum, a, d accumave, a, d ; result is in d now
Parameters | |
accumbuf |
The ongoing accumulation buffer. |
dc |
The data container that needs to be shifted to align with the data container template in accumbuf. |
Keywords | |
frame |
The reference frame to use. If not supplied, the value implied by the last 4 characters of the velocity_definition in the ongoing accumulation will be used. See frame_velocity for a full list of supported reference frames. |