GBT_IDL DATA REDUCTION PACKAGE V3.2

This page was created by the IDL library routine mk_html_help. For more information on this routine, refer to the IDL Online Help Navigator or type:

     ? mk_html_help

at the IDL command line prompt.

Last modified: Wed Nov 17 10:31:39 2004.


List of Documents


List of Routines


Routine Descriptions

A91

[Next Routine] [List of Routines]
   a91.pro   Flag in channels the position of the H91alpha, He91alpha, and C91alpha
   -------   recomb lines for jn04 setup

(See idl/a91.pro)


A92

[Previous Routine] [Next Routine] [List of Routines]
   Flag in channels the position of the 
   -------   recomb lines for pn1 setup

(See idl/a92.pro)


ACCUM

[Previous Routine] [Next Routine] [List of Routines]
  accum.pro   accumulates weighted data buffer 3 as in Unipops
  ---------
              weight is tintg/(Tsys)**2 for data
                        tintg           for Tsys

(See idl/accum.pro)


ADD

[Previous Routine] [Next Routine] [List of Routines]
   add.pro         add a record number to the stack  
   ----------        
                      IDL does NOT like ADD as a .pro name

(See idl/add.pro)


ADDEM

[Previous Routine] [Next Routine] [List of Routines]
   addem.pro         adds record numbers to the STACK
   ----------        
                      IDL does NOT like ADD as a .pro name

(See idl/addem.pro)


ATTACH

[Previous Routine] [Next Routine] [List of Routines]
   attach.pro   attach file to IDL system
   ----------   file must already exist or procedure returns an error

            ==> attach,filetype,filename   if no filetype input a menu is printed
                ........................  <=  construction useful for batch mode
                attach,1          can specify filetype by integer or string
                attach,'ONLINE'   both these commands do the same thing

                important to leave these units CLOSED in the context of this
                package.  hence, for the nonce, the klugy open/close code...

            ==> attach,filetype,filenam,nsave_log_file name <= construction for NSAVE
                ...........................................            

(See idl/attach.pro)


AVE

[Previous Routine] [Next Routine] [List of Routines]
  ave.pro  compute the weighted average of accum buffer 3
  -------  compute weighted Tsys 
           store result in buffer 4

(See idl/ave.pro)


AVGNS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       AVGNS

   avgns.pro   ACCUM and AVE the NSAVE records in the STACK
   ---------

(See rtr/avgns.pro)


AVGSTK

[Previous Routine] [Next Routine] [List of Routines]
   avgstk.pro   ACCUM and AVE the records in the STACK
   ----------

(See idl/avgstk.pro)


AVLOG

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       AVLOG

   avlog.pro   Print average information for NSAVE data records 
   ---------   Syntax: avlog,ns1,ns2
               Similar to nslog but gives more related to daily
               averages
               list only nsaves between ns1 & ns2

(See rtr/avlog.pro)


AZXX

[Previous Routine] [Next Routine] [List of Routines]
   azxx.pro    sets system flag to display AZIMUTH on x-axis
   --------

(See idl/azxx.pro)


B

[Previous Routine] [Next Routine] [List of Routines]
   b.pro   fit polynomial baseline of order nfit to data in nregion zones 
   ------  does the fit automatically, thus all relevant parameters must be set
           neither a baseline model nor the resulting baseline subtracted spectrum
           is plotted

(See idl/b.pro)


B115

[Previous Routine] [Next Routine] [List of Routines]
   b115.pro   Flag in channels the position of H115 beta
   -------   recomb lines for pn1 setup
             9 feb 04 rewritten to ensure that only flags within current display
                      are drawn

(See idl/b115.pro)


B116

[Previous Routine] [Next Routine] [List of Routines]

   Flag in channels the position of the 
    center freq 8210  He++ O++ 147 alpha, 116beta 
   -------   recomb lines for pn1 setup
ro b116

(See idl/b116.pro)


BAM

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       BAM

   bam.pro   ACCUM and AVE the records in the STACK
   -------   Displays each scan pair and offers option
             of deleting it from the average (i.e. no ACCUM)              
             Syntax: bam 

(See rtr/bam.pro)


BB

[Previous Routine] [Next Routine] [List of Routines]
   bb.pro   fit polynomial baseline of order nfit to data in nregion zones 
   ------   uses IDL poly_fit.  BBB is *much* better

(See idl/bb.pro)


BBB

[Previous Routine] [Next Routine] [List of Routines]
   bbb.pro   Fit polynomial baseline of order nfit to data in nregion zones 
   -------   written by J.G. Lyon, Feb. 2004

(See idl/bbb.pro)


BIAS

[Previous Routine] [Next Routine] [List of Routines]
   bias.pro   Displace spectrum in  !b[0].data by y_offset 
   --------

(See idl/bias.pro)


BMARK

[Previous Routine] [Next Routine] [List of Routines]
 bmark.pro   draw nregion boxes +/- 1.5 sigma from displayed mean for a 3 sigma band
 ---------  

(See idl/bmark.pro)


BOXCAR

[Previous Routine] [Next Routine] [List of Routines]
   boxcar.pro   boxcar smoothing function 
   ----------   

(See idl/boxcar.pro)


BSEARCH

[Previous Routine] [Next Routine] [List of Routines]
   bsearch.pro   Fit baselines with polynomials of order 0 to 100
   -----------   Pop up graphics window and plot RMS of fit vs
                 polynomial order
                 nmax is maximum order to plot -- nmax=100 is default

(See idl/bsearch.pro)


CAT

[Previous Routine] [Next Routine] [List of Routines]
   cat.pro   list contents of STACK  catalog
   -------

(See idl/cat.pro)


CATNS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       CATNS

   catns.pro   List contents of STACK  catalog of NSAVE records
   ---------   Uses the AVLOG format.

(See rtr/catns.pro)


CCC

[Previous Routine] [Next Routine] [List of Routines]
   ccc.pro   Procedure to invoke cursor and return its position in PLOT units
   -------   rdplot from Astrolib and is a full screen cursor 
  
             Syntax: ccc,xpos,ypos

(See idl/ccc.pro)


CGBT_WIN

[Previous Routine] [Next Routine] [List of Routines]
   cgbt_win.pro   create a plot window tailored to the GBT data reduction system
   ------------   this one is for continuum data 

(See idl/cgbt_win.pro)


CHAN

[Previous Routine] [Next Routine] [List of Routines]
   chan.pro    sets system flag to display channels on x-axis
   --------

(See idl/chan.pro)


CLEARSET

[Previous Routine] [Next Routine] [List of Routines]
   clearset.pro   initializes SELECT variables to wild card values
   ------------   does NOT alter record or scan search ranges
                  use SETREC and SETRANGE to do this

(See idl/clearset.pro)


CLOSE_DATAFILE

[Previous Routine] [Next Routine] [List of Routines]
   close_datafile   close the ONLINE and OFFLINE data files
   --------------   useful when i/o error occurs during IDL session
                    IDL doesn't care if you close an already closed 
                    unit so close them both for simplicity

(See idl/close_datafile.pro)


CLRSTK

[Previous Routine] [Next Routine] [List of Routines]
  clrstk.pro   empty stack  N.B. EMPTY is an IDL defined variable
  ---------

(See idl/clrstk.pro)


CMARKER

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       CMARKER

   cmarker.pro   Plots line id flags for input receiver, nrx1.
   -----------   Syntax: cmarker,nrx1

(See rtr/cmarker.pro)


COMMENT

[Previous Routine] [Next Routine] [List of Routines]
   comment.pro   writes a string into !b[0].history for annotation
   -----------   msg_max character maximum from {gbt_data}  
                 routine truncates to fit
            ==>  OVERWRITES previous contents in !b[0].history <==

(See idl/comment.pro)


CONDAR

[Previous Routine] [Next Routine] [List of Routines]
   condar   Start looking at continuum data: Reads SDFITS DCR continuum data file 
   ------   and uses changes in parameters to parse data into discrete continuum
            data records 

(See idl/condar.pro)


CONT

[Previous Routine] [Next Routine] [List of Routines]
   cont.pro   switch to the CONTinuum data reduction system
   --------

(See idl/cont.pro)


CONTINFO

