NRAO Home  >  Green Bank  |  Wiki Topic:    GB > Data > GBTIDLQuickReferenceV1pt0
   Changes | Index | Contents | Search | Statistics | Jump to Topic
GBTIDL V1.0: Quick Reference

  Main     Discussion Area     Documentation     Contents     Status  

For help with a routine from the gbtidl command line, use the doc_library command, for example: GBTIDL -> doc_library, "show"

In the following tables, optional arguments are in [brackets]. IDL parameters are in normal font, keywords are in boldface.

Data Operations


>>> Retrieving and Saving Data <<<
dirin, [file_name] Input from the given directory
filein, [file_name] Input from the given SDFITS file
fileout, file_name Open an SDFITS file for writing
files, [ /full ] lists the input and output files currently in use
get, [parameters] retrieve a record from the input file
getdata([index,elemants]) returns the data into an IDL array
getrec, index Retrieve a record at the given index
getscan, scan Retrieve the first record with the given scan number
keep store the PDC to the output SDFITS file
kget, [parameters] Retrieve a record from the output file
kgetrec, index Retrieve a record at the given index from the output file
kgetscan, scan Retrieve the first record with the given scan number from the output file
nget, nsave, [ index, /infile, ok ] retrieve a record with a given nsave identifier
nsave , nsave, [ index, dc, ok ] save to the output file, with an nsave identifier
offline, project, [ /acs, /sp ] a shortcut for filein, used only in Green Bank
online, [ /acs, /sp ] Connect to the online data file
sprotect_off turns off write protection for nsave entries
sprotect_on turns on write protection for nsave entries

>>> Using the Stack <<<
addstack, first, [last, step] add enumerated entries to the stack
appendstack, index append array of entries to the stack
astack(elem) returns the record index for a given entry in the stack
avgstack, [ /noclear ] average spectra identified by entries in the stack
delete, indx remove individual entries from the stack
emptystack, [ /reset, /shrink ] clear the stack
liststack, [start, finish, sortcol, /keep, parameters ] list records from the input data file that correspond to entries in the stack
select, [ /keep, parameters ] add entries to the stack based on the given selection criteria
setdata, value, [elements, index ] Replaces the data in a DC with the values in an IDL array
tellstack list the stack entries

Parameters for Data Retrieval and Selection
listcols lists the available search parameters. These are:
 
index            e2escan              fdnum            elevation           resolution
project          subscan              int              longitude           dateobs
file             scan                 numchn           latitude            bandwidth
extension        polarization         sig              lst                 exposure
row              plnum                cal              centfreq            tsys
source           ifnum                sampler          restfreq            nsave
procedure        feed                 azimuth          velocity

>>> Using Data Containers <<<
add, [in1, in2, out] adds DC's based on indices. out = in1+in2
copy, in, out copies a data container to a new index
divide, [in1, in2, out] out=in1/in2
move, in, out moves a data container to a new index
multiply, [in1, in2, out] out=in1*in2
subtract, [in1, in2, out] out=in1-in2

>>> Getting Information about Scans and Files <<<
header, [dc] Show the record header
list, [start, finish, sortcol, /keep, parameters ] list records from the input data file
ls, [pattern, *options*] list FITS files (default) or any other files in the directory
nregions, [ /keep ] returns the number of records in the input or output file
scan_info(scan, [ /keep ]) returns some info such as num IFs, num integrations, etc.
summary Gives a summary of scans in the input file
table, [index, brange, erange ] list data in tabular form

SELECT Examples:

Integer Search

  select, index=10                 ; selects one index
  select, index=[10,14,17,18]      ; selects a list of indices
  select, index='10:15,20:23'      ; selects the given ranges
  select, index=':30'              ; selects indices less than 30

Float Search

  select, tsys=33.26                ; selects values between 33.255 and 33.265
  select, tsys='33.0:38.0'          ; selects the range 33-38 K
  select, tsys=':45.0'              ; selects based on Tsys < 45.0K

String Search

  select, source='NGC1068'                 ; select based on single string value
  select, source=['NGC1068', 'NGC1069']    ; select from a list of strings
  select, source='NGC*'                    ; wildcards permitted at beginning and end of string

Plotter Operations

annotate, x, y, text, [ color, charsize, /normal, /noshow ] Add text annotation to a plot
bdrop, nchan Drop initial channels from spectrum display
chan Set x-axis units to channels
chantox(chans, [ type, dc ]) returns x-values for given list of channels
clearannotations, [ /noshow ] Clear annotations
clearmarks, [ /noshow ] Clear marks (the "+" markers)
clearoplots, [ index ] Clear overplots
clearoshows Clear oshows
clearovers Clear oshows and oplots
clearvlines, [ /noshow ] Clear vlines
click([ frame, veldef, /nocrosshair, /noshow, label ]) Returns position of a mouse click
crosshair Toggle crosshair cursor
edrop, nchan Drop end channels from spectrum display
freex sets the X-axis range to autoscale
freexy sets X- and Y-axis to autoscale (equivalent to unzoom)
freey sets the Y-axis range to autoscale
freeze Freeze the plotter, i.e. set auto update off
freq Set the x-axis units to frequency
gbtoplot, x, y, [ color, /chan, index ] overplot a set of x,y points
oshow, [dc, color ] Overlay spectrum on the displayed plot
print_ps, [ filename, device, /portrait ] Send the plot to the printer
setabsrel, absrel sets x-axis in Absolute (absrel='Abs') or Relative (absrel='Rel') units
setframe, frame sets reference frame for x-axis
setmarker, x, y, [ text ] places a marker on the plot at the desired location
setveldef, veldef sets velocity definition for x-axis
setvoffset, voffset, [ veldef ] sets the offset velocity
setx, [x1, x2] sets the range on the X-axis
setxunit, unit sets the units for the x-axis
setxy, [xmin, xmax, ymin, ymax] sets the range on the X- and Y-axes.
sety, [y1, y2] sets the range on the Y-axis
show, [dc, /postscript, filename, /reshow, /defaultx, /portrait, color ] displays a data container on the plotter
toggleovers toggles overlays
unfreeze Unfreeze the plotter, i.e. set auto update on
unzoom, [ /onestep ] unzoom the plot
velo Set the x-axis units to velocity
vline, x, [ ylabel, label, /noshow, /ynorm ] draw a vertical line on the plot
write_ascii, [ filename, /prompt, brange, erange ] writes the data in PDC to an ASCII file
write_ps, [ filename, /portrait ] writes the displayed plot to a postscript file
xtochan(xvalues, [ dc ]) returns channel number that corresponds to the given x-values
zline toggles the zero line

