Skip to content

akremin/M2FSreduce_clusterreductions

 
 

Repository files navigation

M2FSreduce

Note:

  • Reduction software for Magellan M2FS spectra

  • Initially forked from Dan Gifford's OSMOSreduce package used to reduce 2.4m MDM telescope slit-mask spectra.

    • Code has been significantly altered. A few subfunctions share inspiration and lines of code from the original.
  • Code produced by Anthony Kremin for M2FS on the 6.5 Magellan-Clay telescope.

Eventually documentation for using the pipeline will be available as an IPython notebook in the docs/ subdirectory.

The code is run from a "quickreduce file." The standard quickreduce can be run from the command line with:

"-m", "--maskname":  defines the name of the mask
"-i", "--iofile":  defines the input-ouput configuration file location
"-o", "--obsfile":   defines the observation configuration file location
"-p", "--pipefile":  defines the pipeline configuration file location

The maskname can be used alone if standards for the three configuration file is used. That standard is as follows:

'./configs/obs_{maskname}.ini' './configs/io_{maskname}.ini' './configs/pipeline.ini'

The basic steps performed by the code are as follows:

  1. Define everything, load the bias files, generate any directories that don't exist.
  2. Create master bias file, Save master bias file
  3. Open all other files, subtract the master bias, save (*c?.b.fits)
  4. Stitch the four opamps together.
  5. Remove cosmics from all file types except bias (*c?.bc.fits)
  6. Use fibermaps or flats to identify apertures of each spectrum.
  7. Use fitted apertures to cut out 2-d spectra in thar,comp,science,twiflat
  8. Collapse the 2-d spectra to 1-d.
  9. Perform a rough calibration using low-res calibration lamps.
  10. Use the rough calibrations to identify lines in a higher density calibration lamp (e.g. ThAr).
  11. Fit a fifth order polynomial to every spectrum of each camera for each exposure.
  12. save fits for use as initial guesses of future fits.
  13. Create master skyflat file, save.
  14. Open all remaining types and divide out master flat, then save (*c?.bcf.fits)
  15. Create master sky spectra by using a median fit of all sky fibers
  16. Remove continuums of the science and sky spectra and iteratively remove each sky line.
  17. Subtract the sky continuum from the science continuum and add back to the science.
  18. Combine the multiple sky subtracted, wavelength calibrated spectra from the multiple exposures.
  19. Fit the combined spectra to redshfit using cross-correlation with SDSS templates.

About

Reduction software for M2FS spectra

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 97.5%
  • Python 2.4%
  • Other 0.1%