[Previous Routine] [Next Routine] [List of Routines]
   continfo   Scan SDFITS continuum data file and determine the number
   --------   of continuum data points per record.  Prompts for filename 
              if none is input. Uses changes in scan number, polarization,           
              scan type, and sequence number to flag new data records.
              Note that different continuum observing procedures, e.g.
              PEAK, FOCUS, etc. will have different number of data points.                      

(See idl/continfo.pro)


COPY

[Previous Routine] [Next Routine] [List of Routines]
   copy,bin,bout   copy buffer bin into buffer bout
   -------------

(See idl/copy.pro)


CUROFF

[Previous Routine] [Next Routine] [List of Routines]
   curoff.pro   turn the cursor OFF for various input
   ---------

(See idl/curoff.pro)


CURON

[Previous Routine] [Next Routine] [List of Routines]
   curon.pro   turn the cursor ON for various input
   ---------

(See idl/curon.pro)


DATE

[Previous Routine] [Next Routine] [List of Routines]
   date.pro   prints information on date of observation
    -------   based on !b[0].date value

(See idl/date.pro)


DAZE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       DAZE

   daze.pro   ACCUM and AVE the NSAVEs in the STACK
   --------   Displaying each NSAVE and offer option
              of deleting it from the average (i.e. no ACCUM)              
              Syntax: daze

(See rtr/daze.pro)


DCOFF

[Previous Routine] [Next Routine] [List of Routines]
   dcoff.pro   turn the DC subtraction OFF when SHOWing TP spectra
   ---------

(See idl/dcoff.pro)


DCON

[Previous Routine] [Next Routine] [List of Routines]
   dcon.pro   turn the DC subtraction ON when SHOWing TP spectra
   ---------

(See idl/dcon.pro)


DCSUB

[Previous Routine] [Next Routine] [List of Routines]
   dcsub   Subtract DC offset defined by mean of the inner 90% of the spectrum
   -----   from buffer 0   !b[0]

(See idl/dcsub.pro)


DECX

[Previous Routine] [Next Routine] [List of Routines]
   decx.pro    sets system flag to display DECLINATION on x-axis
   --------    (continuum mode only)

(See idl/decx.pro)


DEF_XAXIS

[Previous Routine] [Next Routine] [List of Routines]
  def_xaxis.pro    define x-axis units. 
  -------------    returns number of data points on axis, num_pts
                   If !chan  then x-axis is in channels      line/continuum
                      !freq                    frequency     line only
                      !velo                    lsr velocity  line only
                      !elxx                    elevation     continuum only
                      !azxx                    azimuth              "   "
                      !raxx                    right ascension      "   "
                      !decx                    declination          "   "

(See idl/def_xaxis.pro)


DISP

[Previous Routine] [Next Routine] [List of Routines]
   disp.pro   DISPlay: SHOW buffer n and RESHOW buffer m
   --------

(See idl/disp.pro)


DISPLAY

[Previous Routine] [Next Routine] [List of Routines]
   display.pro   This is a Coyote procedure to initialize TV.
   -----------   not used at present in this package

(See idl/display.pro)


DIV

[Previous Routine] [Next Routine] [List of Routines]
   div.pro   !b[0].data = !b[n].data / !b[m].data
   -------   divide buffer n by buffer m
             Default:   !b[0].data = !b[1].data / !b[0].data

(See idl/div.pro)


EDITNS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       EDITNS

   editns.pro   Edit the NSAVE file
   ----------   
               
               

(See rtr/editns.pro)


ELXX

[Previous Routine] [Next Routine] [List of Routines]
   elxx.pro    sets system flag to display ELEVAION on x-axis
   --------    CONTINUUM mode only

(See idl/elxx.pro)


EPAVE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       EPAVE

   epave.pro    Make epoch average with editing capability.
   ---------    Defaults to !this_epoch or asks
                Asks to set SOURCE and LINE ID 
                Ask if you want to do a new source.
                Syntax: epave,npol
                if npol not input defaults to LCP, RCP, and L+R averages
                else npol=1 -> LL
                          2 -> RR
                          3 -> RR+LL

(See rtr/epave.pro)


FETCH

[Previous Routine] [Next Routine] [List of Routines]
   fetch,recon    Calculates the PS spectrum from TP ON/OFF records
   -----------    recon = ON data record; OFF rec# via !recs_per_scan

(See idl/fetch.pro)


FILES

[Previous Routine] [Next Routine] [List of Routines]
  files.pro   Procedure to show what files are currently being used
  ---------
              Example output:

              Files currently being used are:

              SDFITS  Data  file= ../data/jn04_d6.avg.acs.fits LUN= 104
              ONLINE  Data  file= /users/tbania/idl/data/online.gbt LUN= 102
              OFFLINE Data  file= /users/tbania/idl/data/offline.gbt LUN= 103

              Nsave file= /users/tbania/idl/data/nsave.dat LUN= 100
              NSlog file= /users/tbania/idl/data/nsave.log LUN= 101
              PLOT  file= /users/tbania/idl/figs/idl.ps

              Journal   = /users/tbania/idl/saves/journal.dat
              SAVE_state= /users/tbania/idl/saves/state.dat
              SAVE_procs= /users/tbania/idl/saves/procs.dat

(See idl/files.pro)


FIND_FILE

[Previous Routine] [Next Routine] [List of Routines]
   find_file,fname   Does this file_name exist?
   ---------------

(See idl/find_file.pro)


FLAG

[Previous Routine] [Next Routine] [List of Routines]
 flag.pro   set vertical flag at specified channel
 ---------  

(See idl/flag.pro)


FLAGOFF

[Previous Routine] [Next Routine] [List of Routines]
   flagoff.pro   turn the flag OFF for various control functions
   ---------

(See idl/flagoff.pro)


FLAGON

[Previous Routine] [Next Routine] [List of Routines]
   flagon.pro   turn the flag ON for various control functions
   ---------

(See idl/flagon.pro)


FLG_ID

[Previous Routine] [Next Routine] [List of Routines]
   flg_id.pro   set vertical flag at specified channel for line ID
   ----------   ch=x-axis value for flag   
                lab=string for flag label
                clr= sys_colour_variable_name
                Syntax: FLG_ID,channel_to_flag,'label',color
          
        colors: !black  !red    !orange   !green  !forest !yellow 
                !cyan   !blue   !magenta  !purple !gray   !white

(See idl/flg_id.pro)


FREEX

[Previous Routine] [Next Routine] [List of Routines]
  freex.pro   reset x-axis to autoscaling
  ---------

(See idl/freex.pro)


FREEXY

[Previous Routine] [Next Routine] [List of Routines]
  freexy.pro   reset x + y-axis to autoscaling
  ----------

(See idl/freexy.pro)


FREEY

[Previous Routine] [Next Routine] [List of Routines]
   freey.pro   reset y-axis to autoscaling
   ---------

(See idl/freey.pro)


FREQ

[Previous Routine] [Next Routine] [List of Routines]
   freq.pro  sets system flag to display frequency on x-axis
   --------  spectral LINE mode only

(See idl/freq.pro)


G

[Previous Routine] [Next Routine] [List of Routines]
   g.pro   multiple gaussian fit to !b[0].data  
   -----  
           this routine hardwired to fit gaussians with all initial values preset
           presumably this is done via 'gg,#gaussians_to_fit' 
           the gaussian h,c,w values for each component are in !a_gauss and
           the fitting regions is delimited by !bgauss and !egauss

(See idl/g.pro)


G131

[Previous Routine] [Next Routine] [List of Routines]
   Flag in channels the position of the 
   -------   recomb lines for pn1 setup
   center freq  8474 131Gamma,193kappa,164zeta,144delta

(See idl/g131.pro)


G132

[Previous Routine] [Next Routine] [List of Routines]
   Flag in channels the position of the 
   center freq 8280      132gamma,145delta,156eps
   -------   recomb lines for pn1 setup

(See idl/g132.pro)


GAUSS

[Previous Routine] [Next Routine] [List of Routines]
   gauss,pro   full-blown, walk through it all code to fit multiple Gaussians
   ---------   MUST subtract a baseline first
               modified by t.m.bania from astrolib? code
               Uses 'mpcurvefit' from Markwardt for curve fitting.
 
              "Options:"
              "(q) exit
              "(s) set initial parameters"
              "(d) clear and start again"
              "(f) fit"

              'Enter number of Gaussians:'
              "Click on range to fit: bgauss,egauss"
              
               For each component to fit:
              "Gaussian"
              "     Click on center" 
              "     Click on FWHM points"
              
              assumes intensity at center guess for initial fit

