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

Recipe for Reducing Beam Switched Dual Beam data with GBTIDL

Note that the beam switched mode is not recommended, in general, with the GBT. Most observers use total power nod observations instead. Beam switched mode is intended only for archived data or for expert use at this time. (23 Nov 2004).

Command Comments
%sdfits -scans=1:100 -backends=acs /home/gbtdata/AGBT01A_01 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 AGBT01A_01.raw.acs.fits. Additional information is available on the sdfits command. This specific example is illustrative only - there is no real data stored in project AGBT01A_01.
%gbtidl Starts gbtidl and loads the appropriate scripts needed to reduce GBT data.
filein,'AGBT01A_01.raw.acs.fits' This command 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.
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 command is redundant.
getbs,1 Calibrates the beam switched data from scans 1-2, stores the result in the PDC, and displays it.
freeze turn off Auto Update so that the accum loops runs faster
for i=1,99,2 do begin getbs,i & accum & end Retrieves scans 1 through 100 and adds each to the accumulator. Note that the loop increments by 2's because the getbs procedure operates on two consecutive scans. 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.
unfreeze turn Auto Update back on
ave averages data in the accumulator, stores the result in the primary data container, and displays 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.
stats Provides statistics on the spectrum. The range is specified with the mouse cursor.
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.

-- JimBraatz

Topic GBTIDLBeamSwitchRecipe . { Edit | Attach | Ref-By | Printable | Diffs | r1.5 | > | r1.4 | > | r1.3 | More }
Revision r1.5 - 25 Apr 2006 - 20:07 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.