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

Examples of customizing views of the Index file with list

The list command can be used to view the contents of IDL Index File. This file contains a great deal of information, so the list command can be used to view only that information that the user is interested in.


The following command shows how to create the sample data used in these examples:

   % sdfits -mode=raw -scans=177:180 -backends=acs /home/archive/test-data/tape-0002/TREG_040922

Then to access this data in gbtidl use this command:

   filein,'TREG_040922.raw.acs.fits'


In the first example, we list all the records, or spectra, currently found in the index file.

   GBTIDL -> list ; show a brief description of everything 
   #INDEX           SOURCE  SCAN PROCEDURE POL IFNUM FDNUM   INT SIG CAL
        0             W3OH   177     OffOn  XX     0     0     0   T   T
        1             W3OH   177     OffOn  XX     0     0     0   T   F
        2             W3OH   177     OffOn  XX     0     0     1   T   T
        3             W3OH   177     OffOn  XX     0     0     1   T   F
        4             W3OH   177     OffOn  YY     0     0     0   T   T
        5             W3OH   177     OffOn  YY     0     0     0   T   F
        6             W3OH   177     OffOn  YY     0     0     1   T   T
        7             W3OH   177     OffOn  YY     0     0     1   T   F
        8             W3OH   178     OffOn  XX     0     0     0   T   T
        9             W3OH   178     OffOn  XX     0     0     0   T   F
       10             W3OH   178     OffOn  XX     0     0     1   T   T
       11             W3OH   178     OffOn  XX     0     0     1   T   F
       12             W3OH   178     OffOn  YY     0     0     0   T   T
       13             W3OH   178     OffOn  YY     0     0     0   T   F
       14             W3OH   178     OffOn  YY     0     0     1   T   T
       15             W3OH   178     OffOn  YY     0     0     1   T   F
       16             W3OH   179     OffOn  XX     0     0     0   T   T
       17             W3OH   179     OffOn  XX     0     0     0   T   F
       18             W3OH   179     OffOn  XX     0     0     1   T   T
       19             W3OH   179     OffOn  XX     0     0     1   T   F
       20             W3OH   179     OffOn  YY     0     0     0   T   T
       21             W3OH   179     OffOn  YY     0     0     0   T   F
       22             W3OH   179     OffOn  YY     0     0     1   T   T
       23             W3OH   179     OffOn  YY     0     0     1   T   F
       24             W3OH   180     OffOn  XX     0     0     0   T   T
       25             W3OH   180     OffOn  XX     0     0     0   T   F
       26             W3OH   180     OffOn  XX     0     0     1   T   T
       27             W3OH   180     OffOn  XX     0     0     1   T   F
       28             W3OH   180     OffOn  YY     0     0     0   T   T
       29             W3OH   180     OffOn  YY     0     0     0   T   F
       30             W3OH   180     OffOn  YY     0     0     1   T   T
       31             W3OH   180     OffOn  YY     0     0     1   T   F


Next, we use a simple search parameter.

   GBTIDL -> list, index=[0,1,2] ; show a description of the first three records 
   #INDEX           SOURCE  SCAN PROCEDURE POL IFNUM FDNUM   INT SIG CAL
        0             W3OH   177     OffOn  XX     0     0     0   T   T
        1             W3OH   177     OffOn  XX     0     0     0   T   F
        2             W3OH   177     OffOn  XX     0     0     1   T   T


To see every piece of information about these records in the index file, use the verbose keyword.