(See idl/gauss.pro)


GAUSS_COMPS

[Previous Routine] [Next Routine] [List of Routines]
  gauss_comps.pro    convert gaussian component fits to x-axis values 
  ---------------
                     If !chan  then x-axis is in channels
                        !freq                    frequence
                        !velo                    lsr velocity

        this code is a work in progress.  channels mode works. caveat emptor 
        for everything else

(See idl/gauss_comps.pro)


GBTRESTORE

[Previous Routine] [Next Routine] [List of Routines]
   gbtrestore.pro   RESTORES all system + local variables and 
   --------------   user defined procedures + functions from 
                    !save_idl_state  and !save_idl_procs files, respectively

(See idl/gbtrestore.pro)


GBTSAVE

[Previous Routine] [Next Routine] [List of Routines]
   gbtsave.pro   SAVES all system + local variables and user defined procedures and
   -----------   functions in !save_idl_state and !save_idl_procs files, respectively

(See idl/gbtsave.pro)


GBT_WIN

[Previous Routine] [Next Routine] [List of Routines]
   gbt_win.pro   create a plot window tailored to the GBT data reduction system
   -----------   creates the LINE graphics window

(See idl/gbt_win.pro)


GBT_XWIN

[Previous Routine] [Next Routine] [List of Routines]
   gbt_xwin.pro   create a plot window tailored to the GBT data reduction system
   ------------   uses the Marquart XFWINDOW which makes printer plots EASY
********************************************************************
NB this code does NOT work with IDL v.6.0
   in fact it hasn't worked since IDL v5.4 when IDL removed critical
   system calls instead of *installing* this beautiful procedure
********************************************************************

 CALLING SEQUENCE:
   XFWINDOW, WINDOW_INDEX, RETAIN=retain, TITLE=title, $
             XPOS=xpos, YPOS=ypos, XSIZE=xsize, YSIZE=ysize, [ /INIT ]

(See idl/gbt_xwin.pro)


GET

[Previous Routine] [Next Routine] [List of Routines]
   get,rec   copy rec# into buffer !b[0]
   -------

(See idl/get.pro)


GETNS

[Previous Routine] [Next Routine] [List of Routines]
   getns.pro   fills buffer 0 with NSAVE region specified by ns 
   ---------   either input the nsave location explicitly or use !nsave value
               if ns not input uses !nsave value
               if (!nsave_log(!nsave) eq 0) then there is no data here 

(See idl/getns.pro)


GETOFF

[Previous Routine] [Next Routine] [List of Routines]
   getoff,rec   copy rec# into buffer !b[0] and !b[6]
   ----------   This is assumed to be an OFF scan in TP mode

(See idl/getoff.pro)


GETOFFLINE

[Previous Routine] [Next Routine] [List of Routines]
   getoffline.pro   fills buffer 0 with data record from OFFLINE data file
   -------------
                   

(See idl/getoffline.pro)


GETON

[Previous Routine] [Next Routine] [List of Routines]
   geton,rec   copy rec# into buffer !b[0] and !b[5]
   ---------   This is an ON record in TP mode

(See idl/geton.pro)


GETONLINE

[Previous Routine] [Next Routine] [List of Routines]
   getonline.pro   fills buffer 0 with data record from ONLINE data file
   -------------
                   

(See idl/getonline.pro)


GET_SCAN

[Previous Routine] [Next Routine] [List of Routines]
   get_scan.pro   For a specific scan find and plot both polarizations for  
   ------------   a receiver specified by idx.  
               => Assumes <= that one has used CLEARSET and SETSCAN,scan_number 
                  to set the scan number

(See idl/get_scan.pro)


GG

[Previous Routine] [Next Routine] [List of Routines]
   gg.pro   multiple gaussian fit to !b[0].data
   ------   MUST remove a baseline first
            ---------------------------------------
            Syntax: gg,#_gaussian_components_to_fit
            Click: bgauss #_gauss(center,hw_right) egauss"
            ---------------------------------------
            if FLAGON (!flag=1) then overplot the residual=data-fit

(See idl/gg.pro)


GGG

[Previous Routine] [Next Routine] [List of Routines]
  ggg.pro    G procedure with explicit i/o
  -------    MUST have baseline removed.  Needs initial guesses for the fit.
             Returns the fits no matter what state !flag is in.

(See idl/ggg.pro)


H115

[Previous Routine] [Next Routine] [List of Routines]
   h115.pro   Flag in channels the position of H115 beta
   -------    recomb lines for Dec03 setup
              9 feb 04 rewritten to ensure that only flags within current display
                       are drawn

(See idl/h115.pro)


H91

[Previous Routine] [Next Routine] [List of Routines]
   h91.pro   Flag in channels the position of the H91alpha, He91alpha, and C91alpha
   -------   recomb lines for Dec03 setup
             9 feb 04 rewritten to ensure that only flags within current display
                      are drawn

(See idl/h91.pro)


H92

[Previous Routine] [Next Routine] [List of Routines]
   h92.pro   Flag in channels the position of the H92alpha series
   -------   recomb lines for Dec03 setup
             9 feb 04 rewritten to ensure that only flags within current display
                      are drawn

(See idl/h92.pro)


HDR

[Previous Routine] [Next Routine] [List of Routines]

 hdr.pro   prints header variables for a single GBT_DATA record
 -------   i.e. a single subcorrelator spectrum for a specific scan
           if !flag=1 then print out a full header

                  assumes that the data are in !b[0]
ro hdr,rec 

(See idl/hdr.pro)


HE3

[Previous Routine] [Next Routine] [List of Routines]
   he3.pro   Flag in channels the position of the 3-He band 
   -------   recomb lines for Dec03 setup
             9 feb 04 rewritten to ensure that only flags within current display
                      are drawn
             also valid for jun04

(See idl/he3.pro)


HEPP

[Previous Routine] [Next Routine] [List of Routines]
   hepp.pro    Flag in channels the position of the He++ O++ 146alpha, 173eta, 
   --------    194-10, 211-11, He++ O++ 146 alpha, 173eta, 194-10, 211-11
               recomb lines for pn1 setup
               center 8370 MHz

(See idl/hepp.pro)


HLINE

[Previous Routine] [Next Routine] [List of Routines]
 hline.pro   draw horizontal line at specific y-axis value
 ---------   

(See idl/hline.pro)


IDCHAN

[Previous Routine] [Next Routine] [List of Routines]
  idchan.pro    takes xaxis value and returns channel number of !xx array 
  ----------    element whose value is closest.  i.e. finds channel number
                associated with an x-axis value in one of the following 
                co-ordinate systems:
                   If !chan  then x-axis is in channels
                      !freq                    frequency 
                      !velo                    lsr velocity
                      !elxx                    elevation
                      !azxx                    azimuth
                      !raxx                    right ascension
                      !decx                    declination

(See idl/idchan.pro)


INFO

[Previous Routine] [Next Routine] [List of Routines]
 info.pro     print information for !b[0] contents
 --------     useful for debugging

(See idl/info.pro)


INIT_DATA

[Previous Routine] [Next Routine] [List of Routines]
   init_data.pro   Reads input SDFITS filled data file
   -------------   Sets parameters of the IDL GBT data structure 
 

   USEAGE:  init_data,datafile   input the name of the SDD data file 
                                 'datafile' must be fully qualified
                                 file name

(See idl/init_data.pro)


INIT_NSAVE

[Previous Routine] [Next Routine] [List of Routines]

   init_NSAVE   Initialize NSAVE files at startup.  Asks whether or not
   ----------   to use existing ~nsave.dat and ~nsave.log files or to make
                new ones with either the default, or new file names

ro init_NSAVE

(See idl/init_NSAVE.pro)


KILLWIN

[Previous Routine] [Next Routine] [List of Routines]
   killwin   kill off all the windows 

(See idl/killwin.pro)


KSR

