pipeline

Hectospec Reduction Tasks
Doug Mink, 2007-Sep-26

Telescope Data Center
Hectospec Image
[TDC Home]  [TDC Search] [OIR Home]

[Definitions] [Preparation] [Observation] [Reduction (Pipeline) (Software)] [Distribution] [Archiving]


Bias and Dark Files

  1. hectospec.hproc files.fits merge-
    Runs preampfix to clean up overscan region.
    mscred.ccdproc trim+ overscan+ fixpix+ to bias-subtract, trim, and remove bad pixels from all amplifiers of all files.
    hectospec.gaincorr corrects for gain variation between amplifiers. The raw files are moved to the Raw/ subdirectory, and the output files have the same names as the originals.

  2. Check bias files by running hectospec.fxstat on them.
    mscred.combine all of the bias files except those for which any amplifier stands out to an output Zero.fits file. implot it to check for missed bad columns. We have not been subtracting bias images, relying instead on overscan removal to take care of any bias signal without adding noise from individual pixels.

  3. hectospec.fxstat on dark files to check for light leaks.
    mscred.combine them to an output Dark.fits file.
    Check values using plot.implot.
    mscred.ccdproc dark+ on all data files if there is significant dark flux.

  4. hectospec.hmerge on all needed files to combine amps 1, 2, 3, and 4 to single image FITS files.

Flat Field Files

  1. hectospec.hproc files.fits merge+
    runs preampfix to clean up overscan region.
    mscred.ccdproc trim+ overscan+ fixpix+ to bias-subtract, trim, and remove bad pixels from all amplifiers of all files.
    hectospec.gaincorr corrects for gain variation between amplifiers. The raw files are moved to the Raw/ subdirectory, and the output files have the same names as the originals. hectospec.hmerge flat.*.fits combines amps 1, 2, 3, and 4 to single image FITS files.

  2. mscred.combine flats.fits Flat.fits combines multiple flat field exposures into a single file.

  3. hectospec.makeflat domeflat.fits flat.fits runs apextract.apflatten on a dome flat to create a pixel to pixel normalization file which also remove fringing, more or less.

  4. hectospec.hextract domeflat.fits apmap is run on the dome flat field which is closest to the calibration exposure; this will be used for an aperture template and to make a pixel to pixel normalization file. hsmapfix is run by hextract to shrink the width of lines in the map file so that they fit in a header keyword value string. Turn off *all* processing except extraction to produce domeflat.ms.fits.