GBTIDL -> list, index=[0,1,2], /verbose
#INDEX          PROJECT                             FILE EXT    ROW           SOURCE PROCEDURE E2ESC SUBSC  SCAN POL PLNUM IFNUM  FEED FDNUM   INT NUMCHN SIG CAL SAMPLER AZIMU ELEV    LONGITUDE     LATITUDE          LST         CENTFREQ         RESTFREQ         VELOCITY          FREQINT          FREQRES                 DATEOBS              TIMESTAMP        BANDWIDTH EXPOSURE             TSYS NSAVE
     0      TREG_040922         TREG_040922.raw.acs.fits   1      0             W3OH     OffOn     0     0   177  XX     1     0     1     0     0   8192   T   T      A9 341.6 64.2  +02 27 03.9  +62 02 25.5  +03 35 34.0  2.908873346e+13  4.765561856e+09  0.000000000e+00 -6.103515625e+03  7.385253906e+03  08:44:42.00 2004-09-23    2004_09_23_08:44:42  5.000000000e+07      5.0  1.000000000e+00    -1
     1      TREG_040922         TREG_040922.raw.acs.fits   1      1             W3OH     OffOn     0     0   177  XX     1     0     1     0     0   8192   T   F      A9 341.6 64.2  +02 27 03.9  +62 02 25.5  +03 35 34.0  2.908873346e+13  4.765561856e+09  0.000000000e+00 -6.103515625e+03  7.385253906e+03  08:44:42.00 2004-09-23    2004_09_23_08:44:42  5.000000000e+07      4.9  1.000000000e+00    -1
     2      TREG_040922         TREG_040922.raw.acs.fits   1      2             W3OH     OffOn     0     0   177  XX     1     0     1     0     1   8192   T   T      A9 341.6 64.2  +02 27 03.7  +62 02 24.9  +03 35 44.1  2.908873346e+13  4.765561856e+09  0.000000000e+00 -6.103515625e+03  7.385253906e+03  08:44:52.01 2004-09-23    2004_09_23_08:44:42  5.000000000e+07      5.0  1.000000000e+00    -1
G


Obviously, the above example is not recommended if you are only interested in the values of a few specific columns. For this reason, list can print only the columns you specify. The listcols command prints all the available columns. Note that the full name of the column must be used.

   GBTIDL -> listcols     ; what are the columns again?
   Here is the list of columns in the index file.
   These also serve as search keywords.
   Columns in spectral line index file:
   INDEX
   PROJECT
   FILE
   EXTENSION
   ROW
   SOURCE
   PROCEDURE
   E2ESCAN
   SUBSCAN
   SCAN
   POLARIZATION
   PLNUM
   IFNUM
   FEED
   FDNUM
   INT
   NUMCHN
   SIG
   CAL
   SAMPLER
   AZIMUTH
   ELEVATION
   LONGITUDE
   LATITUDE
   LST
   CENTFREQ
   RESTFREQ
   VELOCITY
   FREQINT
   FREQRES
   DATEOBS
   TIMESTAMP
   BANDWIDTH
   EXPOSURE
   TSYS
   NSAVE

   GBTIDL -> list, index=[0,1,2], columns=["INDEX","INT","POLARIZATION"]
   #INDEX   INT POL
        0     0  XX
        1     0  XX
        2     1  XX

   GBTIDL -> list, index=[0,1,2]   ; view the brief description again
   #INDEX           SOURCE  SCAN PROCEDURE POL IFNUM FDNUM   INT SIG CAL
        0             W3OH   177     OffOn  XX     0     0     0   T   T
        1             W3OH   177     OffOn  XX     0     0     0   T   F
        2             W3OH   177     OffOn  XX     0     0     1   T   T


The order in which list prints records (these are rows in the index file) is by default the order of the index number. This can be changed using the sortcol keyword. Note that the full name of the column must be used.

   GBTIDL -> list, scan=177, sortcol="INT"  ; sort by integration number
   #INDEX           SOURCE  SCAN PROCEDURE POL IFNUM FDNUM   INT SIG CAL
        0             W3OH   177     OffOn  XX     0     0     0   T   T
        1             W3OH   177     OffOn  XX     0     0     0   T   F
        4             W3OH   177     OffOn  YY     0     0     0   T   T
        5             W3OH   177     OffOn  YY     0     0     0   T   F
        2             W3OH   177     OffOn  XX     0     0     1   T   T
        3             W3OH   177     OffOn  XX     0     0     1   T   F
        6             W3OH   177     OffOn  YY     0     0     1   T   T
        7             W3OH   177     OffOn  YY     0     0     1   T   F


The liststack command is identical to the list command, it just lists the contents of the stack, not the index file. You can use the same keywords to customize your view.

   GBTIDL -> select, scan=177  ; place scan 177's records on the stack
   GBTIDL -> liststack, col=["INDEX","INT","CAL"], sortcol="CAL"
   #INDEX   INT CAL
        1     0   F
        3     1   F
        5     0   F
        7     1   F
        0     0   T
        2     1   T
        4     0   T
        6     1   T


-- PaulMarganian - 28 May 2005

Topic GBTIDLCustomizeListRecipe . { Edit | Attach | Ref-By | Printable | Diffs | r1.3 | > | r1.2 | > | r1.1 | More }
Revision r1.3 - 09 May 2006 - 20:14 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.