[Previous Routine] [Next Routine] [List of Routines]
   ksr.pro   Continous version of KURSOR.             Left-click  mouse ==> KURSOR executes    
   -------                                            Right-click mouse ==> EXIT and return
             !mouse.button=1L <== left click
                           2      middle click
                           4      right click

   'Continous cursor activated:  Left-click for cursor reads; Right-click to exit'

(See idl/ksr.pro)


KURSOR

[Previous Routine] [Next Routine] [List of Routines]

   kursor.pro   Invoke cursor and read its position once.  Output x,y co-ordinates in PLOT
   ----------   units to standard output.  Return these values in xpos,ypos.  Plot this
                position and its values on graphics screen via FLAG and HLINE.  Invokes CCC.
           ==>  CURSOR is an IDL command hence this name

(See idl/kursor.pro)


LASTX

[Previous Routine] [Next Routine] [List of Routines]
   lastx.pro   Restore x-axis range to previous value
   ---------

(See idl/lastx.pro)


LASTXY

[Previous Routine] [Next Routine] [List of Routines]

   lastxy.pro   Restore x and y-axis ranges to previous values
   ---------

(See idl/lastxy.pro)


LASTY

[Previous Routine] [Next Routine] [List of Routines]

   lasty.pro   Restore y-axis range to previous value
   ---------

(See idl/lasty.pro)


LINE

[Previous Routine] [Next Routine] [List of Routines]

   line.pro   switch to the LINE data reduction system
   --------

(See idl/line.pro)


LIST

[Previous Routine] [Next Routine] [List of Routines]

   list.pro   list contents of either ONLINE or OFFLINE  data file 
   --------   for record index range start,stop 
              lists entire file is no parameters passed
              invokes REC_INFO which chooses either ONLINE or OFFLINE

              toggle between files via ONLINE / OFFLINE commands

(See idl/list.pro)


LOOK

[Previous Routine] [Next Routine] [List of Routines]

   look.pro   use STACK locations to FETCH spectra and plot them with a DC level
   --------   subtracted -- routine assumes x,y-axes are set properly

              FLAGOFF ==> !flag = 0 -->  overplot these spectra
              FLAGON  ==> !flag = 1 -->  show them individually

(See idl/look.pro)


LOOKAV

[Previous Routine] [Next Routine] [List of Routines]

   lookav.pro   select and average all receivers
   ----------   STACK must be filled. Invokes QAV.

(See idl/lookav.pro)


MAKE_CDATA

[Previous Routine] [Next Routine] [List of Routines]

   make_Cdata.pro   Create CONTINUUM data file using the {gbt_data} format.
   --------------   
                    INPUT data is from SDFITS filled data file 
                    !kon  counts number of data records currently in file
                    OUTPUT data is {gbt_data} format to specified file
                           which must then be attached via ATTACH command

                    Syntax: make_Cdata,infile,outfile
HISTORY
       written by TMB June 2004

(See idl/make_Cdata.pro)


MAKE_DATA

[Previous Routine] [Next Routine] [List of Routines]

   make_data.pro   create data file using the {gbt_data} format
   -------------   
                   INPUT data is from SDFITS filled data file 
                   !kon  counts number of data records currently in file
                   OUTPUT data is {gbt_data} format to specified file
                          which must then be attached via ATTACH command
                   Note:  Error generated if #spectral channels in INPUT
                          does not match current {gbt_data} format

                   Syntax: make_data,infile,outfile

HISTORY
       written by TMB April 2004

(See idl/make_data.pro)


MAKE_NSAVE

[Previous Routine] [Next Routine] [List of Routines]

   make_nsave.pro   create the NSAVE file using the input {gbt_data} structure 
   --------------   also create a log file flagging whether a slot has been written

                    'fdata' is data file.  please use '.dat' as suffix
                    'flog'  is log  file.  please use '.log. as suffix 

                    Syntax:  make_nsave,fdata,flog

(See idl/make_nsave.pro)


MAKE_ONLINE

[Previous Routine] [Next Routine] [List of Routines]

   make_ONLINE.pro   create ONLINE data file using the GBT data structure format
   ---------------   new data will be appended to this file via UPDATE command.

                     !kon  counts number of ONLINE data records currently in file
                     recs_per_scan is the number of subcorrelators per scan#

                     INPUT data is from SDFITS filled data file 
                     !datafile defined by init_data.pro which MUST be run
                     before make_ONLINE   -------------

                     Syntax: make_ONLINE,recs_per_scan

(See idl/make_ONLINE.pro)


MASK

[Previous Routine] [Next Routine] [List of Routines]

   mask.pro   Use NREGION information to extract x/y-axis values for 
   --------   fitting routines.
                     returns:  dsig  => rms of masked regions 
                               index => NREGION locations

                     index is used to parse the x/y-axis arrays for curve fits
                     index contains the channel numbers INSIDE the NREGIONs
                     
              Syntax: mask,dsig,index

(See idl/mask.pro)


MGAUSS

[Previous Routine] [Next Routine] [List of Routines]

   mgauss.pro   The Gaussian function required by curvefit.
   ----------   Used to fit the sum of a number of Gaussians.
                Taken from ASTROLIB.

                Syntax: mgauss,x,a,f,pder

(See idl/mgauss.pro)


MINUS

[Previous Routine] [Next Routine] [List of Routines]

   minus.pro   !b[0].data = !b[n].data - !b[m].data
   ---------   subtract buffer m from buffer n 
               Default:   !b[0].data = !b[1].data - !b[0].data
             
               Syntax: minus,n,m

(See idl/minus.pro)


MK

[Previous Routine] [Next Routine] [List of Routines]

   mk.pro   convert y-axis in Kelvins to milliKelvin scale
   ------
            Syntax: mk

(See idl/mk.pro)


MOLECULE

[Previous Routine] [Next Routine] [List of Routines]

   molecule.pro   Flag molecular lines 
   -------        for dn=0 to nMax, plus show stronger H, He lines

                  Written by G. Langston March 2004

(See /idl/idl/lines/molecule.pro)


MOLECULEREAD

[Previous Routine] [Next Routine] [List of Routines]

   moleculeRead.pro   Reads the list of molecules from a file.  W
   -------
 HISTORY
 04APR02 GIL initial version

(See /idl/idl/lines/moleculeRead.pro)


MRSET

[Previous Routine] [Next Routine] [List of Routines]

  mrset.pro    Sets NREGION mask in x-axis units.
  ---------    if !cursor=0 (CUROFF) then returns with error
               Sets beginning and ending of NREGIONs to display
               xmin,xmax
               Syntax: mrset,n,nreg

                       n is the number of nregions to set 
                       nreg is array of x-axis value pairs of (begin,end)
                       EXCEPT the first begin and last end are by
                       default the displayed xmin,xmax
 
           =>  First click is END of first NRESION <=
           =>  Last click is BEGINNING of last NREGION <=                              

(See idl/mrset.pro)


MULT

[Previous Routine] [Next Routine] [List of Routines]

   mult.pro   !b[0].data = !b[n].data * !b[m].data
   --------   multiply buffer n by buffer m
              Default:   !b[0].data = !b[1].data * !b[0].data

              Syntax: mult,n,m

(See idl/mult.pro)


NRFI

[Previous Routine] [Next Routine] [List of Routines]

  nrfi.pro    Replaces spectral region contanimated with RFI with values gotten
  --------    from a baseline fit. Must define RFI zone via either NRSET or MRSET.
              MRSET is recommended.
              Spectral values are replaced for *all* regions *outside* the NREGIONs
              which are *inside* the plotted display.
              Prompts if nfit, the order of the baseline fit, not given.
              Syntax: nrfi,nfit

(See idl/nrfi.pro)


NROFF

[Previous Routine] [Next Routine] [List of Routines]

   nroff.pro   turn flag OFF for showing BMARK regions (NREGIONS)
   ---------

(See idl/nroff.pro)


NRON

[Previous Routine] [Next Routine] [List of Routines]

   nron.pro   turn flag ON for showing BMARK regions (NREGIONS)
   --------

(See idl/nron.pro)


NRSET

