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

Examples of using CLASS Beta

  Main     Usage     Examples     Requests     Updates  


The following example uses data from a test observation. See Regression Test for details.

Run gbt2class

Create a Class binary called 'test.dat' in your working directory from scan 52 of project TREG_040207:

>gbt2class /home/gbtdata/TREG_040207 test.dat --scans=52

Starting Class Converter
converting scan#: 52
entry to be written to class: GBT-A9-0
entry to be written to class: GBT-A9-1
entry to be written to class: GBT-A9-2
entry to be written to class: GBT-A9-3
entry to be written to class: GBT-A9-4
entry to be written to class: GBT-A9-5
entry to be written to class: GBT-A13-0
entry to be written to class: GBT-A13-1
entry to be written to class: GBT-A13-2
entry to be written to class: GBT-A13-3
entry to be written to class: GBT-A13-4
entry to be written to class: GBT-A13-5
Finished Class Converter

Setup class env. and run

For more details on using class at Green Bank, see UsingClass

>export GAG_SYS=linux-intel
>export GAG_ROOT=/home/apps/CLASS
>export PATH="$GAG_ROOT/$GAG_SYS/bin:"$PATH
>class
W-SIC_GTLGTR,  No local logical name table
I-SIC_GTLGTR,  No user defined logical name table
I-SIC,  X-Window mode active
Procedures in /users/pmargani/183202/
Default macro extension is .class
LAS>

View converted scan header

Open the Class Binary file we've created, get the first entry, and view it's header information.

LAS> file in test.dat
 I-CONVERT,  File is  [EEEI to IEEE]
I-INPUT,  test.dat successfully opened
LAS> find
I-FIND,  12 observations found
LAS> list
I-LISTE,  Current index :
     1;  1 NGC5448      F:1420.405 GBT-A9-0     0.0       0.0   Eq    52
     2;  1 NGC5448      F:1420.405 GBT-A9-1     0.0       0.0   Eq    52
     3;  1 NGC5448      F:1420.405 GBT-A9-2     0.0       0.0   Eq    52
     4;  1 NGC5448      F:1420.405 GBT-A9-3     0.0       0.0   Eq    52
     5;  1 NGC5448      F:1420.405 GBT-A9-4     0.0       0.0   Eq    52
     6;  1 NGC5448      F:1420.405 GBT-A9-5     0.0       0.0   Eq    52
     7;  1 NGC5448      F:1420.405 GBT-A13-0     0.0       0.0   Eq    52
     8;  1 NGC5448      F:1420.405 GBT-A13-1     0.0       0.0   Eq    52
     9;  1 NGC5448      F:1420.405 GBT-A13-2     0.0       0.0   Eq    52
    10;  1 NGC5448      F:1420.405 GBT-A13-3     0.0       0.0   Eq    52
    11;  1 NGC5448      F:1420.405 GBT-A13-4     0.0       0.0   Eq    52
    12;  1 NGC5448      F:1420.405 GBT-A13-5     0.0       0.0   Eq    52
LAS> get f
I-GET,  Entry 1 Observation 1; 1 Scan 52
LAS> header
     1;  1 NGC5448      F:1420.405 GBT-A9-0 O: 09-FEB-2004 R: 22-MAR-2004
RA: 14:02:24.423  DEC:  49:08:51.26  (2000.0) Offs:    0.0         0.0    Eq
Unknown   Tau:   0.000      Tsys:   1.000      Time:  0.1668      El:  20.76
N: 16384  I0:   8192.           V0:   2000.      Dv: -0.6441      Hel.
          F0:   1420.40503      Df: -3.0518E-03  Fi:   0.00000000
B_ef:   0.000      F_ef:   0.000      G_im:   0.000
H2O :   0.000      Pamb:   0.000      Tamb:   0.0 Tchop:   0.0 Tcold:   0.0
Tatm:   0.0  Tau:   0.000      Tatm_i:   0.0  Tau_i:   0.000
    52


View the Data.

Plot the data in velocity and frequency space.

LAS> set format long
LAS> dev xland w
I-X,  X-Window default version $Revision: 1.6 $ $Date: 2004/04/16 14:29:12 $
I-X,  Device DISPLAY :0.0
I-X,  Screen characteristics 24 planes, TrueColor
I-X,  Backing Store NOT supported
I-X,  Vendor The XFree86 Project, Inc; release 40300000
I-X,  Protocol X11 ;revision: 0
I-X,  Screen size (mm) : height: 271, width: 374
I-X,  Screen pixels : height: 1024, width: 1280
W-X,  B&W Window, dithering used for images
Graphics device /dev/tty successfully defined as a XLANDSCAPE WHITE
LAS> set unit f
LAS> plot
S-CHAR,  Fonts loaded

You should have a plot that looks like this.

Analyze in Class

The above scan was an Off in an OffOn scan, and if we used gbt2class to get the On scan converted to Class as well, we could do the following:

LAS>FILE IN "test.dat"      [read in the file of interest]
LAS>FIND                    [put all data into memory]
LAS>GET F                   [get the first scan]
LAS>PLOT                    [plot it, this can be ignored]
LAS>EXAMINE RX              [look at the data in the x register, ignorable]
LAS>EXAMINE RY              [look at the data in the y register, get array size]
LAS>DEFINE REAL YY[256]     [make an array, "YON", which has 256 elements]
LAS>LET YON = RY            [put the data in the Y register into the YON array]
LAS>EXAMINE YON             [examine the new array, this can be ignored]
LAS>GET N                   [get the next scan]
LAS>PLOT                    [plot the data - again, this is ignorable]
LAS>EXAMINE RY              [look at the data in the y register, get array size]
LAS>DEFINE REAL YOFF[256]   [make an array, "YOFF", which has 256 elements]
LAS>LET YOFF = RY           [put the data in the Y register into the YOFF array]
LAS>DEFINE REAL YREAL[256]  [make an array, "YREAL", which has 256 elements]
LAS>LET YREAL = YON-YOFF    [Put (YON - YOFF) in YREAL.  Do NOT use spaces]
LAS>EXAMINE YREAL           [Examine the new array]
LAS>LET RY = YREAL          [put the YREAL array into the y register]
LAS>PLOT                    [plot the data in the y register]

Topic ClassBetaExamples . { Edit | Attach | Ref-By | Printable | Diffs | r1.6 | > | r1.5 | > | r1.4 | More }
Revision r1.6 - 16 Apr 2004 - 14:29 GMT - PaulMarganian
Parents: ClassBetaUsage
Content copyright © 1999-2007 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.