"Without a DRP, OSIRIS is a useless hunk of metal." -- James Larkin

To help users reduce their data, I'm collecting my thoughts and experiences as I used DRP v2.1 in June/July 2007 to reduce some of my own OSIRIS data. My dataset was taken in LGS-AO mode, KnX 35 mas scale. The data are of a classical nova. This object has a bright, point-like continuum and extended line emission. There exists a pure background region within each cube. I use a dedicated sky frame for sky subtraction. Other users subtract a dark frame and determine a sky level separately.

I will assume that the user has a working install of and some experience with the pipeline, the ODRFGUI, and Quicklook2 (QL2). I will also assume that the user has the necessary rectification matrices.

I have found that the DRP is missing a couple of features that I wanted during reduction. I have written a couple of perl scripts and some IDL code to help this situation. This is quick and dirty code and comes with no warranties. This code may change at anytime.

Additional OSIRIS code
osimglog
perl script to generate a log file for raw imager data. To use, cd to your raw image directory and type "osimglog > file".
ospeclog
perl script to generate a log file for raw spec data. To use, cd to your raw image directory and type "ospeclog > file".
o_addkey.pro
IDL code to add a keyword to your OSIRIS data. I use this on raw data. QL2 can also add keywords, but currently does not include the additional FITS extensions. Without these extensions, the DRP fails. By default, this will overwrite your file, please inspect the code. Requires o_make_filename.pro (this page) and fxaddpar (astro library).
o_skysubcorr.pro
IDL code to correct for incomplete sky subtraction. Without this step, telluric subtraction can look poor off of bright continuum sources. Requires a pure background region within the cube. By default, this will not overwrite your cube. Requires o_make_filename.pro (this page) and fxaddpar (astro library).
o_make_filename.pro
IDL function to return a string used to name output files.

Please send comments, questions, and suggestions to: . Thanks! Jim Lyke

