Notes on reducing OSIRIS data


These notes have been collected from working with Randy and Shelley.

  1. General:

    • Names for clarification:
      ORP-SPEC = On-line Reduction Pipeline
      CRP-SPEC = Calibration Reduction Pipeline
      ARP-SPEC = Astronomical Reduction Pipeline
    • Reducing data at Keck:
      • rlogin olowalu -l osrseng
        cd /sdata1100/osrseng/work/
        mkdir davidl
        mkdir davidl/object/
        mkdir davidl/object/DRFs/
        \cp -p randy/nova/DRFs/s050913_a007.xml davidl/object/DRFs/tmp.xml
        then work on editing the xml files
        see examples in other directories
        and read instructions below
      • to run the FRP:
        run_odrp &
        cd in your DRF directory
        osirisDropDRF "s060117_a026.xml" 1
      • to see the results:
        run_ql2

  2. FRP setup advices:

    • Classical FRP reduction xml file should include:
      + ReductionType="ARP_SPEC"
      ensure reduction type is set for more iterations
      + dataset .. .. input file(s)s here
      note you could reduce more than one file at a time
      + "Subtract Dark Frame"
      note the possibility to build a super sky (see below)
      + "Adjust Channel Levels"
      + "Glitch Identification"
      + "Spatially Rectify Spectrum"
      + "Assemble Data Cube"
      + "Clean Cosmic Rays"
    • Do not use following modules:
      - "Divide by Flat Field"
      - "Interpolate 1d"
    • For bright object, :
      * use "Remove Crosstalk"
      * do not use "Glitch Identification"
      (dlm found glitch id introduces a lot of spurious effects on the bright structures for RR data.)
    • For telluric correction
      can use aperture photometry for narrow filter or large fov
      for broad band, would require PSF fitting for small fov

  3. Examples of XML file:

    Below follow 3 examples of xml files from Shelley:
    1. Default ARP
    2. Super sky
    3. Mosaic

    1. Default ARP
      <?xml version="1.0" encoding="UTF-8"? >
      <!-- s051222_a016 --> 
      <DRF LogPath="/you_local_path_here/SPEC/DRFs"
      ReductionType="ARP_SPEC"> 
         <dataset InputDir="/you_local_path_here/SPEC/raw"
           <fits FileName="s051222_a016001.fits" /> 
           <fits FileName="s051222_a016003.fits" /> 
         </dataset> 
         <module
         CalibrationFile="/you_local_path_here/SPEC/raw/051222_a016002.fits"
            Name="Subtract Dark Frame" /> 
         <module Name="Adjust Channel Levels" /> 
         <module Name="Glitch Identification" /> 
         <module
             CalibrationFile="/you_local_path_here/calib/SPEC/rectfication/s050624_c069___infl_Hn3_050.fits"
            Name="Spatially Rectify Spectrum" /> 
         <module Name="Assemble Data Cube" /> 
         <module Name="Clean Cosmic Rays" /> 
         <module
            Name="Save DataSet Information"
            OutputDir="/you_local_path_here/reduce_v1"/> 
            </DRF> 
      
    2. "Super" sky
      • The super sky may be used to create a super dark frame as well.
      • It should be noted that making a super sky/dark using the module "Make Dark Frame" is a CRP-SPEC reduction type.
      • Example:
            <!-- make_super_sky --> 
            <DRF LogPath="/you_local_path_here/DRFs"
        	    ReductionType="CRP_SPEC">  
        	   <dataset InputDir="/you_local_path_here/SPEC/raw"
        	  Name = "sky" OutputDir="/you_local_path_here/051123/">  
             <fits
                 FileName="s051123_a013002.fits" />  
             <fits
                 FileName="s051123_a014002.fits" />  
             <fits
                 FileName="s051123_a015002.fits" />  
               </dataset>  
           <module   Name="Glitch Identification" Skip="1" />  
           <module Name="Adjust Channel Levels" Skip="0" />  
           <module
               Name="Make Dark Frame"
               OutputDir="/you_local_path_here/051123/" Skip="0"/>  
           <update
              DataSetNumber="0"
              HeaderNumber="-1">  
              <updateParameter
                Keyword="DATAFILE"
                KeywordValue="Sky_900"
                KeywordComment="Output Filename"
                KeywordType="string">  
              </updateParameter>  
           </update>  
           </DRF>  
           
    3. Mosaic Routine:
      • Here is an example XML for using the mosaic routine. The keyword value in this case specifies the offset method used to align the image (TEL:determine offsets from the telescope coordinate, AO: determine offsets from AO header info (not implemented yet), FILE: take offsets from file).
      • Here are a few parameters of mosaic you may want to be aware of. The defaults are to Sum the frames by taking an average of the frames, to shift each of the frames by rounding the shift to integer values, and to calculate the offsets from the telescope header information.
        1. mosaicdith_COMMON___SumMethod = 'AVERAGE'
          can be AVERAGE, SUM , or MEDIAN (averaging the datasets or summing them up or taking the median)
        2. mosaicdith_COMMON___ShiftMethod = 'ROUNDED'
          can be ROUNDED, BILINEAR or CUBIC for rounding the shifts to integer values (fastest), shifting the slices of a cube bilinearly or 'cubicly' (see interpolate in the idl docs).
        3. mosaicdith_COMMON___OffsetMethod = 'TEL'
          TEL:determine offsets from the telescope coordinate, AO: determine offsets from AO header info (not implemented yet), FILE: take offsets from file.
      • These methods can be changed by editing the mosaic XML file, Keyword='SumMethod' and then specify which SumMethod you prefer Keyword Value='SUM' or Keyword='ShiftMethod' and then specify which ShiftMethod you prefer Keyword Value='CUBIC' or Keyword='OFFMTD' and then specify which SumMethod you prefer Keyword Value='TEL'
      • Example:
           <!-- s051123_bmz1525_mosaic -->  
           <DRF
              LogPath="/net/hydrogen/data/projects/osiris/DRP/saw/051222/reduce_v1/DRFs"
              ReductionType="ARP_SPEC">  
              <dataset
              InputDir="/net/hydrogen/data/projects/osiris/DRP/saw/051222/reduce_v1/"
              Name="HDF BMZ1525"
              OutputDir="/net/hydrogen/data/projects/osiris/DRP/saw/051222/reduce_v1">  
             <fits FileName="s051222_a038001_datset_Hn5_100_0.fits"> </fits>  
             <fits FileName="s051222_a038002_datset_Hn5_100_1.fits"> </fits>  
             <fits FileName="s051222_a039001_datset_Hn5_100_2.fits"> </fits>  
           </dataset>  
           <module
               Name="Mosaic Dithered Frames"    
               OutputDir="/net/hydrogen/data/projects/osiris/DRP/saw/051222/reduce_v1"
               Save="1"
               SaveOnErr="0"
               Skip="0"> </module>  
          <update
               DataSetNumber="0"
               HeaderNumber="-1">  
             <updateParameter
                 Keyword="OFFMTD"
                 KeywordValue="TEL"
                 KeywordComment="Offset Method"
                 KeywordType="string"> </updateParameter>  
           </update>  
           </DRF>  
        
  4. Thank you very much to Shelley and Randy!


BACK