|
User Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox dcspurchans.pro
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.