|
User Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox dcvshift.pro
dcvshift |
function dcvshift(accumbuf, dc, [frame=string], [veldef=string], [voffset=double]) |
Function to calculate the shift, in channels, necessary to align in velocity 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 vs = dcvshift(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, vs ; actually shift the data dcaccum, a, d ; and add it in getps, 32 data_copy,!g.s[0], d dcshift, d, dcvshift(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. |
veldef |
The velocity definition to use. If not supplied, the value implied by the first 4 characters of the velocity_definition in the ongoing accumulation will be used. See frame_velocity for a full list of supported reference frames. |
voffset |
A velocity offset in km/s to apply before aligning. If not set, this defaults to a value of 0.0. A typical use would be to set this equal to the source velocity (at the velocity header value). Not that the units expected here are km/s, in agreement with those expected for setvoffset. The units for the velocity header field are m/s. |