### 2006/08/23 - Inventory of routines prepared by Michael Wood-Vasey, updated by sj

File                    Purpose
---------------------------------------------------------------------------
amoebafit.pro           Finds first guess for lightcurve model parameters
auto_range.pro          Utility function to calculate plotting range
bestrest.pro            Determines the best match rest-frame passbands
checkfixedparam.pro     Determines which parameters to fit for based on 'sn.grid' file
convertprior.pro        Attempts to determine the effect of a different prior without re-fitting
cmp_avg.pro             Utility function to calculate average with optional sigma-clipping.
datamodel.pro           Called by printfitout.pro to output a file with data points and model fit info
defaultcolor.pro        Stores lookup table of the model color to use 
                             for a given restframe passband when calculating K-corrections
defaultgrid.pro         Specifies algorithm for refinement between grid iterations, links to either:
defaultgrid.orig.pro         Use this as defaultgrid.pro to use coarser grids
defaultgrid.mwv.pro          Use this as defaultgrid.pro for higher resolution grids (but it is slower)
defaultskcgx.pro        Specifies bandpass reference for MLCS2k2 template as well as the
                             Milky Way Galaxy extinction law and R_V parameter to use
defaultsrvfit.pro       Specifies the A_V threshold above which to fit R_V as well, and what fixed R_V
                             to use for low-extinction objects
defaultssnr.pro         Specifies SNR threshold below which suspect data points are flagged
dump_vectors.pro        Utility to create plain text versions of the vectors and S matrix
ebplot.pro              Utility procedure to plot with error bars.
fastccm_unred.pro       Faster version of IDL astro library routine CCM_UNRED 
fit.pro                 Main routine called to actually do the fitting
fixparam.pro            Ensure the values of the fixed parameters are set to their fixed values
forcespec.pro           Force a spectrum to have a particular color by warping it using CCM law
fullobslc.pro           Calculates an MLCS2k2 observer-frame model lightcurve from model parameters
fullrestlc.pro          Calculates an MLCS2k2 rest-frame model lightcurve from model parameters
genlc.pro               Wrapper for fullobslc.pro to create a model observer-frame light curve
getchisq.pro            Calculate the chi-squared for a set of model parameters and observed data
getgx.pro               Computes Galactic extinction in a given passband
getkc.pro               Computes the K-correction
getlastiter.pro         Gets the last iteration of a given fit from the filenames in the fit directory
getlastparam.pro        Get the set of estimated parameters from the last fit iteration
getlevels.pro           Get the appropriate levels for the purposes of contour plotting
getm2redden.pro         Load the effective reddening for all of the MLCS2k2 vectors.
getm2smatrix.pro        Load the S matrix MLCS2k2 model
getm2vectors.pro        Load the the MLCS2k2 model vectors
getobslc.pro            Get an observed lightcurve for a given set of model parameters and observed dates
getpb.pro               Returns the requested passband structure.
getrestlc.pro           Returns a rest-frame lightcurve for the given model parameters and phases
getsmatrix.pro          Returns the smatrix for the specified filters and phases
getzeropoint.pro        Returns the maximum magnitude of the V-band MLCS2k2 model
gridfit.pro             Do the lightcurve fit for a grid of input parameters.
gx_*                    Galactic extinction routines (low-level, supporting getgx.pro)
gx_createfile.pro        - Create a Galactic extinction lookup table [actually does the work]
gx_getfilename.pro       - Create a filename for a Galactic extinction lookup table based on constituents
gx_loadfile.pro          - Load the specified Galatic extinection lookup table
gx_lookup.pro            - Look up a Galactic extinction for a given color and phase
gx_parsefilename.pro     - Parse a Galactic extinction table filename into relevant parameters
gx_readfits.pro          - Read a Galactic extinction lookup table FITS file
gx_writefits.pro         - Write a Galactic extinction lookup table FITS file
kc_*                    K-correction routines  (low-level, supporting getkc.pro)
kc_createfile.pro        - Create a K-correction extinction lookup table [actually does the work]
kc_getfilename.pro       - Create a filename for a K-correction extinction lookup table based on constituents
kc_loadfile.pro          - Load the specified Galatic extinection lookup table
kc_lookup.pro            - Look up a K-correction extinction for a given color and phase
kc_parsefilename.pro     - Parse a K-correction extinction table filename into relevant parameters
kc_readfits.pro          - Read a K-correction extinction lookup table FITS file
kc_writefits.pro         - Write a K-correction extinction lookup table FITS file
makeuniq.pro            Utility function to compute averages of one array over unique values of another
obsmodsnr.pro           Function to calculate SNR of an observation and model
pbefflam.pro            Calculates the effective wavelength of a passband
plotfit.pro             Plot a model fit to a given set of data
posdef.pro              Ensures that a passed-in square matrix is positive-definite
preloadgx.pro           Load the Galactic extinction table for fit
preloadkc.pro           Load the Galactic extinction table for fit
printfitout.pro         Print the results of a fit
ps_close.pro            Helper procedures to shift plot output to EPS files
ps_open.pro
put_id.pro              Utility procedure to time/user/host-stamp the output plot for a fit
readit.pro              Utility procedure to read an ascii file
readitconv.pro          Helper function for readit.pro
readlcdata.pro          Read in a light curve from a .dat file
readsngrid.pro          Read in a grid file given the model parameters and range to fit
readsninfo.pro          Read in an info file for a given supernova
readspec.pro            Read a spectrum file (either FITS or text format)
rgb.pro                 Generate 24-bit IDL colors from RGB values
setupfit.pro            Setup procedure to prepare data and info for MLCS2k2 fit
setupgrid.pro           Set up the parameter search grid
strjust.pro             Utility function to left/right/center justify a string
synflux.pro             Do synthetic photometry on a spectrum using passband structures.  Returns flux.
synflux2.pro            Synthetic photometry without passband structures. Use synflux instead, if you can.
synphot.pro             Returns synthetic photometry in magnitudes (uses synflux and passband zeropoint)
synphot2.pro            Like synphot.pro but without passband structures (cf. synflux2). Use synphot if you can.
translatepb.pro         Lookup table to translate single letter 'U','B','V','R','I','J','H','K' to real passbands
trapint.pro             Integrates f(x)dx with the trapezoidal rule
vec.pro                 Creates a double precision vector of specified range and steps.
writespec.pro           Print an ASCII x, f spectrum file           

