GMOS IFU-1 Reduction for Target_Name


Science Dataset:

Observation UT date(s) YYYY Mon dd
Data filename prefix(es) NYYYYMMddS

**File numbers:** Adjust the file numbers and ranges, and other observation information.
**Central wavelength = 600nm**
Science 154-155 (600nm, binning x=2, y=1, 900s)
Flat 153 (600nm, binning x=2, y=1, 90s)
Arc 152 (600nm, binning x=2, y=1, 60s)
**Central wavelength = 590nm**
Science 156-157 (590nm, binning x=2, y=1, 900s)
Flat 158 (590nm, binning x=2, y=1, 90s)
Arc 159 (590nm, binning x=2, y=1, 60s)

Standard Dataset:

Adjust the information to match your standard star. See the Standard Star notebook template.

Name: Feige 6
Central Wavelength: 590nm
Observation UT date YYYY Mon dd
Data filename prefix NYYYYMMddS

Reduced File name:

Reduced Standard Star (Feige 6) ...NYYYYMMddS####.fits (590nm, binning x=2, y=1, 30s)

STEP 0: Define variables specific to this target and start parallel PyRAF session.

The directory paths are assumed to match this structure:

program_rootdir
    - calibproducts
        - standards
            - stdname_long
            - stdname_long
    - raw
    - stdname_long
        - README
        - redux
    - targetname_long
        - README
        - redux
            - night1_YYYYMMdd
            - night2_YYYYMMdd
            ...
        - products
            - night1_YYYYMMdd
            - night2_YYYYMMdd
            ...
            - all
            - science
    - targetname_long
    ...

In [ ]:
import os
import os.path

#WARNING:  Make sure that the directory structure is already in place.

# TODO: Create the directory here, would be more user-friendly.

# EDIT HERE - Target and standard names, and observation dates
targetname_long = 'SDSSJ134640.79+522836.5'
targetname_short = '134640'
night1 = 'night1_YYYYMMdd'
#night2 = 'night2_YYYYMMdd'
stdname_long = 'Feige6'

# EDIT HERE - Directories
program_rootdir = '/Volumes/Rugged2/GN-2015B-Q-50/

# EDIT HERE - File numbers and central wavelengths
observations = {
    'night1' : {
        '600nm' : {
            'sciroot' = 'SYYYYMMddS',
            'sciframes' : '154-155',
            'flatroot' = 'SYYYYMMddS',
            'flatframes' : '153',
            'arcroot' = 'SYYYYMMddS',
            'arcframes' : '152'             
            },
        '590nm' : {
            'sciroot' = 'SYYYYMMddS',
            'sciframes' : '156-157',
            'flatroot' = 'SYYYYMMddS',
            'flatframes' : '158',
            'arcroot' = 'SYYYYMMddS',
            'arcframes' : '159'
            }
    },
    #'night2' :
}
logfiles = { '600nm' = targetname_short + '600nm.log',
             '590nm' = targetname_short + '590nm.log' }
databases = { '600nm' = targetname_short + '600nm_database/',
              '590nm' = targetname_short + '590nm_database/' }



# Automatically set directories and other variables from info above.
raw_dir = os.path.join(program_rootdir,'raw')
redux_dir = os.path.join(program_rootdir, targetname_long, 'redux')
night_dirs = { 'night1' : os.path.join(redux_dir, night1),
               #'night2' : os.path.join(redux_dir, night2)
             }

Now get a PyRAF session ready. This will be needed for some interactive tasks that don't work well in the notebook.

Open an xtern or a Terminal, then:

cd '/Volumes/Rugged2/GS-2013B-Q-73/SDSSJ005918.23+002519.7/test_notebook/reduxHK'
pyraf

Then in the PyRAF session:

gemini
f2
unlearn gemini
unlearn f2
unlearn gnirs
unlearn gemtools

Get your PyRAF configured. In the PyRAF session:

iraf.f2.logfile = "HK005918.log"
iraf.f2.database = "HK005918_database/"
set rawdir = "../../../raw/"
set stdimage=imt2048
nsheaders('f2', logfile=iraf.f2.logfile)

In [ ]:
os.chdir(night_dirs['night1'])