Public Version - Mar 15, 2017 Bug report to: tiantian.yuan@anu.edu.au If you want a tutorial of how to run this code, I am happy to be contacted. MOSFIT: A set of IDL codes written to process the post-pipeline data products of MOSFIRE. This is the code that is written by Tiantian Yuan to reduce the ZFIRE data http://zfire.swinburne.edu.au/ If you decide to use this code without notifying Tiantian, then you are responsible for your own bug :). It is common knowledge that codes written by astronomers are extremely buggy, but HEY, they are handy and help you get to your science quicker ! Any publications resulting from using this code can cite this link MOSFIT: http://www.mso.anu.edu.au/~yuantt/mosfit/ What MOSFIT does: Telluric correction Flux calibration (using either spectroscopic or photometric stars) Coadd 2D spectrum of different observations Extract 2D from 1D spectra Fit emissions lines from 1D spectra Main pros include: mosrunall_example.pro => a top-level script defining paths and calling subroutines cali_telluric.pro => derive sensitivity curve (telluric absorption+instrument throughput) divid_tellu.pro => divide all data by the sensitivity curve moscali_flux.pro => derive flux calibration curve using standard stars divid_flux.pro => apply the flux calibration curve to all data fit1dmos_flux.pro => extract 1D spectra from 2D and fit significant emission lines ==== coadd_2Dexample.pro => coadd 2D spectrum of different nights; do this before you run mosrunall*.pro (spectrum can be coadd-ed in 1D too, i will supply an example soon) rename_example.csh => rename DRP output file to include slit-number (historic reasons) readslit.pro=> read target basic information from the slit design files ==== other subroutines are included in mosrunall_libpro/ need put this directory under your outpath in *mosrunall*.pro: Caution: 1. [SII] fitting are usually bad - suggest picking them out and fit them separately. 2. ALways check the fitting in the *.eps files. Fitting can be bad due to a) bad error spectrum; b) bad initial guess c) wrong model (e.g., lines with rotational curve features that can't be fit by one Gaussian, in which case you can modify the fitting functions). 3. Input tables are important (containing initial guess and user-defined features to extract 1D from 2D and to command the code to fit the lines) What MOSFIT does not include but you probable want to consider doing yourself : 1. barycentric corrections (relevant if you care about accurate redshifts and want to coadd data taken when the vector of the earth's rotational speed towards the sun is different). We have corrected for this in our ZFIRE survey (for > 10 km/s velocities). 2. flux calibration anchored to narrow/broad-band HST imaging (ideal if you want to correct for slit-loss and slit orientation effects)