[Previous Routine] [Next Routine] [List of Routines]

  nrset.pro    Sets NREGION mask in x-axis units.
  ---------    if !cursor=1 then set with the cursor: nrset,#_regions_to_set
                            else nrset,3,[1510,1790,1965,2090,2300,2475] 
                                       |=#_regions_to_set
               Syntax: nrset,n,nreg

                       n is the number of nregions to set 
                       nreg is array of x-axis value pairs of (begin,end)
                       i.e. [b1,e1,b2,e2,b3,e3, ...]

(See idl/nrset.pro)


NSLOG

[Previous Routine] [Next Routine] [List of Routines]

   nslog.pro   Print information for NSAVE data records 
   ---------    

(See idl/nslog.pro)


NSOFF

[Previous Routine] [Next Routine] [List of Routines]

   nsoff.pro   set NSAVE write protection flag OFF
   --------

(See idl/nsoff.pro)


NSON

[Previous Routine] [Next Routine] [List of Routines]

   nson.pro   set NSAVE write protection flag ON
   --------

(See idl/nson.pro)


OFFLINE

[Previous Routine] [Next Routine] [List of Routines]
   offline.pro   Choose OFFLINE data file for SELECT searches.
   -----------   Toggles boolean !ONLINE, sets !koff, !recmin, !recmax,
                 !scanmin, !scanmax.

              => Use ATTACH to change OFFLINE file.  
              => Must then issue OFFLINE to get correct file size parameters.

(See idl/offline.pro)


ONLINE

[Previous Routine] [Next Routine] [List of Routines]

   online.pro   Choose ONLINE data file for SELECT searches.
   ----------   toggles boolean !ONLINE, sets !kon, !recmin, !recmax,
                !scanmin, !scanmax.

             => Use ATTACH to change ONLINE file. 
             => Must then issue ONLINE to get correct file size parameters.

(See idl/online.pro)


ORTHOFIT

[Previous Routine] [Next Routine] [List of Routines]

   ortho_fit.pro   Function uses general orthogonal polynomial to 
   -------------   do least squares fitting.

                   THIS FUNCTION NOT NORMALLY INVOKED BY USER:
                   It is invoked by BBB and RADIOM.

                   Despite the caveat below, routine almost never
                   diverges.  It returns 'sane' fits for
                   nfit =< 100 !!!

  returns polyfit: contains information for fitting to arbitrary
  points using the recursion relations

  on return 
       cfit has coefficients of the polynomial fit = sum(m) a_m x^m
         because of round-off using this form gives unreliable
         results above about order 15 even for double precision
       rms is an array with the rms error for a polynomial fit for
       each polynomial up to order nfit 

   written by John G. Lyon, Feb. 2004 especially for this package

(See idl/orthofit.pro)


PHY_CONST

[Previous Routine] [Next Routine] [List of Routines]
                   NOT A PROCEDURE BUT A BATCH SCRIPT INVOKED AT STARTUP

   phy_const.pro   define physical constants as system variables  cgs units
   -------------   make all of them read-only with ,1 construction during definition

defsysv, '!light_c',   2.99792458D+5  ,1 ; speed of light in km/sec
defsysv, '!plank_h',   6.6260755D-27  ,1 ; Planck constant
defsysv, '!newt_g' ,   6.67259D-8     ,1 ; Newton gravitational constant dyne cm^2 gm^-2
defsysv, '!boltz_k',   1.380658D-16   ,1 ; Boltzman constant erg K-1
defsysv, '!eV2erg' ,   1.60217733D-12 ,1 ; 1 eV to ergs
defsysv, '!AU'     ,   1.4960D+13     ,1 ; AU in cm
defsysv, '!m_H'    ,   1.673534D-24   ,1 ; hydrogen mass in gm
defsysv, '!m_e'    ,   9.1093897D-28  ,1 ; electron mass in gm
defsysv, '!pc'     ,   3.0857D+18     ,1 ; pc in cm 
defsysv, '!rad_sig',   5.67051D-5     ,1 ; radiation constant in erg cm-2 s-1 K-4

 Note that it *could* be used as a procedure with slight modification.

 Gives capability of invoking physical constants in procedures:  
 e.g. !pc   !light_c

(See idl/phy_const.pro)


PLTCHDR

[Previous Routine] [Next Routine] [List of Routines]

   pltChdr.pro   ;  annotate plot with header values -- CONTINUUM version
   -----------
                ;  assumes data are in !b[0] 

(See idl/pltChdr.pro)


PLTG

[Previous Routine] [Next Routine] [List of Routines]

   pltg.pro   ;  annotate plot with gaussian fit values
   --------
              ;  assumes data are in !a_gauss

(See idl/pltg.pro)


PLTHDR

[Previous Routine] [Next Routine] [List of Routines]

   plthdr.pro   ;  annotate plot with header values
   ----------
                ;  assumes data are in !b[0] 

(See idl/plthdr.pro)


PLUS

[Previous Routine] [Next Routine] [List of Routines]

   plus.pro   !b[0].data = !b[n].data + !b[m].data
   --------
              Default:   !b[0].data = !b[0].data + !b[1].data

              Syntax: plus,n,m

(See idl/plus.pro)


PRINTOFF

[Previous Routine] [Next Routine] [List of Routines]

   printoff.pro   Closes the postscript plot file !plt_file
   ------------   If prt=1 then prints this file to a postscript device
                  Searches for env variable PSPRINTER, else uses 
                  PSprinter = 'ops4050'  -> GBT control room 

                  Use SETPRINTER to change printer assignments. 

                  Syntax: printoff,prt

(See idl/printoff.pro)


PROCS

[Previous Routine] [Next Routine] [List of Routines]

   procs.pro   Output the names of all currently compiled procedures to std out
   ---------
               ===>   BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE <===

               Text above is IDL description of itself.  This is, however,
               NOT what 'routine_info()' returns.  This IDL command
               returns the names of all procedures that have been invoked
               to date during the current IDL session.

               If these calls fail, e.g. because the routing does not exist,
               etc. THEY ARE STILL LISTED BY ROUTINE_INFO()

               Better to use IDL 'help' which lists *compiled* procedures.

(See idl/procs.pro)


PS

[Previous Routine] [Next Routine] [List of Routines]

   ps.pro    Calculates the PS spectrum from TP ON/OFF records
   ------    
             on_rec  = ON  data record # => copied to buffer 5
             off_rec = OFF data record # => copied to buffer 6
             TP spectrum copied to buffer 7

             DCON/DCOFF toggles automatic DC level subtraction          
          => Also create a TP pair using: FETCH,on_rec 
             (this assumes off_rec=on_rec-8)             
             
             Syntax: ps,on_rec,off_rec

(See idl/ps.pro)


PSPLOT

[Previous Routine] [Next Routine] [List of Routines]
 
   psplot,filename   Print a postscript file.
   ---------------   searches for env variable PSPRINTER, else uses 
                     PSprinter = 'ops4050', the GBT control room. 
                     if filename not input, 'idl' is assumed

                     filename must only be name in !plot_file
                     directory, WITHOUT the '.ps'

                     Syntax: psplot,filename

(See idl/psplot.pro)


PUTAVNS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       PUTAVNS

   putavns.pro   Save buffer 0 to NSAVE region specified by !nsave 
   -----------   Similar to PUTNS **BUT** changes scan number to NSAVE
                 slot number and offers option of overide of write protection
                 N.B. SAVE is an IDL command!

                 !nsave_log[!nsave] is 1 if the !nsave slot has been written to
                 if ( (!protectns eq 1) and (!nsave_log[!nsave] ne 0) ) then 
                 offers option of override 
                 Syntax: putavns,ns

(See rtr/putavns.pro)


QAV

[Previous Routine] [Next Routine] [List of Routines]

   qav.pro   From the existing selection criteria, fill the stack with
   -------   all matching records, both polarizations, average, and flag.
             Specify which receiver number (1->8, integer) via 'rx_num'
             If rx_num not given, prompts for input.               

             Syntax:  qav,rx_num
-
ro qav,rx_num

(See idl/qav.pro)


QLOOK

[Previous Routine] [Next Routine] [List of Routines]

   qlook.pro   Take a quick look at all the subcorrelators with appropriate flags.
   ---------   SELECTS records in STACK and executes the LOOK command.  Can be
               used for a single scan via SETSCAN.

               Syntax: qlook

(See idl/qlook.pro)


QLOOK4

