GREAT: Data Inspection (CLASS)

Goals

  • Inspect GREAT data structure

  • Plot GREAT spectrum

  • Subtract baseline of spectrum

Introduction

This recipe is a beginner’s introduction to plotting GREAT spectra using the class utility, which is part of the GILDAS package developed by IRAM and now the standard for single-dish heterodyne spectroscopy data reduction. The goal is to take you from finding a sample data set through modifying the baseline fit, averaging, and saving the result in a fits file.

Ingredients

Data can be downloaded directly here

The data can also be downloaded from the IRSA archive by completing the following steps.

  1. Download and install class from the IRAM GILDAS homepage https://www.iram.fr/IRAMFR/GILDAS/

  2. Open the class manual in a browser tab. Also, get this useful set of tips on using class for reference: http://www.iram.fr/~gildas/demos/class/class-tutorial.pdf

  3. Find the data: [see screenshot of archive interface]

  • Go to IRSA archive and log in

  • [][1]Click “SOFIA archive”

  • Select “All Sky”

  • Enter 75_0020 in “Plan ID”

  • Use the “Instrument” pulldown menu to select “GREAT”

  • Press <search>

image1

  1. Select and download the data [see screenshot of archive search results]

  • Select the files: (2017-06-14_GR_F406_75_0020_**1**_1900536.9.great.tar, and 2017-06-14_GR_F406_75_0020_2_1900536.9.great.tar

  • Press <Prepare download> and then again <Prepare download>

  • Save the zip file to a working directory and Unzip it

image2

Procedure

  1. Load data into CLASS

  • Go to the directory where you put the zip file

  • Go to the directory where the unzipped data are:

    cd sofia_2017-06-14_GR_F406/p4897/2017-06-14_GR_F406_75_0020_2_1900536.9

  • Start class

    class

  1. Open the file with calibrated main-beam temperature spectra and list them:

    LAS> file in 2017-06-14_GR_F406_75_0020_2_1900536.9_Tmb.great

    LAS> lis in

    Input index contains:

     N;V Source       Line         Telescope      Lambda     Beta Sys  Sca Sub

     1;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.1   +152.3 Eq 20588 2

     2;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.1   +152.3 Eq 20588 6

     3;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.1   +152.3 Eq 20588 10

     4;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.1   +152.3 Eq 20588 14

etc.

  1. Get the spectra of the central pixel (0):

    LAS> set tel *0*

    LAS> fin

    I-FIND,  20 observations found

    LAS> lis

    Current index contains:

    N;V Source       Line         Telescope      Lambda     Beta Sys  Sca Sub

    1;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.1   +152.3 Eq 20588 2

    2;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.1   +152.3 Eq 20588 6

    3;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.1   +152.3 Eq 20588 10

    4;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.1   +152.3 Eq 20588 14

    5;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.1   +152.3 Eq 20588 18

    6;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.1   +152.3 Eq 20590 2

    7;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.1   +152.3 Eq 20590 6

    8;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.1   +152.3 Eq 20590 10

    9;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.2   +152.4 Eq 20590 14

    10;4 POLARIS-TELE CII_U        SOF-LFAH_0_S    +28.2   +152.4 Eq 20590 18

    71;4 POLARIS-TELE CII_U        SOF-LFAV_0_S    +26.8   +150.8 Eq 20588 2

    72;4 POLARIS-TELE CII_U        SOF-LFAV_0_S    +26.8   +150.8 Eq 20588 6

    73;4 POLARIS-TELE CII_U        SOF-LFAV_0_S    +26.8   +150.8 Eq 20588 10

    74;4 POLARIS-TELE CII_U        SOF-LFAV_0_S    +26.8   +150.8 Eq 20588 14

    75;4 POLARIS-TELE CII_U        SOF-LFAV_0_S    +26.8   +150.8 Eq 20588 18

    76;4 POLARIS-TELE CII_U        SOF-LFAV_0_S    +26.8   +150.8 Eq 20590 2

    77;4 POLARIS-TELE CII_U        SOF-LFAV_0_S    +26.8   +150.8 Eq 20590 6

    78;4 POLARIS-TELE CII_U        SOF-LFAV_0_S    +26.8   +150.8 Eq 20590 10

    79;4 POLARIS-TELE CII_U        SOF-LFAV_0_S    +26.9   +150.9 Eq 20590 14

    80;4 POLARIS-TELE CII_U        SOF-LFAV_0_S    +26.9   +150.9 Eq 20590 18

  2. Plot the first individual spectrum that was found for the central pixel. You will see the entire passband, which likely includes much more than you need to see.

    LAS> get first

    I-GET,  Observation 1; Vers 4 Scan 20588

    LAS> plot

  3. Narrow to the center of the passband near the central velocity of cloud, smooth to 0.5 km/s, and plot again. The data are now acceptable gridded and reveal the approximate range and sensitivity expected for observations of Galactic sources. The keyword “Time” in the header shows 0.28 for this individual spectrum.

    LAS> get first

    I-GET,  Observation 1; Vers 4 Scan 20588

    LAS> set unit v f

    LAS> set mode x -50 50

    LAS> pl

    LAS> smo gau 0.5

    LAS> pl

  4. Set up baseline fitting. We will do first order excluding the central portion where there could be a line.

    LAS> ge fi

    LAS> set window -50 -30 30 50

    LAS> plot

    LAS> draw win

    LAS> base /plot

  5. Write baseline-subtracted spectra to new file

    LAS> file out bsub.dat single /over

    I-FILE,  File is version 2 (record length: 1024 words)

    I-NEWPUT,  bsub.dat initialized

    LAS> write

    LAS> for j 2 to found

    LAS: get next

    LAS: plot; base /plot; draw win

    LAS: write

    LAS: next j

  6. Average the baseline-subtracted spectra from the new file, get the rms

    LAS> file in bsub.dat

    LAS> fin /all

    LAS> average /resample /nocheck cal

    LAS> smoo gau 0.5

    LAS> plot

    LAS> rms /nocheck

  7. Write final spectrum to FITS file

    LAS> fits write bsub.fits /mode spectrum

Cleaning up

Now that you have cooked this simple recipe, you should be able to expand and make the spectra you and your colleagues have been dreaming of. To get some more ideas, look at the class script in the tar file for the full reduction script that was used in generating the products and for comments and examples of how to do things with GREAT data in class.