Procedures:
  1. Start DRP, QL2, and ODRFGUI
  2. Verify Header Keywords
  3. Reduce Tellurics
  4. Reduce Object to Basic level
  5. Mosaic Object Cubes
  6. Correct Sky Subtraction
  7. Correct Telluric Absorption
  8. Next Steps


  1. Start DRP, QL2, and ODRFGUI
  2. The latest versions of these software packages are available for download on the OSIRIS Tools Page.

    All available rectification matrices are online.

    Notes
    1. I also start a separate IDL session because the DRP produces 1-d FITS files and QL2 doesn't currently handle these.
    2. For the ODRFGUI, one must "Set Calibration Directory..." and "Set Queue Directory..." via the "File" menu before beginning. Additionally, make sure the "Output Path" and "Log Path" are defined via the dedicated buttons.
    Back to Top

  3. Verify Header Keywords
  4. Note: The DRP requires certain FITS header keywords in the raw files and cubes. Without these keywords, the DRP will crash..

    1. SSCALE
    2. Spec scale. Several modules use this keyword. An occasional hiccup in the OSIRIS global server causes this keyword to be omitted. This is the reason I wrote o_addkey.pro. If this keyword is missing, you may substitute the value of "SS1NAME". The value of "SSCALE" is a string. Use o_addkey.pro to add "SSCALE" to your raw files before any reduction.
    3. Correct Dispersion
    4. This module corrects for spectral tilt caused by both the atmosphere and the AO bench. It requires the following keywords:
      1. SSCALE -- OSIRIS keyword, spectrograph scale
      2. EL -- DCS keyword, telescope elevation
      3. PA_SPEC -- OSIRIS keyword, position angle of spec detector
      4. PARANG -- DCS keyword, parallactic angle
      5. CDELT1 -- DRP keyword, wavelength step between spectral channels
      6. CRVAL1 -- DRP keyword, initial wavelength of the cube
      If your data are missing many of these keywords, you may wish to skip the Correct Dispersion module.

    Back to Top


  5. Reduce Tellurics
  6. Note: The DRP modules for telluric stars works best for A0V stars. The modules are designed to remove strong H-lines. If your telluric stars are other spectral types, you will need to remove their intrinsic features by another method. Please see the "User Community" section of the OSIRIS Post-Observing Page.

    1. Reduce using "basicARP_drfTemplate.xml"
    2. Produces a cube so you can check how well the DRP did.
    3. Examine your cube in QL2
    4. If you dithered on-chip, make sure the positive star is above the negative star. Otherwise, the telluric extraction will fail. Take numerous depth plots the star, look for hot/cold spaxels. I use the "Average" Collapse on the cube so these stick out more. If there are bad spaxels on your star, you may want to manually extract the telluric star.
    5. Reduce using "telluricARP_drfTemplate.xml"
    6. Produces a 1-d FITS file. Before saving or dropping, left-click on "Divide Blackbody". Make sure "Temperature" is set correctly for your spectral type. The default is 10000.0. I use 9480.0 for A0V.
    7. Read in your 1-d spectrum into IDL
    8. Verify that the shape of the 1-d roughly matches the QL2 depth plots of the cube. The values will be different because depth plots average the counts and the 1-d sums. Remember that the 1-d spectrum has the H-lines removed and is divided by a blackbody shape.
    9. Re-reduce using "telluricARP_drfTemplate.xml" (optional)
    10. Only if concerned about the shape. This time, skip the "Remove Hydrogen Lines" and "Divide Blackbody" modules to see if the spectral shapes of the 1-d and depth plot match more closely.
    11. Manually extract to 1-d (optional)
    12. If you're unhappy with the auto-extraction, you can manually do it. You'll need to write your own code to do so. For telluric shape, you can drop a nearly arbitrary aperture on your star. Your manually extracted 1-d spectrum still needs the FITS extensions for the DRP. Use the extensions from the auto-extracted 1-d spectrum. See the o_addkey.pro or o_skysubcorr.pro co des to see how this is done.
    13. If you manually extract to 1-d (optional)
    14. After you have a 1-d FITS file, use the "cubes_telluric_extract_drfTemplate.xml" template to get a telluric spectrum. Simply skip the "Extract Star" module. Make sure you double-check the stellar temperature set for the "Divide Blackbody" module.

    Back to Top


  7. Reduce Object to Basic level
  8. Note: I do not recommend using the "fullARP_drfTemplate.xml" because of sky subtraction issues.

    1. Reduce using "basicARP_drfTemplate.xml"
    2. Produces a cube so you can check how well the DRP did.
    3. Examine your cube in QL2
    4. Take numerous depth plots on and off the object. Look for hot/cold spaxels. I use the "Average" Collapse on the cube so these stick out more.
    5. Repeat above steps for additional object data
    6. We're getting ready to mosaic the cubes.

    Back to Top


  9. Mosaic cubes
    1. Mosaic cubes using "cubes_mosaic_drfTemplate.xml"
    2. Note that "Save Dataset" is not necessary because the "Mosaic Frames" module implicitly saves your mosaicked cube. Before saving or dropping, left-click "Mosaic Frames" to see the arguments. I had 2 cubes to mosaic in LGS mode so I selected "AVERAGE" for "Combine_Method" and "LGS" for "Offset_Method".
    3. Examine your cube in QL2
    4. Take numerous depth plots on and off the object. Compare to the individual frames.

    Back to Top


  10. Correct Sky Subtraction
    1. Examine your cube in QL2
    2. Take numerous depth plots on and off the object. I'm lucky enough in my data to have pure background in my cubes. I can directly see how well the sky was subtracted. Typical observing modes of 15 minutes on- and 15 minutes off-source mean that the sky value can change significantly from one frame to another. Remember that pixel values are in DN/sec so 0.002 DN/sec can be significant.
    3. Determine a background region
    4. If you have a background region in your field, use QL2 depth plots to determine a representative region.
    5. Subtract the representative background
    6. Use o_skysubcorr.pro to remove the residual background. Syntax will be something like: "o_skysubcorr, xreg=[3,7], yreg=[16,48]". This will popup an IDL graphics window that shows the spectrum of the background region along with the mean value and 1-sigma errors. Produces a new cube with the name "your_original_file_ssc.fits". The background region, value, and standard deviation are saved in the FITS header.
    7. Examine your new cube in QL2
    8. You should start to see the pattern that I think visual inspection of one's data is important.

    Back to Top


  11. Correct Telluric Absorption
    1. Use "cubes_telluric_correct_drfTemplate.xml"
    2. Self-explanatory, no?
    3. Examine your new cube in QL2
    4. See how well the telluric correction is. If you have pure background in your cube, pay particular attention to depth plots in this region.

    Back to Top


  12. Next Steps (Now you can do science)
    1. Visualization
    2. 3-d datacubes are amazing. We're currently working on OSRSVOL. A volume-rendering tool that permits the user to "play" with his/her data in volume space.
    3. Continuum Subtraction
    4. I have rough software that subtracts the bright continuum from my nova so that I can examine the extended line emission.
    5. Line Subtraction
    6. Perhaps you wish to remove line emission that fills the FOV?

    Back to Top