Science Operations

Quick Reduce


The mods_quickreduce software is an IDL-based quick reduction tool which outputs sky-subtracted, wavelength-calibrated spectra. It available from all partner accounts on the mountain obsN workstations, the 64-bit OS machines, obs1, obs2.  Currently, the quick reduction pipeline can only be used to look at MODS1 data.

To run the quick reduce software:

  1. Open IDL, using the command modsidl, in a directory on obs1 or obs2 in which you have write permission and which contains the MODS file you wish to process.
    1. modsidl is a script that sets the correct paths before starting IDL.
    2. A recommended place to work is ~/Scratch/<UTdate>.
  2. Run: mods_quickreduce, ’<filename>’, [options]
    1. There are two main options one can use.
      1. /calwave  — this uses a stock wavelength calibration. This option is necessary and valid only for longslit spectra.
      2. apertures = [1,2,…N] — this tells the program which apertures/slits to work on. aperutres = [1] will reduce only the central slit segment in the segmented long-slits. The image below illustrates the ordering of the segments.
      3. mods_quickreduce, ‘mods1C.YYYYMMDD.NNNN.fits’, /calwave, apertures=[1]
      4. NOTE: If you are looking at a MOS field you also need the mms file in the directory.  The sky subtraction may have trouble if there are objects on the edges of the apertures.
      5. The output of mods_quickreduce is a file with the suffix “x2d” (mods1C.YYYYMMDD.NNNN_x2d.fits) file which can be viewed using dispMODSx2d.


Once the file is processed, the processed image can be viewed outside of IDL the resultant x2d file:

dispMODSx2d <filename>

Some of the options in dispMODSx2d are:

  1. To change the scaling, put the cursor on the image and type “s”. Then the low and high values you want, separated by a space “ “ . This is confusing as the current values are displayed within parenthesis and separated by a comma, i.e. (min,max), but this is not correct syntax for input.
  2. The output *_x2d.fits file, for long-slit mode at least, has 6 extensions:

    0 = OTF

    1 = sky subtracted

    2 = variance

    3 = sky

    4 = wavelength image

    5 = slit mask

    6 = Slit BinTable

    You can view it in ds9, but then you lose the wavelength scale.

  3. Long-Slit segments are numbered from top to bottom: