NRAO Home  >  Green Bank  |  Wiki Topic:    GB > Data > IDLDocumentation > GBTIDLFreqSwitchRecipe
   Changes | Index | Contents | Search | Statistics | Jump to Topic

Recipe for Reducing Frequency Switched Track data with GBTIDL

Command Comments
sdfits -scans=76:77 -backends=sp /home/archive/test-data/tape-0002/TREG_040628 The first step in reducing GBT data with the gbtidl program is to convert (or "fill") the data from the raw GBT FITS files into an sdfits file. This step accomplishes the task. The output file will be called TREG_040628.raw.sp.fits. Additional information is available on the sdfits command
%gbtidl Starts gbtidl and loads the appropriate scripts needed to reduce GBT data.
filein,'TREG_040628.raw.sp.fits' This comand identifies the input data set. If the data are contained all in one file, the filein command is appropriate. It is also possible to use a directory of sdfits files as the input, in which case the dirin command is used to identify the input directory.
list Lists the records available in the input data set.
summary lists GBT scans in the input dataset
getrec,0 Retrieves the first record from the input data set. The data are copied into the primary data container (PDC).
header Shows some header information
show Displays the data from the global data container on the plotter. In this case, the data are still not calibrated and so the spectrum shows just a bandpass shape. If Auto Update is ON, this step is redundant.
getfs,76,ifnum=0 Calibrates the frequency switched data from scan 21, IF 0, folds the data, and stores the result in the PDC.
show Displays the calibrated spectrum
for i=76,77 do begin getfs,i & accum & end Retrieves scans 76 through 77 and adds each to the accumulator, Although there are only two scans in this loop, the number of scans can be increased trivially by changing the limits in the loop. An alternative to using a simple loop is to use the stack to generate a list of scans to be averaged. See an example of how to use the stack here
ave averages data in the accumulator, stores the result in the primary data container, and displayes it.
bdrop,10  
edrop, 10 Drop the first and last 10 channels from the display
sclear Clears the accumulator
setregion Prompt the user to specify the regions to be used for baseline fitting by clicking on the plotter. The baseline regions are stored in !g.nregion. The baseline regions can be specified explicitly by setting !g.nregion directly.
bshape, nfit=5 Shows the result of a fifth order polynomial fit. !g.nfit is set to 5.
show
bshape, nfit=4 Shows the result of a fourth order polynomial fit. !g.nfit is set to 4. If no order is given, the previous value of !g.nfit will be applied.
baseline Subtracts the fourth order polynomial baseline from the data. The residual is stored in the PDC, and displayed.
show Shows the data after baseline subtraction.
stats Provides statistics on the spectrum. The range of interest is specified with the mouse cursor.
setx,1.667,1.6676 Zoom in on one of the features
fitgauss Fits a Gaussian profile to the data. The user will be prompted to enter the range to be fit as well as initial guesses for peak and width by clicking on the plotter.
freex Unzoom

-- JimBraatz

Topic GBTIDLFreqSwitchRecipe . { Edit | Attach | Ref-By | Printable | Diffs | r1.9 | > | r1.8 | > | r1.7 | More }
Revision r1.9 - 25 Apr 2006 - 20:02 GMT - BobGarwood
Parents: IDLDocumentation
Content copyright © 1999-2007 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.