Produced by IDL 7.1.1
User Documentation

./toolbox
dcspurchans.pro

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

dcspurchans

function dcspurchans(vsprval, vsprpix, vspdelt, nchan, [/docenterspur], [count=variable])

Return a vector of VEGAS ADC spur channels given the values of VSPDELT, VSPRPIX, VSPRVAL, and NCHAN.

The VSP* values should be taken from a GBTIDL data container, where the VSPRPIX value has already had 1 subtracted from the value found in the FITS file (FITS counts channels from 1, GBTIDL counts channels from 0).

Spurs are located at the following channels:

spur_j = (j - VSPRVAL)*VSPDELT + VSPRPIX

Where j is an integer that goes from 0 through 33.

The VSP* values are double precision floats but the spur_j is assumed to be an integer. Conversion to an integer is done using the IDL round function.

NCHAN is used to determine which spur_j values should be returned. Valid spur_j values are equal to or greater than 0 and less than NCHAN. The count keyword is set to the number of valid spur_j values returned. If there are none, then the returned spur_j value is -1 and count is 0.

The value at j=16, the center ADC spur, is not included in the returned values unless the docenterspur keyword is set. Normal sdfits use will replace that center ADC spur with the average of the two adjacent channels and so it's usually not necessary in GBTIDL to know where that center ADC spur is since it does not need to be reflagged or interpolated across.

These spurs do not include the center spur. That spur always occurs at the center channel (NCHAN/2 when counting from 0, as is done in IDL) and is replaced with the average of the two adjacent channels by sdfits unless the "-nointerp" option to sdfits is used. That spur does not arise in the ADC and so does not move as the spectral window is tuned across the ADC bandpass.

This routine does not check the validity of the input values.

Returns
an array listing the channel numbers associated with all of the VEGAS spurs associated with the input parameters.
Version
$Id$

Parameters
vsprval
in, required
double
The spur reference value.
vsprpix
in, required
double
The channel number (pixel) corresponding to the spur reference value (vsprval).
vspdelt
in, required
double
The channel increment between adjacent spur numbers (j to j+1).
nchan
in, required
integer
The number of channels to use in determining which spur_j values to return.

Keywords
docenterspur
in, optional
boolean
When set, the center ADC spur will be included in the array of returned channel numbers. The center ADC spur is normally interpolated across by sdfits and is typically not needed when reflagging or interpolating across the spurs in GBTIDL. The default behavior is to not return that channel in the list of spur channel numbers.
count
out, optional
variable
The number of valid VEGAS spur channels returned.


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