MLCS2k2 observer frame revisions


Version 0.01  Mon Dec  5 01:51:49 PST 2005  sj

   initial release.



Version 0.02  Fri Dec 16 16:57:45 PST 2005  sj

   - removed strupcase() calls; passband names are case-sensitive.

   - removed "fitout" structure name in gridfit.pro and amoebafit.pro

   - updated plotfit.pro oplot call to handle 1-element plotting    

   - changed default fit.pro iterations from 4 to 3

   - updated VEGA.mags.dat to include HSTvegamag = 0.000 in all passbands
   - updated all HST passbands (F160W_NIC2,F110W_NIC2,F850LP_ACS,F606W_ACS,
       F775W_ACS) so they are on the vegamag scale; the VEGA spectrum gives
       magnitude 0.000 in all HST passbands. HST photometry should use the
       vegamag zeropoints.

   - fixed a bug in fullobslc.pro; previous version produced incorrect
       .obsframe.dat files and model light curve plots 

   - slightly more graceful exit if amoeba fails to converge in amoebafit.pro

   - added a choice of vectors and smatrix into the info file
     use "early" to include -20 to -10 day points, but not properly trained
     use "final" to start vectors at -10 days (properly trained)



Version 0.03  Fri Jul 21 15:48:17 PDT 2006  sj

   - included new prior files for flat A_V, R_V, both flat, one-sided
     gaussian A_V prior (with sigma = 1.0 mag, called prior_adam.pro),
     one-sided gaussian plus 20% weight "delta" function (prior_avpeak.pro)

   - new version of bestrest.pro uses a lookup table (called obsrest.lookup
     in aux/passbands/) as its first choice for matching an observer-frame
     passband to a rest-frame passband

   - added some kludges to kc_createfile.pro to add an error floor (0.01 mag)
     for K-corrections determined with template SEDs (like nugent, nugent_adam)
     and also to pump up the K-correction error when the effective rest
     wavelength is less than 3500 A (where the SEDs are poorly known)

   - changed Astier rest-frame filters to use Fukugita zeropoints 

   - added SNLS passbands from CFHT 3.6m, using Fukugita zeropoints

   - added SDSS passbands from Hubert, using Bohlin (Vega) zeropoints

   - also added SDSSnat passbands, with the same response functions but 
     zeropoints in the SDSS natural (instrumental) system (close to AB)

   - fixed a bug in synflux.pro, synflux2.pro for photon-based passbands

   - changed rest-frame default filter set to Astier (from Bessell)
     this was done in defaultskcgx.pro

   - updated translatepb.pro to look in defaultskcgx for 'U','B','V','R','I'
     translations

   - changed bestrest.pro so that passbands with rest effective wavelength
     less than 3200 A are not used (it was 3000 A before)

   - added genlc.pro observer-frame light curve generator (this is just 
     a wrapper around fullobslc.pro)

   - removed some extraneous error checking in getzeropoint.pro

   - updated printfitout.pro to create a new .info.log file that documents
     what parameters were in the sn.info file for that iteration, as well
     as which rest-frame filter set was being used

   - printfitout also creates  ".datamodel.dat" and ".restframe.dat" files
     with more information

   - printfitout flags data points with SNR less than a default threshold
     (specified in pro/defaultssnr.pro, currently 4.0), either from the
     observational error bar, OR from the "model" SNR, which is defined
     as the SNR the object would have had if the noise level were the same
     but the flux were equal to the model flux for that point. a "clean"
     version with only high SNR points is created in the ".hisnr.dat" files
     which you can then use to (manually) replace what's in data/

   - added new vector choices, include "oldadam" to match Adam's homebrew
     MLCS2k2 code (using vectors from 2004), as well as "noff-final" and
     "noff-early" which are the same as "final" and "early", except the
     off-diagonal elements of the S matrix are zero

   - removed "minav" and "rvminav" options to many routines; the minimum
     value of host A_V at which the fitter begins to fit R_V is given
     in the routine defaultsrvfit.pro

   - updated amoebafit so it actually does two amoebas, first with a
     coarse convergence criterion and then a better one
     
   - replaced Nugent spectral template with newer version 1.2 (the older
     one is still available as nugent_v11) 

   - updated getranges.pro in aux/colorshift/ so that it looks at all the
     vectors in train/ to determine the widest color span for the lookups
 
   - updated pro/getm2vectors.pro and pro/getm2smatrix.pro to remove 
     structure names, because they could vary in size

   - updated some utility functions to be more efficient (strjust, makeuniq, 
     trapint)

   - added code comments and README from MWV into pro/

   - updated readit.pro to read up to 5000 lines by default (instead of 500)

   - two choices for defaultgrid.pro (you can switch to higher-resolution,
     but slower grids) by linking to defaultgrid.mwv.pro. Only do this if
     you have a fast machine.



