Produced by IDL 7.1.1
User Documentation

./toolbox
dcvshift.pro

Last modification date:
Wed Sep 28 13:27:10 2016

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.

Returns
shift, in channels, to be used as argument to dcshift. Returns 0.0 on error.
Examples
 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
 
Version
$Id$

Parameters
accumbuf
in, required
accum_struct
The ongoing accumulation buffer.
dc
in, required
spectrum
The data container that needs to be shifted to align with the data container template in accumbuf.

Keywords
frame
in, optional
string
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
in, optional
string
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
in, optional
double
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.


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:38 2016