[Previous Routine] [Next Routine] [List of Routines]

   qlook4.pro   For STACK contents average and display all 
   ----------   the correlator segments. 
                Pop Up a new graphics window and plot four
                plots with two polarizations each.

            =>  rx1 rx2 rx3 rx4 integers can be in any
                order with 1 -> 'rx1'
                If not passed, defaults to 2x4 plots
            =>  Return window state via WRESET command

                Syntax: qlook4,rx1,rx2,rx3,rx4

(See idl/qlook4.pro)


QQQ

[Previous Routine] [Next Routine] [List of Routines]
  qqq.pro    Uses QLOOK4 to give a quick look at a single TP on/off pair
  -------    for data taken in the 3He configuration:  8 x 2 correlators

             Syntax: qqq,scan_number

(See idl/qqq.pro)


RADIOM

[Previous Routine] [Next Routine] [List of Routines]
   radiom.pro   For STACK contents fit nfit order baseline to
   ----------   previously defined NREGIONs and calculate the 
                rms vs integration time.
                Pop Up a new graphics window and plot the
                radiometer equation.
            =>  RUN THIS PROCEDURE WITH X-AXIS IN CHANNELS
                rms values with theoretical ones calculated via TH_RMS.
            =>  Return window state via WRESET command

                Syntax: radiom,nfit    

(See idl/radiom.pro)


RAXX

[Previous Routine] [Next Routine] [List of Routines]

   raxx.pro    Sets system flag to display RIGHT ASCENSION on x-axis.
   --------    (continuum mode only)

(See idl/raxx.pro)


RECOMBALL

[Previous Routine] [Next Routine] [List of Routines]

   recombAll.pro  Flag C, N and O recombination lines 
   -------        for dn=0 to nMax, plus show stronger H, He lines

                  Written by G. Langston March 2004

(See /idl/idl/lines/recombAll.pro)


RECOMBC

[Previous Routine] [Next Routine] [List of Routines]

   recombC.pro   Flag C recombination lines 
   -------        dn=quantum jump; dn=1==\alpha,dn=2==\beta etc

                 Written by G. Langston March 2004

(See /idl/idl/lines/recombC.pro)


RECOMBH

[Previous Routine] [Next Routine] [List of Routines]

   recombH.pro   Flag H recombination lines 
   -------        dn=quantum jump; dn=1==\alpha,dn=2==\beta etc
                 
                 Written by G. Langston March 2004

(See /idl/idl/lines/recombH.pro)


RECOMBHE

[Previous Routine] [Next Routine] [List of Routines]

   recombHe.pro   Flag He recombination lines 
   -------        dn=quantum jump; dn=1==\alpha,dn=2==\beta etc
                  Z =charge state, usually Z=1

                  Written by G. Langston March 2004

(See /idl/idl/lines/recombHe.pro)


RECOMBN

[Previous Routine] [Next Routine] [List of Routines]

   recombN.pro   Flag N recombination lines 
   -------        dn=quantum jump; dn=1==\alpha,dn=2==\beta etc

                 Written by G. Langston March 2004

(See /idl/idl/lines/recombN.pro)


RECOMBO

[Previous Routine] [Next Routine] [List of Routines]

   recombN.pro   Flag N recombination lines 
   -------        dn=quantum jump; dn=1==\alpha,dn=2==\beta etc

                 Written by G. Langston March 2004

(See /idl/idl/lines/recombO.pro)


REC_INFO

[Previous Routine] [Next Routine] [List of Routines]

 rec_info.pro     Print information for a {gbt_data} data file record
 ------------     rec is the record number which is the position of 
                  the data structure in the data file 

                  ONLINE/OFFLINE toggle to ONLINE or OFFLINE data file 

                   Syntax: rec_info,rec

(See idl/rec_info.pro)


RESHOW

[Previous Routine] [Next Routine] [List of Routines]
  reshow.pro    Overplot existing plot using identical plot parameters.
  ----------
                   If CHAN !chan  then x-axis is in channels
                   FREQ !freq                    frequence
                   VELO !velo                    lsr velocity

(See idl/reshow.pro)


RFI

[Previous Routine] [Next Routine] [List of Routines]

  rfi.pro    Replaces spectral region contanimated with RFI with values gotten
  -------    from a baseline fit. 
             Prompts to define a *single*  RFI zone via MRSET,2
             Spectral values are replaced for *all* regions *outside* the NREGIONs
             which are *inside* the plotted display.
             By default nfit=9.
             Syntax: rfi

(See idl/rfi.pro)


RMS

[Previous Routine] [Next Routine] [List of Routines]

   rms.pro    Calculate rms between xmin and xmax 
   -------    CURON/CUROFF toggles how this is set

              if !cursor=1 then set with the cursor, left to right
                 else set via command line parameters xmin,xmax

           => returns: sigma = rms in current y-axis units

              Syntax: rms,sigma,xmin,xmax

(See idl/rms.pro)


RMS_MASK

[Previous Routine] [Next Routine] [List of Routines]

   rms_mask.pro    calculate RMS of data within the NREGIONs
   ------------
                  if !cursor=1 then set with the cursor
                  else set via command line parameters xmin,xmax

(See idl/rms_mask.pro)


RXID

[Previous Routine] [Next Routine] [List of Routines]

  rxid.pro   identify the transition of a band using the GBT sampler keyword 
  --------  
             initially set to rx1.1, rx1.2, rx2.1, rx2.2, etc
             where .1/.2 are polarizations .1=LCP and .2=RCP

(See idl/rxid.pro)


RXIDREC

[Previous Routine] [Next Routine] [List of Routines]

  rxidrec.pro   Identify the spectral transition of a subcorrelator band
  -----------   using the GBT sampler keyword. Sets value of 'line_id' 
                in {gbt_data}.
                Does this on a record by record basis in MAKE_ONLINE and MAKE_DATA.
           -->  'line_id' is both input and output string and takes values such as:
                'rx1.1','rx1.2','rx2.1','rx2.2', etc where .1/.2 are polarizations:
                .1=LCP and .2=RCP

(See idl/rxidrec.pro)


SCALE

[Previous Routine] [Next Routine] [List of Routines]

   scale.pro   scale !b[0].data by !fact
   ---------   If no input, uses existing !fact to scale.

               Syntax: scale,fact

(See idl/scale.pro)


SD2CGBT

[Previous Routine] [Next Routine] [List of Routines]

   sd2Cgbt.pro   converts the SD_FITS structure into the internal GBT data structure
   -----------   data structure for the CONTINUUM case 
                    ; in  is sd_fits  data structure input
                    ; out is gbt_data date structure output 
                    ; 15 April 2004 version for SDFITS gamma release

ro sd2Cgbt,in,out

(See idl/sd2Cgbt.pro)


SD_TO_GBT

[Previous Routine] [Next Routine] [List of Routines]

   sd_to_gbt.pro   Convert the SDFITS structure into the internal
   -------------   GBT data structure {gbt_data} 
                   Does this on a record by record basis at present
                      'in'  is SDFITS     data structure input sdd[]
                      'out' is {gbt_data} data structure output 
               =>  Invoked by MAKE_DATA and MAKE_ONLINE

                   For SDFITS v1.1

(See idl/sd_to_gbt.pro)


SELECT

[Previous Routine] [Next Routine] [List of Routines]
NAME:
  SELECT

   select.pro   Search either the ONLINE or OFFLINE data file and load STACK 
   ----------   with record numbers that match various selection criteria.  
                ALL searches are made on strings. Matches input string exactly.
            ==>  Currently the possible choices are: <==
                 Source Name   'W3'      !src
                 Scan type     'ON'      !typ
                 Polarization  'LL'      !pol
                 Line ID       'rx2.2'   !id
                 Scan          '1234'    !scan
                 Record Range            !recmin,!recmax  
                 Scan Range              !scanmin,!scanmax

                 ONLINE/OFFLINE
                 for !online=1 search the ONLINE  data file
                            =0 search the OFFLINE data file

(See idl/select.pro)


SELECTNS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       SELECTNS

   selectns.pro   Search the NSAVE data file and load STACK with nsave 
   ------------   locations that match various selection criteria.
                  ALL searches are made on strings. 
                  Matches input string exactly.
             ==>  Currently the possible choices are: <==
                  Source Name   'W3'           !src
                  Data  type    'JN04_D1'      !typ
                  Line ID       'HE3' 'A91'    !id
                  Polarization  'LL' 'RR'      !pol