Version 0.04  Wed Aug 23 15:39:42 PDT 2006  sj

   - major speedup! should be a factor of ~5 faster when doing fits,
     and a factor of ~2 faster calculating gx and kc lookup tables

   - fixed a bug that incorrectly fit data points earlier or later
     than the extent of the templates; improved handling of this
     issue all around. 

   - added "avnear0" prior (basically like fixing A_V = 0), and "glos"
     prior ("-g-alaxy -l-ines -o-f -s-ight") that mimics calculated
     extinction distributions through galaxies

   - added "tweaked" vectors which are the same as "early" except U-B
     and B-V were made slightly bluer (at all epochs and all deltas)
     based on the color zeropoints derived from fitting low-z U,B-only and
     B,V-only objects

   - genlc and fullobslc now allow you to input specific dates or
     phases at which to calculate the light curve

   - fixed incorrect header for defaultgrid.mwv.pro 

   - added "outdir" keyword to fit.pro to specify output directory

   - created convertprior.pro to see the effect of changing a prior
     without re-fitting (it doesn't always work, see comments in code)

   - fixed a bug in setupfit.pro; in cases of fixed A_V, csgrid would lose
     its trailing 1-element dimension

   - improved plotfit.pro output in cases when two parameters are fixed

   - updated amoebafit to recalculate C-matrix after coarse fit, as
     well as to try harder if it doesn't converge

   - updated datamodel.pro to add restphase in output file

   - outliers from the fit (the level is specified in defaultssnr.pro,
     currently set at 5-sigma) are flagged in the .datamodel.dat file
     and excluded from the .hisnr.dat file

   - SDSS passbands now use the natural system

   - raised the floor on the t0 stepsize in defaultgrid.orig.pro and
     defaultgrid.mwv.pro to avoid underestimating t0 error



Version 0.05  Sat Nov  4 22:42:24 PST 2006  sj

   - fixed implemenation of "outdir" keyword to fit.pro

   - new Bohlin 2006 Vega spectrum (alpha_lyr_stis_003.fits) is now
     our default (few percent changes in the red)

   - small implementation changes of passband zeropoints

   - updated passbands:
        SDSS (based on new AB->SDSS offsets from John Marriner)
        added UBVRI_Cohen and U_MaizApellaniz  
        all Vega-based passbands updated with new Vega spectrum

   - new rest-frame filter sets (to correspond to UBVRI_Landolt):
        "Cohen" uses Cohen et al. passbands (with Vega zeropoints)
        "MA+C" uses U_MaizAppelaniz and BVRI_Cohen

   - added "glosz" prior to simulate ESSENCE selection effects
     and "snls" prior to (very crudely!) simulate SNLS;
     these priors change with redshift (see postscript files
     from updated plotprior.pro) 

   - updated "tweaked" vectors in all filters to yield
     proper color zeropoints (i.e., a posterior extinction
     distribution with flatnegav prior gives zeropoint=0)  

   - new options for the S-matrix for each set of vectors:
        "sorig" (raw S-matrix from training) 
        "slowz" (scaled up S-matrix used for low-z MLCS2k2 paper)
        "slowznoff" (like slowz, but no off-diagonal elements)
        "s=0" (no model error, for testing purposes)

   - updated amoebafit.pro to better handle situations where
     amoeba fails to converge or gets stuck 

   - moved defaultskcgx.pro, defaultssnr.pro and defaultsrvfit.pro
     to fit/ subdirectory, so you remember to update them:
     set "MA+C" as default rest-frame filter set (defaultskcgx.pro)
     upped minav to 2.5 mag before R_V is fit (defaultsrvfit.pro)
   
   - disabled smoothing of K-correction and Galactic extinction
     correction for "model" spectral samples (i.e., all the
     nugent* samples)  


Version 0.06  Tue Feb 20 14:24:24 PST 2007  sj

   - added new S-matrix option for early/tweaked vectors:
       "smix" (same as sorig, but errors before -10d are scaled up)

   - IDL save files from fit now internally compressed to save space
 
   - text dumps of the vectors/Smatrices are in train/textdump/

   - updated bestrest.pro to use Rick Kessler's conventions for
       matching observer-frame and rest-frame passbands

   - added an option in defaultskcgx.pro to allow/disallow more
       than one observer-frame passband to map to the same 
       rest-frame passband ("samerest")

   - updated SDSS redshift mappings in aux/passbands/obsrest.lookup

   - added Gajus' /clean keyword in fit.pro to remove old
       fit sav and postscript files and save space

   - new rest-frame filter set (to correspond to UBVRI_Landolt):
       "Marriner" uses John Marriner tweaked passbands, with 
       zeropoint based on BD+17d4708 rather than Vega

   - updated passbands:
       added Keck/LRIS, Subaru/Suprime, HST/WFPC2, USNO/u'g'r'i'z',
         and other CTIO4m (BTC, B45, V45, Supermacho VR) passbands
       SDSS has new zeropoints from AB offsets using solar analogs
       added UBVRI_Marriner
       added BX passbands for all rest-filter sets        

   - rest-frame U-B colors in K-correction and MW Galactic-extinction
       correction now use the BX passband (via aux/colorshift/results/)
       this changes mags referenced to rest-frame U, by < 0.01 mag


Version 0.07 Tue May  5 23:28:10 EDT 2009  sj

   - added 'rv19' vectors based on re-training with R_V = 1.9 for lowz

   - added CSP passbands ugriBVYJHKs
   
   - added 2MASS passbands JHKs

   - added Swift passbands vv,bb,uu,uvw1,uvm2,uvw2

   - added Kessler passbands UBVRI as a description of the Landolt system
     based on shifting the Bessell (1990) passbands to eliminate color
     terms between Landolt measurements and HST spectrophotometry

   - added 'salty' vectors based on SALT2 model, with alpha=0.12
     DO NOT USE RESULTS WITH DELTA >= 1.0 from 'salty' vectors

   - added Hsiao spectral templates (version 2007-Oct-17), paper ref:
     Hsiao et al. 2007 (ApJ, 663, 1187)

