This is a pipeline for measuring Mn stellar abundances in dwarf galaxies from medium-resolution DEIMOS spectra.
To get a local copy up and running, follow these simple steps.
Here are the main Python packages required and the versions used:
- astropy (4.0)
- matplotlib (3.2.1)
- numpy (1.18.2)
- pandas (1.0.3)
You will also need to install MOOG (the moog17scat version from Alex Ji).
Follow the usual steps to clone the repo:
git clone https://github.com/mdlreyes/SMAUG.gitWrap the FORTRAN code smooth_gauss to Python using the following:
f2py -c -m smooth_gauss smooth_gauss.fHere are the main parts of the Mn measurement pipeline:
-
Code to correct the observed spectra
- continuum_division.py: gets rid of slowly-varying continuum in observed spectrum
- get synthetic spectrum (no [Mn/H] specified) from Ivanna’s grid
- divide obs/synth
- fit spline to quotient, mask out Mn regions (and other "bad" regions)
- divide obs spectrum by spline
- wvl_corr.py: does empirical wavelength correction using Balmer lines
- continuum_division.py: gets rid of slowly-varying continuum in observed spectrum
-
Code to make synthetic spectra
- interp_atmosphere.py: given atmospheric params and [Mn/H], create *.atm file for MOOG
- run_moog.py: use MOOG to make synthetic spectrum - run 8 times, one for each line list!
- make *.par file
- specify linelist
- specify *.atm file
- splice all pieces of spectrum together into array
-
Code to do the fitting
- match_spectrum.py: prep the observed and synthetic spectra for fitting
- open observed spectrum
- interpolate and smooth synth spectrum to match wavelength array & resolution of observed spectrum
- chi_squared.py: actually fit the observed spectrum with synthetic spectra
- calculate chi-square value
- minimize chi-square ([Mn/H] is free parameter)
- output_mn.py: run chi_squared.py on all stars in a folder
- output_mn_mpi.py: same as output_mn.py, but using multiprocessing to make it faster
- match_spectrum.py: prep the observed and synthetic spectra for fitting
Mia de los Reyes - @MiaDoesAstro - mdelosre@caltech.edu
Project Link: https://github.com/mdlreyes/SMAUG