(See rtr/selectns.pro)


SET

[Previous Routine] [Next Routine] [List of Routines]
NAME:
  SET

   set.pro   sets parameter values for selection filtering of data type
   -------   This procedure walks you through all the choices

          => LOOK CAREFULLY AT THE IDL PROMPT WHICH CHANGES
          => Input strings must NOT be delimited by quotes
          => '' or ' ' or '*' (NO QUOTES!) return sets wildcard for search 

(See idl/set.pro)


SETID

[Previous Routine] [Next Routine] [List of Routines]

   setid.pro   Sets line ID for a SELECT search of ONLINE/OFFLINE data.
   ---------   if id value not passed, prompts for string
               Syntax::  setid,"rx1.2" <-- must pass a string "*" is wildcard 

(See idl/setid.pro)


SETLINE

[Previous Routine] [Next Routine] [List of Routines]

   setline.pro   sets line ID for a SELECT search of the !gbt[] data 
   -----------   this version prompts

(See idl/setline.pro)


SETNS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       SETNS

   setns.pro   sets parameter values for selection filtering of data type
   ---------   This procedure walks you through all the choices
               Tailored for selecting on the NSAVE data file which
               normally contains processed data.

          => LOOK CAREFULLY AT THE IDL PROMPT WHICH CHANGES
          => Input strings must NOT be delimited by quotes
          => '' or ' ' or '*' (NO QUOTES!) return sets wildcard for search 

(See rtr/setns.pro)


SETPLOT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
   SETPLOT

   setplot.pro   NOT part of this package, but it is useful.
   -----------

                 Directs subsequent plot to the specified plotting device.
                 Typing SETPLOT without any parameters will give a menu of
                        available plotting devices.

                 setplot              ;Print menu of available graphics devices
                 setplot,device_n_no  ;Direct subsequent to device device_no
                 setplot,device_name  ;Set to device given by device_name
                 THICK - controls thickness of lines and characters, by setting
                         !P.CHARTHICK, !P.THICK, !X.THICK and !Y.THICK, default=1
                 For example, to make triple thickness lines on a QMS landscape plot:
            IDL->SETPLOT,'QMS',THICK=3



 PURPOSE:
   To direct subsequent plot to the specified plotting device.
	Typing SETPLOT without any parameters will give a menu of
	     available plotting devices.
	The user is informed of the subsequent plotting device.
	The user can either specify the device name or the 
	     device number.    
 CALLING SEQUENCE:
    setplot	           ;Print menu of available graphics devices
    setplot,device_no	   ;Direct subsequent to device given by device_no
    setplot,device_name   ;Set to device given by device_name
 INPUT:
 KEYWORDS:
      THICK - controls the thickness of the lines and characters, by setting
              !P.CHARTHICK, !P.THICK, !X.THICK and !Y.THICK,  default=1
              For example, to make triple thickness lines on a QMS landscape 
              plot:

                      IDL>SETPLOT,'QMS',THICK=3
 REVISION HISTORY:
    Written, W. Landsman, STX Corp. 	February, 1987
    Adapted to SUN IDL.  M. Greason, STX, August 1990
    Combined VAX and UNIX versions, N. Collins, STX, Nov. 27, 1990
    Added THICK keyword to control the plot thickness  W. Landsman Mar 1991

    Modified by Ed Murphy for his personal preferences.

(See idl/setplot.pro)


SETPOL

[Previous Routine] [Next Routine] [List of Routines]

   setpol.pro   Sets polarization for a SELECT search of ONLINE/OFFLINE data.
   ----------   if pol value not passed, prompts for string
                Syntax::  setpol,"LCP" <-- must pass a string "*" is wildcard 
                                  RCP

(See idl/setpol.pro)


SETPRINTER

[Previous Routine] [Next Routine] [List of Routines]

   setprinter,dev   select printer for hardcopy output 
   --------------   via 'setenv PSPRINTER dev'

            ==> setprinter,dev   if no device input a menu is printed
                         
                setprinter,0          can specify device by integer or string
                setprinter,'lpr'      both these commands do the same thing

        Syntax: setprinter,unit_no OR setprinter,"device_name"
                setprinter,0          can specify device by integer or string
                setprinter,'lpr'      both these commands do the same thing

          menu: 
               (0) lp0     : Boston University department office: BW'
               (1) ops4050 : GBT Control Room: BW'
               (2) telops  : GBT Control Room: color'
               (3) net     : Jansky 234: BW'
               (4) lp      : Reber 105: BW'
               (5) pslaser : Reber 105: color'
               (6) coltran : Reber 105: color transparency'
               (7) astro-hp    : University of Virginia printer'

(See idl/setprinter.pro)


SETRANGE

[Previous Routine] [Next Routine] [List of Routines]

   setrange.pro   set the scan range for a SELECT search of 
   ------------   ONLINE/OFFLINE data file. 
                  If no input, prompts for !scanmin,!scanmax

                  Syntax:  setrange,scanmin,scanmax

(See idl/setrange.pro)


SETREC

[Previous Routine] [Next Routine] [List of Routines]

   setrec.pro   Set the record range for a SELECT search of
   ----------   ONLINE/OFFLINE data file.
                If no input, prompts for !recmin,!recmax

                Syntax: setrec,recmin,recmax

(See idl/setrec.pro)


SETSCAN

[Previous Routine] [Next Routine] [List of Routines]

   setscan.pro   Set the scan number for a SELECT search of ONLINE/OFFLINE
   -----------   datafile.  If no input, prompts for scan #.

                 Syntax:  setscan,'1234'   <== sets !scan=1234  ' ' needed


(See idl/setscan.pro)


SETSOURCE

[Previous Routine] [Next Routine] [List of Routines]

   setsource.pro   set source name for for a SELECT search of the !gbt[] data
   -------------   this version prompts you 

(See idl/setsource.pro)


SETSRC

[Previous Routine] [Next Routine] [List of Routines]
   setsrc.pro   set the source name for a SELECT search of the !gbt[] data 
   ----------   
                Useage:  setsrc,'NGC3242'  <-- must pass a string  '*' is wildcard

(See idl/setsrc.pro)


SETTYPE

[Previous Routine] [Next Routine] [List of Routines]

   settype.pro   sets scan type for a SELECT search of the !gbt[] data 
   ----------   this version promps 

(See idl/settype.pro)


SETX

[Previous Routine] [Next Routine] [List of Routines]

  setx.pro   set xmin and xmax for x-axis range on SHOW
  --------    CURON/CUROFF toggles behavior:
                   if !cursor=1 then set with the cursor
                   else set via command line parameters xmin,xmax
  

(See idl/setx.pro)


SETXY

[Previous Routine] [Next Routine] [List of Routines]

   setxy.pro   Use a box cursor to set the x-axis and y-axis scaling.
   ---------    
               CURON  --> setxy
               CUROFF --> setxy,xmin,xmax,ymin,ymax

                  Click Left button to set box bottom right corner.
                  Drag Left button to move box.
                  Drag Middle button near a corner to resize box.
                  Right button when done.

(See idl/setxy.pro)


SETY

[Previous Routine] [Next Routine] [List of Routines]

  sety.pro   set ymin and ymax for y-axis range on SHOW
  --------   CURON/CUROFF toggles behavior:
                  if !cursor=1 then set with the cursor
                  else set via command line parameters ymin,ymax

(See idl/sety.pro)


SHOW

[Previous Routine] [Next Routine] [List of Routines]
NAME:
  SHOW

  show.pro    basic plot of data.  plots data and header of contents of !b[0]
  --------    
               
              If !chan  then x-axis is in channels       CHAN
                 !freq                    frequency      FREQ
                 !velo                    lsr velocity   VELO 
                 COMMANDS BELOW ARE FOR CONTINUUM DATA ONLY
                 !azxx                    azimuth deg    AZXX
                 !elxx                    elevation deg  ELXX
                 !raxx                    R.A. deg       RAXX
                 !decx                    Dec. deg       DECX

(See idl/show.pro)


SMO