Calibration Lamp Files

  1. hectospec.hproc comps.fits merge+
    runs preampfix to clean up overscan region.
    mscred.ccdproc trim+ overscan+ fixpix+ to bias-subtract, trim, and remove bad pixels from all amplifiers of all files.
    hectospec.gaincorr corrects for gain variation between amplifiers. The raw files are moved to the Raw/ subdirectory, and the output files have the same names as the originals. hectospec.hmerge is run to merge the four amplifiers of each comparison file to single image FITS files.

  2. hectospec.hflat comps.fits divides by the normalization image made by makeflat, removing pixel to pixel variation and fringing. The original merged, unnormalized file is saved in the ./[[norm/ directory.

  3. mscred.combine comps.*.fits Comp.fits combines multiple calibration lamp exposures into a single file.

  4. hectospec.hextract Comp.fits to extract the calibration spectra, using domeflat.ms.fits as apref. hsmapfix is run by hextract to shrink the width of lines in the map file so that they fit in a header keyword value string. Turn off *all* processing except extraction to produce domeflat.ms.fits.

  5. hectospec.hcal comp.ms.fits to calibrate the spectra of one even and one odd aperture from the calibration image. The user is expected to identify calibration lines in both spectra. The script continues by running reidentify separately on the even and odd apertures and combining the results into a single database/idcomp.ms file. dispcor comp.ms.fits is run after the spectra are calibrated, and the file without dispersion information is put in the directory Nodisp/. If a calibration already exists, set hcal.oldcal and hcal.oldcaldir to use it with reidentify, and you won't have to identify all of those lines.

Sky Flat Files

  1. hectospec.hproc skyflats.fits merge+
    runs preampfix to clean up overscan region.
    mscred.ccdproc trim+ overscan+ fixpix+ to bias-subtract, trim, and remove bad pixels from all amplifiers of all files.
    hectospec.gaincorr corrects for gain variation between amplifiers. The raw files are moved to the Raw/ subdirectory, and the output files have the same names as the originals. hectospec.hmerge is run to merge the four amplifiers of each sky flat file to single image FITS files.

  2. hectospec.hflat skyflats.fits divides by the normalization image made by makeflat, removing pixel to pixel variation and fringing. The original merged, unnormalized file is saved in the ./[[norm/ directory.

  3. hectospec.hextract skyflats.fits on a sky flat field close to the calibration spectra. This will be used for fiber transmission calibration. hsmapfix is run by hextract to shrink the width of lines in the map file so that they fit in a header keyword value string. Turn off *all* processing except extraction to produce domeflat.ms.fits.

  4. hectospec.hlin skyflats.ms.fits dispersion corrects and rebins the sky flat field spectra using
    refspec skyflat.ms.fits references="comp.ms",
    dispcor skyflat.ms.fits linearize- to add the dispersion function to the sky flat spectrum file header, and
    rvsao.sumspec skyflat.ms.fits to rebin all of the spectra to the same linear dispersion.

  5. hectospec.hscombine skyflats.ms.fits skyflat.ms.fits combines all sky flat exposures into a single set of spectra.

  6. hectospec.maketran skyflatf.ms.fits creates a fiber transmission multispec file, pixtran.ms.fits It takes the mean of specified apertures, divides every aperture by that mean, uses rvsao.sumspec to fit a low-order function to each aperture, and saves the resulting functions as spectra.

Object Files

  1. hectospec.hproc objects.fits merge+
    runs preampfix to clean up overscan region.
    mscred.ccdproc trim+ overscan+ fixpix+ to bias-subtract, trim, and remove bad pixels from all amplifiers of all files.
    hectospec.gaincorr corrects for gain variation between amplifiers. The raw files are moved to the Raw/ subdirectory, and the output files have the same names as the originals. hectospec.hmerge is run to merge the four amplifiers of each object file to single image FITS files.

  2. hectospec.hflat objects.fits divides by the normalization image made by makeflat, removing pixel to pixel variation and fringing. The original merged, unnormalized file is saved in the ./[[norm/ directory.

  3. hectospec.hcosmic objects.fits compares images from the same pointing and removes cosmic rays from each exposure. Temporary median and limit files are created and my be deleted. Nelson Caldwell developed the algorith which compares two files at a time, using statistics from the median file to figure out when to reject high pixels.

  4. hectospec.hextract objects.fits extracts the object spectra, using domeflat.ms.fits as apref. If hextract.mapfile is null (""), the mapfile name is made by adding "_map" to the spectrum file name minus ".fits".

    hectospec.hsmapfix objects.map runs an awk script on map files to shrink the length of lines file so that they fit in a header keyword value string.

  5. hectospec.hlin objects.ms.fits dispersion corrects and rebins each spectrum using
    refspec file.ms.fits references="comp.ms",
    dispcor file.ms.fits filed.ms.fits linearize- to add the dispersion function to the sky flat spectrum file header, and
    hpixshift file.ms.fits to compute the mean dispersion axis pixel shift in each image and add it to the image header
    rvsao.sumspec filed.ms.fits filer.ms.fits to rebin all of the spectra to the same linear dispersion. The orginal file is moved to ./Nodisp/.

  6. hectospec.hscombine objectsi.ms.fits objecti.ms.fits combines all exposures of a single pointing into a single set of spectra, eliminating cosmic rays in the process. If hectospec.hcosmic is used, spectra are summed, otherwise, a median or mean with some sort of cosmic ray rejection is best.

  7. hectospec.htran objects.ms.fits    Runs the following corrections on the spectra:

  8. hectospec.hsplit objects.ms.fits makes 1D spectra with all of the necessary information in their headers.
    This CL script runs a ksh script which requires that WCSTools tasks be available to a Unix ksh script.

    Each pointing is now 300 separate spectra in a separate directory.

  9. hectospec.skyproc *.fits is run in each directory of 1D spectra to scale and subtract background levels from the spectra.
    This CL script runs a ksh script which requires WCSTools and unix-iraf tasks available in Unix.
    or
  10. hectospec.hskyproc *.fits is run in each directory of 1D spectra to scale and subtract background levels from the spectra.
    This CL script runs other CL scripts and IRAF SPP tasks and is a more portable alternative to the skyproc task.

  11. rvsao.xcsao *.fits finds the redshifts of all of the object spectra. We use four templates: emission and absorption FAST templates, plus a new synthetic emission template with more blue lines and a new 90,000 km/sec absorption template made from Hectospec data.

Changes