Adding a Grating for an Instrument in the LowRedux Package


BACK

This page describes the effort required to modify the code to add a new grating for data reduction.

Summary from Chris Wilmer on MMT RCS

  1. 1. adding a new grating to XIDL

    This is the procedure I followed to add new grating data for XIDL. The refurbished Red Channel Spectrograph on the MMT has the choice of several gratings. Two of these are the 600-6310 and 1200-7700. The 600-6310 was already included so the present case is for 1200-7700

    To include these some of the code has to be updated: xidl/Spec/Longslit/pro/General/long_reduce_params.pro
    For this, one has to find the lines corresponding to this telescope (mmt) and instrument. The MMT FITS keyword for a grating is "DISPERSE":

    ENDIF ELSE IF strmatch(telescope, 'mmt') THEN BEGIN
    bsp = 0.72
    box_rad = 7
    PEAK_SMTH = 10.0D
    IF strmatch(detector, 'mmtblue*') then BEGIN
    grating = strcompress(sxpar(scihdr, 'DISPERSE'), /rem)
    CASE grating OF
    '300GPM': skyfile = GETENV('LONGSLIT_DIR') + $
    '/calib/sky/mmt_sky_bcs_300.sav'
    '800GPM': skyfile = GETENV('LONGSLIT_DIR') + $
    '/calib/sky/mmt_sky_bcs_800.sav'
    ELSE: message, 'ERROR: Unknown grating'
    ENDCASE
    ENDIF ELSE BEGIN
    grating = strcompress(sxpar(scihdr, 'DISPERSE'), /rem)
    CASE grating OF
    '600-6310': skyfile = GETENV('LONGSLIT_DIR') + $
    '/calib/sky/mmt_sky_rcs_600.sav'
    '1200-7700': skyfile = GETENV('LONGSLIT_DIR') + $
    '/calib/sky/mmy_sky_rcs_1200_7700_red.sav'
    ELSE: message, 'ERROR: Unknown grating', grating
    endcase

  2. Adding a new ARC solution

    One problem encountered using the Red Channel Spectrograph, was the lack of a good table of HeNeAr lines in the 9400-10300 AA region of the spectrum. At the telescope I carried out a long series of integrations of arcs that allowed me creating a "super-HeNeAr" exposure bringing out the fainter lines. This was done by co-adding the _raw_ frames. This is important since the spectral interval of the arcs and science frames must be the same (at least that is what I think is true). This description has the XIDL distribution stored in an ~/idl/ directory:

    ~/idl/xidl

    1. Create a table with wavelengths for this spectrum:

      mmt_1200_10300_shifted.lst
      ...
      9534.1629 1 Ne I
      9657.786 1 Ar I
      ...

      This is stored normally at

      ~/idl/xidl/Spec/Arcs/Lists

    2. Create the co-added 1-D spectrum:

      mmt_1200_10300_shifted.fits

    3. read spectrum and calculate the wavelength solution. The arc will be read into "spec", while "calib" will be written by x_identify

      spec = mrdfits('mmt_1200_10300_shifted',0)

      x_identify, spec, calib, linelist='mmt_1200_10300_shifted.lst',$
      lineroot='~/idl/xidl/Spec/Arcs/Lists'

    4. Once the fit is good you want to save it for later use. The naming here is being used to make it uniform with the spectra already stored in the XIDL database:

      archive_arc = spec save, archive_arc, calib,filename='mmt_red_1200_10300_shifted.sav'

    5. Place the file in

      ~/idl/xidl/Spec/Longslit/calib/

    6. Now back to reducing data using the new solution:

      long_reduce,'n1.par',linelist='mmt_1200_10300_shifted.lst',$ reid_file='mmt_red_1200_10300_shifted.sav'



Last modified 2007-5-11