[Previous Routine] [Next Routine] [List of Routines]
   smo.pro   smooth with gaussian weighting with fwhm=n in channels
   -------

(See idl/smo.pro)


SMOOTH

[Previous Routine] [Next Routine] [List of Routines]

   smooth.pro   5-channel smooth with gaussian weighting
   ----------
                uses !smgwt array  !smgwt[0] = number of channels in smgwt
                channels within this range at either end of spectrum are left intact

(See idl/smooth.pro)


SRCVL

[Previous Routine] [Next Routine] [List of Routines]

   srcvl.pro   Plots vertical flag at specified source velocity 
   ---------   ch= position of flag.  must be in current x-axis units

(See idl/srcvl.pro)


SRCVLOFF

[Previous Routine] [Next Routine] [List of Routines]

   srcvloff.pro   turn the source velocity flag line off 
   ---------

(See idl/srcvloff.pro)


SRCVLON

[Previous Routine] [Next Routine] [List of Routines]

   srcvlon.pro   turn the source velocity flag line on 
   ---------

(See idl/srcvlon.pro)


START_DAY

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       START_DAY

   start_day.pro   Prompts for daily average setup parameter
   -------------   Syntax: start_day,'D1'  
                   If argument is omitted it will prompt

(See rtr/start_day.pro)


START_EPOCH

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       START_EPOCH

   start_epoch.pro   Prompts for epoch label 
   ---------------   Syntax: start_epoch,'JN04'  
                     If argument is omitted it will prompt

(See rtr/start_epoch.pro)


START_GBT

[Previous Routine] [Next Routine] [List of Routines]

   start_gbt,SDFITS_file   INITIALIZES THIS PACKAGE
   ---------------------   
                           Creates ONLINE data file from SDFITS_file
                           Prompts for SDFITS file name if not supplied

                           Syntax: start_gbt,"fully_qualified_SDFITS_file_name"

(See idl/start_gbt.pro)


START_SRC

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       START_SRC

  start_src.pro   Make a daily average for a specific souorce.   
  -------------   Does the average for all 8 receivers.
                  Syntax: start_src,"source_name" 
                  If argument is omitted it will prompt

(See rtr/start_src.pro)


SUB

[Previous Routine] [Next Routine] [List of Routines]

   sub.pro   subtract a record number from the stack  
   -------        
             Syntax: sub,rec_#

(See idl/sub.pro)


SYMS

[Previous Routine] [Next Routine] [List of Routines]

     syms.pro   Creates a set of vectors which define basic symbols
     --------   for use in scatter plots.  See the discussion of the IDL USERSYM
                procedure, pg. B-122.  These vectors set the shape of the symbols,
                then USERSYM is called prior to plotting. 
                Written by Mike Fanelli; Modified by Ed Murphy 

          no    --  selects the desired symbol
                   1=circle   2=triangle  3=square 4=diamond
                   5=plus     6=x symbol  7=half circle
       scale    --  selects the scale factor
         ifl    --  selects the `filling 'factor' 
                    1= filled 0= empty

                Syntax:  syms,no,scale,ifl

(See idl/syms.pro)


TAGID

[Previous Routine] [Next Routine] [List of Routines]

   tagid.pro   writes a byte(string) into !b[0].line_id for annotation of 
   ---------   receiver/spectral line identification
               32 character maximum in {gbt_data}  
               routine truncates input string to fit

               If msg is passed explicitly, then must be a string 'msg'
               else system prompts for a message and no ' ' is needed

            => Overwrites !b[0].line_id 

               Syntax: tagid,"message"

(See idl/tagid.pro)


TAGPOL

[Previous Routine] [Next Routine] [List of Routines]

   tagpol.pro   writes a byte(string) into !b[0].pol_id for annotation of polarization
   ----------   4 character maximum in {gbt_data}  
                routine truncates to fit

             => Overwrites !b[0].pol_id 

(See idl/tagpol.pro)


TAGTYPE

[Previous Routine] [Next Routine] [List of Routines]

   tagtype.pro   writes a byte(string) into !b[0].scan_id for annotation
   -----------   32 character maximum in {gbt_data}  
                 routine truncates input string to fit

                 If msg is passed explicitly, then must be a string 'msg'
                 else system prompts for a message and no ' ' is needed
              => Overwrites !b[0].scan_type

                 Syntax: tagtype,"message"

(See idl/tagtype.pro)


TELLSTK

[Previous Routine] [Next Routine] [List of Routines]

   tellstk.pro   Print contents of STACK as list of record numbers
   -----------
                 TELLSTacK

(See idl/tellstk.pro)


TEMPLATE

[Previous Routine] [Next Routine] [List of Routines]
   proc.pro   
   --------   Syntax: 

(See rtr/template.pro)


TEST

[Previous Routine] [Next Routine] [List of Routines]

   procedure to parse Cintia's HII region catalog

ro test

(See idl/test.pro)


TH_RMS

[Previous Routine] [Next Routine] [List of Routines]

 th_rms.pro   Calculate theoretical rms expected from current configuration
 ----------   Pass arrays to RADIOM for comparison with empirical radiometer
              equation.

 theoretical radiometer equation 


  rms := k1*tsys/sqrt(k2*teff*npol*df);

 where

  tsys  - system temperature                in milliKelvins
  k1    - backend sampling efficiency
           k1 = 1.032 for 9-level
           k1 = 1.235 for 3-level
  k2    - autocorrelator channel weighting function         
           k2 = 1.21 for Uniform
           k2 = 2.00 for Hanning
  teff  - ton*toff/(ton + toff)  in seconds
  npol  - number of polarizations (or independent signals)
  df    - frequency resolution in Hz 

(See idl/th_rms.pro)


TMB

[Previous Routine] [Next Routine] [List of Routines]
 script to test plots

(See idl/tmb.pro)


UNMK

[Previous Routine] [Next Routine] [List of Routines]

   unmk.pro   Convert y-axis in milliKelvins to Kelvin scale via !fact=1.0e-03
   --------
 

(See idl/unmk.pro)


UPDATE

[Previous Routine] [Next Routine] [List of Routines]

   update.pro   Update ONLINE data file by appending new data to existing
   ----------   ONLINE data file.  INPUT data is from SDFITS data file.

                Assumes SDFITS datafile is being updated.

                Translates and appends new data to ONLINE data file. 
                SDFITS !datafile defined by  INIT_DATA or MAKE_DATA
                                             ---------    ---------
                !kon  counts number of ONLINE data records currently in file

(See idl/update.pro)


VELO

[Previous Routine] [Next Routine] [List of Routines]

   velo.pro    Sets system flag to display velocity on x-axis
   --------    
               CHAN/VELO/FREQ toggle x-axis display for LINE data

(See idl/velo.pro)


WHAM

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       WHAM

   wham.pro    Make daily average with editing capability.
   --------    Syntax: wham, rx_to_start, rx_to_end,  no_pols_to_process
                      if  0 parameters:  defaults to all rx's
                          1           :  sets start_rx = end_rx
                          2           :  assumes both pols to be done
                          3           :  one polarization only

(See rtr/wham.pro)


WRESET

[Previous Routine] [Next Routine] [List of Routines]

   wreset.pro   Reset window from specialized window to either LINE or 
   ----------   CONTinuum graphics window

             => Used to kill off PopUp windows from BSEARCH, RADIOM, QLOOK4

(See idl/wreset.pro)


XROLL

[Previous Routine] [Next Routine] [List of Routines]

   xroll   sets x-axis range to inner 90% of total range 
   -----   eliminates correlator filter rolloff effects 

(See idl/xroll.pro)


XX

[Previous Routine] [Next Routine] [List of Routines]

  xx.pro    renaming of SHOW procedure
  ------
               

(See idl/xx.pro)


ZLINE

[Previous Routine] [Next Routine] [List of Routines]
   zline.pro   Draw a line through zero intensity
   ---------   
               ZLON/ZLOFF toggle

(See idl/zline.pro)


ZLOFF

[Previous Routine] [Next Routine] [List of Routines]

   zloff.pro   Turn the zero line OFF:  !zline=0
   ---------

(See idl/zloff.pro)


ZLON

[Previous Routine] [List of Routines]

   zlon.pro   Turn the zero line ON:    !zline=1
   ---------

(See idl/zlon.pro)