Analysis Procedures


>>> Averaging <<<
accum, [ accumnum, weight, dc ] Add a spectrum to the accumulator
ave, [ accumnum, /noclear, /quiet ] average data in the accumulator
avgstack, [ /noclear ] average entries in the stack
fshift, [accumnum, index, frame ] determine a shift to align in frequency
gshift, offset, [ index, /wrap, ftol, /nowelsh, /nopad ] Apply a shift to align spectra
sclear, [ accumnum ] clear the accumulator buffer
vshift, accumnum, [ index, frame, veldef, voffset ] determine a shift to align in velocity
xshift, accumnum. [ index ] determine a shift to align in current X-axis units

>>> Baselines <<<
baseline, [ nfit, modelindex, ok ] fits and subtracts a baseline from the PDC spectrum
bmodel, [ modelindex, nfit, ok ] writes a baseline model into a DC using coeffs from a previous fit
bshape, [ nfit, /noshow, modelindex, /ok, color ] fit and display a baseline as an overplot without subtracting it
bshow, [ nfit, /ok, color ] overplot the most recently fit baseline
bsubtract, [ nfit, /ok ] subtracts a baseline determined from the stored coeffs
nfit, order sets the order of the (orthogonal) polynomial to be fit
nregion, regions defines the regions to be used for a baseline fit
setregion interactive use of the cursor to define the baseline region

>>> Calibration <<<
fold, [ sig, ref, ftol ] Fold a frequency-switched scan (also done in getfs)
getfs, scan, [ ifnum, intnum, plnum, fdnum, tau, ap_eff, units, /nofold, /noweight ] Retrieves and calibrates a frequency switched scan
getnod, scan, [ ifnum, intnum, plnum, tau, tsys, ap_eff, smthoff, units, /noweight ] Retrieves and calibrates a total power nod scan pair
getps, scan, [ ifnum, intnum, plnum, fdnum, tau, tsys, ap_eff, smthoff, units, /noweight ] Retrieves and calibrates a total power position switched scan pair
getsigref, sigscan, refscan, [ ifnum, intnum, plnum, tau, tsys, ap_eff, smthoff, units, /noweight ] Retrieves and calibrates a total power position switched pair, with the user identifying the sig scan and ref scan separately
gettp, scan, [ ifnum, intnum, plnum, fdnum, /noweight ] Retrieves and calibrates a single total power scan

>>> Gaussians <<<
fitgauss, [ fit, fitrms, modelindex ] interactive procedure to fit Gaussians to the spectrum
gauss, [fit, fitrms, index, modelindex, ok, /quiet ] fits Gaussians to the spectrum, based on initial values set by procedures gregion, ngauss, gmaxiter, and gparamvalues
gmaxiter, maxiter sets max number of iterations for Gauss fitter
gparamvalues, gauss_index, values sets initial guesses for Gauss fitter
gregion, regions sets the regions used for Gauss fitter
gshow, [ modelindex, /parts, color ] displays the Gaussian fits on the plotter
ngauss, ng sets the number of Gaussians to be fit
report_gauss, [ /fits, /params ] Prints the results of a Gaussian fit on terminal

>>> Other <<<
bias, factor add a bias to the spectrum in the PDC
boxcar, width, [ index, /decimate ] Boxcar smoothing
clip, datamin, datamax, [ index ] Truncate spectrum to a min and max data value
decimate, [nchan] Decimate the spectrum by paring channels
gfft, [real_index, imag_index, /inverse, bdrop, edrop ] FFT or inverse FFT the spectrum
hanning, [ /decimate ] hanning smooth the spectrum in the PDC
header, [dc] show header information on the console
invert, [ index ] flip the data end-to-end
molecule show molecular transition frequencies on the plotter
powspec, [index] compute power spectrum of ther specified DC
recombh, [dn] compute and plot frequencies of recombination lines
replace, [bchan, echan, /zero ] replace bad data values with interpolated or zero values
scale, factor scale the spectrum in the PDC
stats, [brange, erange, /full, ret ] Provide statistics

Topic GBTIDLQuickReferenceV1pt0 . { Edit | Attach | Ref-By | Printable | Diffs | r1.10 | > | r1.9 | > | r1.8 | More }
Revision r1.10 - 17 Jun 2005 - 16:06 GMT - BobGarwood Content copyright © 1999-2007 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.

Data.GBTIDLQuickReferenceV1pt0 moved from Data.GBTIDLQuickReferenceEditedV1pt0 on 17 Jun 2005 - 16:06 by BobGarwood - put it back