├── .coveragerc ├── .gitattributes ├── .gitignore ├── .isort.cfg ├── .travis.yml ├── CITATION ├── CODE_OF_CONDUCT.md ├── LICENSE ├── MANIFEST.in ├── README.md ├── TODO.md ├── docs ├── Makefile ├── _static │ └── style.css ├── _templates │ └── layout.html ├── accessibility.rst ├── api.rst ├── assessing.rst ├── command_line.rst ├── conf.py ├── error.rst ├── fitting.rst ├── getting_started.rst ├── help.rst ├── images │ └── light-curve.png ├── index.rst ├── installation.rst ├── make.bat ├── models.rst ├── outputs.rst ├── package.rst └── requirements.txt ├── jupyter └── mosfit.ipynb ├── logo.png ├── mosfit ├── __init__.py ├── __main__.py ├── cache │ └── .gitkeep ├── constants.py ├── contributors.txt ├── converter.py ├── dependencies.txt ├── fetcher.py ├── fitter.py ├── jupyter │ └── mosfit.ipynb ├── logo.txt ├── main.py ├── model.py ├── models │ ├── bns │ │ ├── bns.json │ │ └── parameters.json │ ├── bns_generative │ │ ├── bns_generative.json │ │ └── parameters.json │ ├── bns_magnetar │ │ ├── bns_magnetar.json │ │ └── parameters.json │ ├── csm │ │ ├── csm.json │ │ ├── data │ │ │ ├── csm_table.dat │ │ │ └── info.txt │ │ └── parameters.json │ ├── csmni │ │ ├── csmni.json │ │ └── parameters.json │ ├── default │ │ ├── default.json │ │ ├── parameters.json │ │ └── parameters_test.json │ ├── exppow │ │ ├── exppow.json │ │ └── parameters.json │ ├── fallback │ │ ├── fallback.json │ │ └── parameters.json │ ├── ia │ │ ├── ia.json │ │ └── parameters.json │ ├── ic │ │ ├── ic.json │ │ └── parameters.json │ ├── kilonova │ │ ├── kilonova.json │ │ └── parameters.json │ ├── magnetar │ │ ├── magnetar.json │ │ └── parameters.json │ ├── magni │ │ ├── magni.json │ │ └── parameters.json │ ├── model.json │ ├── nsbh │ │ ├── nsbh.json │ │ └── parameters.json │ ├── nsbh_generative │ │ ├── nsbh_generative.json │ │ └── parameters.json │ ├── rprocess │ │ ├── parameters.json │ │ └── rprocess.json │ ├── shockni │ │ ├── parameters.json │ │ └── shockni.json │ ├── slsn │ │ ├── parameters.json │ │ └── slsn.json │ ├── slsnni │ │ ├── parameters.json │ │ └── slsnni.json │ ├── tde │ │ ├── data │ │ │ ├── 4-3 │ │ │ │ ├── 0.600.dat │ │ │ │ ├── 0.650.dat │ │ │ │ ├── 0.700.dat │ │ │ │ ├── 0.750.dat │ │ │ │ ├── 0.800.dat │ │ │ │ ├── 0.850.dat │ │ │ │ ├── 0.900.dat │ │ │ │ ├── 1.000.dat │ │ │ │ ├── 1.100.dat │ │ │ │ ├── 1.200.dat │ │ │ │ ├── 1.300.dat │ │ │ │ ├── 1.400.dat │ │ │ │ ├── 1.500.dat │ │ │ │ ├── 1.600.dat │ │ │ │ ├── 1.700.dat │ │ │ │ ├── 1.800.dat │ │ │ │ ├── 1.850.dat │ │ │ │ ├── 1.900.dat │ │ │ │ ├── 2.000.dat │ │ │ │ ├── 2.500.dat │ │ │ │ ├── 3.000.dat │ │ │ │ ├── 3.500.dat │ │ │ │ └── 4.000.dat │ │ │ ├── 5-3 │ │ │ │ ├── 0.500.dat │ │ │ │ ├── 0.525.dat │ │ │ │ ├── 0.550.dat │ │ │ │ ├── 0.575.dat │ │ │ │ ├── 0.600.dat │ │ │ │ ├── 0.650.dat │ │ │ │ ├── 0.700.dat │ │ │ │ ├── 0.750.dat │ │ │ │ ├── 0.800.dat │ │ │ │ ├── 0.850.dat │ │ │ │ ├── 0.900.dat │ │ │ │ ├── 0.950.dat │ │ │ │ ├── 1.000.dat │ │ │ │ ├── 1.100.dat │ │ │ │ ├── 1.200.dat │ │ │ │ ├── 1.300.dat │ │ │ │ ├── 1.400.dat │ │ │ │ ├── 1.500.dat │ │ │ │ ├── 2.000.dat │ │ │ │ └── 2.500.dat │ │ │ └── info.txt │ │ ├── parameters.json │ │ └── tde.json │ └── types.json ├── modules │ ├── __init__.py │ ├── arrays │ │ ├── __init__.py │ │ ├── alltimes.py │ │ ├── array.py │ │ ├── densetimes.py │ │ ├── diagonal.py │ │ ├── kernel.py │ │ └── resttimes.py │ ├── constraints │ │ ├── __init__.py │ │ ├── bns_constraints.py │ │ ├── constraint.py │ │ ├── csmconstraints.py │ │ ├── fallback_constraints.py │ │ ├── ia_constraints.py │ │ ├── magnetar_constraints.py │ │ ├── nsbh_constraints.py │ │ ├── slsn_constraints.py │ │ ├── slsnni_constraints.py │ │ └── tde_constraints.py │ ├── datas │ │ ├── __init__.py │ │ └── transient.py │ ├── energetics │ │ ├── __init__.py │ │ ├── aspherical_kilonova.py │ │ ├── aspherical_wind.py │ │ ├── bns_ejecta.py │ │ ├── bns_ejecta_generative.py │ │ ├── energetic.py │ │ ├── homologous_expansion.py │ │ ├── nsbh_ejecta.py │ │ ├── nsbh_ejecta_generative.py │ │ └── thin_shell.py │ ├── engines │ │ ├── __init__.py │ │ ├── bns_magnetar.py │ │ ├── csm.py │ │ ├── engine.py │ │ ├── exppow.py │ │ ├── fallback.py │ │ ├── magnetar.py │ │ ├── nickelcobalt.py │ │ ├── rprocess.py │ │ ├── shock_cocoon.py │ │ ├── shock_cooling.py │ │ └── simplefallback.py │ ├── module.py │ ├── objectives │ │ ├── __init__.py │ │ └── likelihood.py │ ├── observables │ │ ├── .copy │ │ ├── __init__.py │ │ ├── filterrules.json │ │ ├── filters │ │ │ ├── 2MASS_2MASS.H_AB.dat │ │ │ ├── 2MASS_2MASS.H_AB.xml │ │ │ ├── 2MASS_2MASS.H_Vega.dat │ │ │ ├── 2MASS_2MASS.H_Vega.xml │ │ │ ├── 2MASS_2MASS.J_AB.dat │ │ │ ├── 2MASS_2MASS.J_AB.xml │ │ │ ├── 2MASS_2MASS.J_Vega.dat │ │ │ ├── 2MASS_2MASS.J_Vega.xml │ │ │ ├── 2MASS_2MASS.Ks_AB.dat │ │ │ ├── 2MASS_2MASS.Ks_AB.xml │ │ │ ├── 2MASS_2MASS.Ks_Vega.dat │ │ │ ├── 2MASS_2MASS.Ks_Vega.xml │ │ │ ├── ATLAS_cyan_info.c │ │ │ ├── CFHT_CFH12k.R_AB.dat │ │ │ ├── CFHT_CFH12k.R_AB.xml │ │ │ ├── CFHT_CFH12k.R_Vega.dat │ │ │ ├── CFHT_CFH12k.R_Vega.xml │ │ │ ├── CFHT_CFHT.Z_AB.dat │ │ │ ├── CFHT_CFHT.Z_AB.xml │ │ │ ├── CFHT_CFHT.Z_Vega.dat │ │ │ ├── CFHT_CFHT.Z_Vega.xml │ │ │ ├── GAIA_GAIA0.G_AB.dat │ │ │ ├── GAIA_GAIA0.G_AB.xml │ │ │ ├── GAIA_GAIA0.G_Vega.dat │ │ │ ├── GAIA_GAIA0.G_Vega.xml │ │ │ ├── GALEX_GALEX.FUV_AB.dat │ │ │ ├── GALEX_GALEX.FUV_AB.xml │ │ │ ├── GALEX_GALEX.FUV_Vega.dat │ │ │ ├── GALEX_GALEX.FUV_Vega.xml │ │ │ ├── GALEX_GALEX.NUV_AB.dat │ │ │ ├── GALEX_GALEX.NUV_AB.xml │ │ │ ├── GALEX_GALEX.NUV_Vega.dat │ │ │ ├── GALEX_GALEX.NUV_Vega.xml │ │ │ ├── Generic_Bessell.B_AB.dat │ │ │ ├── Generic_Bessell.B_AB.xml │ │ │ ├── Generic_Bessell.B_Vega.dat │ │ │ ├── Generic_Bessell.B_Vega.xml │ │ │ ├── Generic_Bessell.I_AB.dat │ │ │ ├── Generic_Bessell.I_AB.xml │ │ │ ├── Generic_Bessell.I_Vega.dat │ │ │ ├── Generic_Bessell.I_Vega.xml │ │ │ ├── Generic_Bessell.R_AB.dat │ │ │ ├── Generic_Bessell.R_AB.xml │ │ │ ├── Generic_Bessell.R_Vega.dat │ │ │ ├── Generic_Bessell.R_Vega.xml │ │ │ ├── Generic_Bessell.U_AB.dat │ │ │ ├── Generic_Bessell.U_AB.xml │ │ │ ├── Generic_Bessell.U_Vega.dat │ │ │ ├── Generic_Bessell.U_Vega.xml │ │ │ ├── Generic_Bessell.V_AB.dat │ │ │ ├── Generic_Bessell.V_AB.xml │ │ │ ├── Generic_Bessell.V_Vega.dat │ │ │ ├── Generic_Bessell.V_Vega.xml │ │ │ ├── Generic_Cousins.I_AB.dat │ │ │ ├── Generic_Cousins.I_AB.xml │ │ │ ├── Generic_Cousins.I_Vega.dat │ │ │ ├── Generic_Cousins.I_Vega.xml │ │ │ ├── Generic_Cousins.R_AB.dat │ │ │ ├── Generic_Cousins.R_AB.xml │ │ │ ├── Generic_Cousins.R_Vega.dat │ │ │ ├── Generic_Cousins.R_Vega.xml │ │ │ ├── Generic_Johnson.B_AB.dat │ │ │ ├── Generic_Johnson.B_AB.xml │ │ │ ├── Generic_Johnson.B_Vega.dat │ │ │ ├── Generic_Johnson.B_Vega.xml │ │ │ ├── Generic_Johnson.I_AB.dat │ │ │ ├── Generic_Johnson.I_AB.xml │ │ │ ├── Generic_Johnson.I_Vega.dat │ │ │ ├── Generic_Johnson.I_Vega.xml │ │ │ ├── Generic_Johnson.J_AB.dat │ │ │ ├── Generic_Johnson.J_AB.xml │ │ │ ├── Generic_Johnson.J_Vega.dat │ │ │ ├── Generic_Johnson.J_Vega.xml │ │ │ ├── Generic_Johnson.M_AB.dat │ │ │ ├── Generic_Johnson.M_AB.xml │ │ │ ├── Generic_Johnson.M_Vega.dat │ │ │ ├── Generic_Johnson.M_Vega.xml │ │ │ ├── Generic_Johnson.R_AB.dat │ │ │ ├── Generic_Johnson.R_AB.xml │ │ │ ├── Generic_Johnson.R_Vega.dat │ │ │ ├── Generic_Johnson.R_Vega.xml │ │ │ ├── Generic_Johnson.U_AB.dat │ │ │ ├── Generic_Johnson.U_AB.xml │ │ │ ├── Generic_Johnson.U_Vega.dat │ │ │ ├── Generic_Johnson.U_Vega.xml │ │ │ ├── Generic_Johnson.V_AB.dat │ │ │ ├── Generic_Johnson.V_AB.xml │ │ │ ├── Generic_Johnson.V_Vega.dat │ │ │ ├── Generic_Johnson.V_Vega.xml │ │ │ ├── HST_WFC3_UVIS1.F218W_AB.dat │ │ │ ├── HST_WFC3_UVIS1.F218W_AB.xml │ │ │ ├── HST_WFC3_UVIS1.F218W_Vega.dat │ │ │ ├── HST_WFC3_UVIS1.F218W_Vega.xml │ │ │ ├── HST_WFC3_UVIS1.F225W_AB.dat │ │ │ ├── HST_WFC3_UVIS1.F225W_AB.xml │ │ │ ├── HST_WFC3_UVIS1.F225W_Vega.dat │ │ │ ├── HST_WFC3_UVIS1.F225W_Vega.xml │ │ │ ├── HST_WFC3_UVIS1.F275W_AB.dat │ │ │ ├── HST_WFC3_UVIS1.F275W_AB.xml │ │ │ ├── HST_WFC3_UVIS1.F275W_Vega.dat │ │ │ ├── HST_WFC3_UVIS1.F275W_Vega.xml │ │ │ ├── HST_WFC3_UVIS1.F336W_AB.dat │ │ │ ├── HST_WFC3_UVIS1.F336W_AB.xml │ │ │ ├── HST_WFC3_UVIS1.F336W_Vega.dat │ │ │ ├── HST_WFC3_UVIS1.F336W_Vega.xml │ │ │ ├── HST_WFC3_UVIS1.F390W_AB.dat │ │ │ ├── HST_WFC3_UVIS1.F390W_AB.xml │ │ │ ├── HST_WFC3_UVIS1.F390W_Vega.dat │ │ │ ├── HST_WFC3_UVIS1.F390W_Vega.xml │ │ │ ├── HST_WFC3_UVIS1.F438W_AB.dat │ │ │ ├── HST_WFC3_UVIS1.F438W_AB.xml │ │ │ ├── HST_WFC3_UVIS1.F438W_Vega.dat │ │ │ ├── HST_WFC3_UVIS1.F438W_Vega.xml │ │ │ ├── HST_WFC3_UVIS1.F475W_AB.dat │ │ │ ├── HST_WFC3_UVIS1.F475W_AB.xml │ │ │ ├── HST_WFC3_UVIS1.F475W_Vega.dat │ │ │ ├── HST_WFC3_UVIS1.F475W_Vega.xml │ │ │ ├── HST_WFC3_UVIS1.F555W_AB.dat │ │ │ ├── HST_WFC3_UVIS1.F555W_AB.xml │ │ │ ├── HST_WFC3_UVIS1.F555W_Vega.dat │ │ │ ├── HST_WFC3_UVIS1.F555W_Vega.xml │ │ │ ├── HST_WFC3_UVIS1.F625W_AB.dat │ │ │ ├── HST_WFC3_UVIS1.F625W_AB.xml │ │ │ ├── HST_WFC3_UVIS1.F625W_Vega.dat │ │ │ ├── HST_WFC3_UVIS1.F625W_Vega.xml │ │ │ ├── HST_WFC3_UVIS1.F775W_AB.dat │ │ │ ├── HST_WFC3_UVIS1.F775W_AB.xml │ │ │ ├── HST_WFC3_UVIS1.F775W_Vega.dat │ │ │ ├── HST_WFC3_UVIS1.F775W_Vega.xml │ │ │ ├── HST_WFC3_UVIS1.F814W_AB.dat │ │ │ ├── HST_WFC3_UVIS1.F814W_AB.xml │ │ │ ├── HST_WFC3_UVIS1.F814W_Vega.dat │ │ │ ├── HST_WFC3_UVIS1.F814W_Vega.xml │ │ │ ├── LCO_CSP.Y_AB.dat │ │ │ ├── LCO_CSP.Y_AB.xml │ │ │ ├── LCO_CSP.Y_Vega.dat │ │ │ ├── LCO_CSP.Y_Vega.xml │ │ │ ├── LSST_LSST.g_AB.dat │ │ │ ├── LSST_LSST.g_AB.xml │ │ │ ├── LSST_LSST.g_Vega.dat │ │ │ ├── LSST_LSST.g_Vega.xml │ │ │ ├── LSST_LSST.i_AB.dat │ │ │ ├── LSST_LSST.i_AB.xml │ │ │ ├── LSST_LSST.i_Vega.dat │ │ │ ├── LSST_LSST.i_Vega.xml │ │ │ ├── LSST_LSST.r_AB.dat │ │ │ ├── LSST_LSST.r_AB.xml │ │ │ ├── LSST_LSST.r_Vega.dat │ │ │ ├── LSST_LSST.r_Vega.xml │ │ │ ├── LSST_LSST.u_AB.dat │ │ │ ├── LSST_LSST.u_AB.xml │ │ │ ├── LSST_LSST.u_Vega.dat │ │ │ ├── LSST_LSST.u_Vega.xml │ │ │ ├── LSST_LSST.y_AB.dat │ │ │ ├── LSST_LSST.y_AB.xml │ │ │ ├── LSST_LSST.y_Vega.dat │ │ │ ├── LSST_LSST.y_Vega.xml │ │ │ ├── LSST_LSST.z_AB.dat │ │ │ ├── LSST_LSST.z_AB.xml │ │ │ ├── LSST_LSST.z_Vega.dat │ │ │ ├── LSST_LSST.z_Vega.xml │ │ │ ├── PAN-STARRS_PS1.g_AB.dat │ │ │ ├── PAN-STARRS_PS1.g_AB.xml │ │ │ ├── PAN-STARRS_PS1.g_Vega.dat │ │ │ ├── PAN-STARRS_PS1.g_Vega.xml │ │ │ ├── PAN-STARRS_PS1.i_AB.dat │ │ │ ├── PAN-STARRS_PS1.i_AB.xml │ │ │ ├── PAN-STARRS_PS1.i_Vega.dat │ │ │ ├── PAN-STARRS_PS1.i_Vega.xml │ │ │ ├── PAN-STARRS_PS1.open_AB.dat │ │ │ ├── PAN-STARRS_PS1.open_AB.xml │ │ │ ├── PAN-STARRS_PS1.open_Vega.dat │ │ │ ├── PAN-STARRS_PS1.open_Vega.xml │ │ │ ├── PAN-STARRS_PS1.r_AB.dat │ │ │ ├── PAN-STARRS_PS1.r_AB.xml │ │ │ ├── PAN-STARRS_PS1.r_Vega.dat │ │ │ ├── PAN-STARRS_PS1.r_Vega.xml │ │ │ ├── PAN-STARRS_PS1.w_AB.dat │ │ │ ├── PAN-STARRS_PS1.w_AB.xml │ │ │ ├── PAN-STARRS_PS1.w_Vega.dat │ │ │ ├── PAN-STARRS_PS1.w_Vega.xml │ │ │ ├── PAN-STARRS_PS1.y_AB.dat │ │ │ ├── PAN-STARRS_PS1.y_AB.xml │ │ │ ├── PAN-STARRS_PS1.y_Vega.dat │ │ │ ├── PAN-STARRS_PS1.y_Vega.xml │ │ │ ├── PAN-STARRS_PS1.z_AB.dat │ │ │ ├── PAN-STARRS_PS1.z_AB.xml │ │ │ ├── PAN-STARRS_PS1.z_Vega.dat │ │ │ ├── PAN-STARRS_PS1.z_Vega.xml │ │ │ ├── SLOAN_SDSS.g_AB.dat │ │ │ ├── SLOAN_SDSS.g_AB.xml │ │ │ ├── SLOAN_SDSS.g_Vega.dat │ │ │ ├── SLOAN_SDSS.g_Vega.xml │ │ │ ├── SLOAN_SDSS.i_AB.dat │ │ │ ├── SLOAN_SDSS.i_AB.xml │ │ │ ├── SLOAN_SDSS.i_Vega.dat │ │ │ ├── SLOAN_SDSS.i_Vega.xml │ │ │ ├── SLOAN_SDSS.r_AB.dat │ │ │ ├── SLOAN_SDSS.r_AB.xml │ │ │ ├── SLOAN_SDSS.r_Vega.dat │ │ │ ├── SLOAN_SDSS.r_Vega.xml │ │ │ ├── SLOAN_SDSS.u_AB.dat │ │ │ ├── SLOAN_SDSS.u_AB.xml │ │ │ ├── SLOAN_SDSS.u_Vega.dat │ │ │ ├── SLOAN_SDSS.u_Vega.xml │ │ │ ├── SLOAN_SDSS.z_AB.dat │ │ │ ├── SLOAN_SDSS.z_AB.xml │ │ │ ├── SLOAN_SDSS.z_Vega.dat │ │ │ ├── SLOAN_SDSS.z_Vega.xml │ │ │ ├── Swift_UVOT.B_AB.dat │ │ │ ├── Swift_UVOT.B_AB.xml │ │ │ ├── Swift_UVOT.B_Vega.dat │ │ │ ├── Swift_UVOT.B_Vega.xml │ │ │ ├── Swift_UVOT.UVM2_AB.dat │ │ │ ├── Swift_UVOT.UVM2_AB.xml │ │ │ ├── Swift_UVOT.UVM2_Vega.dat │ │ │ ├── Swift_UVOT.UVM2_Vega.xml │ │ │ ├── Swift_UVOT.UVW1_AB.dat │ │ │ ├── Swift_UVOT.UVW1_AB.xml │ │ │ ├── Swift_UVOT.UVW1_Vega.dat │ │ │ ├── Swift_UVOT.UVW1_Vega.xml │ │ │ ├── Swift_UVOT.UVW2_AB.dat │ │ │ ├── Swift_UVOT.UVW2_AB.xml │ │ │ ├── Swift_UVOT.UVW2_Vega.dat │ │ │ ├── Swift_UVOT.UVW2_Vega.xml │ │ │ ├── Swift_UVOT.U_AB.dat │ │ │ ├── Swift_UVOT.U_AB.xml │ │ │ ├── Swift_UVOT.U_Vega.dat │ │ │ ├── Swift_UVOT.U_Vega.xml │ │ │ ├── Swift_UVOT.V_AB.dat │ │ │ ├── Swift_UVOT.V_AB.xml │ │ │ ├── Swift_UVOT.V_Vega.dat │ │ │ ├── Swift_UVOT.V_Vega.xml │ │ │ ├── chandra_acis-s.area │ │ │ ├── rosat_pspc_r4tor7.area │ │ │ ├── swift_xrt_pc.area │ │ │ └── xmm_pn_medium.area │ │ └── photometry.py │ ├── outputs │ │ ├── __init__.py │ │ ├── lightcurve.py │ │ ├── output.py │ │ └── write.py │ ├── parameters │ │ ├── __init__.py │ │ ├── arbitrary.py │ │ ├── constant.py │ │ ├── covariance.py │ │ ├── gaussian.py │ │ ├── kroupa.py │ │ ├── luminositydistance.py │ │ ├── parameter.py │ │ ├── powerlaw.py │ │ ├── redshift.py │ │ └── variance.py │ ├── photospheres │ │ ├── __init__.py │ │ ├── cocoon_photosphere.py │ │ ├── densecore.py │ │ ├── photosphere.py │ │ ├── tde_photosphere.py │ │ └── temperature_floor.py │ ├── seds │ │ ├── __init__.py │ │ ├── blackbody.py │ │ ├── blackbody_cutoff.py │ │ ├── blackbody_supressed.py │ │ ├── line.py │ │ ├── losextinction.py │ │ ├── multiblackbody.py │ │ ├── sed.py │ │ └── synchrotron.py │ ├── transforms │ │ ├── __init__.py │ │ ├── diffusion.py │ │ ├── diffusion_aspherical.py │ │ ├── diffusion_csm.py │ │ ├── transform.py │ │ └── viscous.py │ └── utilities │ │ ├── __init__.py │ │ ├── operator.py │ │ ├── rename.py │ │ └── utility.py ├── mossampler.py ├── plotting.py ├── printer.py ├── requirements.txt ├── samplers │ ├── __init__.py │ ├── ensembler.py │ ├── nester.py │ ├── ptsampler.py │ ├── sampler.py │ └── ultranester.py ├── strings.json ├── tests │ ├── LSQ12dlf.json │ ├── PTF10hgi.txt │ ├── SN2006le.json │ └── event_list.txt └── utils.py ├── setup.cfg ├── setup.py ├── test.py └── test.sh /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | omit = 3 | mosfit/plotting.py 4 | 5 | [report] 6 | exclude_lines = 7 | except KeyboardInterrupt: 8 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.ipynb filter=nbstripout 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | cache/ 3 | products/ 4 | output/ 5 | dist/ 6 | src/ 7 | mosfit/modules/observables/filters 8 | mosfit/modules/observables/filters/*.dat 9 | mosfit/modules/observables/filters/*.xml 10 | /models/ 11 | /jupyter/ 12 | /modules/ 13 | MANIFEST 14 | mosfit.egg-info/ 15 | *.pyc 16 | *checkpoint.ipynb 17 | *.so 18 | *.prof 19 | *.swp 20 | .DS_Store 21 | /*.* 22 | mosfit/strings-*.json 23 | *.tags* 24 | 25 | # Documentation 26 | docs/_build 27 | docs/api 28 | -------------------------------------------------------------------------------- /.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | multi_line_output=0 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - 3.7 4 | notifications: 5 | slack: astrochats:tV2KNwL9jXSGSv5KhulGNVro 6 | git: 7 | depth: 3 8 | 9 | # Setup anaconda 10 | before_install: 11 | # Install packages 12 | - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; 13 | - bash miniconda.sh -b -p $HOME/miniconda 14 | - export PATH="$HOME/miniconda/bin:$PATH" 15 | - hash -r 16 | - conda config --set always_yes yes --set changeps1 no 17 | - conda update -q conda; 18 | install: 19 | - conda update setuptools 20 | - conda config --add channels conda-forge 21 | - conda install --yes python=$TRAVIS_PYTHON_VERSION astrocats astropy corner coveralls cython dropbox emcee extinction inflect jupyter matplotlib mpi4py nbstripout numexpr palettable schwimmbad scipy!=0.19.0 seaborn six 22 | - pip install googletrans 23 | - coverage run -p setup.py install 24 | 25 | # Run test 26 | script: 27 | - ./test.sh -c 28 | 29 | # Run coveralls 30 | after_success: 31 | - if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then coveralls; fi 32 | -------------------------------------------------------------------------------- /CITATION: -------------------------------------------------------------------------------- 1 | To cite MOSFiT in publications, please use: 2 | 3 | Guillochon, J.; Nicholl, M.; Villar, V. A., 2018, ApJS, Accepted 4 | 5 | For LaTex and BibTex users: 6 | 7 | \bibitem[Turk et al.(2011)]{2011ApJS..192....9T} Turk, M.~J., Smith, B.~D., 8 | Oishi, J.~S., et al.\ 2011, The Astrophysical Journal Supplement Series, 192, 9 9 | 10 | @ARTICLE{2017arXiv171002145G, 11 | author = {{Guillochon}, J. and {Nicholl}, M. and {Villar}, V.~A. and {Mockler}, B. and 12 | {Narayan}, G. and {Mandel}, K.~S. and {Berger}, E. and {Williams}, P.~K.~G. 13 | }, 14 | title = "{MOSFiT: Modular Open-Source Fitter for Transients}", 15 | journal = {ArXiv e-prints}, 16 | archivePrefix = "arXiv", 17 | eprint = {1710.02145}, 18 | primaryClass = "astro-ph.IM", 19 | keywords = {Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - High Energy Astrophysical Phenomena}, 20 | year = 2017, 21 | month = oct, 22 | adsurl = {http://adsabs.harvard.edu/abs/2017arXiv171002145G}, 23 | adsnote = {Provided by the SAO/NASA Astrophysics Data System} 24 | } 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016-2018 James Guillochon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE 2 | include test.sh 3 | include test.py 4 | exclude docs/_build 5 | exclude docs/api 6 | exclude build/ 7 | exclude products/ 8 | exclude dist/ 9 | exclude src/ 10 | graft mosfit 11 | global-include *.md 12 | global-include .gitkeep 13 | global-exclude .DS_Store 14 | global-exclude *.prof 15 | global-exclude *.swp 16 | global-exclude *.png 17 | global-exclude *.pyc 18 | prune mosfit/cache/ 19 | include mosfit/cache/.gitkeep 20 | include mosfit/cache/names.min.json 21 | include logo.png 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

MOSFiT

2 | Build Status 3 | Coverage Status 4 | Python Version 5 | PyPI version 6 | Documentation Status 7 | ascl:1710.006 8 | Currently logged-in users in MOSFiT Slack channel 9 | 10 | `MOSFiT` (**M**odular **O**pen-**S**ource **Fi**tter for **T**ransients) is a Python 2.7/3.x package for fitting, sharing, and estimating the parameters of transients via user-contributed transient models. Data for a transient can either be provided by the user in a wide range of formats (JSON, ASCII tables, CDS, LaTeX), or can be pulled automatically from one of the Open Catalogs (e.g. the [Open Supernova Catalog](https://sne.space), [Open TDE Catalog](https://tde.space), and [Open Nova Catalog](https://opennova.space)) by its name. With the use of an optional upload flag, fits performed by users can then be uploaded back to the Open Catalogs for the benefit of the transient community.
11 | 12 | ## Installation 13 | 14 | `MOSFiT` is available on `conda` and `pip`, and can be installed using: 15 | 16 | ```bash 17 | conda install -c conda-forge mosfit 18 | ``` 19 | 20 | or: 21 | 22 | ```bash 23 | pip install mosfit 24 | ``` 25 | 26 | For a development install of `MOSFiT`, the repository should be cloned from GitHub and then installed into your Python environment via the `setup.py` script: 27 | 28 | ```bash 29 | git clone https://github.com/guillochon/MOSFiT.git 30 | cd MOSFiT 31 | python setup.py develop 32 | ``` 33 | 34 | ## Using MOSFiT 35 | 36 | For detailed instructions on using MOSFiT, please see our documentation on RTD: 37 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | Engines 2 | - [ ] `Jet` 3 | - [x] `CSM` 4 | - [ ] `Nuclear` 5 | 6 | Transforms 7 | - [ ] `Viscosity` 8 | - [ ] `Reprocessing` 9 | 10 | SEDs 11 | - [x] `Extinction` 12 | - [ ] `MultiBlackbody` 13 | - [ ] `SpectrumBased` 14 | - [ ] `Line` 15 | 16 | Optimization 17 | - [ ] Cythonize bottlenecks 18 | - [ ] Load-balance fracking 19 | 20 | Input 21 | - [ ] Local modules 22 | - [ ] Non-JSON data (CDS tables, flat files) 23 | 24 | Testing 25 | - [ ] Test on Windows (CI not possible yet) 26 | 27 | Cleanup 28 | - [x] Make `--quiet` actually quiet 29 | 30 | Integration 31 | - [x] Importing `mosfit` for use in other codes 32 | 33 | Output 34 | - [x] Model LCs 35 | - [ ] Model SEDs 36 | - [x] Walker distributions 37 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SPHINXPROJ = MOSFiT 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /docs/_static/style.css: -------------------------------------------------------------------------------- 1 | /* override table width restrictions */ 2 | @media screen and (min-width: 767px) { 3 | 4 | .wy-table-responsive table td { 5 | /* !important prevents the common CSS stylesheets from overriding 6 | this as on RTD they are loaded after this stylesheet */ 7 | white-space: normal !important; 8 | } 9 | 10 | .wy-table-responsive { 11 | overflow: visible !important; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /docs/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | {% block extrahead %} 3 | 4 | {% endblock %} 5 | -------------------------------------------------------------------------------- /docs/accessibility.rst: -------------------------------------------------------------------------------- 1 | .. _accessibility: 2 | 3 | ============= 4 | Accessibility 5 | ============= 6 | 7 | .. _language: 8 | 9 | -------- 10 | Language 11 | -------- 12 | 13 | ``MOSFiT`` can optionally translate all of its command line text into any language supported by Google translate. ``MOSFiT`` will use a user's ``$LANG`` environment variable to guess the language to use, if this variable is set. To accomplish this, the user must install the ``googletrans`` via ``pip``: 14 | 15 | .. code-block:: bash 16 | 17 | pip install googletrans 18 | 19 | Then, ``MOSFiT`` can be translated into one of the available languages using the ``--language`` option. When running for the first time for a new language, ``MOSFiT`` will pass all strings to the ``googletrans`` package one by one, which takes a few minutes to return the translated strings. 20 | 21 | Note that Google's translation service is very approximate, and the translated text is only roughly equivalent to the original meaning. 22 | -------------------------------------------------------------------------------- /docs/api.rst: -------------------------------------------------------------------------------- 1 | === 2 | API 3 | === 4 | .. automodapi:: mosfit.modules 5 | -------------------------------------------------------------------------------- /docs/assessing.rst: -------------------------------------------------------------------------------- 1 | .. _assessing: 2 | 3 | ================ 4 | Assessing models 5 | ================ 6 | 7 | .. _convergence: 8 | 9 | ----------- 10 | Convergence 11 | ----------- 12 | 13 | Convergence in ``MOSFiT`` is assessed using the Gelman-Rubin statistic (or "potential scale reduction factor", abbreviated PSRF), which is a measure of the in-chain variance as compared to the between-chain variance. This metric is calculated for each free parameter, with the global PSRF score being derived by taking the maximum difference amongst all the individual parameter PSRFs. If a model is converged and well-mixed, these two values should be close to equal (PSRF ~ 1), and any significant deviance from equality suggests that the chains have yet to converge. 14 | 15 | By default, ``MOSFiT`` will run for a small, fixed number of iterations (``-i 5000``), regardless of how well-converged a model is, to guarantee the total runtime is deterministic. If however the ``-R`` option is passed to ``MOSFiT``, the code will continue to evolve the chains beyond the iteration limit specified by ``-i`` until the PSRF is less than a prescribed value (by default 1.1, unless the user sets another value using ``-R``). 16 | 17 | Another measure of convergence is the autocorrelation time :math:`\tau_{\rm auto}`, estimated using the ``acor`` function embedded within ``emcee``. Unfortunately, this metric usually does not give an indication of how close one is to convergence until one is already converged, as it fails to yield an estimate for the autocorrelation time if :math:`\tau_{\rm auto} > i`, where :math:`i` is the number of iterations. We find that typically chains must run for significantly longer than what is required to converge according to the PSRF before ``acor`` will yield a numerical value (``-R 1.05`` or less). 18 | 19 | The fact that ``acor`` does not yield a value until the PSRF ~ 1 means that the number of independent draws from the posterior is significantly constrained unless the user chooses to run their chains for much longer. ``MOSFiT`` can be instructed to run until a certain number of independent samples are available via the ``-U`` option. 20 | 21 | .. _scoring: 22 | 23 | ------- 24 | Scoring 25 | ------- 26 | 27 | Model compatibility with a given dataset is measured using the "Watanabe-Akaike information criterion" (WAIC, also known as the "widely applicable information criterion", [WAT2010]_), which is simply the score of the parameter combination with the highest likelihood minus the variance of the scores within the fully-converged posterior. Ideally, one prefers models with the fewest free parameters, the WAIC estimates the *effective* number of free parameters for a given model and adjusts the score accordingly. In principle, two models with the same score for their best fits may have wildly different WAIC scores depending on the distribution of scores within their posteriors. This criterion is less sensitive to overfitting than simply comparing the best scores yielded by two models, and should also provide a fair comparisson between models with different numbers of free parameters. 28 | 29 | .. [WAT2010] `Watanabe et al. 2010 `_ 30 | -------------------------------------------------------------------------------- /docs/command_line.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | Command line arguments 3 | ====================== 4 | 5 | Below are descriptions of the command line arguments available for ``MOSFiT``. 6 | 7 | .. autoprogram:: mosfit.main:get_parser() 8 | -------------------------------------------------------------------------------- /docs/images/light-curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guillochon/MOSFiT/92e60f130bb011248ed07273b82e780266a5cbd1/docs/images/light-curve.png -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | ====== 2 | MOSFiT 3 | ====== 4 | 5 | Welcome to the documentation for MOSFiT (The Modular Open Source Fitter for Transients), a Python 2.7/3.x package for fitting, sharing, and estimating the parameters of transients via user-contributed transient models. 6 | 7 | Please see the links below for information on how to install and run the package. 8 | 9 | ------------ 10 | Using MOSFiT 11 | ------------ 12 | 13 | .. toctree:: 14 | :maxdepth: 2 15 | 16 | installation.rst 17 | getting_started.rst 18 | models.rst 19 | fitting.rst 20 | outputs.rst 21 | package.rst 22 | assessing.rst 23 | error.rst 24 | accessibility.rst 25 | help.rst 26 | command_line.rst 27 | api.rst 28 | 29 | ------------------ 30 | Indices and tables 31 | ------------------ 32 | 33 | * :ref:`genindex` 34 | * :ref:`modindex` 35 | * :ref:`search` 36 | 37 | .. _maintainers: 38 | 39 | --------------------- 40 | License & Attribution 41 | --------------------- 42 | 43 | Copyright 2016-2018, `James Guillochon `_, Matt Nicholl, and contributors. 44 | 45 | The source code is made available under the terms of the MIT license. 46 | -------------------------------------------------------------------------------- /docs/installation.rst: -------------------------------------------------------------------------------- 1 | .. _installation: 2 | 3 | ============ 4 | Installation 5 | ============ 6 | 7 | Several installation methods for ``MOSFiT`` are outlined below. If you run into 8 | issues, `open a new issue `_ on 9 | GitHub. 10 | 11 | .. _anaconda: 12 | 13 | ------------------------------- 14 | Setting up MOSFiT with Anaconda 15 | ------------------------------- 16 | 17 | **Platforms:** MacOS X, Linux, and Windows 18 | 19 | We recommend using the `Anaconda `__ Python 20 | distribution from Continuum Analytics (or the related Miniconda distribution) 21 | as your Python environment. 22 | 23 | After installing conda, ``MOSFiT`` can be installed via: 24 | 25 | .. code-block:: bash 26 | 27 | conda install -c conda-forge mosfit 28 | 29 | .. _pip: 30 | 31 | ------------------- 32 | Installing with pip 33 | ------------------- 34 | 35 | **Platforms:** MacOS X, Linux, and Windows 36 | 37 | Installing ``MOSFiT`` with pip is straightforward: 38 | 39 | .. code-block:: bash 40 | 41 | pip install mosfit 42 | 43 | .. _source: 44 | 45 | ---------------------- 46 | Installing from source 47 | ---------------------- 48 | 49 | **Platforms:** MacOS X, Linux, and Windows 50 | 51 | If you are interested in performing more serious development work, it is probably best to install ``MOSFiT`` from source. This can be done by cloning the repository and then running the ``setup.py`` script: 52 | 53 | .. code-block:: bash 54 | 55 | git clone https://github.com/guillochon/MOSFiT.git 56 | cd MOSFiT 57 | python setup.py install 58 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | set SPHINXPROJ=MOSFiT 13 | 14 | if "%1" == "" goto help 15 | 16 | %SPHINXBUILD% >NUL 2>NUL 17 | if errorlevel 9009 ( 18 | echo. 19 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 20 | echo.installed, then set the SPHINXBUILD environment variable to point 21 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 22 | echo.may add the Sphinx directory to PATH. 23 | echo. 24 | echo.If you don't have Sphinx installed, grab it from 25 | echo.http://sphinx-doc.org/ 26 | exit /b 1 27 | ) 28 | 29 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 30 | goto end 31 | 32 | :help 33 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 34 | 35 | :end 36 | popd 37 | -------------------------------------------------------------------------------- /docs/package.rst: -------------------------------------------------------------------------------- 1 | .. _package: 2 | 3 | ================== 4 | Using as a package 5 | ================== 6 | 7 | If you wish to produce light curves or other data products for a given model without using the fitting and evidence accumulation features of ``MOSFiT``, functions within the code can be accessed by importing the ``mosfit`` package into your Python code. 8 | 9 | .. _run: 10 | 11 | --------------------- 12 | Produce model outputs 13 | --------------------- 14 | 15 | In the code snippet below, we fetch a supernova's data from the Open Catalogs using the ``Fetcher`` class, create a ``Model`` that initializes from the fetched data, and finally run the model: 16 | 17 | .. code-block:: python 18 | 19 | import mosfit 20 | import numpy as np 21 | 22 | # Create an instance of the `Fetcher` class. 23 | my_fetcher = mosfit.fetcher.Fetcher() 24 | 25 | # Fetch some data from the Open Supernova Catalog. 26 | fetched = my_fetcher.fetch('SN2009do')[0] 27 | 28 | # Instantiatiate the `Model` class (selecting 'slsn' as the model). 29 | my_model = mosfit.model.Model(model='slsn') 30 | 31 | # Load the fetched data into the model. 32 | my_model.load_data(my_fetcher.load_data(fetched), event_name=fetched['name']) 33 | 34 | # Generate a random input vector of free parameters. 35 | x = np.random.rand(my_model.get_num_free_parameters()) 36 | 37 | # Produce model output. 38 | outputs = my_model.run(x) 39 | print('Keys in output: `{}`'.format(', '.join(list(outputs.keys())))) 40 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | astropy<3.0 2 | astrocats>=0.3.32 3 | dropbox 4 | emcee 5 | extinction 6 | numpydoc 7 | schwimmbad 8 | sphinx_automodapi 9 | sphinxcontrib-autoprogram 10 | numexpr 11 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guillochon/MOSFiT/92e60f130bb011248ed07273b82e780266a5cbd1/logo.png -------------------------------------------------------------------------------- /mosfit/__init__.py: -------------------------------------------------------------------------------- 1 | """MOSFiT: Modular light curve fitting software.""" 2 | import os 3 | 4 | import astrocats 5 | 6 | from . import constants # noqa: F401 7 | from . import fitter # noqa: F401 8 | from . import model # noqa: F401 9 | from . import plotting # noqa: F401 10 | from . import printer # noqa: F401 11 | from . import utils # noqa: F401 12 | 13 | authors = [] 14 | contributors = [] 15 | 16 | dir_name = os.path.dirname(os.path.realpath(__file__)) 17 | 18 | with open(os.path.join(dir_name, 'contributors.txt')) as f: 19 | for cont in f.read().splitlines(): 20 | if '*' in cont: 21 | authors.append(cont.split('(')[0].strip(' *')) 22 | else: 23 | contributors.append(cont.split('(')[0].strip()) 24 | 25 | __version__ = '1.2' 26 | __author__ = ' & '.join([', '.join(authors[:-1]), authors[-1]]) 27 | __contributors__ = ' & '.join([', '.join(contributors[:-1]), contributors[-1]]) 28 | __license__ = 'MIT' 29 | 30 | # Check astrocats version for schema compatibility. 31 | right_astrocats = True 32 | vparts = astrocats.__version__.split('.') 33 | req_path = os.path.join(dir_name, 'requirements.txt') 34 | with open(req_path, 'r') as f: 35 | for req in f.read().splitlines(): 36 | if 'astrocats' in req: 37 | vneed = req.split('=')[-1].split('.') 38 | if int(vparts[0]) < int(vneed[0]): 39 | right_astrocats = False 40 | elif int(vparts[1]) < int(vneed[1]): 41 | right_astrocats = False 42 | elif int(vparts[2]) < int(vneed[2]): 43 | right_astrocats = False 44 | if not right_astrocats: 45 | raise ImportError( 46 | 'Installed `astrocats` package is out of date for this version of ' 47 | 'MOSFiT, please upgrade your `astrocats` install to a version >= `' + 48 | '.'.join(vneed) + '` with either `pip` or `conda`.') 49 | -------------------------------------------------------------------------------- /mosfit/__main__.py: -------------------------------------------------------------------------------- 1 | """Entry point for MOSFiT scripts.""" 2 | 3 | if __name__ == "__main__": 4 | from . import main 5 | main.main() 6 | -------------------------------------------------------------------------------- /mosfit/cache/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guillochon/MOSFiT/92e60f130bb011248ed07273b82e780266a5cbd1/mosfit/cache/.gitkeep -------------------------------------------------------------------------------- /mosfit/constants.py: -------------------------------------------------------------------------------- 1 | """List of numerical constants, faster than using astropy with every call.""" 2 | 3 | from decimal import Decimal 4 | 5 | import astropy.constants as c 6 | import astropy.units as u 7 | import numpy as np 8 | 9 | LIKELIHOOD_FLOOR = -np.inf 10 | LOCAL_LIKELIHOOD_FLOOR = -1.0e8 11 | 12 | ANG_CGS = u.Angstrom.cgs.scale 13 | AU_CGS = u.au.cgs.scale 14 | C_CGS = c.c.cgs.value 15 | H_CGS = c.h.cgs.value 16 | DAY_CGS = u.day.cgs.scale 17 | FOE = 1.0e51 18 | FOUR_PI = 4.0 * np.pi 19 | SQRT_2_PI = np.sqrt(2.0 * np.pi) 20 | IPI = 1.0 / np.pi 21 | KM_CGS = u.km.cgs.scale 22 | M_SUN_CGS = c.M_sun.cgs.value 23 | M_P_CGS = c.m_p.cgs.value 24 | MEV_CGS = u.MeV.cgs.scale 25 | MAG_FAC = 2.5 26 | MPC_CGS = u.Mpc.cgs.scale 27 | 28 | KS_DAYS = float(Decimal('1000') / Decimal(DAY_CGS)) 29 | H_C_CGS = H_CGS * C_CGS 30 | H_C_ANG_CGS = H_C_CGS / ANG_CGS 31 | 32 | G_CGS = c.G.cgs.value 33 | -------------------------------------------------------------------------------- /mosfit/contributors.txt: -------------------------------------------------------------------------------- 1 | James Guillochon (https://github.com/guillochon, guillochon@gmail.com)* 2 | Matt Nicholl (https://github.com/mnicholl, mattnicholl1@gmail.com)* 3 | Brenna Mockler 4 | Ashley Villar 5 | -------------------------------------------------------------------------------- /mosfit/dependencies.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guillochon/MOSFiT/92e60f130bb011248ed07273b82e780266a5cbd1/mosfit/dependencies.txt -------------------------------------------------------------------------------- /mosfit/logo.txt: -------------------------------------------------------------------------------- 1 | ╔═════════════════════════════════════════════════════════════════════════════════════════╗ 2 | ║ !m;@@@#.@ :@@; !e!g ``@@@@@ !e!r :@@@@@ !e!b ::::,. ` !e║ 3 | ║ !m`@@@@@@' @@@@@@@ !e!g @@@@@@@@@@': !e!r @@@@@@@@@ !e!y @@@@@@@@@@@@@. !e!b @@@@@@@@@@@@@@ !e║ 4 | ║ !m@@@@@@@ @@@@@@@# !e!g #@@@@@@@@@@@@@, !e!r @@@@@@@@@@@ !e!y @@@@@@@',` !e!b @@@@@@@' !e║ 5 | ║ !m`@@@@@@@ '@@@@@@ !e!g `@@@@@@ .@@@@ !e!r @@@@@ @@; !e!y.@@@@' @@@@ !e!b @@@@@@ !e║ 6 | ║ !m@@@@@@# '@@@@@@@ !e!g @@@@@ `;@@; !e!r @@@@@ @. !e!y @@@@@@@@@@ @@@; !e!b @@@@@ !e║ 7 | ║ !m@@@@@@@@` @@@@@@@@ !e!g #@@@@ @@@ !e!r @@@@@@; !e!y @@@: #@@` !e!b @@@@@` !e║ 8 | ║ !m@@@@@@@@ #@@@@ @@@ !e!g @@@@@@ ;@@@` !e!r .@@@@@@@' !e!y @@@@ `@@@ !e!b @@@@ !e║ 9 | ║ !m@@@@ `@@@@@@ @@@ !e!g `@@@@@@ @@@@ !e!r #@@@@@' !e!y @@@ @@@ !e!b @@@@ !e║ 10 | ║ !m@@@',@@@@@@ @@@ !e!g @@@@@@@ @@@ !e!r ;@@ .@@@@@@ !e!y'@@@ :@@ !e!b `@@@@ !e║ 11 | ║ !m;@@@ @@@: ,@@@ !e!g @@@@@@@@@@@ !e!r ;@@@@@@@@@@@ !e!y `@ !e!b @' !e║ 12 | ║ !m;@@@ ,@# @@# !e!g ;@@@@@@@, !e!r @@;@@@@@` !e║ 13 | ╚═════════════════════════════════════════════════════════════════════════════════════════╝ 14 | -------------------------------------------------------------------------------- /mosfit/models/bns/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e19, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "texplosion":{ 8 | "min_value":-1.0, 9 | "max_value":0.0 10 | }, 11 | "Mchirp":{ 12 | "min_value":0.7, 13 | "max_value":2.0 14 | }, 15 | "q":{ 16 | "min_value":0.4, 17 | "max_value":1.0 18 | }, 19 | "alpha":{ 20 | "min_value":0.1, 21 | "max_value":1.0 22 | }, 23 | "disk_frac":{ 24 | "min_value":0.05, 25 | "max_value":0.5 26 | }, 27 | "shock_frac":{ 28 | "min_value":0.0, 29 | "max_value":1.0 30 | }, 31 | "cos_theta":{ 32 | "min_value":0.0, 33 | "max_value":1.0 34 | }, 35 | "cos_theta_open":{ 36 | "value":0.707107 37 | }, 38 | "cos_theta_cocoon":{ 39 | "value":0.866025 40 | }, 41 | "s":{ 42 | "value":1.0 43 | }, 44 | "Mtov":{ 45 | "min_value":2.0, 46 | "max_value":2.5 47 | }, 48 | "LambdaSym":{ 49 | "min_value":10, 50 | "max_value":2000 51 | }, 52 | "kappa_blue":{ 53 | "value":0.5 54 | }, 55 | "kappa_red":{ 56 | "value":10 57 | }, 58 | "temperature":{ 59 | "value":2500 60 | }, 61 | "variance":{ 62 | "min_value":1.0e-3, 63 | "max_value":100.0, 64 | "log":true 65 | }, 66 | "codeltatime":{ 67 | "min_value":1.0e-3, 68 | "max_value":1.0e3, 69 | "log":true 70 | }, 71 | "codeltalambda":{ 72 | "min_value":1.0e-1, 73 | "max_value":1.0e6, 74 | "log":true 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /mosfit/models/bns_generative/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "value":1.0e18 4 | }, 5 | "texplosion":{ 6 | "value":-0.05 7 | }, 8 | "Mchirp":{ 9 | "min_value":0.7, 10 | "max_value":2.0 11 | }, 12 | "q":{ 13 | "min_value":0.4, 14 | "max_value":1.0 15 | }, 16 | "alpha":{ 17 | "value":1.0 18 | }, 19 | "disk_frac":{ 20 | "value":0.15 21 | }, 22 | "shock_frac":{ 23 | "value":0.0 24 | }, 25 | "cos_theta":{ 26 | "value":0.5 27 | }, 28 | "cos_theta_open":{ 29 | "value":0.707107 30 | }, 31 | "cos_theta_cocoon":{ 32 | "value":0.866025 33 | }, 34 | "s":{ 35 | "value":1.0 36 | }, 37 | "Mtov":{ 38 | "value":2.2 39 | }, 40 | "radius_ns":{ 41 | "value":11.0 42 | }, 43 | "kappa_blue":{ 44 | "value":0.5 45 | }, 46 | "kappa_red":{ 47 | "value":10 48 | }, 49 | "temperature":{ 50 | "value":2500 51 | }, 52 | "variance":{ 53 | "value":1.0e-3 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /mosfit/models/bns_magnetar/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "value":1.0e18 4 | }, 5 | "texplosion":{ 6 | "value":-0.05 7 | }, 8 | "Mchirp":{ 9 | "min_value":0.7, 10 | "max_value":2.0 11 | }, 12 | "q":{ 13 | "min_value":0.4, 14 | "max_value":1.0 15 | }, 16 | "Bfield":{ 17 | "min_value":0.1, 18 | "max_value":100.0, 19 | "log":true 20 | }, 21 | "alpha":{ 22 | "value":1.0 23 | }, 24 | "disk_frac":{ 25 | "value":0.15 26 | }, 27 | "shock_frac":{ 28 | "value":0.0 29 | }, 30 | "cos_theta":{ 31 | "value":0.5 32 | }, 33 | "cos_theta_open":{ 34 | "value":0.707107 35 | }, 36 | "cos_theta_cocoon":{ 37 | "value":0.866025 38 | }, 39 | "s":{ 40 | "value":1.0 41 | }, 42 | "Mtov":{ 43 | "value":2.2 44 | }, 45 | "radius_ns":{ 46 | "value":11.0 47 | }, 48 | "kappa_blue":{ 49 | "value":0.5 50 | }, 51 | "kappa_red":{ 52 | "value":10 53 | }, 54 | "temperature":{ 55 | "value":2500 56 | }, 57 | "variance":{ 58 | "min_value":1.0e-3, 59 | "max_value":100.0, 60 | "log":true 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /mosfit/models/csm/data/info.txt: -------------------------------------------------------------------------------- 1 | This folder contains an extended solutions table to the system presented in Chevalier 1982 (their Table 1). Table produced by Jiang, Jiang & Villar 2019. 2 | 3 | Columns are: n, s, beta_fs, beta_rs, A -------------------------------------------------------------------------------- /mosfit/models/csm/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "texplosion":{ 8 | "min_value":-500.0, 9 | "max_value":0.0 10 | }, 11 | "temperature":{ 12 | "min_value":1.0, 13 | "max_value":10000, 14 | "log":true 15 | }, 16 | "s":{ 17 | "min_value":0.0, 18 | "max_value":1.0 19 | }, 20 | "n":{ 21 | "value":12.0 22 | }, 23 | "delta":{ 24 | "value":0.0 25 | }, 26 | "r0":{ 27 | "value":6.685 28 | }, 29 | "mcsm":{ 30 | "min_value":0.1, 31 | "max_value":30.0, 32 | "log":true 33 | }, 34 | "mejecta":{ 35 | "min_value":0.1, 36 | "max_value":30.0, 37 | "log":true 38 | }, 39 | "vejecta":{ 40 | "min_value":1.0e3, 41 | "max_value":1.0e5, 42 | "log":true 43 | }, 44 | "rho":{ 45 | "min_value":1.0e-15, 46 | "max_value":1.0e-11, 47 | "log":true 48 | }, 49 | "variance":{ 50 | "min_value":1.0e-5, 51 | "max_value":1.0e1, 52 | "log":true 53 | }, 54 | "codeltatime":{ 55 | "min_value":1.0e-3, 56 | "max_value":1.0e2, 57 | "log":true 58 | }, 59 | "codeltalambda":{ 60 | "min_value":1.0e-1, 61 | "max_value":1.0e4, 62 | "log":true 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /mosfit/models/csmni/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "fnickel":{ 8 | "min_value":1.0e-3, 9 | "max_value":1.0, 10 | "log":true 11 | }, 12 | "texplosion":{ 13 | "min_value":-500.0, 14 | "max_value":0.0 15 | }, 16 | "temperature":{ 17 | "min_value":1.0, 18 | "max_value":10000, 19 | "log":true 20 | }, 21 | "kappagamma":{ 22 | "min_value":0.1, 23 | "max_value":1.0e4, 24 | "log":true 25 | }, 26 | "n":{ 27 | "value":12.0 28 | }, 29 | "delta":{ 30 | "value":0.0 31 | }, 32 | "r0":{ 33 | "value":6.685 34 | }, 35 | "mcsm":{ 36 | "min_value":0.1, 37 | "max_value":30.0, 38 | "log":true 39 | }, 40 | "mejecta":{ 41 | "min_value":0.1, 42 | "max_value":30.0, 43 | "log":true 44 | }, 45 | "kinetic_energy":{ 46 | "min_value":1.0, 47 | "max_value":10, 48 | "log":true 49 | }, 50 | "rho":{ 51 | "min_value":1.0e-15, 52 | "max_value":1.0e-11, 53 | "log":true 54 | }, 55 | "variance":{ 56 | "min_value":1.0e-5, 57 | "max_value":1.0e1, 58 | "log":true 59 | }, 60 | "codeltatime":{ 61 | "min_value":1.0e-3, 62 | "max_value":1.0e2, 63 | "log":true 64 | }, 65 | "codeltalambda":{ 66 | "min_value":1.0e-1, 67 | "max_value":1.0e4, 68 | "log":true 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /mosfit/models/default/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "fnickel":{ 8 | "min_value":1.0e-3, 9 | "max_value":1.0, 10 | "log":true 11 | }, 12 | "texplosion":{ 13 | "min_value":-500.0, 14 | "max_value":0.0 15 | }, 16 | "temperature":{ 17 | "min_value":1.0e3, 18 | "max_value":1.0e5, 19 | "log":true 20 | }, 21 | "kappagamma":{ 22 | "min_value":0.1, 23 | "max_value":1.0e4, 24 | "log":true 25 | }, 26 | "mejecta":{ 27 | "min_value":1.0e-3, 28 | "max_value":100.0, 29 | "log":true 30 | }, 31 | "vejecta":{ 32 | "min_value":1.0e3, 33 | "max_value":1.0e5, 34 | "log":true 35 | }, 36 | "variance":{ 37 | "min_value":1.0e-3, 38 | "max_value":100.0, 39 | "log":true 40 | }, 41 | "codeltatime":{ 42 | "min_value":1.0e-3, 43 | "max_value":1.0e2, 44 | "log":true 45 | }, 46 | "codeltalambda":{ 47 | "min_value":1.0e-1, 48 | "max_value":1.0e4, 49 | "log":true 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /mosfit/models/default/parameters_test.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "fnickel":{ 8 | "min_value":1.0e-3, 9 | "max_value":1.0, 10 | "log":true 11 | }, 12 | "texplosion":{ 13 | "min_value":-1000.0, 14 | "max_value":0.0 15 | }, 16 | "temperature":{ 17 | "class":"powerlaw", 18 | "alpha":-2.0, 19 | "min_value":1.0e3, 20 | "max_value":1.0e5, 21 | "log":true 22 | }, 23 | "kappagamma":{ 24 | "class":"gaussian", 25 | "mu":1.0e2, 26 | "sigma":1.0, 27 | "min_value":0.1, 28 | "max_value":1.0e4, 29 | "log":true 30 | }, 31 | "mejecta":{ 32 | "class":"powerlaw", 33 | "alpha":3.0, 34 | "min_value": 1.0, 35 | "max_value": 10.0, 36 | "log":false 37 | }, 38 | "vejecta":{ 39 | "class":"gaussian", 40 | "mu":1.0e4, 41 | "sigma":0.5e3, 42 | "min_value":1.0e3, 43 | "max_value":1.0e5, 44 | "log":false 45 | }, 46 | "variance":{ 47 | "min_value":1.0, 48 | "max_value":1.0, 49 | "log":true 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /mosfit/models/exppow/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "alpha":{ 8 | "min_value":0.0, 9 | "max_value":10.0 10 | }, 11 | "beta":{ 12 | "min_value":0.0, 13 | "max_value":10.0 14 | }, 15 | "tpeak":{ 16 | "min_value":0.01, 17 | "max_value":100.0, 18 | "log":true 19 | }, 20 | "lumscale":{ 21 | "min_value":1.0e38, 22 | "max_value":1.0e48, 23 | "log":true 24 | }, 25 | "texplosion":{ 26 | "min_value":-500.0, 27 | "max_value":0.0 28 | }, 29 | "kappa":{ 30 | "min_value":0.05, 31 | "max_value":0.2 32 | }, 33 | "mejecta":{ 34 | "min_value":1.0e-3, 35 | "max_value":100.0, 36 | "log":true 37 | }, 38 | "vejecta":{ 39 | "min_value":1.0e3, 40 | "max_value":1.0e5, 41 | "log":true 42 | }, 43 | "variance":{ 44 | "min_value":1.0e-3, 45 | "max_value":100.0, 46 | "log":true 47 | }, 48 | "codeltatime":{ 49 | "min_value":1.0e-3, 50 | "max_value":1.0e2, 51 | "log":true 52 | }, 53 | "codeltalambda":{ 54 | "min_value":1.0e-1, 55 | "max_value":1.0e4, 56 | "log":true 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /mosfit/models/fallback/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":0.0, 4 | "max_value":9e20 5 | }, 6 | "Lat1sec":{ 7 | "min_value":1.0e51, 8 | "max_value":1.0e57, 9 | "log":true 10 | }, 11 | "ton":{ 12 | "min_value":1.0e-4, 13 | "max_value":100.0, 14 | "log":true 15 | }, 16 | "texplosion":{ 17 | "min_value":-100.0, 18 | "max_value":0.0 19 | }, 20 | "kappa":{ 21 | "min_value":0.05, 22 | "max_value":0.2 23 | }, 24 | "mejecta":{ 25 | "min_value":1.0e-1, 26 | "max_value":100.0, 27 | "log":true 28 | }, 29 | "vejecta":{ 30 | "class":"gaussian", 31 | "mu":1.47e4, 32 | "sigma":4.3e3, 33 | "min_value":1.0e3, 34 | "max_value":3.0e4 35 | }, 36 | "temperature":{ 37 | "class":"gaussian", 38 | "mu":6.0e3, 39 | "sigma":1.0e3, 40 | "min_value":3.0e3, 41 | "max_value":1.0e4 42 | }, 43 | "variance":{ 44 | "min_value":1.0e-3, 45 | "max_value":100.0, 46 | "log":true 47 | }, 48 | "codeltatime":{ 49 | "min_value":1.0e-3, 50 | "max_value":1.0e3, 51 | "log":true 52 | }, 53 | "codeltalambda":{ 54 | "min_value":1.0e-1, 55 | "max_value":1.0e6, 56 | "log":true 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /mosfit/models/ia/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "fnickel":{ 8 | "min_value":1.0e-3, 9 | "max_value":1.0, 10 | "log":true 11 | }, 12 | "texplosion":{ 13 | "min_value":-200.0, 14 | "max_value":0.0 15 | }, 16 | "temperature":{ 17 | "min_value":1.0e3, 18 | "max_value":1.0e5, 19 | "log":true 20 | }, 21 | "kappa":{ 22 | "min_value":0.01, 23 | "max_value":1.0, 24 | "log":true 25 | }, 26 | "kappagamma":{ 27 | "min_value":0.1, 28 | "max_value":1.0e4, 29 | "log":true 30 | }, 31 | "mejecta":{ 32 | "min_value":1.0e-3, 33 | "max_value":3.0, 34 | "log":true 35 | }, 36 | "vejecta":{ 37 | "min_value":1.0e3, 38 | "max_value":5.0e4, 39 | "log":true 40 | }, 41 | "cutoff_wavelength":{ 42 | "min_value":2000.0, 43 | "max_value":4000.0 44 | }, 45 | "line_wavelength":{ 46 | "min_value":5000.0, 47 | "max_value":10000.0 48 | }, 49 | "line_width":{ 50 | "min_value":100.0, 51 | "max_value":5000.0 52 | }, 53 | "line_time":{ 54 | "min_value":1.0, 55 | "max_value":100.0 56 | }, 57 | "line_duration":{ 58 | "min_value":1.0, 59 | "max_value":100.0 60 | }, 61 | "line_amplitude":{ 62 | "min_value":0.0, 63 | "max_value":1.0 64 | }, 65 | "variance":{ 66 | "min_value":1.0e-3, 67 | "max_value":100.0, 68 | "log":true 69 | }, 70 | "codeltatime":{ 71 | "min_value":1.0e-3, 72 | "max_value":1.0e2, 73 | "log":true 74 | }, 75 | "codeltalambda":{ 76 | "min_value":1.0e-1, 77 | "max_value":1.0e4, 78 | "log":true 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /mosfit/models/ic/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "fnickel":{ 8 | "min_value":1.0e-3, 9 | "max_value":1.0, 10 | "log":true 11 | }, 12 | "texplosion":{ 13 | "min_value":-500.0, 14 | "max_value":0.0 15 | }, 16 | "temperature":{ 17 | "min_value":1.0e3, 18 | "max_value":1.0e5, 19 | "log":true 20 | }, 21 | "kappagamma":{ 22 | "min_value":0.1, 23 | "max_value":1.0e4, 24 | "log":true 25 | }, 26 | "mejecta":{ 27 | "min_value":1.0e-3, 28 | "max_value":100.0, 29 | "log":true 30 | }, 31 | "vejecta":{ 32 | "min_value":1.0e3, 33 | "max_value":1.0e5, 34 | "log":true 35 | }, 36 | "variance":{ 37 | "min_value":1.0e-3, 38 | "max_value":100.0, 39 | "log":true 40 | }, 41 | "codeltatime":{ 42 | "min_value":1.0e-3, 43 | "max_value":1.0e2, 44 | "log":true 45 | }, 46 | "codeltalambda":{ 47 | "min_value":1.0e-1, 48 | "max_value":1.0e4, 49 | "log":true 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /mosfit/models/kilonova/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "texplosion":{ 8 | "min_value":-500.0, 9 | "max_value":0.0 10 | }, 11 | "mejecta_blue":{ 12 | "min_value":1.0e-3, 13 | "max_value":5.0e-2, 14 | "log":false 15 | }, 16 | "kappa_blue":{ 17 | "value":0.5 18 | }, 19 | "kappa_red":{ 20 | "value":10 21 | }, 22 | "kappa_purple":{ 23 | "value":3 24 | }, 25 | "mejecta_red":{ 26 | "min_value":1.0e-3, 27 | "max_value":1.0e-1, 28 | "log":true 29 | }, 30 | "mejecta_purple":{ 31 | "min_value":1.0e-3, 32 | "max_value":1.0e-1, 33 | "log":true 34 | }, 35 | "vejecta_blue":{ 36 | "min_value":6.0e4, 37 | "max_value":1.2e5, 38 | "log":false 39 | }, 40 | "vejecta_red":{ 41 | "min_value":1.0e4, 42 | "max_value":6.0e4, 43 | "log":false 44 | }, 45 | "vejecta_purple":{ 46 | "min_value":1.0e4, 47 | "max_value":1.0e5, 48 | "log":false 49 | }, 50 | "temperature_red":{ 51 | "min_value":1.0e2, 52 | "max_value":1.0e4, 53 | "log":true 54 | }, 55 | "temperature_blue":{ 56 | "min_value":1.0e2, 57 | "max_value":1.0e4, 58 | "log":true 59 | }, 60 | "temperature_purple":{ 61 | "min_value":1.0e2, 62 | "max_value":1.0e4, 63 | "log":true 64 | }, 65 | "variance":{ 66 | "min_value":1.0e-3, 67 | "max_value":100.0, 68 | "log":true 69 | }, 70 | "codeltatime":{ 71 | "min_value":1.0e-3, 72 | "max_value":1.0e3, 73 | "log":true 74 | }, 75 | "codeltalambda":{ 76 | "min_value":1.0e-1, 77 | "max_value":1.0e6, 78 | "log":true 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /mosfit/models/magnetar/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "Pspin":{ 8 | "min_value":1.0, 9 | "max_value":10.0 10 | }, 11 | "Bfield":{ 12 | "min_value":0.1, 13 | "max_value":10.0, 14 | "log":true 15 | }, 16 | "Mns":{ 17 | "min_value":1.0, 18 | "max_value":2.0 19 | }, 20 | "thetaPB":{ 21 | "min_value":0.0, 22 | "max_value":1.57079632679 23 | }, 24 | "texplosion":{ 25 | "min_value":-500.0, 26 | "max_value":0.0 27 | }, 28 | "temperature":{ 29 | "min_value":1.0e3, 30 | "max_value":1.0e5, 31 | "log":true 32 | }, 33 | "kappa":{ 34 | "min_value":0.05, 35 | "max_value":0.2 36 | }, 37 | "kappagamma":{ 38 | "min_value":0.1, 39 | "max_value":1.0e4, 40 | "log":true 41 | }, 42 | "mejecta":{ 43 | "min_value":1.0e-3, 44 | "max_value":100.0, 45 | "log":true 46 | }, 47 | "vejecta":{ 48 | "min_value":1.0e3, 49 | "max_value":1.0e5, 50 | "log":true 51 | }, 52 | "variance":{ 53 | "min_value":1.0e-3, 54 | "max_value":100.0, 55 | "log":true 56 | }, 57 | "codeltatime":{ 58 | "min_value":1.0e-3, 59 | "max_value":1.0e2, 60 | "log":true 61 | }, 62 | "codeltalambda":{ 63 | "min_value":1.0e-1, 64 | "max_value":1.0e4, 65 | "log":true 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /mosfit/models/magni/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "fnickel":{ 8 | "min_value":0.0, 9 | "max_value":1.0 10 | }, 11 | "Pspin":{ 12 | "min_value":1.0, 13 | "max_value":10.0 14 | }, 15 | "Bfield":{ 16 | "min_value":0.1, 17 | "max_value":10.0, 18 | "log":true 19 | }, 20 | "Mns":{ 21 | "min_value":1.0, 22 | "max_value":2.0 23 | }, 24 | "thetaPB":{ 25 | "min_value":0.0, 26 | "max_value":1.57079632679 27 | }, 28 | "texplosion":{ 29 | "min_value":-500.0, 30 | "max_value":0.0 31 | }, 32 | "temperature":{ 33 | "min_value":1.0e3, 34 | "max_value":1.0e5, 35 | "log":true 36 | }, 37 | "kappa":{ 38 | "min_value":0.05, 39 | "max_value":0.2 40 | }, 41 | "kappagamma":{ 42 | "min_value":0.1, 43 | "max_value":1.0e4, 44 | "log":true 45 | }, 46 | "mejecta":{ 47 | "min_value":1.0e-3, 48 | "max_value":100.0, 49 | "log":true 50 | }, 51 | "vejecta":{ 52 | "min_value":1.0e3, 53 | "max_value":1.0e5, 54 | "log":true 55 | }, 56 | "variance":{ 57 | "min_value":1.0e-3, 58 | "max_value":100.0, 59 | "log":true 60 | }, 61 | "codeltatime":{ 62 | "min_value":1.0e-3, 63 | "max_value":1.0e2, 64 | "log":true 65 | }, 66 | "codeltalambda":{ 67 | "min_value":1.0e-1, 68 | "max_value":1.0e4, 69 | "log":true 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /mosfit/models/nsbh/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "value":1.0e19, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "texplosion":{ 8 | "min_value":-1.0, 9 | "max_value":0.0 10 | }, 11 | "Mchirp":{ 12 | "min_value":1.0, 13 | "max_value":6.0 14 | }, 15 | "q":{ 16 | "min_value":0.1, 17 | "max_value":1.0 18 | }, 19 | "chi":{ 20 | "min_value":-1.0, 21 | "max_value":1.0 22 | }, 23 | "fMag":{ 24 | "min_value":0.1, 25 | "max_value":1.0 26 | }, 27 | "cos_theta":{ 28 | "min_value":0.0, 29 | "max_value":1.0 30 | }, 31 | "cos_theta_open":{ 32 | "value":0.707 33 | }, 34 | "cos_theta_open_dyn":{ 35 | "value":0.174 36 | }, 37 | "s":{ 38 | "value":1.0 39 | }, 40 | "Mtov":{ 41 | "value":2.17 42 | }, 43 | "LambdaEff":{ 44 | "min_value":0, 45 | "max_value":100 46 | }, 47 | "kappa_dyn":{ 48 | "value":10.0 49 | }, 50 | "kappa_magnetic":{ 51 | "value":10.0 52 | }, 53 | "kappa_thermal_blue":{ 54 | "value":1.0 55 | }, 56 | "kappa_thermal_purple":{ 57 | "value":5.0 58 | }, 59 | "temperature":{ 60 | "value":2500 61 | }, 62 | "variance":{ 63 | "min_value":1.0e-3, 64 | "max_value":100.0, 65 | "log":true 66 | }, 67 | "codeltatime":{ 68 | "min_value":1.0e-3, 69 | "max_value":1.0e3, 70 | "log":true 71 | }, 72 | "codeltalambda":{ 73 | "min_value":1.0e-1, 74 | "max_value":1.0e6, 75 | "log":true 76 | } 77 | } -------------------------------------------------------------------------------- /mosfit/models/nsbh_generative/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "value":1.0e19, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "texplosion":{ 8 | "min_value":-1.0, 9 | "max_value":0.0 10 | }, 11 | "M1":{ 12 | "min_value":3.0, 13 | "max_value":20.0 14 | }, 15 | "M2":{ 16 | "min_value":0.9, 17 | "max_value":2.2 18 | }, 19 | "chi":{ 20 | "min_value":-0.01, 21 | "max_value":0.17 22 | }, 23 | "radius_ns":{ 24 | "min_value":10, 25 | "max_value":15 26 | }, 27 | "fMag":{ 28 | "min_value":0.1, 29 | "max_value":1.0 30 | }, 31 | "cos_theta":{ 32 | "min_value":0.883, 33 | "max_value":1.00 34 | }, 35 | "cos_theta_open":{ 36 | "value":0.7071 37 | }, 38 | "cos_theta_open_dyn":{ 39 | "value":0.1736 40 | }, 41 | "s":{ 42 | "value":1.0 43 | }, 44 | "Mtov":{ 45 | "value":2.17 46 | }, 47 | "kappa_dyn":{ 48 | "value":10.0 49 | }, 50 | "kappa_magnetic":{ 51 | "value":10.0 52 | }, 53 | "kappa_thermal_blue":{ 54 | "value":1.0 55 | }, 56 | "kappa_thermal_purple":{ 57 | "value":5.0 58 | }, 59 | "temperature":{ 60 | "value":2500 61 | }, 62 | "variance":{ 63 | "min_value":1.0e-3, 64 | "max_value":100.0, 65 | "log":true 66 | }, 67 | "codeltatime":{ 68 | "min_value":1.0e-3, 69 | "max_value":1.0e3, 70 | "log":true 71 | }, 72 | "codeltalambda":{ 73 | "min_value":1.0e-1, 74 | "max_value":1.0e6, 75 | "log":true 76 | } 77 | } -------------------------------------------------------------------------------- /mosfit/models/rprocess/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "frad":{ 8 | "min_value":0.9, 9 | "max_value":1.0, 10 | "log":true 11 | }, 12 | "texplosion":{ 13 | "min_value":-500.0, 14 | "max_value":0.0 15 | }, 16 | "mejecta":{ 17 | "min_value":1.0e-3, 18 | "max_value":1.0e-1, 19 | "log":true 20 | }, 21 | "vejecta":{ 22 | "min_value":3.0e4, 23 | "max_value":9.0e4, 24 | "log":true 25 | }, 26 | "variance":{ 27 | "min_value":1.0e-3, 28 | "max_value":100.0, 29 | "log":true 30 | }, 31 | "codeltatime":{ 32 | "min_value":1.0e-3, 33 | "max_value":1.0e2, 34 | "log":true 35 | }, 36 | "codeltalambda":{ 37 | "min_value":1.0e-1, 38 | "max_value":1.0e4, 39 | "log":true 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /mosfit/models/shockni/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost": { 3 | "min_value": 1.0e16, 4 | "max_value": 1.0e23, 5 | "log": true 6 | }, 7 | "texplosion": { 8 | "min_value": -500.0, 9 | "max_value": 0.0 10 | }, 11 | "mejecta": { 12 | "min_value": 1.0e-3, 13 | "max_value": 100, 14 | "log": true 15 | }, 16 | "radius_star": { 17 | "min_value": 1e8, 18 | "max_value": 1e15, 19 | "log": true 20 | }, 21 | "fnickel": { 22 | "min_value": 1.0e-3, 23 | "max_value": 1.0, 24 | "log": true 25 | }, 26 | "kappa": { 27 | "min_value": 0.1, 28 | "max_value": 0.2, 29 | "log": false 30 | }, 31 | "kappagamma":{ 32 | "min_value":0.1, 33 | "max_value":1.0e4, 34 | "log":true 35 | }, 36 | "vejecta": { 37 | "min_value": 1.0e3, 38 | "max_value": 1.0e5, 39 | "log": true 40 | }, 41 | "temperature": { 42 | "min_value": 1.0e2, 43 | "max_value": 1.0e4, 44 | "log": true 45 | }, 46 | "variance": { 47 | "min_value": 1.0e-3, 48 | "max_value": 100.0, 49 | "log": true 50 | }, 51 | "codeltatime": { 52 | "min_value": 1.0e-3, 53 | "max_value": 1.0e3, 54 | "log": true 55 | }, 56 | "codeltalambda": { 57 | "min_value": 1.0e-1, 58 | "max_value": 1.0e6, 59 | "log": true 60 | } 61 | } -------------------------------------------------------------------------------- /mosfit/models/slsn/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "Pspin":{ 8 | "min_value":1.0, 9 | "max_value":10.0 10 | }, 11 | "Bfield":{ 12 | "min_value":0.1, 13 | "max_value":10.0 14 | }, 15 | "Mns":{ 16 | "min_value":1.0, 17 | "max_value":2.0 18 | }, 19 | "thetaPB":{ 20 | "min_value":0.0, 21 | "max_value":1.57079632679 22 | }, 23 | "texplosion":{ 24 | "min_value":-500.0, 25 | "max_value":0.0 26 | }, 27 | "kappa":{ 28 | "min_value":0.05, 29 | "max_value":0.2 30 | }, 31 | "kappagamma":{ 32 | "min_value":0.1, 33 | "max_value":1.0e4, 34 | "log":true 35 | }, 36 | "mejecta":{ 37 | "min_value":0.1, 38 | "max_value":100.0, 39 | "log":true 40 | }, 41 | "vejecta":{ 42 | "min_value":5.0e3, 43 | "max_value":2.0e4 44 | }, 45 | "temperature":{ 46 | "min_value":3.0e3, 47 | "max_value":1.0e4 48 | }, 49 | "variance":{ 50 | "min_value":1.0e-3, 51 | "max_value":100.0, 52 | "log":true 53 | }, 54 | "codeltatime":{ 55 | "min_value":1.0e-3, 56 | "max_value":1.0e2, 57 | "log":true 58 | }, 59 | "codeltalambda":{ 60 | "min_value":1.0e-1, 61 | "max_value":1.0e4, 62 | "log":true 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /mosfit/models/slsnni/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "nhhost":{ 3 | "min_value":1.0e16, 4 | "max_value":1.0e23, 5 | "log":true 6 | }, 7 | "fnickel":{ 8 | "min_value":1e-3, 9 | "max_value":1.0, 10 | "log":true 11 | }, 12 | "Pspin":{ 13 | "min_value":0.7, 14 | "max_value":20.0 15 | }, 16 | "Bfield":{ 17 | "min_value":0.01, 18 | "max_value":10.0, 19 | "log":true 20 | }, 21 | "Mns":{ 22 | "min_value":1.0, 23 | "max_value":2.0 24 | }, 25 | "thetaPB":{ 26 | "min_value":0.0, 27 | "max_value":1.57079632679 28 | }, 29 | "texplosion":{ 30 | "min_value":-500.0, 31 | "max_value":0.0 32 | }, 33 | "kappa":{ 34 | "min_value":0.05, 35 | "max_value":0.2 36 | }, 37 | "kappagamma":{ 38 | "min_value":0.1, 39 | "max_value":1.0e4, 40 | "log":true 41 | }, 42 | "mejecta":{ 43 | "min_value":0.1, 44 | "max_value":100.0, 45 | "log":true 46 | }, 47 | "alpha":{ 48 | "min_value":0.0, 49 | "max_value":5.0 50 | }, 51 | "cutoff_wavelength":{ 52 | "min_value":2000.0, 53 | "max_value":6000.0 54 | }, 55 | "vejecta":{ 56 | "min_value":5.0e3, 57 | "max_value":2.0e4 58 | }, 59 | "temperature":{ 60 | "min_value":3.0e3, 61 | "max_value":1.0e4 62 | }, 63 | "variance":{ 64 | "min_value":1.0e-3, 65 | "max_value":100.0, 66 | "log":true 67 | }, 68 | "codeltatime":{ 69 | "min_value":1.0e-3, 70 | "max_value":1.0e2, 71 | "log":true 72 | }, 73 | "codeltalambda":{ 74 | "min_value":1.0e-1, 75 | "max_value":1.0e4, 76 | "log":true 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /mosfit/models/tde/data/info.txt: -------------------------------------------------------------------------------- 1 | the folder 4-3 contains the dmdes for gamma = 4/3, converted from the dmdts on James Guillochon's blog (http://astrocrash.net/wp-content/uploads/2013/12/dmdts.zip). 2 | 3 | Same for folder 5-3 but with gamma = 5/3. 4 | 5 | file formatting : first row is energy, second row is dmde 6 | units = cgs -------------------------------------------------------------------------------- /mosfit/models/tde/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "starmass":{ 3 | "min_value":0.01, 4 | "max_value":30 5 | }, 6 | "Tviscous":{ 7 | "min_value":1.0e-3, 8 | "max_value":1.0e2, 9 | "log":true 10 | }, 11 | "nhhost":{ 12 | "min_value":1.0e16, 13 | "max_value":1.0e23, 14 | "log":true 15 | }, 16 | "b":{ 17 | "min_value":0.0, 18 | "max_value":2.0 19 | }, 20 | "bhmass":{ 21 | "min_value":5.0e4, 22 | "max_value":5.0e8, 23 | "log":true 24 | }, 25 | "efficiency":{ 26 | "min_value":0.0001, 27 | "max_value":0.4, 28 | "log":true 29 | }, 30 | "texplosion":{ 31 | "min_value":-500.0, 32 | "max_value":0.0 33 | }, 34 | "variance":{ 35 | "min_value":1.0e-3, 36 | "max_value":100.0, 37 | "log":true 38 | }, 39 | "lphoto":{ 40 | "min_value":0.0, 41 | "max_value":2.0 42 | }, 43 | "Rph0":{ 44 | "min_value":1.0e-4, 45 | "max_value":1.0e4, 46 | "log":true 47 | }, 48 | "codeltatime":{ 49 | "min_value":1.0e-3, 50 | "max_value":1.0e3, 51 | "log":true 52 | }, 53 | "codeltalambda":{ 54 | "min_value":1.0e-1, 55 | "max_value":1.0e6, 56 | "log":true 57 | } 58 | } -------------------------------------------------------------------------------- /mosfit/models/types.json: -------------------------------------------------------------------------------- 1 | { 2 | "PISN":["default"], 3 | "SLSN-I":["slsn", "csm", "magni"], 4 | "SLSN-II":["csm", "slsn", "magni"], 5 | "Ic":["ic", "default"], 6 | "Ia":["ia", "default"], 7 | "IIn":["default"], 8 | "Kilonova":["kilonova", "rprocess"], 9 | "NS + NS":["kilonova"], 10 | "BH + NS":["kilonova"] 11 | } 12 | -------------------------------------------------------------------------------- /mosfit/modules/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Module`.""" 2 | from .arrays import * # noqa: F403 3 | from .constraints import * # noqa: F403 4 | from .datas import * # noqa: F403 5 | from .energetics import * # noqa: F403 6 | from .engines import * # noqa: F403 7 | from .module import Module 8 | from .objectives import * # noqa: F403 9 | from .observables import * # noqa: F403 10 | from .outputs import * # noqa: F403 11 | from .parameters import * # noqa: F403 12 | from .photospheres import * # noqa: F403 13 | from .seds import * # noqa: F403 14 | from .transforms import * # noqa: F403 15 | 16 | __all__ = ['Module'] 17 | __all__.extend(arrays.__all__) # noqa: F405 18 | __all__.extend(constraints.__all__) # noqa: F405 19 | __all__.extend(datas.__all__) # noqa: F405 20 | __all__.extend(energetics.__all__) # noqa: F405 21 | __all__.extend(engines.__all__) # noqa: F405 22 | __all__.extend(objectives.__all__) # noqa: F405 23 | __all__.extend(observables.__all__) # noqa: F405 24 | __all__.extend(outputs.__all__) # noqa: F405 25 | __all__.extend(parameters.__all__) # noqa: F405 26 | __all__.extend(photospheres.__all__) # noqa: F405 27 | __all__.extend(seds.__all__) # noqa: F405 28 | __all__.extend(transforms.__all__) # noqa: F405 29 | -------------------------------------------------------------------------------- /mosfit/modules/arrays/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Array` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/arrays/array.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Array` class.""" 2 | from mosfit.modules.module import Module 3 | 4 | # Important: Only define one ``Module`` class per file. 5 | 6 | 7 | class Array(Module): 8 | """Template class for arrays.""" 9 | -------------------------------------------------------------------------------- /mosfit/modules/arrays/densetimes.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `DenseTimes` class.""" 2 | from collections import OrderedDict 3 | 4 | import numpy as np 5 | from mosfit.modules.arrays.array import Array 6 | 7 | # Important: Only define one ``Module`` class per file. 8 | 9 | 10 | class DenseTimes(Array): 11 | """Generate an evenly-spaced array of times for use in calculations. 12 | 13 | This class ensures an even time-sampling between the time of explosion 14 | and the last datapoint, as many transients may lack regular cadence data. 15 | """ 16 | 17 | N_TIMES = 100 18 | L_T_MIN = -6 # in days 19 | 20 | def __init__(self, **kwargs): 21 | """Initialize module.""" 22 | super(DenseTimes, self).__init__(**kwargs) 23 | self._n_times = kwargs[ 24 | 'n_times'] if 'n_times' in kwargs else self.N_TIMES 25 | 26 | def process(self, **kwargs): 27 | """Process module.""" 28 | self._rest_times = kwargs['rest_times'] 29 | self._rest_t_explosion = kwargs[self.key('resttexplosion')] 30 | 31 | outputs = OrderedDict() 32 | max_times = max(self._rest_times) 33 | if max_times > self._rest_t_explosion: 34 | outputs['dense_times'] = np.unique( 35 | np.concatenate(([0.0], [ 36 | x + self._rest_t_explosion for x in np.logspace( 37 | self.L_T_MIN, 38 | np.log10(max_times - self._rest_t_explosion), 39 | num=self._n_times) 40 | ], self._rest_times))) 41 | else: 42 | outputs['dense_times'] = np.array(self._rest_times) 43 | outputs['dense_indices'] = np.searchsorted(outputs['dense_times'], 44 | self._rest_times) 45 | return outputs 46 | -------------------------------------------------------------------------------- /mosfit/modules/arrays/resttimes.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `RestTimes` class.""" 2 | from collections import OrderedDict 3 | 4 | import numpy as np 5 | from mosfit.modules.arrays.array import Array 6 | 7 | 8 | # Important: Only define one ``Module`` class per file. 9 | 10 | 11 | class RestTimes(Array): 12 | """This class converts the observed times to rest-frame times.""" 13 | 14 | def process(self, **kwargs): 15 | """Process module.""" 16 | self._times = kwargs['all_times'] 17 | self._t_explosion = kwargs[self.key('texplosion')] 18 | self._z = kwargs[self.key('redshift')] 19 | 20 | outputs = OrderedDict() 21 | outputs['rest_times'] = np.array([ 22 | x / (1.0 + self._z) for x in self._times 23 | ]) 24 | outputs[self.key('resttexplosion')] = self._t_explosion / ( 25 | 1.0 + self._z) 26 | return outputs 27 | -------------------------------------------------------------------------------- /mosfit/modules/constraints/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Constraint` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/constraints/bns_constraints.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `BNSConstraints` class.""" 2 | import astropy.constants as c 3 | import numpy as np 4 | 5 | from mosfit.constants import C_CGS, M_SUN_CGS, KM_CGS, G_CGS 6 | from mosfit.modules.constraints.constraint import Constraint 7 | 8 | # G_CGS = c.G.cgs.value 9 | 10 | 11 | class BNSConstraints(Constraint): 12 | """BNS constraints. 13 | 14 | 1. M1 < Mtov 15 | 2. M2 > 0.8 Msun 16 | 3. 9 < R_ns < 16 17 | 4. Causality relation relating Mtov and radius 18 | 19 | Free parameters are Mchirp and q. Thus for large q, M1 can be larger or M2 20 | smaller than allowed by NS EoS. Constraint penalises masses outside range 21 | 22 | Realistic EoS prevents extreme values of radius 23 | """ 24 | 25 | def __init__(self, **kwargs): 26 | """Initialize module.""" 27 | super(BNSConstraints, self).__init__(**kwargs) 28 | 29 | def process(self, **kwargs): 30 | """Process module. Add constraints below.""" 31 | self._score_modifier = 0.0 32 | # Mass of heavier NS 33 | self._m1 = kwargs[self.key('M1')] 34 | # Mass of lighter NS 35 | self._m2 = kwargs[self.key('M2')] 36 | self._m_tov = kwargs[self.key('Mtov')] 37 | self._r1 = kwargs[self.key('R1')] 38 | self._r2 = kwargs[self.key('R2')] 39 | 40 | # Soft max/min, proportional to diff^2 and scaled to -100 for 0.1 Msun 41 | # 1 42 | if self._m1 > self._m_tov: 43 | self._score_modifier -= (100. * (self._m1-self._m_tov))**2 44 | 45 | # 2 46 | if self._m2 < 0.8: 47 | self._score_modifier -= (100. * (0.8-self._m2))**2 48 | 49 | # 3 50 | if self._r1 > 16: 51 | self._score_modifier -= (20. * (self._r1-16))**2 52 | 53 | if self._r1 < 9: 54 | self._score_modifier -= (20. * (9-self._r1))**2 55 | 56 | if self._r2 > 16: 57 | self._score_modifier -= (20. * (self._r2-16))**2 58 | 59 | if self._r2 < 9: 60 | self._score_modifier -= (20. * (9-self._r2))**2 61 | 62 | 63 | # 4 64 | Mcaus = 1/2.82 * C_CGS**2 * self._r1 * KM_CGS / G_CGS / M_SUN_CGS 65 | 66 | if self._m_tov > Mcaus: 67 | self._score_modifier -= (100. * (self._m_tov-Mcaus))**2 68 | 69 | return {self.key('score_modifier'): self._score_modifier} 70 | -------------------------------------------------------------------------------- /mosfit/modules/constraints/constraint.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Constraint` class.""" 2 | from collections import OrderedDict 3 | 4 | from mosfit.modules.module import Module 5 | 6 | 7 | # Important: Only define one ``Module`` class per file. 8 | 9 | 10 | class Constraint(Module): 11 | """Template class for constraints.""" 12 | 13 | def process(self, **kwargs): 14 | """Process module.""" 15 | self._score_modifier = 0.0 16 | return OrderedDict([(self.key('score_modifier'), 17 | self._score_modifier)]) 18 | -------------------------------------------------------------------------------- /mosfit/modules/constraints/ia_constraints.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `IaConstraints` class.""" 2 | from mosfit.constants import KM_CGS, M_P_CGS, M_SUN_CGS, MEV_CGS 3 | from mosfit.modules.constraints.constraint import Constraint 4 | 5 | 6 | # Important: Only define one ``Module`` class per file. 7 | 8 | 9 | class IaConstraints(Constraint): 10 | """Ia constraints. 11 | 12 | 1. Kinetic energy cannot excede nuclear burning release 13 | """ 14 | 15 | _REFERENCES = [] 16 | 17 | def __init__(self, **kwargs): 18 | """Initialize module.""" 19 | super(IaConstraints, self).__init__(**kwargs) 20 | self._wants_dense = True 21 | 22 | self._excess_constant = -( 23 | 56.0 / 4.0 * 2.4249 - 53.9037) / M_P_CGS * MEV_CGS 24 | 25 | def process(self, **kwargs): 26 | """Process module. Add constraints below.""" 27 | self._score_modifier = 0.0 28 | self._mejecta = kwargs[self.key('mejecta')] * M_SUN_CGS 29 | self._vejecta = kwargs[self.key('vejecta')] * KM_CGS 30 | self._fnickel = kwargs[self.key('fnickel')] 31 | 32 | # Maximum energy from burning, assumes pure Helium to Nickel. 33 | self._Emax = self._excess_constant * self._mejecta * self._fnickel 34 | 35 | # Ejecta kinetic energy, assuming at R/2. 36 | self._Ek = 0.5 * self._mejecta * (self._vejecta / 2.0) ** 2 37 | 38 | # Make sure kinetic energy < burning energy. 39 | if self._Ek > self._Emax: 40 | self._score_modifier -= (( 41 | self._Ek - self._Emax) / (2 * (0.1 * self._Emax))) ** 2 42 | 43 | return {self.key('score_modifier'): self._score_modifier} 44 | -------------------------------------------------------------------------------- /mosfit/modules/constraints/magnetar_constraints.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `MagnetarConstraints` class.""" 2 | import numpy as np 3 | from mosfit.constants import DAY_CGS, KM_CGS, M_SUN_CGS 4 | from mosfit.modules.constraints.constraint import Constraint 5 | 6 | 7 | # Important: Only define one ``Module`` class per file. 8 | 9 | 10 | class MagnetarConstraints(Constraint): 11 | """Magnetar constraints. 12 | 13 | Kinetic energy cannot excede magnetar rotational energy 14 | """ 15 | 16 | def __init__(self, **kwargs): 17 | """Initialize module.""" 18 | super(MagnetarConstraints, self).__init__(**kwargs) 19 | self._wants_dense = True 20 | 21 | def process(self, **kwargs): 22 | """Process module. Add constraints below.""" 23 | self._score_modifier = 0.0 24 | self._Pspin = kwargs[self.key('Pspin')] 25 | self._Mns = kwargs[self.key('Mns')] 26 | self._mejecta = kwargs[self.key('mejecta')] * M_SUN_CGS 27 | self._vejecta = kwargs[self.key('vejecta')] * KM_CGS 28 | self._times = kwargs[self.key('dense_times')] 29 | self._rest_t_explosion = kwargs[self.key('resttexplosion')] 30 | self._lums = kwargs[self.key('dense_luminosities')] 31 | self._neutrino_energy = kwargs[self.key('neutrino_energy')] 32 | 33 | # Magnetar rotational energy 34 | self._Ep = 2.6e52 * (self._Mns / 1.4) ** (3. / 35 | 2.) * self._Pspin ** (-2) 36 | 37 | # Ejecta kinetic energy 38 | self._Ek = 0.5 * self._mejecta * self._vejecta ** 2 39 | 40 | # Construct array of rest-frame times since explosion 41 | norm_times = self._times - self._rest_t_explosion 42 | 43 | # Shift array to get delta_t between observations 44 | shift_times = norm_times[:-1] 45 | shift_times = np.insert(shift_times, 0, 0.0) 46 | 47 | norm_times[norm_times < 0] = 0.0 48 | shift_times[shift_times < 0] = 0.0 49 | 50 | L_arr = np.array(self._lums) 51 | 52 | # integrate bolometric light curve to find radiative losses 53 | E_rad = sum(L_arr * (norm_times - shift_times) * DAY_CGS) 54 | 55 | # Kinetic energy < magnetar energy - radiative loss + neutrinos (10^51) 56 | if (self._Ek > self._Ep - E_rad + self._neutrino_energy): 57 | self._score_modifier += -( 58 | self._Ek - (self._Ep - E_rad + self._neutrino_energy)) ** 2 / ( 59 | 2 * self._neutrino_energy ** 2) 60 | 61 | return {self.key('score_modifier'): self._score_modifier} 62 | -------------------------------------------------------------------------------- /mosfit/modules/constraints/nsbh_constraints.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `NSBHConstraints` class.""" 2 | import astropy.constants as c 3 | import numpy as np 4 | 5 | from mosfit.constants import C_CGS, M_SUN_CGS, KM_CGS, G_CGS 6 | from mosfit.modules.constraints.constraint import Constraint 7 | 8 | # G_CGS = c.G.cgs.value 9 | 10 | 11 | class NSBHConstraints(Constraint): 12 | """NSBH constraints. 13 | 14 | 1. M1 > Mtov 15 | 2. M2 < Mtov 16 | 3. M2 > 0.8 Msun 17 | 4. 9 < R_ns < 16 18 | 5. Causality relation relating Mtov and radius 19 | 20 | Free parameters are Mchirp and q. Thus for large q, M1 can be larger or M2 21 | smaller than allowed by NS EoS. Constraint penalises masses outside range 22 | 23 | Realistic EoS prevents extreme values of radius 24 | """ 25 | 26 | def __init__(self, **kwargs): 27 | """Initialize module.""" 28 | super(NSBHConstraints, self).__init__(**kwargs) 29 | 30 | def process(self, **kwargs): 31 | """Process module. Add constraints below.""" 32 | self._score_modifier = 0.0 33 | 34 | # Mass of BH 35 | self._Mbh = kwargs[self.key('M1')] 36 | # Mass of NS 37 | self._Mns = kwargs[self.key('M2')] 38 | self._m_tov = kwargs[self.key('Mtov')] 39 | self._Rns = kwargs[self.key('radius_ns')] 40 | 41 | # Soft max/min, proportional to diff^2 and scaled to -100 for 0.1 Msun 42 | # 1 43 | if self._Mbh < self._m_tov: 44 | self._score_modifier -= (100. * (self._m_tov-self._Mbh))**2 45 | 46 | # 2 47 | if self._Mns > self._m_tov: 48 | self._score_modifier -= (100. * (self._Mns-self._m_tov))**2 49 | 50 | # 3 51 | if self._Mns < 0.8: 52 | self._score_modifier -= (100. * (0.8-self._Mns))**2 53 | 54 | # 4 55 | if self._Rns > 16: 56 | self._score_modifier -= (20. * (self._Rns-16))**2 57 | 58 | if self._Rns < 9: 59 | self._score_modifier -= (20. * (9-self._Rns))**2 60 | 61 | 62 | # 5 63 | Mcaus = 1/2.82 * C_CGS**2 * self._Rns * KM_CGS / G_CGS / M_SUN_CGS 64 | 65 | if self._m_tov > Mcaus: 66 | self._score_modifier -= (100. * (self._m_tov-Mcaus))**2 67 | 68 | return {self.key('score_modifier'): self._score_modifier} 69 | -------------------------------------------------------------------------------- /mosfit/modules/datas/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Data` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/energetics/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Energetic` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/energetics/energetic.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Energetic` class.""" 2 | from mosfit.modules.module import Module 3 | 4 | 5 | # Important: Only define one ``Module`` class per file. 6 | 7 | 8 | class Energetic(Module): 9 | """Template class for energy/velocity conversions.""" 10 | -------------------------------------------------------------------------------- /mosfit/modules/energetics/homologous_expansion.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `HomologousExpansion` class.""" 2 | import numpy as np 3 | 4 | from mosfit.constants import FOE, KM_CGS, M_SUN_CGS 5 | from mosfit.modules.energetics.energetic import Energetic 6 | 7 | 8 | # Important: Only define one ``Module`` class per file. 9 | 10 | 11 | class HomologousExpansion(Energetic): 12 | """Generate `vejecta` from `kinetic_energy` assuming homologous expansion. 13 | 14 | Convert an input kinetic energy to velocity assuming ejecta in 15 | homologous expansion. 16 | """ 17 | 18 | def process(self, **kwargs): 19 | """Process module.""" 20 | self._energy = kwargs[self.key('kinetic_energy')] 21 | self._m_ejecta = kwargs[self.key('mejecta')] 22 | 23 | v_ejecta = np.sqrt(10.0 * self._energy * FOE / 24 | (3.0 * self._m_ejecta * M_SUN_CGS)) / KM_CGS 25 | 26 | return {self.key('vejecta'): v_ejecta} 27 | -------------------------------------------------------------------------------- /mosfit/modules/energetics/thin_shell.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `ThinShell` class.""" 2 | import numpy as np 3 | 4 | from mosfit.constants import FOE, KM_CGS, M_SUN_CGS 5 | from mosfit.modules.energetics.energetic import Energetic 6 | 7 | 8 | # Important: Only define one ``Module`` class per file. 9 | 10 | 11 | class ThinShell(Energetic): 12 | """Generate `vejecta` from `kinetic_energy` if ejecta in thin shell.""" 13 | 14 | def process(self, **kwargs): 15 | """Process module.""" 16 | self._energy = kwargs[self.key('kinetic_energy')] 17 | self._m_ejecta = kwargs[self.key('mejecta')] 18 | 19 | v_ejecta = np.sqrt(2.0 * self._energy * FOE / 20 | (self._m_ejecta * M_SUN_CGS)) / KM_CGS 21 | 22 | return {self.key('vejecta'): v_ejecta} 23 | -------------------------------------------------------------------------------- /mosfit/modules/engines/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Engine` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/engines/engine.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Engine` class.""" 2 | from mosfit.modules.module import Module 3 | 4 | 5 | # Important: Only define one ``Module`` class per file. 6 | 7 | 8 | class Engine(Module): 9 | """Generic engine module.""" 10 | 11 | def __init__(self, **kwargs): 12 | """Initialize module.""" 13 | super(Engine, self).__init__(**kwargs) 14 | self._wants_dense = True 15 | -------------------------------------------------------------------------------- /mosfit/modules/engines/exppow.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `ExpPow` class.""" 2 | from math import isnan 3 | 4 | import numpy as np 5 | 6 | from mosfit.modules.engines.engine import Engine 7 | 8 | 9 | # Important: Only define one ``Module`` class per file. 10 | 11 | 12 | class ExpPow(Engine): 13 | """A simple analytical engine.""" 14 | 15 | def process(self, **kwargs): 16 | """Process module.""" 17 | self._times = kwargs[self.key('dense_times')] 18 | self._alpha = kwargs[self.key('alpha')] 19 | self._beta = kwargs[self.key('beta')] 20 | self._t_peak = kwargs[self.key('tpeak')] 21 | self._lum_scale = kwargs[self.key('lumscale')] 22 | self._rest_t_explosion = kwargs[self.key('resttexplosion')] 23 | 24 | ts = [ 25 | np.inf 26 | if self._rest_t_explosion > x else (x - self._rest_t_explosion) 27 | for x in self._times 28 | ] 29 | 30 | luminosities = [ 31 | self._lum_scale * (1.0 - np.exp(-t / self._t_peak)) ** 32 | self._alpha * (t / self._t_peak) ** (-self._beta) for t in ts 33 | ] 34 | luminosities = [0.0 if isnan(x) else x for x in luminosities] 35 | 36 | return {self.dense_key('luminosities'): luminosities} 37 | -------------------------------------------------------------------------------- /mosfit/modules/engines/magnetar.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Magnetar` class.""" 2 | from math import isnan 3 | 4 | import numpy as np 5 | from astrocats.catalog.source import SOURCE 6 | 7 | from mosfit.constants import DAY_CGS 8 | from mosfit.modules.engines.engine import Engine 9 | 10 | 11 | # Important: Only define one ``Module`` class per file. 12 | 13 | 14 | class Magnetar(Engine): 15 | """Magnetar spin-down engine.""" 16 | 17 | _REFERENCES = [ 18 | {SOURCE.BIBCODE: '1971ApJ...164L..95O'} 19 | ] 20 | 21 | def process(self, **kwargs): 22 | """Process module.""" 23 | self._times = kwargs[self.key('dense_times')] 24 | self._Pspin = kwargs[self.key('Pspin')] 25 | self._Bfield = kwargs[self.key('Bfield')] 26 | self._Mns = kwargs[self.key('Mns')] 27 | self._thetaPB = kwargs[self.key('thetaPB')] 28 | self._rest_t_explosion = kwargs[self.key('resttexplosion')] 29 | 30 | Ep = 2.6e52 * (self._Mns / 1.4) ** (3. / 2.) * self._Pspin ** (-2) 31 | # ^ E_rot = 1/2 I (2pi/P)^2, unit = erg 32 | 33 | tp = 1.3e5 * self._Bfield ** (-2) * self._Pspin ** 2 * ( 34 | self._Mns / 1.4) ** (3. / 2.) * (np.sin(self._thetaPB)) ** (-2) 35 | # ^ tau_spindown = P/(dP/dt), unit = s 36 | # Magnetic dipole: power = 2/(3c^3)*(R^3 Bsin(theta))^2 * (2pi/P)^4 37 | # Set equal to -d/dt(E_rot) to derive tau 38 | 39 | ts = [ 40 | np.inf 41 | if self._rest_t_explosion > x else (x - self._rest_t_explosion) 42 | for x in self._times 43 | ] 44 | 45 | luminosities = [2 * Ep / tp / ( 46 | 1. + 2 * t * DAY_CGS / tp) ** 2 for t in ts] 47 | # ^ From Ostriker and Gunn 1971 eq 4 48 | luminosities = [0.0 if isnan(x) else x for x in luminosities] 49 | 50 | return {self.dense_key('luminosities'): luminosities} 51 | -------------------------------------------------------------------------------- /mosfit/modules/engines/nickelcobalt.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `NickelCobalt` class.""" 2 | import numpy as np 3 | 4 | from mosfit.modules.engines.engine import Engine 5 | 6 | 7 | # Important: Only define one ``Module`` class per file. 8 | 9 | 10 | class NickelCobalt(Engine): 11 | """Nickel/Cobalt decay engine.""" 12 | 13 | NI56_LUM = 6.45e43 14 | CO56_LUM = 1.45e43 15 | NI56_LIFE = 8.8 16 | CO56_LIFE = 111.3 17 | 18 | def process(self, **kwargs): 19 | """Process module.""" 20 | self._times = kwargs[self.key('dense_times')] 21 | self._mnickel = kwargs[self.key('fnickel')] * kwargs[ 22 | self.key('mejecta')] 23 | self._rest_t_explosion = kwargs[self.key('resttexplosion')] 24 | 25 | # From 1994ApJS...92..527N 26 | ts = np.empty_like(self._times) 27 | t_inds = self._times >= self._rest_t_explosion 28 | ts[t_inds] = self._times[t_inds] - self._rest_t_explosion 29 | 30 | luminosities = np.zeros_like(self._times) 31 | luminosities[t_inds] = self._mnickel * ( 32 | self.NI56_LUM * np.exp(-ts[t_inds] / self.NI56_LIFE) + 33 | self.CO56_LUM * np.exp(-ts[t_inds] / self.CO56_LIFE)) 34 | 35 | luminosities[np.isnan(luminosities)] = 0.0 36 | 37 | return {self.dense_key('luminosities'): luminosities} 38 | -------------------------------------------------------------------------------- /mosfit/modules/engines/shock_cocoon.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Shock` class.""" 2 | from math import isnan 3 | from astrocats.catalog.source import SOURCE 4 | 5 | import numpy as np 6 | 7 | from mosfit.constants import C_CGS, DAY_CGS, FOUR_PI, KM_CGS, M_SUN_CGS 8 | from mosfit.modules.engines.engine import Engine 9 | 10 | 11 | # Important: Only define one ``Module`` class per file. 12 | 13 | 14 | class Shock(Engine): 15 | """Cooling emission from shock-heated cocoon. 16 | 17 | Follows Piro and Kollmeier 2018. 18 | 19 | Shock heating can be turned off in bns model by setting shock_frac=0 20 | or cos_theta_cocoon=1 21 | 22 | Uses softmax (tanh) function to turn off cocoon for t > t_thin (no material left to cool) 23 | """ 24 | 25 | DIFF_CONST = M_SUN_CGS / (FOUR_PI * C_CGS * KM_CGS) 26 | C_KMS = C_CGS / KM_CGS 27 | 28 | _REFERENCES = [ 29 | {SOURCE.BIBCODE: '2018ApJ...855..103P'} 30 | ] 31 | 32 | def process(self, **kwargs): 33 | """Process module.""" 34 | self._times = kwargs[self.key('dense_times')] 35 | self._rest_t_explosion = kwargs[self.key('resttexplosion')] 36 | self._kappa = kwargs[self.key('kappa')] 37 | self._m_ejecta = kwargs[self.key('mejecta')] 38 | self._v_ejecta = kwargs[self.key('vejecta')] 39 | # Cocoon opening angle- should be between 1 and cos_theta_open 40 | # for polar KN ejecta 41 | self._cos_theta_cocoon = kwargs[self.key('cos_theta_cocoon')] 42 | self._shocked_fraction = kwargs[self.key('shock_frac')] 43 | # Shocked ejecta power law density profile 44 | self._s = kwargs[self.key('s')] 45 | # Shock breakout timescale in seconds 46 | self._t_shock = kwargs[self.key('tshock')] 47 | # Radius where material is shocked by relativistic jet: 48 | R = C_CGS * self._t_shock 49 | 50 | m_shocked = self._m_ejecta * self._shocked_fraction 51 | 52 | theta = np.arccos(self._cos_theta_cocoon) 53 | 54 | self._tau_diff = np.sqrt(self.DIFF_CONST * self._kappa * 55 | m_shocked / self._v_ejecta) / DAY_CGS 56 | 57 | t_thin = (self.C_KMS / self._v_ejecta)**0.5 * self._tau_diff 58 | 59 | L0 = (theta**2/2)**(1/3) * (m_shocked * M_SUN_CGS * 60 | self._v_ejecta * KM_CGS * R / (self._tau_diff * DAY_CGS)**2 ) 61 | 62 | ts = [ 63 | np.inf 64 | if self._rest_t_explosion > x else (x - self._rest_t_explosion) 65 | for x in self._times 66 | ] 67 | 68 | 69 | # tanh function added by MN to turn off cocoon emission smoothly 70 | # once all layers are optically thin (have radiated their energy) 71 | luminosities = [L0 * (t/self._tau_diff)**-(4/(self._s+2)) * (1 + 72 | np.tanh(t_thin-t))/2 for t in ts] 73 | 74 | luminosities = [0.0 if isnan(x) else x for x in luminosities] 75 | 76 | return {self.dense_key('luminosities'): luminosities} 77 | -------------------------------------------------------------------------------- /mosfit/modules/engines/shock_cooling.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Shock` class.""" 2 | from math import isnan 3 | from astrocats.catalog.source import SOURCE 4 | 5 | import numpy as np 6 | 7 | from mosfit.constants import C_CGS, DAY_CGS, FOUR_PI, KM_CGS, M_SUN_CGS 8 | from mosfit.modules.engines.engine import Engine 9 | 10 | 11 | # Important: Only define one ``Module`` class per file. 12 | 13 | 14 | class Shock(Engine): 15 | """Cooling emission from shock-heated ejecta. 16 | 17 | Follows Piro and Kollmeier 2018. 18 | 19 | Shock heating can be turned off in the model by setting shock_frac=0 20 | 21 | Uses softmax (tanh) function to turn off cocoon for t > t_thin (no material left to cool) 22 | """ 23 | 24 | DIFF_CONST = M_SUN_CGS / (FOUR_PI * C_CGS * KM_CGS) 25 | C_KMS = C_CGS / KM_CGS 26 | 27 | _REFERENCES = [ 28 | {SOURCE.BIBCODE: '2018ApJ...855..103P'} 29 | ] 30 | 31 | def process(self, **kwargs): 32 | """Process module.""" 33 | self._times = kwargs[self.key('dense_times')] 34 | self._rest_t_explosion = kwargs[self.key('resttexplosion')] 35 | self._kappa = kwargs[self.key('kappa')] 36 | self._m_ejecta = kwargs[self.key('mejecta')] 37 | self._v_ejecta = kwargs[self.key('vejecta')] 38 | self.radius_star = kwargs[self.key('radius_star')] # AU to cm 39 | 40 | # shocked fraction of the ejecta - set equal to 1 by default 41 | 42 | self._shocked_fraction = kwargs[self.key('shock_frac')] 43 | # Shocked ejecta power law density profile 44 | self._s = kwargs[self.key('s')] 45 | # Shock breakout timescale in seconds 46 | # Radius where material is shocked by ejecta: 47 | # radius is a free parameter 48 | 49 | m_shocked = self._m_ejecta * self._shocked_fraction 50 | 51 | self._tau_diff = np.sqrt(self.DIFF_CONST * self._kappa * 52 | m_shocked / self._v_ejecta) / DAY_CGS 53 | 54 | t_thin = (self.C_KMS / self._v_ejecta)**0.5 * self._tau_diff 55 | 56 | L0 = (1/2) * (m_shocked * M_SUN_CGS * 57 | self._v_ejecta * KM_CGS * self.radius_star / (self._tau_diff * DAY_CGS)**2) 58 | 59 | ts = [ 60 | np.inf 61 | if self._rest_t_explosion > x else (x - self._rest_t_explosion) 62 | for x in self._times 63 | ] 64 | 65 | # tanh function added by MN to turn off cocoon emission smoothly 66 | # once all layers are optically thin (have radiated their energy) 67 | luminosities = [L0 * (t/self._tau_diff)**-(4/(self._s+2)) * (1 + 68 | np.tanh(t_thin-t))/2 for t in ts] 69 | 70 | luminosities = [0.0 if isnan(x) else x for x in luminosities] 71 | 72 | return {self.dense_key('luminosities'): luminosities} 73 | -------------------------------------------------------------------------------- /mosfit/modules/engines/simplefallback.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Simplefallback` class.""" 2 | from math import isnan 3 | 4 | import numpy as np 5 | from astrocats.catalog.source import SOURCE 6 | 7 | from mosfit.constants import DAY_CGS 8 | from mosfit.modules.engines.engine import Engine 9 | 10 | # Important: Only define one ``Module`` class per file. 11 | 12 | 13 | class Simplefallback(Engine): 14 | """ 15 | Simple fallback energy input. 16 | 17 | Flat energy at first and then proportional to t**(-5/3). 18 | """ 19 | 20 | _REFERENCES = [{SOURCE.BIBCODE: '2013ApJ...772...30D'}] 21 | 22 | def process(self, **kwargs): 23 | """Process module.""" 24 | self._times = kwargs[self.key('dense_times')] 25 | self._L0 = kwargs[self.key('Lat1sec')] 26 | self._ton1 = kwargs[self.key('ton')] 27 | self._rest_t_explosion = kwargs[self.key('resttexplosion')] 28 | 29 | ts = [ 30 | np.inf if self._rest_t_explosion > x else 31 | (x - self._rest_t_explosion) for x in self._times 32 | ] 33 | 34 | luminosities = [ 35 | self._L0 / (t * DAY_CGS)**(5. / 3.) if t - self._ton1 > 0 else 36 | self._L0 / (self._ton1 * DAY_CGS)**(5. / 3.) for t in ts 37 | ] 38 | luminosities = [0.0 if isnan(x) else x for x in luminosities] 39 | 40 | return {self.dense_key('luminosities'): luminosities} 41 | -------------------------------------------------------------------------------- /mosfit/modules/objectives/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Objective` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/observables/.copy: -------------------------------------------------------------------------------- 1 | filters 2 | -------------------------------------------------------------------------------- /mosfit/modules/observables/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Observable` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/2MASS_2MASS.H_AB.dat: -------------------------------------------------------------------------------- 1 | 14180.0 0.0 2 | 14400.0 0.0005 3 | 14620.0 0.0028 4 | 14780.0 0.0081 5 | 14860.0 0.0287 6 | 14930.0 0.0871 7 | 15040.0 0.2014 8 | 15150.0 0.4382 9 | 15280.0 0.6864 10 | 15390.0 0.8181 11 | 15460.0 0.8821 12 | 15510.0 0.9118 13 | 15560.0 0.9269 14 | 15650.0 0.9293 15 | 15720.0 0.8727 16 | 15770.0 0.8566 17 | 15830.0 0.8826 18 | 15920.0 0.9181 19 | 15970.0 0.9267 20 | 16020.0 0.9076 21 | 16130.0 0.926 22 | 16190.0 0.9205 23 | 16280.0 0.9242 24 | 16330.0 0.9235 25 | 16420.0 0.9418 26 | 16480.0 0.9491 27 | 16570.0 0.9807 28 | 16590.0 0.9937 29 | 16710.0 1.0 30 | 16840.0 0.9561 31 | 17010.0 0.9241 32 | 17150.0 0.9821 33 | 17270.0 0.9916 34 | 17390.0 0.9887 35 | 17460.0 0.9792 36 | 17510.0 0.9682 37 | 17530.0 0.937 38 | 17560.0 0.919 39 | 17640.0 0.8423 40 | 17750.0 0.6671 41 | 17850.0 0.2694 42 | 17900.0 0.4516 43 | 17960.0 0.1731 44 | 18030.0 0.1077 45 | 18100.0 0.0707 46 | 18130.0 0.0051 47 | 18180.0 0.02 48 | 18280.0 0.0004 49 | 18350.0 0.0 50 | 18500.0 1e-04 51 | 18710.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/2MASS_2MASS.H_Vega.dat: -------------------------------------------------------------------------------- 1 | 14180.0 0.0 2 | 14400.0 0.0005 3 | 14620.0 0.0028 4 | 14780.0 0.0081 5 | 14860.0 0.0287 6 | 14930.0 0.0871 7 | 15040.0 0.2014 8 | 15150.0 0.4382 9 | 15280.0 0.6864 10 | 15390.0 0.8181 11 | 15460.0 0.8821 12 | 15510.0 0.9118 13 | 15560.0 0.9269 14 | 15650.0 0.9293 15 | 15720.0 0.8727 16 | 15770.0 0.8566 17 | 15830.0 0.8826 18 | 15920.0 0.9181 19 | 15970.0 0.9267 20 | 16020.0 0.9076 21 | 16130.0 0.926 22 | 16190.0 0.9205 23 | 16280.0 0.9242 24 | 16330.0 0.9235 25 | 16420.0 0.9418 26 | 16480.0 0.9491 27 | 16570.0 0.9807 28 | 16590.0 0.9937 29 | 16710.0 1.0 30 | 16840.0 0.9561 31 | 17010.0 0.9241 32 | 17150.0 0.9821 33 | 17270.0 0.9916 34 | 17390.0 0.9887 35 | 17460.0 0.9792 36 | 17510.0 0.9682 37 | 17530.0 0.937 38 | 17560.0 0.919 39 | 17640.0 0.8423 40 | 17750.0 0.6671 41 | 17850.0 0.2694 42 | 17900.0 0.4516 43 | 17960.0 0.1731 44 | 18030.0 0.1077 45 | 18100.0 0.0707 46 | 18130.0 0.0051 47 | 18180.0 0.02 48 | 18280.0 0.0004 49 | 18350.0 0.0 50 | 18500.0 1e-04 51 | 18710.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/2MASS_2MASS.J_AB.dat: -------------------------------------------------------------------------------- 1 | 10620.0 0.0 2 | 10660.0 0.0004 3 | 10700.0 0.0015 4 | 10750.0 0.0027 5 | 10780.0 0.0055 6 | 10820.0 0.0123 7 | 10840.0 0.0203 8 | 10870.0 0.0306 9 | 10890.0 0.0405 10 | 10930.0 0.0515 11 | 10960.0 0.0564 12 | 11020.0 0.0718 13 | 11050.0 0.2736 14 | 11070.0 0.341 15 | 11090.0 0.3584 16 | 11120.0 0.3801 17 | 11160.0 0.3307 18 | 11170.0 0.2395 19 | 11200.0 0.2501 20 | 11230.0 0.2833 21 | 11280.0 0.2582 22 | 11290.0 0.2515 23 | 11320.0 0.5381 24 | 11340.0 0.2232 25 | 11380.0 0.5369 26 | 11400.0 0.1102 27 | 11430.0 0.5292 28 | 11470.0 0.2619 29 | 11540.0 0.3202 30 | 11590.0 0.1743 31 | 11640.0 0.607 32 | 11670.0 0.6179 33 | 11700.0 0.6763 34 | 11730.0 0.7279 35 | 11750.0 0.7465 36 | 11790.0 0.8304 37 | 11820.0 0.7903 38 | 11860.0 0.8096 39 | 11880.0 0.8369 40 | 11920.0 0.836 41 | 11950.0 0.7499 42 | 11990.0 0.708 43 | 12020.0 0.6988 44 | 12090.0 0.7049 45 | 12160.0 0.7004 46 | 12210.0 0.7328 47 | 12270.0 0.7057 48 | 12310.0 0.8424 49 | 12360.0 0.9219 50 | 12400.0 0.9525 51 | 12440.0 0.9676 52 | 12470.0 0.9595 53 | 12530.0 0.9227 54 | 12550.0 0.893 55 | 12580.0 0.8529 56 | 12600.0 0.8023 57 | 12650.0 0.7501 58 | 12700.0 0.6781 59 | 12750.0 0.6524 60 | 12790.0 0.6388 61 | 12860.0 0.6424 62 | 12920.0 0.6486 63 | 12970.0 0.6824 64 | 13020.0 0.7529 65 | 13050.0 0.7759 66 | 13070.0 0.8118 67 | 13100.0 0.777 68 | 13130.0 0.721 69 | 13160.0 0.9525 70 | 13190.0 0.8551 71 | 13230.0 0.8414 72 | 13260.0 1.0 73 | 13300.0 0.8947 74 | 13330.0 0.8549 75 | 13340.0 0.5379 76 | 13360.0 0.2799 77 | 13390.0 0.9065 78 | 13430.0 0.6893 79 | 13460.0 0.5533 80 | 13490.0 0.2432 81 | 13530.0 0.0144 82 | 13550.0 0.0002 83 | 13600.0 0.0401 84 | 13630.0 0.0045 85 | 13700.0 0.0003 86 | 13730.0 0.0372 87 | 13770.0 0.0005 88 | 13830.0 0.0 89 | 13880.0 1e-04 90 | 13920.0 0.0033 91 | 13950.0 0.0003 92 | 13960.0 0.0085 93 | 13970.0 0.0254 94 | 13980.0 0.1184 95 | 14000.0 1e-04 96 | 14010.0 1e-04 97 | 14020.0 0.0521 98 | 14040.0 0.0104 99 | 14060.0 0.0478 100 | 14070.0 0.0004 101 | 14100.0 0.0024 102 | 14120.0 0.0053 103 | 14160.0 0.0086 104 | 14210.0 0.0007 105 | 14260.0 0.0003 106 | 14420.0 0.0004 107 | 14500.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/2MASS_2MASS.J_Vega.dat: -------------------------------------------------------------------------------- 1 | 10620.0 0.0 2 | 10660.0 0.0004 3 | 10700.0 0.0015 4 | 10750.0 0.0027 5 | 10780.0 0.0055 6 | 10820.0 0.0123 7 | 10840.0 0.0203 8 | 10870.0 0.0306 9 | 10890.0 0.0405 10 | 10930.0 0.0515 11 | 10960.0 0.0564 12 | 11020.0 0.0718 13 | 11050.0 0.2736 14 | 11070.0 0.341 15 | 11090.0 0.3584 16 | 11120.0 0.3801 17 | 11160.0 0.3307 18 | 11170.0 0.2395 19 | 11200.0 0.2501 20 | 11230.0 0.2833 21 | 11280.0 0.2582 22 | 11290.0 0.2515 23 | 11320.0 0.5381 24 | 11340.0 0.2232 25 | 11380.0 0.5369 26 | 11400.0 0.1102 27 | 11430.0 0.5292 28 | 11470.0 0.2619 29 | 11540.0 0.3202 30 | 11590.0 0.1743 31 | 11640.0 0.607 32 | 11670.0 0.6179 33 | 11700.0 0.6763 34 | 11730.0 0.7279 35 | 11750.0 0.7465 36 | 11790.0 0.8304 37 | 11820.0 0.7903 38 | 11860.0 0.8096 39 | 11880.0 0.8369 40 | 11920.0 0.836 41 | 11950.0 0.7499 42 | 11990.0 0.708 43 | 12020.0 0.6988 44 | 12090.0 0.7049 45 | 12160.0 0.7004 46 | 12210.0 0.7328 47 | 12270.0 0.7057 48 | 12310.0 0.8424 49 | 12360.0 0.9219 50 | 12400.0 0.9525 51 | 12440.0 0.9676 52 | 12470.0 0.9595 53 | 12530.0 0.9227 54 | 12550.0 0.893 55 | 12580.0 0.8529 56 | 12600.0 0.8023 57 | 12650.0 0.7501 58 | 12700.0 0.6781 59 | 12750.0 0.6524 60 | 12790.0 0.6388 61 | 12860.0 0.6424 62 | 12920.0 0.6486 63 | 12970.0 0.6824 64 | 13020.0 0.7529 65 | 13050.0 0.7759 66 | 13070.0 0.8118 67 | 13100.0 0.777 68 | 13130.0 0.721 69 | 13160.0 0.9525 70 | 13190.0 0.8551 71 | 13230.0 0.8414 72 | 13260.0 1.0 73 | 13300.0 0.8947 74 | 13330.0 0.8549 75 | 13340.0 0.5379 76 | 13360.0 0.2799 77 | 13390.0 0.9065 78 | 13430.0 0.6893 79 | 13460.0 0.5533 80 | 13490.0 0.2432 81 | 13530.0 0.0144 82 | 13550.0 0.0002 83 | 13600.0 0.0401 84 | 13630.0 0.0045 85 | 13700.0 0.0003 86 | 13730.0 0.0372 87 | 13770.0 0.0005 88 | 13830.0 0.0 89 | 13880.0 1e-04 90 | 13920.0 0.0033 91 | 13950.0 0.0003 92 | 13960.0 0.0085 93 | 13970.0 0.0254 94 | 13980.0 0.1184 95 | 14000.0 1e-04 96 | 14010.0 1e-04 97 | 14020.0 0.0521 98 | 14040.0 0.0104 99 | 14060.0 0.0478 100 | 14070.0 0.0004 101 | 14100.0 0.0024 102 | 14120.0 0.0053 103 | 14160.0 0.0086 104 | 14210.0 0.0007 105 | 14260.0 0.0003 106 | 14420.0 0.0004 107 | 14500.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/2MASS_2MASS.Ks_AB.dat: -------------------------------------------------------------------------------- 1 | 19270.0 0.0 2 | 19340.0 0.0002 3 | 19390.0 0.0005 4 | 19480.0 0.0054 5 | 19570.0 0.0119 6 | 19620.0 0.0197 7 | 19690.0 0.0422 8 | 19760.0 0.0873 9 | 19810.0 0.1528 10 | 19890.0 0.2482 11 | 19900.0 0.1902 12 | 19980.0 0.2339 13 | 20080.0 0.2946 14 | 20140.0 0.3982 15 | 20190.0 0.3366 16 | 20280.0 0.6207 17 | 20370.0 0.765 18 | 20450.0 0.7464 19 | 20610.0 0.6251 20 | 20720.0 0.7255 21 | 20750.0 0.6895 22 | 20820.0 0.7879 23 | 20890.0 0.8181 24 | 20990.0 0.8228 25 | 21060.0 0.8633 26 | 21130.0 0.8778 27 | 21200.0 0.8549 28 | 21240.0 0.8953 29 | 21380.0 0.9189 30 | 21450.0 0.9268 31 | 21550.0 0.9267 32 | 21690.0 0.9009 33 | 21760.0 0.9228 34 | 21850.0 0.8428 35 | 21970.0 0.9459 36 | 22080.0 0.9804 37 | 22130.0 0.9879 38 | 22180.0 0.9848 39 | 22320.0 0.9647 40 | 22370.0 0.9816 41 | 22480.0 0.9834 42 | 22560.0 0.9613 43 | 22600.0 0.9792 44 | 22630.0 1.0 45 | 22650.0 0.9632 46 | 22700.0 0.9812 47 | 22720.0 0.9681 48 | 22760.0 0.9109 49 | 22770.0 0.9821 50 | 22810.0 0.8896 51 | 22840.0 0.8918 52 | 22860.0 0.9424 53 | 22910.0 0.8404 54 | 22930.0 0.8042 55 | 22950.0 0.7077 56 | 22970.0 0.6576 57 | 22990.0 0.5607 58 | 23060.0 0.4437 59 | 23110.0 0.3482 60 | 23160.0 0.2302 61 | 23200.0 0.1626 62 | 23250.0 0.136 63 | 23280.0 0.0921 64 | 23350.0 0.0624 65 | 23390.0 0.0431 66 | 23440.0 0.034 67 | 23460.0 0.031 68 | 23520.0 0.0118 69 | 23610.0 0.0068 70 | 23630.0 0.0007 71 | 23700.0 0.003 72 | 23750.0 0.0021 73 | 23840.0 0.0004 74 | 23990.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/2MASS_2MASS.Ks_Vega.dat: -------------------------------------------------------------------------------- 1 | 19270.0 0.0 2 | 19340.0 0.0002 3 | 19390.0 0.0005 4 | 19480.0 0.0054 5 | 19570.0 0.0119 6 | 19620.0 0.0197 7 | 19690.0 0.0422 8 | 19760.0 0.0873 9 | 19810.0 0.1528 10 | 19890.0 0.2482 11 | 19900.0 0.1902 12 | 19980.0 0.2339 13 | 20080.0 0.2946 14 | 20140.0 0.3982 15 | 20190.0 0.3366 16 | 20280.0 0.6207 17 | 20370.0 0.765 18 | 20450.0 0.7464 19 | 20610.0 0.6251 20 | 20720.0 0.7255 21 | 20750.0 0.6895 22 | 20820.0 0.7879 23 | 20890.0 0.8181 24 | 20990.0 0.8228 25 | 21060.0 0.8633 26 | 21130.0 0.8778 27 | 21200.0 0.8549 28 | 21240.0 0.8953 29 | 21380.0 0.9189 30 | 21450.0 0.9268 31 | 21550.0 0.9267 32 | 21690.0 0.9009 33 | 21760.0 0.9228 34 | 21850.0 0.8428 35 | 21970.0 0.9459 36 | 22080.0 0.9804 37 | 22130.0 0.9879 38 | 22180.0 0.9848 39 | 22320.0 0.9647 40 | 22370.0 0.9816 41 | 22480.0 0.9834 42 | 22560.0 0.9613 43 | 22600.0 0.9792 44 | 22630.0 1.0 45 | 22650.0 0.9632 46 | 22700.0 0.9812 47 | 22720.0 0.9681 48 | 22760.0 0.9109 49 | 22770.0 0.9821 50 | 22810.0 0.8896 51 | 22840.0 0.8918 52 | 22860.0 0.9424 53 | 22910.0 0.8404 54 | 22930.0 0.8042 55 | 22950.0 0.7077 56 | 22970.0 0.6576 57 | 22990.0 0.5607 58 | 23060.0 0.4437 59 | 23110.0 0.3482 60 | 23160.0 0.2302 61 | 23200.0 0.1626 62 | 23250.0 0.136 63 | 23280.0 0.0921 64 | 23350.0 0.0624 65 | 23390.0 0.0431 66 | 23440.0 0.034 67 | 23460.0 0.031 68 | 23520.0 0.0118 69 | 23610.0 0.0068 70 | 23630.0 0.0007 71 | 23700.0 0.003 72 | 23750.0 0.0021 73 | 23840.0 0.0004 74 | 23990.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/CFHT_CFH12k.R_AB.dat: -------------------------------------------------------------------------------- 1 | 5680.0 0.00345 2 | 5700.0 0.00809 3 | 5720.0 0.01656 4 | 5740.0 0.02998 5 | 5760.0 0.04906 6 | 5780.0 0.07394 7 | 5800.0 0.10439 8 | 5820.0 0.13982 9 | 5840.0 0.17976 10 | 5860.0 0.22369 11 | 5880.0 0.2713 12 | 5900.0 0.32184 13 | 5920.0 0.37404 14 | 5940.0 0.42598 15 | 5960.0 0.47571 16 | 5980.0 0.52138 17 | 6000.0 0.5618 18 | 6020.0 0.5968 19 | 6040.0 0.62723 20 | 6060.0 0.6548 21 | 6080.0 0.68153 22 | 6100.0 0.70876 23 | 6120.0 0.73668 24 | 6140.0 0.76448 25 | 6160.0 0.79073 26 | 6180.0 0.81339 27 | 6200.0 0.83063 28 | 6220.0 0.84155 29 | 6240.0 0.84653 30 | 6260.0 0.84753 31 | 6280.0 0.84726 32 | 6300.0 0.84814 33 | 6320.0 0.85158 34 | 6340.0 0.858 35 | 6360.0 0.86647 36 | 6380.0 0.87534 37 | 6400.0 0.88268 38 | 6420.0 0.88696 39 | 6440.0 0.88756 40 | 6460.0 0.88492 41 | 6480.0 0.87999 42 | 6500.0 0.87405 43 | 6520.0 0.8681 44 | 6540.0 0.86272 45 | 6560.0 0.85841 46 | 6580.0 0.85551 47 | 6600.0 0.85487 48 | 6620.0 0.8575 49 | 6640.0 0.86383 50 | 6660.0 0.87349 51 | 6680.0 0.88557 52 | 6700.0 0.89891 53 | 6720.0 0.91174 54 | 6740.0 0.92235 55 | 6760.0 0.92865 56 | 6780.0 0.92891 57 | 6800.0 0.92307 58 | 6820.0 0.91249 59 | 6840.0 0.89957 60 | 6860.0 0.88666 61 | 6880.0 0.8757 62 | 6900.0 0.86786 63 | 6920.0 0.86374 64 | 6940.0 0.8638 65 | 6960.0 0.86786 66 | 6980.0 0.87515 67 | 7000.0 0.88405 68 | 7020.0 0.89223 69 | 7040.0 0.89807 70 | 7060.0 0.90086 71 | 7080.0 0.89859 72 | 7100.0 0.88548 73 | 7120.0 0.85301 74 | 7140.0 0.79439 75 | 7160.0 0.71074 76 | 7180.0 0.60931 77 | 7200.0 0.49973 78 | 7220.0 0.38902 79 | 7240.0 0.2816 80 | 7260.0 0.18401 81 | 7280.0 0.10477 82 | 7300.0 0.05035 83 | 7320.0 0.01971 84 | 7340.0 0.00659 85 | 7360.0 0.00244 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/CFHT_CFH12k.R_Vega.dat: -------------------------------------------------------------------------------- 1 | 5680.0 0.00345 2 | 5700.0 0.00809 3 | 5720.0 0.01656 4 | 5740.0 0.02998 5 | 5760.0 0.04906 6 | 5780.0 0.07394 7 | 5800.0 0.10439 8 | 5820.0 0.13982 9 | 5840.0 0.17976 10 | 5860.0 0.22369 11 | 5880.0 0.2713 12 | 5900.0 0.32184 13 | 5920.0 0.37404 14 | 5940.0 0.42598 15 | 5960.0 0.47571 16 | 5980.0 0.52138 17 | 6000.0 0.5618 18 | 6020.0 0.5968 19 | 6040.0 0.62723 20 | 6060.0 0.6548 21 | 6080.0 0.68153 22 | 6100.0 0.70876 23 | 6120.0 0.73668 24 | 6140.0 0.76448 25 | 6160.0 0.79073 26 | 6180.0 0.81339 27 | 6200.0 0.83063 28 | 6220.0 0.84155 29 | 6240.0 0.84653 30 | 6260.0 0.84753 31 | 6280.0 0.84726 32 | 6300.0 0.84814 33 | 6320.0 0.85158 34 | 6340.0 0.858 35 | 6360.0 0.86647 36 | 6380.0 0.87534 37 | 6400.0 0.88268 38 | 6420.0 0.88696 39 | 6440.0 0.88756 40 | 6460.0 0.88492 41 | 6480.0 0.87999 42 | 6500.0 0.87405 43 | 6520.0 0.8681 44 | 6540.0 0.86272 45 | 6560.0 0.85841 46 | 6580.0 0.85551 47 | 6600.0 0.85487 48 | 6620.0 0.8575 49 | 6640.0 0.86383 50 | 6660.0 0.87349 51 | 6680.0 0.88557 52 | 6700.0 0.89891 53 | 6720.0 0.91174 54 | 6740.0 0.92235 55 | 6760.0 0.92865 56 | 6780.0 0.92891 57 | 6800.0 0.92307 58 | 6820.0 0.91249 59 | 6840.0 0.89957 60 | 6860.0 0.88666 61 | 6880.0 0.8757 62 | 6900.0 0.86786 63 | 6920.0 0.86374 64 | 6940.0 0.8638 65 | 6960.0 0.86786 66 | 6980.0 0.87515 67 | 7000.0 0.88405 68 | 7020.0 0.89223 69 | 7040.0 0.89807 70 | 7060.0 0.90086 71 | 7080.0 0.89859 72 | 7100.0 0.88548 73 | 7120.0 0.85301 74 | 7140.0 0.79439 75 | 7160.0 0.71074 76 | 7180.0 0.60931 77 | 7200.0 0.49973 78 | 7220.0 0.38902 79 | 7240.0 0.2816 80 | 7260.0 0.18401 81 | 7280.0 0.10477 82 | 7300.0 0.05035 83 | 7320.0 0.01971 84 | 7340.0 0.00659 85 | 7360.0 0.00244 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Bessell.B_AB.dat: -------------------------------------------------------------------------------- 1 | 3600.0 0.0 2 | 3700.0 0.03 3 | 3800.0 0.134 4 | 3900.0 0.567 5 | 4000.0 0.92 6 | 4100.0 0.978 7 | 4200.0 1.0 8 | 4300.0 0.978 9 | 4400.0 0.935 10 | 4500.0 0.853 11 | 4600.0 0.74 12 | 4700.0 0.64 13 | 4800.0 0.536 14 | 4900.0 0.424 15 | 5000.0 0.325 16 | 5100.0 0.235 17 | 5200.0 0.15 18 | 5300.0 0.095 19 | 5400.0 0.043 20 | 5500.0 0.009 21 | 5600.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Bessell.B_Vega.dat: -------------------------------------------------------------------------------- 1 | 3600.0 0.0 2 | 3700.0 0.03 3 | 3800.0 0.134 4 | 3900.0 0.567 5 | 4000.0 0.92 6 | 4100.0 0.978 7 | 4200.0 1.0 8 | 4300.0 0.978 9 | 4400.0 0.935 10 | 4500.0 0.853 11 | 4600.0 0.74 12 | 4700.0 0.64 13 | 4800.0 0.536 14 | 4900.0 0.424 15 | 5000.0 0.325 16 | 5100.0 0.235 17 | 5200.0 0.15 18 | 5300.0 0.095 19 | 5400.0 0.043 20 | 5500.0 0.009 21 | 5600.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Bessell.I_AB.dat: -------------------------------------------------------------------------------- 1 | 7000.0 0.0 2 | 7100.0 0.024 3 | 7200.0 0.232 4 | 7300.0 0.555 5 | 7400.0 0.785 6 | 7500.0 0.91 7 | 7600.0 0.965 8 | 7700.0 0.985 9 | 7800.0 0.99 10 | 7900.0 0.995 11 | 8000.0 1.0 12 | 8100.0 1.0 13 | 8200.0 0.99 14 | 8300.0 0.98 15 | 8400.0 0.95 16 | 8500.0 0.91 17 | 8600.0 0.86 18 | 8700.0 0.75 19 | 8800.0 0.56 20 | 8900.0 0.33 21 | 9000.0 0.15 22 | 9100.0 0.03 23 | 9200.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Bessell.I_Vega.dat: -------------------------------------------------------------------------------- 1 | 7000.0 0.0 2 | 7100.0 0.024 3 | 7200.0 0.232 4 | 7300.0 0.555 5 | 7400.0 0.785 6 | 7500.0 0.91 7 | 7600.0 0.965 8 | 7700.0 0.985 9 | 7800.0 0.99 10 | 7900.0 0.995 11 | 8000.0 1.0 12 | 8100.0 1.0 13 | 8200.0 0.99 14 | 8300.0 0.98 15 | 8400.0 0.95 16 | 8500.0 0.91 17 | 8600.0 0.86 18 | 8700.0 0.75 19 | 8800.0 0.56 20 | 8900.0 0.33 21 | 9000.0 0.15 22 | 9100.0 0.03 23 | 9200.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Bessell.R_AB.dat: -------------------------------------------------------------------------------- 1 | 5500.0 0.0 2 | 5600.0 0.23 3 | 5700.0 0.74 4 | 5800.0 0.91 5 | 5900.0 0.98 6 | 6000.0 1.0 7 | 6100.0 0.98 8 | 6200.0 0.96 9 | 6300.0 0.93 10 | 6400.0 0.9 11 | 6500.0 0.86 12 | 6600.0 0.81 13 | 6700.0 0.78 14 | 6800.0 0.72 15 | 6900.0 0.67 16 | 7000.0 0.61 17 | 7100.0 0.56 18 | 7200.0 0.51 19 | 7300.0 0.46 20 | 7400.0 0.4 21 | 7500.0 0.35 22 | 8000.0 0.14 23 | 8500.0 0.03 24 | 9000.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Bessell.R_Vega.dat: -------------------------------------------------------------------------------- 1 | 5500.0 0.0 2 | 5600.0 0.23 3 | 5700.0 0.74 4 | 5800.0 0.91 5 | 5900.0 0.98 6 | 6000.0 1.0 7 | 6100.0 0.98 8 | 6200.0 0.96 9 | 6300.0 0.93 10 | 6400.0 0.9 11 | 6500.0 0.86 12 | 6600.0 0.81 13 | 6700.0 0.78 14 | 6800.0 0.72 15 | 6900.0 0.67 16 | 7000.0 0.61 17 | 7100.0 0.56 18 | 7200.0 0.51 19 | 7300.0 0.46 20 | 7400.0 0.4 21 | 7500.0 0.35 22 | 8000.0 0.14 23 | 8500.0 0.03 24 | 9000.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Bessell.U_AB.dat: -------------------------------------------------------------------------------- 1 | 3000.0 0.0 2 | 3050.0 0.016 3 | 3100.0 0.068 4 | 3150.0 0.167 5 | 3200.0 0.287 6 | 3250.0 0.423 7 | 3300.0 0.56 8 | 3350.0 0.673 9 | 3400.0 0.772 10 | 3450.0 0.841 11 | 3500.0 0.905 12 | 3550.0 0.943 13 | 3600.0 0.981 14 | 3650.0 0.993 15 | 3700.0 1.0 16 | 3750.0 0.989 17 | 3800.0 0.916 18 | 3850.0 0.804 19 | 3900.0 0.625 20 | 3950.0 0.423 21 | 4000.0 0.238 22 | 4050.0 0.114 23 | 4100.0 0.051 24 | 4150.0 0.019 25 | 4200.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Bessell.U_Vega.dat: -------------------------------------------------------------------------------- 1 | 3000.0 0.0 2 | 3050.0 0.016 3 | 3100.0 0.068 4 | 3150.0 0.167 5 | 3200.0 0.287 6 | 3250.0 0.423 7 | 3300.0 0.56 8 | 3350.0 0.673 9 | 3400.0 0.772 10 | 3450.0 0.841 11 | 3500.0 0.905 12 | 3550.0 0.943 13 | 3600.0 0.981 14 | 3650.0 0.993 15 | 3700.0 1.0 16 | 3750.0 0.989 17 | 3800.0 0.916 18 | 3850.0 0.804 19 | 3900.0 0.625 20 | 3950.0 0.423 21 | 4000.0 0.238 22 | 4050.0 0.114 23 | 4100.0 0.051 24 | 4150.0 0.019 25 | 4200.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Bessell.V_AB.dat: -------------------------------------------------------------------------------- 1 | 4700.0 0.0 2 | 4800.0 0.03 3 | 4900.0 0.163 4 | 5000.0 0.458 5 | 5100.0 0.78 6 | 5200.0 0.967 7 | 5300.0 1.0 8 | 5400.0 0.973 9 | 5500.0 0.898 10 | 5600.0 0.792 11 | 5700.0 0.684 12 | 5800.0 0.574 13 | 5900.0 0.461 14 | 6000.0 0.359 15 | 6100.0 0.27 16 | 6200.0 0.197 17 | 6300.0 0.135 18 | 6400.0 0.081 19 | 6500.0 0.045 20 | 6600.0 0.025 21 | 6700.0 0.017 22 | 6800.0 0.013 23 | 6900.0 0.009 24 | 7000.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Bessell.V_Vega.dat: -------------------------------------------------------------------------------- 1 | 4700.0 0.0 2 | 4800.0 0.03 3 | 4900.0 0.163 4 | 5000.0 0.458 5 | 5100.0 0.78 6 | 5200.0 0.967 7 | 5300.0 1.0 8 | 5400.0 0.973 9 | 5500.0 0.898 10 | 5600.0 0.792 11 | 5700.0 0.684 12 | 5800.0 0.574 13 | 5900.0 0.461 14 | 6000.0 0.359 15 | 6100.0 0.27 16 | 6200.0 0.197 17 | 6300.0 0.135 18 | 6400.0 0.081 19 | 6500.0 0.045 20 | 6600.0 0.025 21 | 6700.0 0.017 22 | 6800.0 0.013 23 | 6900.0 0.009 24 | 7000.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Cousins.I_AB.dat: -------------------------------------------------------------------------------- 1 | 7000.0 0.0 2 | 7050.0 0.005 3 | 7100.0 0.02 4 | 7150.0 0.05 5 | 7200.0 0.1 6 | 7250.0 0.17 7 | 7300.0 0.33 8 | 7350.0 0.7 9 | 7400.0 0.82 10 | 7450.0 0.9 11 | 7500.0 0.95 12 | 7550.0 0.98 13 | 7600.0 0.99 14 | 7650.0 0.994 15 | 7700.0 0.98 16 | 7750.0 0.95 17 | 7800.0 0.913 18 | 7850.0 0.87 19 | 7900.0 0.83 20 | 7950.0 0.79 21 | 8000.0 0.75 22 | 8050.0 0.71 23 | 8100.0 0.673 24 | 8150.0 0.65 25 | 8200.0 0.63 26 | 8250.0 0.61 27 | 8300.0 0.58 28 | 8350.0 0.55 29 | 8400.0 0.51 30 | 8450.0 0.47 31 | 8500.0 0.405 32 | 8550.0 0.33 33 | 8600.0 0.25 34 | 8650.0 0.18 35 | 8700.0 0.14 36 | 8750.0 0.11 37 | 8800.0 0.08 38 | 8850.0 0.06 39 | 8900.0 0.035 40 | 8950.0 0.02 41 | 9000.0 0.01 42 | 9050.0 0.005 43 | 9100.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Cousins.I_Vega.dat: -------------------------------------------------------------------------------- 1 | 7000.0 0.0 2 | 7050.0 0.005 3 | 7100.0 0.02 4 | 7150.0 0.05 5 | 7200.0 0.1 6 | 7250.0 0.17 7 | 7300.0 0.33 8 | 7350.0 0.7 9 | 7400.0 0.82 10 | 7450.0 0.9 11 | 7500.0 0.95 12 | 7550.0 0.98 13 | 7600.0 0.99 14 | 7650.0 0.994 15 | 7700.0 0.98 16 | 7750.0 0.95 17 | 7800.0 0.913 18 | 7850.0 0.87 19 | 7900.0 0.83 20 | 7950.0 0.79 21 | 8000.0 0.75 22 | 8050.0 0.71 23 | 8100.0 0.673 24 | 8150.0 0.65 25 | 8200.0 0.63 26 | 8250.0 0.61 27 | 8300.0 0.58 28 | 8350.0 0.55 29 | 8400.0 0.51 30 | 8450.0 0.47 31 | 8500.0 0.405 32 | 8550.0 0.33 33 | 8600.0 0.25 34 | 8650.0 0.18 35 | 8700.0 0.14 36 | 8750.0 0.11 37 | 8800.0 0.08 38 | 8850.0 0.06 39 | 8900.0 0.035 40 | 8950.0 0.02 41 | 9000.0 0.01 42 | 9050.0 0.005 43 | 9100.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Cousins.R_AB.dat: -------------------------------------------------------------------------------- 1 | 5400.0 0.0 2 | 5450.0 0.002 3 | 5500.0 0.01 4 | 5550.0 0.03 5 | 5600.0 0.07 6 | 5650.0 0.18 7 | 5700.0 0.4 8 | 5750.0 0.77 9 | 5800.0 0.89 10 | 5850.0 0.96 11 | 5900.0 0.99 12 | 5950.0 0.999 13 | 6000.0 1.0 14 | 6050.0 0.997 15 | 6100.0 0.99 16 | 6150.0 0.976 17 | 6200.0 0.96 18 | 6250.0 0.946 19 | 6300.0 0.93 20 | 6350.0 0.912 21 | 6400.0 0.895 22 | 6450.0 0.88 23 | 6500.0 0.86 24 | 6550.0 0.845 25 | 6600.0 0.825 26 | 6650.0 0.806 27 | 6700.0 0.788 28 | 6750.0 0.765 29 | 6800.0 0.742 30 | 6850.0 0.72 31 | 6900.0 0.7 32 | 6950.0 0.676 33 | 7000.0 0.65 34 | 7050.0 0.626 35 | 7100.0 0.6 36 | 7150.0 0.568 37 | 7200.0 0.53 38 | 7250.0 0.48 39 | 7300.0 0.395 40 | 7350.0 0.3 41 | 7400.0 0.215 42 | 7450.0 0.155 43 | 7500.0 0.12 44 | 7550.0 0.1 45 | 7600.0 0.085 46 | 7650.0 0.075 47 | 7700.0 0.06 48 | 7750.0 0.05 49 | 7800.0 0.04 50 | 7850.0 0.029 51 | 7900.0 0.02 52 | 7950.0 0.01 53 | 8000.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Cousins.R_Vega.dat: -------------------------------------------------------------------------------- 1 | 5400.0 0.0 2 | 5450.0 0.002 3 | 5500.0 0.01 4 | 5550.0 0.03 5 | 5600.0 0.07 6 | 5650.0 0.18 7 | 5700.0 0.4 8 | 5750.0 0.77 9 | 5800.0 0.89 10 | 5850.0 0.96 11 | 5900.0 0.99 12 | 5950.0 0.999 13 | 6000.0 1.0 14 | 6050.0 0.997 15 | 6100.0 0.99 16 | 6150.0 0.976 17 | 6200.0 0.96 18 | 6250.0 0.946 19 | 6300.0 0.93 20 | 6350.0 0.912 21 | 6400.0 0.895 22 | 6450.0 0.88 23 | 6500.0 0.86 24 | 6550.0 0.845 25 | 6600.0 0.825 26 | 6650.0 0.806 27 | 6700.0 0.788 28 | 6750.0 0.765 29 | 6800.0 0.742 30 | 6850.0 0.72 31 | 6900.0 0.7 32 | 6950.0 0.676 33 | 7000.0 0.65 34 | 7050.0 0.626 35 | 7100.0 0.6 36 | 7150.0 0.568 37 | 7200.0 0.53 38 | 7250.0 0.48 39 | 7300.0 0.395 40 | 7350.0 0.3 41 | 7400.0 0.215 42 | 7450.0 0.155 43 | 7500.0 0.12 44 | 7550.0 0.1 45 | 7600.0 0.085 46 | 7650.0 0.075 47 | 7700.0 0.06 48 | 7750.0 0.05 49 | 7800.0 0.04 50 | 7850.0 0.029 51 | 7900.0 0.02 52 | 7950.0 0.01 53 | 8000.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.B_AB.dat: -------------------------------------------------------------------------------- 1 | 3700.0 0.0 2 | 3800.0 0.11 3 | 4000.0 0.92 4 | 4200.0 1.0 5 | 4400.0 0.94 6 | 4600.0 0.79 7 | 4800.0 0.58 8 | 5000.0 0.36 9 | 5200.0 0.15 10 | 5400.0 0.04 11 | 5600.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.B_Vega.dat: -------------------------------------------------------------------------------- 1 | 3700.0 0.0 2 | 3800.0 0.11 3 | 4000.0 0.92 4 | 4200.0 1.0 5 | 4400.0 0.94 6 | 4600.0 0.79 7 | 4800.0 0.58 8 | 5000.0 0.36 9 | 5200.0 0.15 10 | 5400.0 0.04 11 | 5600.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.I_AB.dat: -------------------------------------------------------------------------------- 1 | 6800.0 0.0 2 | 7000.0 0.01 3 | 7200.0 0.17 4 | 7400.0 0.36 5 | 7600.0 0.56 6 | 7800.0 0.76 7 | 8000.0 0.96 8 | 8200.0 0.98 9 | 8400.0 0.99 10 | 8600.0 1.0 11 | 8800.0 0.98 12 | 9000.0 0.93 13 | 9200.0 0.84 14 | 9400.0 0.71 15 | 9600.0 0.58 16 | 9800.0 0.47 17 | 10000.0 0.36 18 | 10200.0 0.28 19 | 10400.0 0.2 20 | 10600.0 0.15 21 | 10800.0 0.1 22 | 11000.0 0.08 23 | 11200.0 0.05 24 | 11400.0 0.03 25 | 11600.0 0.02 26 | 12000.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.I_Vega.dat: -------------------------------------------------------------------------------- 1 | 6800.0 0.0 2 | 7000.0 0.01 3 | 7200.0 0.17 4 | 7400.0 0.36 5 | 7600.0 0.56 6 | 7800.0 0.76 7 | 8000.0 0.96 8 | 8200.0 0.98 9 | 8400.0 0.99 10 | 8600.0 1.0 11 | 8800.0 0.98 12 | 9000.0 0.93 13 | 9200.0 0.84 14 | 9400.0 0.71 15 | 9600.0 0.58 16 | 9800.0 0.47 17 | 10000.0 0.36 18 | 10200.0 0.28 19 | 10400.0 0.2 20 | 10600.0 0.15 21 | 10800.0 0.1 22 | 11000.0 0.08 23 | 11200.0 0.05 24 | 11400.0 0.03 25 | 11600.0 0.02 26 | 12000.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.J_AB.dat: -------------------------------------------------------------------------------- 1 | 9600.0 0.0 2 | 9800.0 0.02 3 | 10000.0 0.03 4 | 10200.0 0.06 5 | 10400.0 0.16 6 | 10600.0 0.35 7 | 10800.0 0.62 8 | 11000.0 0.93 9 | 11200.0 0.85 10 | 11400.0 0.78 11 | 11600.0 0.78 12 | 11800.0 0.8 13 | 12000.0 0.85 14 | 12200.0 0.93 15 | 12400.0 0.75 16 | 12600.0 0.64 17 | 12800.0 0.63 18 | 13000.0 0.63 19 | 13200.0 0.66 20 | 13400.0 0.68 21 | 13600.0 0.7 22 | 13800.0 0.7 23 | 14000.0 0.66 24 | 14200.0 0.6 25 | 14400.0 0.46 26 | 14600.0 0.27 27 | 14800.0 0.14 28 | 15000.0 0.09 29 | 15200.0 0.06 30 | 15400.0 0.02 31 | 15600.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.J_Vega.dat: -------------------------------------------------------------------------------- 1 | 9600.0 0.0 2 | 9800.0 0.02 3 | 10000.0 0.03 4 | 10200.0 0.06 5 | 10400.0 0.16 6 | 10600.0 0.35 7 | 10800.0 0.62 8 | 11000.0 0.93 9 | 11200.0 0.85 10 | 11400.0 0.78 11 | 11600.0 0.78 12 | 11800.0 0.8 13 | 12000.0 0.85 14 | 12200.0 0.93 15 | 12400.0 0.75 16 | 12600.0 0.64 17 | 12800.0 0.63 18 | 13000.0 0.63 19 | 13200.0 0.66 20 | 13400.0 0.68 21 | 13600.0 0.7 22 | 13800.0 0.7 23 | 14000.0 0.66 24 | 14200.0 0.6 25 | 14400.0 0.46 26 | 14600.0 0.27 27 | 14800.0 0.14 28 | 15000.0 0.09 29 | 15200.0 0.06 30 | 15400.0 0.02 31 | 15600.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.M_AB.dat: -------------------------------------------------------------------------------- 1 | 41000.0 0.0 2 | 42000.0 0.04 3 | 43000.0 0.25 4 | 44000.0 0.48 5 | 45000.0 1.0 6 | 46000.0 0.93 7 | 47000.0 0.92 8 | 48000.0 0.89 9 | 49000.0 0.84 10 | 50000.0 0.78 11 | 51000.0 0.76 12 | 52000.0 0.79 13 | 53000.0 0.74 14 | 54000.0 0.68 15 | 55000.0 0.6 16 | 56000.0 0.49 17 | 57000.0 0.32 18 | 58000.0 0.26 19 | 59000.0 0.21 20 | 60000.0 0.19 21 | 61000.0 0.09 22 | 62000.0 0.02 23 | 63000.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.M_Vega.dat: -------------------------------------------------------------------------------- 1 | 41000.0 0.0 2 | 42000.0 0.04 3 | 43000.0 0.25 4 | 44000.0 0.48 5 | 45000.0 1.0 6 | 46000.0 0.93 7 | 47000.0 0.92 8 | 48000.0 0.89 9 | 49000.0 0.84 10 | 50000.0 0.78 11 | 51000.0 0.76 12 | 52000.0 0.79 13 | 53000.0 0.74 14 | 54000.0 0.68 15 | 55000.0 0.6 16 | 56000.0 0.49 17 | 57000.0 0.32 18 | 58000.0 0.26 19 | 59000.0 0.21 20 | 60000.0 0.19 21 | 61000.0 0.09 22 | 62000.0 0.02 23 | 63000.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.R_AB.dat: -------------------------------------------------------------------------------- 1 | 5200.0 0.0 2 | 5400.0 0.06 3 | 5600.0 0.28 4 | 5800.0 0.5 5 | 6000.0 0.69 6 | 6200.0 0.79 7 | 6400.0 0.88 8 | 6600.0 0.94 9 | 6800.0 0.98 10 | 7000.0 1.0 11 | 7200.0 0.94 12 | 7400.0 0.85 13 | 7600.0 0.73 14 | 7800.0 0.57 15 | 8000.0 0.42 16 | 8200.0 0.31 17 | 8400.0 0.17 18 | 8600.0 0.11 19 | 8800.0 0.06 20 | 9000.0 0.04 21 | 9200.0 0.02 22 | 9400.0 0.01 23 | 9600.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.R_Vega.dat: -------------------------------------------------------------------------------- 1 | 5200.0 0.0 2 | 5400.0 0.06 3 | 5600.0 0.28 4 | 5800.0 0.5 5 | 6000.0 0.69 6 | 6200.0 0.79 7 | 6400.0 0.88 8 | 6600.0 0.94 9 | 6800.0 0.98 10 | 7000.0 1.0 11 | 7200.0 0.94 12 | 7400.0 0.85 13 | 7600.0 0.73 14 | 7800.0 0.57 15 | 8000.0 0.42 16 | 8200.0 0.31 17 | 8400.0 0.17 18 | 8600.0 0.11 19 | 8800.0 0.06 20 | 9000.0 0.04 21 | 9200.0 0.02 22 | 9400.0 0.01 23 | 9600.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.U_AB.dat: -------------------------------------------------------------------------------- 1 | 3000.0 0.0 2 | 3100.0 0.1 3 | 3200.0 0.61 4 | 3300.0 0.84 5 | 3400.0 0.93 6 | 3500.0 0.97 7 | 3600.0 1.0 8 | 3700.0 0.97 9 | 3800.0 0.73 10 | 3900.0 0.36 11 | 4000.0 0.05 12 | 4100.0 0.01 13 | 4200.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.U_Vega.dat: -------------------------------------------------------------------------------- 1 | 3000.0 0.0 2 | 3100.0 0.1 3 | 3200.0 0.61 4 | 3300.0 0.84 5 | 3400.0 0.93 6 | 3500.0 0.97 7 | 3600.0 1.0 8 | 3700.0 0.97 9 | 3800.0 0.73 10 | 3900.0 0.36 11 | 4000.0 0.05 12 | 4100.0 0.01 13 | 4200.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.V_AB.dat: -------------------------------------------------------------------------------- 1 | 4600.0 0.0 2 | 4800.0 0.02 3 | 5000.0 0.38 4 | 5200.0 0.91 5 | 5400.0 0.98 6 | 5600.0 0.72 7 | 5800.0 0.62 8 | 6000.0 0.4 9 | 6200.0 0.2 10 | 6400.0 0.08 11 | 6600.0 0.02 12 | 6800.0 0.01 13 | 7000.0 0.01 14 | 7200.0 0.01 15 | 7400.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Generic_Johnson.V_Vega.dat: -------------------------------------------------------------------------------- 1 | 4600.0 0.0 2 | 4800.0 0.02 3 | 5000.0 0.38 4 | 5200.0 0.91 5 | 5400.0 0.98 6 | 5600.0 0.72 7 | 5800.0 0.62 8 | 6000.0 0.4 9 | 6200.0 0.2 10 | 6400.0 0.08 11 | 6600.0 0.02 12 | 6800.0 0.01 13 | 7000.0 0.01 14 | 7200.0 0.01 15 | 7400.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/PAN-STARRS_PS1.g_AB.dat: -------------------------------------------------------------------------------- 1 | 3900.0 0.001 2 | 3910.0 0.001 3 | 3920.0 0.001 4 | 3930.0 0.002 5 | 3940.0 0.004 6 | 3950.0 0.007 7 | 3960.0 0.012 8 | 3970.0 0.021 9 | 3980.0 0.035 10 | 3990.0 0.053 11 | 4000.0 0.073 12 | 4010.0 0.096 13 | 4020.0 0.118 14 | 4030.0 0.135 15 | 4040.0 0.147 16 | 4050.0 0.157 17 | 4060.0 0.163 18 | 4070.0 0.167 19 | 4080.0 0.171 20 | 4090.0 0.175 21 | 4100.0 0.181 22 | 4110.0 0.186 23 | 4120.0 0.192 24 | 4130.0 0.199 25 | 4140.0 0.204 26 | 4150.0 0.206 27 | 4160.0 0.208 28 | 4170.0 0.211 29 | 4180.0 0.217 30 | 4190.0 0.225 31 | 4200.0 0.233 32 | 4210.0 0.24 33 | 4220.0 0.246 34 | 4230.0 0.249 35 | 4240.0 0.25 36 | 4250.0 0.25 37 | 4260.0 0.253 38 | 4270.0 0.259 39 | 4280.0 0.268 40 | 4290.0 0.277 41 | 4300.0 0.286 42 | 4310.0 0.295 43 | 4320.0 0.3 44 | 4330.0 0.302 45 | 4340.0 0.302 46 | 4350.0 0.304 47 | 4360.0 0.309 48 | 4370.0 0.316 49 | 4380.0 0.323 50 | 4390.0 0.33 51 | 4400.0 0.336 52 | 4410.0 0.34 53 | 4420.0 0.341 54 | 4430.0 0.342 55 | 4440.0 0.344 56 | 4450.0 0.348 57 | 4460.0 0.354 58 | 4470.0 0.361 59 | 4480.0 0.368 60 | 4490.0 0.374 61 | 4500.0 0.38 62 | 4510.0 0.386 63 | 4520.0 0.392 64 | 4530.0 0.396 65 | 4540.0 0.398 66 | 4550.0 0.398 67 | 4560.0 0.394 68 | 4570.0 0.388 69 | 4580.0 0.384 70 | 4590.0 0.382 71 | 4600.0 0.384 72 | 4610.0 0.388 73 | 4620.0 0.393 74 | 4630.0 0.396 75 | 4640.0 0.396 76 | 4650.0 0.396 77 | 4660.0 0.397 78 | 4670.0 0.397 79 | 4680.0 0.399 80 | 4690.0 0.4 81 | 4700.0 0.401 82 | 4710.0 0.402 83 | 4720.0 0.403 84 | 4730.0 0.405 85 | 4740.0 0.408 86 | 4750.0 0.413 87 | 4760.0 0.418 88 | 4770.0 0.424 89 | 4780.0 0.431 90 | 4790.0 0.437 91 | 4800.0 0.441 92 | 4810.0 0.444 93 | 4820.0 0.446 94 | 4830.0 0.448 95 | 4840.0 0.451 96 | 4850.0 0.453 97 | 4860.0 0.456 98 | 4870.0 0.458 99 | 4880.0 0.46 100 | 4890.0 0.46 101 | 4900.0 0.459 102 | 4910.0 0.455 103 | 4920.0 0.451 104 | 4930.0 0.45 105 | 4940.0 0.453 106 | 4950.0 0.459 107 | 4960.0 0.463 108 | 4970.0 0.467 109 | 4980.0 0.471 110 | 4990.0 0.472 111 | 5000.0 0.471 112 | 5010.0 0.468 113 | 5020.0 0.466 114 | 5030.0 0.463 115 | 5040.0 0.459 116 | 5050.0 0.457 117 | 5060.0 0.456 118 | 5070.0 0.455 119 | 5080.0 0.456 120 | 5090.0 0.456 121 | 5100.0 0.457 122 | 5110.0 0.458 123 | 5120.0 0.459 124 | 5130.0 0.461 125 | 5140.0 0.465 126 | 5150.0 0.469 127 | 5160.0 0.473 128 | 5170.0 0.475 129 | 5180.0 0.476 130 | 5190.0 0.475 131 | 5200.0 0.473 132 | 5210.0 0.472 133 | 5220.0 0.473 134 | 5230.0 0.473 135 | 5240.0 0.474 136 | 5250.0 0.473 137 | 5260.0 0.472 138 | 5270.0 0.474 139 | 5280.0 0.477 140 | 5290.0 0.483 141 | 5300.0 0.489 142 | 5310.0 0.495 143 | 5320.0 0.498 144 | 5330.0 0.5 145 | 5340.0 0.501 146 | 5350.0 0.502 147 | 5360.0 0.502 148 | 5370.0 0.502 149 | 5380.0 0.502 150 | 5390.0 0.502 151 | 5400.0 0.501 152 | 5410.0 0.5 153 | 5420.0 0.496 154 | 5430.0 0.493 155 | 5440.0 0.489 156 | 5450.0 0.486 157 | 5460.0 0.481 158 | 5470.0 0.467 159 | 5480.0 0.438 160 | 5490.0 0.39 161 | 5500.0 0.323 162 | 5510.0 0.248 163 | 5520.0 0.175 164 | 5530.0 0.113 165 | 5540.0 0.068 166 | 5550.0 0.041 167 | 5560.0 0.025 168 | 5570.0 0.015 169 | 5580.0 0.009 170 | 5590.0 0.006 171 | 5600.0 0.003 172 | 5610.0 0.002 173 | 5620.0 0.002 174 | 5630.0 0.001 175 | 5640.0 0.001 176 | 5650.0 0.001 177 | 5660.0 0.001 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/PAN-STARRS_PS1.z_AB.dat: -------------------------------------------------------------------------------- 1 | 7850.0 0.001 2 | 7860.0 0.001 3 | 7870.0 0.001 4 | 7880.0 0.001 5 | 7890.0 0.001 6 | 7900.0 0.001 7 | 7910.0 0.001 8 | 7920.0 0.001 9 | 7930.0 0.001 10 | 7940.0 0.002 11 | 7950.0 0.002 12 | 7960.0 0.002 13 | 7970.0 0.003 14 | 7980.0 0.004 15 | 7990.0 0.005 16 | 8000.0 0.006 17 | 8010.0 0.007 18 | 8020.0 0.008 19 | 8030.0 0.009 20 | 8040.0 0.012 21 | 8050.0 0.015 22 | 8060.0 0.019 23 | 8070.0 0.025 24 | 8080.0 0.034 25 | 8090.0 0.045 26 | 8100.0 0.06 27 | 8110.0 0.079 28 | 8120.0 0.101 29 | 8130.0 0.129 30 | 8140.0 0.16 31 | 8150.0 0.203 32 | 8160.0 0.252 33 | 8170.0 0.318 34 | 8180.0 0.397 35 | 8190.0 0.499 36 | 8200.0 0.588 37 | 8210.0 0.696 38 | 8220.0 0.761 39 | 8230.0 0.75 40 | 8240.0 0.833 41 | 8250.0 0.849 42 | 8260.0 0.85 43 | 8270.0 0.863 44 | 8280.0 0.839 45 | 8290.0 0.86 46 | 8300.0 0.858 47 | 8310.0 0.857 48 | 8320.0 0.845 49 | 8330.0 0.862 50 | 8340.0 0.857 51 | 8350.0 0.867 52 | 8360.0 0.867 53 | 8370.0 0.877 54 | 8380.0 0.879 55 | 8390.0 0.88 56 | 8400.0 0.88 57 | 8410.0 0.876 58 | 8420.0 0.873 59 | 8430.0 0.871 60 | 8440.0 0.869 61 | 8450.0 0.869 62 | 8460.0 0.868 63 | 8470.0 0.868 64 | 8480.0 0.867 65 | 8490.0 0.866 66 | 8500.0 0.865 67 | 8510.0 0.863 68 | 8520.0 0.861 69 | 8530.0 0.858 70 | 8540.0 0.855 71 | 8550.0 0.854 72 | 8560.0 0.852 73 | 8570.0 0.85 74 | 8580.0 0.848 75 | 8590.0 0.848 76 | 8600.0 0.849 77 | 8610.0 0.85 78 | 8620.0 0.851 79 | 8630.0 0.85 80 | 8640.0 0.849 81 | 8650.0 0.849 82 | 8660.0 0.848 83 | 8670.0 0.846 84 | 8680.0 0.845 85 | 8690.0 0.843 86 | 8700.0 0.84 87 | 8710.0 0.839 88 | 8720.0 0.837 89 | 8730.0 0.835 90 | 8740.0 0.833 91 | 8750.0 0.832 92 | 8760.0 0.831 93 | 8770.0 0.829 94 | 8780.0 0.827 95 | 8790.0 0.824 96 | 8800.0 0.82 97 | 8810.0 0.816 98 | 8820.0 0.81 99 | 8830.0 0.806 100 | 8840.0 0.801 101 | 8850.0 0.796 102 | 8860.0 0.792 103 | 8870.0 0.79 104 | 8880.0 0.787 105 | 8890.0 0.786 106 | 8900.0 0.783 107 | 8910.0 0.783 108 | 8920.0 0.781 109 | 8930.0 0.777 110 | 8940.0 0.773 111 | 8950.0 0.764 112 | 8960.0 0.747 113 | 8970.0 0.723 114 | 8980.0 0.727 115 | 8990.0 0.671 116 | 9000.0 0.719 117 | 9010.0 0.697 118 | 9020.0 0.71 119 | 9030.0 0.691 120 | 9040.0 0.73 121 | 9050.0 0.725 122 | 9060.0 0.714 123 | 9070.0 0.687 124 | 9080.0 0.688 125 | 9090.0 0.694 126 | 9100.0 0.683 127 | 9110.0 0.691 128 | 9120.0 0.68 129 | 9130.0 0.666 130 | 9140.0 0.653 131 | 9150.0 0.659 132 | 9160.0 0.625 133 | 9170.0 0.642 134 | 9180.0 0.592 135 | 9190.0 0.59 136 | 9200.0 0.549 137 | 9210.0 0.504 138 | 9220.0 0.429 139 | 9230.0 0.361 140 | 9240.0 0.283 141 | 9250.0 0.214 142 | 9260.0 0.158 143 | 9270.0 0.116 144 | 9280.0 0.079 145 | 9290.0 0.057 146 | 9300.0 0.039 147 | 9310.0 0.028 148 | 9320.0 0.019 149 | 9330.0 0.014 150 | 9340.0 0.01 151 | 9350.0 0.008 152 | 9360.0 0.006 153 | 9370.0 0.005 154 | 9380.0 0.004 155 | 9390.0 0.004 156 | 9400.0 0.004 157 | 9410.0 0.003 158 | 9420.0 0.002 159 | 9430.0 0.002 160 | 9440.0 0.002 161 | 9450.0 0.001 162 | 9460.0 0.001 163 | 9470.0 0.001 164 | 9480.0 0.001 165 | 9490.0 0.001 166 | 9510.0 0.001 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/PAN-STARRS_PS1.z_Vega.dat: -------------------------------------------------------------------------------- 1 | 7850.0 0.001 2 | 7860.0 0.001 3 | 7870.0 0.001 4 | 7880.0 0.001 5 | 7890.0 0.001 6 | 7900.0 0.001 7 | 7910.0 0.001 8 | 7920.0 0.001 9 | 7930.0 0.001 10 | 7940.0 0.002 11 | 7950.0 0.002 12 | 7960.0 0.002 13 | 7970.0 0.003 14 | 7980.0 0.004 15 | 7990.0 0.005 16 | 8000.0 0.006 17 | 8010.0 0.007 18 | 8020.0 0.008 19 | 8030.0 0.009 20 | 8040.0 0.012 21 | 8050.0 0.015 22 | 8060.0 0.019 23 | 8070.0 0.025 24 | 8080.0 0.034 25 | 8090.0 0.045 26 | 8100.0 0.06 27 | 8110.0 0.079 28 | 8120.0 0.101 29 | 8130.0 0.129 30 | 8140.0 0.16 31 | 8150.0 0.203 32 | 8160.0 0.252 33 | 8170.0 0.318 34 | 8180.0 0.397 35 | 8190.0 0.499 36 | 8200.0 0.588 37 | 8210.0 0.696 38 | 8220.0 0.761 39 | 8230.0 0.75 40 | 8240.0 0.833 41 | 8250.0 0.849 42 | 8260.0 0.85 43 | 8270.0 0.863 44 | 8280.0 0.839 45 | 8290.0 0.86 46 | 8300.0 0.858 47 | 8310.0 0.857 48 | 8320.0 0.845 49 | 8330.0 0.862 50 | 8340.0 0.857 51 | 8350.0 0.867 52 | 8360.0 0.867 53 | 8370.0 0.877 54 | 8380.0 0.879 55 | 8390.0 0.88 56 | 8400.0 0.88 57 | 8410.0 0.876 58 | 8420.0 0.873 59 | 8430.0 0.871 60 | 8440.0 0.869 61 | 8450.0 0.869 62 | 8460.0 0.868 63 | 8470.0 0.868 64 | 8480.0 0.867 65 | 8490.0 0.866 66 | 8500.0 0.865 67 | 8510.0 0.863 68 | 8520.0 0.861 69 | 8530.0 0.858 70 | 8540.0 0.855 71 | 8550.0 0.854 72 | 8560.0 0.852 73 | 8570.0 0.85 74 | 8580.0 0.848 75 | 8590.0 0.848 76 | 8600.0 0.849 77 | 8610.0 0.85 78 | 8620.0 0.851 79 | 8630.0 0.85 80 | 8640.0 0.849 81 | 8650.0 0.849 82 | 8660.0 0.848 83 | 8670.0 0.846 84 | 8680.0 0.845 85 | 8690.0 0.843 86 | 8700.0 0.84 87 | 8710.0 0.839 88 | 8720.0 0.837 89 | 8730.0 0.835 90 | 8740.0 0.833 91 | 8750.0 0.832 92 | 8760.0 0.831 93 | 8770.0 0.829 94 | 8780.0 0.827 95 | 8790.0 0.824 96 | 8800.0 0.82 97 | 8810.0 0.816 98 | 8820.0 0.81 99 | 8830.0 0.806 100 | 8840.0 0.801 101 | 8850.0 0.796 102 | 8860.0 0.792 103 | 8870.0 0.79 104 | 8880.0 0.787 105 | 8890.0 0.786 106 | 8900.0 0.783 107 | 8910.0 0.783 108 | 8920.0 0.781 109 | 8930.0 0.777 110 | 8940.0 0.773 111 | 8950.0 0.764 112 | 8960.0 0.747 113 | 8970.0 0.723 114 | 8980.0 0.727 115 | 8990.0 0.671 116 | 9000.0 0.719 117 | 9010.0 0.697 118 | 9020.0 0.71 119 | 9030.0 0.691 120 | 9040.0 0.73 121 | 9050.0 0.725 122 | 9060.0 0.714 123 | 9070.0 0.687 124 | 9080.0 0.688 125 | 9090.0 0.694 126 | 9100.0 0.683 127 | 9110.0 0.691 128 | 9120.0 0.68 129 | 9130.0 0.666 130 | 9140.0 0.653 131 | 9150.0 0.659 132 | 9160.0 0.625 133 | 9170.0 0.642 134 | 9180.0 0.592 135 | 9190.0 0.59 136 | 9200.0 0.549 137 | 9210.0 0.504 138 | 9220.0 0.429 139 | 9230.0 0.361 140 | 9240.0 0.283 141 | 9250.0 0.214 142 | 9260.0 0.158 143 | 9270.0 0.116 144 | 9280.0 0.079 145 | 9290.0 0.057 146 | 9300.0 0.039 147 | 9310.0 0.028 148 | 9320.0 0.019 149 | 9330.0 0.014 150 | 9340.0 0.01 151 | 9350.0 0.008 152 | 9360.0 0.006 153 | 9370.0 0.005 154 | 9380.0 0.004 155 | 9390.0 0.004 156 | 9400.0 0.004 157 | 9410.0 0.003 158 | 9420.0 0.002 159 | 9430.0 0.002 160 | 9440.0 0.002 161 | 9450.0 0.001 162 | 9460.0 0.001 163 | 9470.0 0.001 164 | 9480.0 0.001 165 | 9490.0 0.001 166 | 9510.0 0.001 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/SLOAN_SDSS.g_AB.dat: -------------------------------------------------------------------------------- 1 | 3630.0 0.0 2 | 3655.0 0.0003 3 | 3680.0 0.0008 4 | 3705.0 0.0013 5 | 3730.0 0.0019 6 | 3755.0 0.0024 7 | 3780.0 0.0034 8 | 3805.0 0.0055 9 | 3830.0 0.0103 10 | 3855.0 0.0194 11 | 3880.0 0.0326 12 | 3905.0 0.0492 13 | 3930.0 0.0686 14 | 3955.0 0.09 15 | 3980.0 0.1123 16 | 4005.0 0.1342 17 | 4030.0 0.1545 18 | 4055.0 0.1722 19 | 4080.0 0.1873 20 | 4105.0 0.2003 21 | 4130.0 0.2116 22 | 4155.0 0.2214 23 | 4180.0 0.2301 24 | 4205.0 0.2378 25 | 4230.0 0.2448 26 | 4255.0 0.2513 27 | 4280.0 0.2574 28 | 4305.0 0.2633 29 | 4330.0 0.2691 30 | 4355.0 0.2747 31 | 4380.0 0.2801 32 | 4405.0 0.2852 33 | 4430.0 0.2899 34 | 4455.0 0.294 35 | 4480.0 0.2979 36 | 4505.0 0.3016 37 | 4530.0 0.3055 38 | 4555.0 0.3097 39 | 4580.0 0.3141 40 | 4605.0 0.3184 41 | 4630.0 0.3224 42 | 4655.0 0.3257 43 | 4680.0 0.3284 44 | 4705.0 0.3307 45 | 4730.0 0.3327 46 | 4755.0 0.3346 47 | 4780.0 0.3364 48 | 4805.0 0.3383 49 | 4830.0 0.3403 50 | 4855.0 0.3425 51 | 4880.0 0.3448 52 | 4905.0 0.3472 53 | 4930.0 0.3495 54 | 4955.0 0.3519 55 | 4980.0 0.3541 56 | 5005.0 0.3562 57 | 5030.0 0.3581 58 | 5055.0 0.3597 59 | 5080.0 0.3609 60 | 5105.0 0.3613 61 | 5130.0 0.3609 62 | 5155.0 0.3595 63 | 5180.0 0.3581 64 | 5205.0 0.3558 65 | 5230.0 0.3452 66 | 5255.0 0.3194 67 | 5280.0 0.2807 68 | 5305.0 0.2339 69 | 5330.0 0.1839 70 | 5355.0 0.1352 71 | 5380.0 0.0911 72 | 5405.0 0.0548 73 | 5430.0 0.0295 74 | 5455.0 0.0166 75 | 5480.0 0.0112 76 | 5505.0 0.0077 77 | 5530.0 0.005 78 | 5555.0 0.0032 79 | 5580.0 0.0021 80 | 5605.0 0.0015 81 | 5630.0 0.0012 82 | 5655.0 0.001 83 | 5680.0 0.0009 84 | 5705.0 0.0008 85 | 5730.0 0.0006 86 | 5755.0 0.0005 87 | 5780.0 0.0003 88 | 5805.0 0.0001 89 | 5830.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/SLOAN_SDSS.g_Vega.dat: -------------------------------------------------------------------------------- 1 | 3630.0 0.0 2 | 3655.0 0.0003 3 | 3680.0 0.0008 4 | 3705.0 0.0013 5 | 3730.0 0.0019 6 | 3755.0 0.0024 7 | 3780.0 0.0034 8 | 3805.0 0.0055 9 | 3830.0 0.0103 10 | 3855.0 0.0194 11 | 3880.0 0.0326 12 | 3905.0 0.0492 13 | 3930.0 0.0686 14 | 3955.0 0.09 15 | 3980.0 0.1123 16 | 4005.0 0.1342 17 | 4030.0 0.1545 18 | 4055.0 0.1722 19 | 4080.0 0.1873 20 | 4105.0 0.2003 21 | 4130.0 0.2116 22 | 4155.0 0.2214 23 | 4180.0 0.2301 24 | 4205.0 0.2378 25 | 4230.0 0.2448 26 | 4255.0 0.2513 27 | 4280.0 0.2574 28 | 4305.0 0.2633 29 | 4330.0 0.2691 30 | 4355.0 0.2747 31 | 4380.0 0.2801 32 | 4405.0 0.2852 33 | 4430.0 0.2899 34 | 4455.0 0.294 35 | 4480.0 0.2979 36 | 4505.0 0.3016 37 | 4530.0 0.3055 38 | 4555.0 0.3097 39 | 4580.0 0.3141 40 | 4605.0 0.3184 41 | 4630.0 0.3224 42 | 4655.0 0.3257 43 | 4680.0 0.3284 44 | 4705.0 0.3307 45 | 4730.0 0.3327 46 | 4755.0 0.3346 47 | 4780.0 0.3364 48 | 4805.0 0.3383 49 | 4830.0 0.3403 50 | 4855.0 0.3425 51 | 4880.0 0.3448 52 | 4905.0 0.3472 53 | 4930.0 0.3495 54 | 4955.0 0.3519 55 | 4980.0 0.3541 56 | 5005.0 0.3562 57 | 5030.0 0.3581 58 | 5055.0 0.3597 59 | 5080.0 0.3609 60 | 5105.0 0.3613 61 | 5130.0 0.3609 62 | 5155.0 0.3595 63 | 5180.0 0.3581 64 | 5205.0 0.3558 65 | 5230.0 0.3452 66 | 5255.0 0.3194 67 | 5280.0 0.2807 68 | 5305.0 0.2339 69 | 5330.0 0.1839 70 | 5355.0 0.1352 71 | 5380.0 0.0911 72 | 5405.0 0.0548 73 | 5430.0 0.0295 74 | 5455.0 0.0166 75 | 5480.0 0.0112 76 | 5505.0 0.0077 77 | 5530.0 0.005 78 | 5555.0 0.0032 79 | 5580.0 0.0021 80 | 5605.0 0.0015 81 | 5630.0 0.0012 82 | 5655.0 0.001 83 | 5680.0 0.0009 84 | 5705.0 0.0008 85 | 5730.0 0.0006 86 | 5755.0 0.0005 87 | 5780.0 0.0003 88 | 5805.0 0.0001 89 | 5830.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/SLOAN_SDSS.i_AB.dat: -------------------------------------------------------------------------------- 1 | 6430.0 0.0 2 | 6455.0 0.0001 3 | 6480.0 0.0003 4 | 6505.0 0.0004 5 | 6530.0 0.0004 6 | 6555.0 0.0003 7 | 6580.0 0.0003 8 | 6605.0 0.0004 9 | 6630.0 0.0009 10 | 6655.0 0.0019 11 | 6680.0 0.0034 12 | 6705.0 0.0056 13 | 6730.0 0.0103 14 | 6755.0 0.0194 15 | 6780.0 0.0344 16 | 6805.0 0.0561 17 | 6830.0 0.0839 18 | 6855.0 0.1164 19 | 6880.0 0.1528 20 | 6905.0 0.1948 21 | 6930.0 0.2408 22 | 6955.0 0.2857 23 | 6980.0 0.3233 24 | 7005.0 0.3503 25 | 7030.0 0.3759 26 | 7055.0 0.399 27 | 7080.0 0.4162 28 | 7105.0 0.4233 29 | 7130.0 0.4165 30 | 7155.0 0.3943 31 | 7180.0 0.376 32 | 7205.0 0.3823 33 | 7230.0 0.3918 34 | 7255.0 0.3892 35 | 7280.0 0.3828 36 | 7305.0 0.382 37 | 7330.0 0.3884 38 | 7355.0 0.3872 39 | 7380.0 0.3821 40 | 7405.0 0.3787 41 | 7430.0 0.3759 42 | 7455.0 0.3727 43 | 7480.0 0.3681 44 | 7505.0 0.3618 45 | 7530.0 0.3565 46 | 7555.0 0.3554 47 | 7580.0 0.3478 48 | 7605.0 0.1473 49 | 7630.0 0.2096 50 | 7655.0 0.2648 51 | 7680.0 0.33 52 | 7705.0 0.3256 53 | 7730.0 0.3223 54 | 7755.0 0.3179 55 | 7780.0 0.3129 56 | 7805.0 0.3077 57 | 7830.0 0.3026 58 | 7855.0 0.298 59 | 7880.0 0.2944 60 | 7905.0 0.2921 61 | 7930.0 0.2916 62 | 7955.0 0.2921 63 | 7980.0 0.2927 64 | 8005.0 0.2923 65 | 8030.0 0.2896 66 | 8055.0 0.284 67 | 8080.0 0.2758 68 | 8105.0 0.2642 69 | 8130.0 0.2427 70 | 8155.0 0.2091 71 | 8180.0 0.1689 72 | 8205.0 0.1276 73 | 8230.0 0.0901 74 | 8255.0 0.0603 75 | 8280.0 0.0378 76 | 8305.0 0.0218 77 | 8330.0 0.0117 78 | 8355.0 0.0068 79 | 8380.0 0.0048 80 | 8405.0 0.0033 81 | 8430.0 0.002 82 | 8455.0 0.0013 83 | 8480.0 0.001 84 | 8505.0 0.0009 85 | 8530.0 0.0009 86 | 8555.0 0.0008 87 | 8580.0 0.0005 88 | 8605.0 0.0002 89 | 8630.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/SLOAN_SDSS.i_Vega.dat: -------------------------------------------------------------------------------- 1 | 6430.0 0.0 2 | 6455.0 0.0001 3 | 6480.0 0.0003 4 | 6505.0 0.0004 5 | 6530.0 0.0004 6 | 6555.0 0.0003 7 | 6580.0 0.0003 8 | 6605.0 0.0004 9 | 6630.0 0.0009 10 | 6655.0 0.0019 11 | 6680.0 0.0034 12 | 6705.0 0.0056 13 | 6730.0 0.0103 14 | 6755.0 0.0194 15 | 6780.0 0.0344 16 | 6805.0 0.0561 17 | 6830.0 0.0839 18 | 6855.0 0.1164 19 | 6880.0 0.1528 20 | 6905.0 0.1948 21 | 6930.0 0.2408 22 | 6955.0 0.2857 23 | 6980.0 0.3233 24 | 7005.0 0.3503 25 | 7030.0 0.3759 26 | 7055.0 0.399 27 | 7080.0 0.4162 28 | 7105.0 0.4233 29 | 7130.0 0.4165 30 | 7155.0 0.3943 31 | 7180.0 0.376 32 | 7205.0 0.3823 33 | 7230.0 0.3918 34 | 7255.0 0.3892 35 | 7280.0 0.3828 36 | 7305.0 0.382 37 | 7330.0 0.3884 38 | 7355.0 0.3872 39 | 7380.0 0.3821 40 | 7405.0 0.3787 41 | 7430.0 0.3759 42 | 7455.0 0.3727 43 | 7480.0 0.3681 44 | 7505.0 0.3618 45 | 7530.0 0.3565 46 | 7555.0 0.3554 47 | 7580.0 0.3478 48 | 7605.0 0.1473 49 | 7630.0 0.2096 50 | 7655.0 0.2648 51 | 7680.0 0.33 52 | 7705.0 0.3256 53 | 7730.0 0.3223 54 | 7755.0 0.3179 55 | 7780.0 0.3129 56 | 7805.0 0.3077 57 | 7830.0 0.3026 58 | 7855.0 0.298 59 | 7880.0 0.2944 60 | 7905.0 0.2921 61 | 7930.0 0.2916 62 | 7955.0 0.2921 63 | 7980.0 0.2927 64 | 8005.0 0.2923 65 | 8030.0 0.2896 66 | 8055.0 0.284 67 | 8080.0 0.2758 68 | 8105.0 0.2642 69 | 8130.0 0.2427 70 | 8155.0 0.2091 71 | 8180.0 0.1689 72 | 8205.0 0.1276 73 | 8230.0 0.0901 74 | 8255.0 0.0603 75 | 8280.0 0.0378 76 | 8305.0 0.0218 77 | 8330.0 0.0117 78 | 8355.0 0.0068 79 | 8380.0 0.0048 80 | 8405.0 0.0033 81 | 8430.0 0.002 82 | 8455.0 0.0013 83 | 8480.0 0.001 84 | 8505.0 0.0009 85 | 8530.0 0.0009 86 | 8555.0 0.0008 87 | 8580.0 0.0005 88 | 8605.0 0.0002 89 | 8630.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/SLOAN_SDSS.r_AB.dat: -------------------------------------------------------------------------------- 1 | 5380.0 0.0 2 | 5405.0 0.0014 3 | 5430.0 0.0099 4 | 5455.0 0.0259 5 | 5480.0 0.0497 6 | 5505.0 0.0807 7 | 5530.0 0.1186 8 | 5555.0 0.1625 9 | 5580.0 0.2093 10 | 5605.0 0.2555 11 | 5630.0 0.2975 12 | 5655.0 0.3326 13 | 5680.0 0.3609 14 | 5705.0 0.3834 15 | 5730.0 0.401 16 | 5755.0 0.4147 17 | 5780.0 0.4253 18 | 5805.0 0.4333 19 | 5830.0 0.4395 20 | 5855.0 0.4446 21 | 5880.0 0.4489 22 | 5905.0 0.4527 23 | 5930.0 0.4563 24 | 5955.0 0.4599 25 | 5980.0 0.4634 26 | 6005.0 0.4665 27 | 6030.0 0.4689 28 | 6055.0 0.4703 29 | 6080.0 0.4711 30 | 6105.0 0.4717 31 | 6130.0 0.4727 32 | 6155.0 0.4744 33 | 6180.0 0.4767 34 | 6205.0 0.4792 35 | 6230.0 0.4819 36 | 6255.0 0.4844 37 | 6280.0 0.4867 38 | 6305.0 0.4887 39 | 6330.0 0.4902 40 | 6355.0 0.4909 41 | 6380.0 0.4912 42 | 6405.0 0.4912 43 | 6430.0 0.4912 44 | 6455.0 0.4914 45 | 6480.0 0.4915 46 | 6505.0 0.4912 47 | 6530.0 0.4901 48 | 6555.0 0.4878 49 | 6580.0 0.4852 50 | 6605.0 0.4818 51 | 6630.0 0.4697 52 | 6655.0 0.4421 53 | 6680.0 0.4009 54 | 6705.0 0.3499 55 | 6730.0 0.2924 56 | 6755.0 0.2318 57 | 6780.0 0.1715 58 | 6805.0 0.1152 59 | 6830.0 0.0687 60 | 6855.0 0.038 61 | 6880.0 0.0212 62 | 6905.0 0.0134 63 | 6930.0 0.0099 64 | 6955.0 0.0076 65 | 6980.0 0.0055 66 | 7005.0 0.0039 67 | 7030.0 0.0027 68 | 7055.0 0.002 69 | 7080.0 0.0015 70 | 7105.0 0.0012 71 | 7130.0 0.001 72 | 7155.0 0.0007 73 | 7180.0 0.0004 74 | 7205.0 0.0002 75 | 7230.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/SLOAN_SDSS.r_Vega.dat: -------------------------------------------------------------------------------- 1 | 5380.0 0.0 2 | 5405.0 0.0014 3 | 5430.0 0.0099 4 | 5455.0 0.0259 5 | 5480.0 0.0497 6 | 5505.0 0.0807 7 | 5530.0 0.1186 8 | 5555.0 0.1625 9 | 5580.0 0.2093 10 | 5605.0 0.2555 11 | 5630.0 0.2975 12 | 5655.0 0.3326 13 | 5680.0 0.3609 14 | 5705.0 0.3834 15 | 5730.0 0.401 16 | 5755.0 0.4147 17 | 5780.0 0.4253 18 | 5805.0 0.4333 19 | 5830.0 0.4395 20 | 5855.0 0.4446 21 | 5880.0 0.4489 22 | 5905.0 0.4527 23 | 5930.0 0.4563 24 | 5955.0 0.4599 25 | 5980.0 0.4634 26 | 6005.0 0.4665 27 | 6030.0 0.4689 28 | 6055.0 0.4703 29 | 6080.0 0.4711 30 | 6105.0 0.4717 31 | 6130.0 0.4727 32 | 6155.0 0.4744 33 | 6180.0 0.4767 34 | 6205.0 0.4792 35 | 6230.0 0.4819 36 | 6255.0 0.4844 37 | 6280.0 0.4867 38 | 6305.0 0.4887 39 | 6330.0 0.4902 40 | 6355.0 0.4909 41 | 6380.0 0.4912 42 | 6405.0 0.4912 43 | 6430.0 0.4912 44 | 6455.0 0.4914 45 | 6480.0 0.4915 46 | 6505.0 0.4912 47 | 6530.0 0.4901 48 | 6555.0 0.4878 49 | 6580.0 0.4852 50 | 6605.0 0.4818 51 | 6630.0 0.4697 52 | 6655.0 0.4421 53 | 6680.0 0.4009 54 | 6705.0 0.3499 55 | 6730.0 0.2924 56 | 6755.0 0.2318 57 | 6780.0 0.1715 58 | 6805.0 0.1152 59 | 6830.0 0.0687 60 | 6855.0 0.038 61 | 6880.0 0.0212 62 | 6905.0 0.0134 63 | 6930.0 0.0099 64 | 6955.0 0.0076 65 | 6980.0 0.0055 66 | 7005.0 0.0039 67 | 7030.0 0.0027 68 | 7055.0 0.002 69 | 7080.0 0.0015 70 | 7105.0 0.0012 71 | 7130.0 0.001 72 | 7155.0 0.0007 73 | 7180.0 0.0004 74 | 7205.0 0.0002 75 | 7230.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/SLOAN_SDSS.u_AB.dat: -------------------------------------------------------------------------------- 1 | 2980.0 0.0 2 | 3005.0 0.0001 3 | 3030.0 0.0005 4 | 3055.0 0.0013 5 | 3080.0 0.0026 6 | 3105.0 0.0052 7 | 3130.0 0.0093 8 | 3155.0 0.0161 9 | 3180.0 0.024 10 | 3205.0 0.0323 11 | 3230.0 0.0405 12 | 3255.0 0.0485 13 | 3280.0 0.0561 14 | 3305.0 0.0634 15 | 3330.0 0.07 16 | 3355.0 0.0756 17 | 3380.0 0.0803 18 | 3405.0 0.0848 19 | 3430.0 0.0883 20 | 3455.0 0.0917 21 | 3480.0 0.0959 22 | 3505.0 0.1001 23 | 3530.0 0.1029 24 | 3555.0 0.1044 25 | 3580.0 0.1053 26 | 3605.0 0.1063 27 | 3630.0 0.1075 28 | 3655.0 0.1085 29 | 3680.0 0.1084 30 | 3705.0 0.1064 31 | 3730.0 0.1024 32 | 3755.0 0.0966 33 | 3780.0 0.0887 34 | 3805.0 0.0787 35 | 3830.0 0.0672 36 | 3855.0 0.0549 37 | 3880.0 0.0413 38 | 3905.0 0.0268 39 | 3930.0 0.0145 40 | 3955.0 0.0075 41 | 3980.0 0.0042 42 | 4005.0 0.0022 43 | 4030.0 0.001 44 | 4055.0 0.0006 45 | 4080.0 0.0004 46 | 4105.0 0.0002 47 | 4130.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/SLOAN_SDSS.u_Vega.dat: -------------------------------------------------------------------------------- 1 | 2980.0 0.0 2 | 3005.0 0.0001 3 | 3030.0 0.0005 4 | 3055.0 0.0013 5 | 3080.0 0.0026 6 | 3105.0 0.0052 7 | 3130.0 0.0093 8 | 3155.0 0.0161 9 | 3180.0 0.024 10 | 3205.0 0.0323 11 | 3230.0 0.0405 12 | 3255.0 0.0485 13 | 3280.0 0.0561 14 | 3305.0 0.0634 15 | 3330.0 0.07 16 | 3355.0 0.0756 17 | 3380.0 0.0803 18 | 3405.0 0.0848 19 | 3430.0 0.0883 20 | 3455.0 0.0917 21 | 3480.0 0.0959 22 | 3505.0 0.1001 23 | 3530.0 0.1029 24 | 3555.0 0.1044 25 | 3580.0 0.1053 26 | 3605.0 0.1063 27 | 3630.0 0.1075 28 | 3655.0 0.1085 29 | 3680.0 0.1084 30 | 3705.0 0.1064 31 | 3730.0 0.1024 32 | 3755.0 0.0966 33 | 3780.0 0.0887 34 | 3805.0 0.0787 35 | 3830.0 0.0672 36 | 3855.0 0.0549 37 | 3880.0 0.0413 38 | 3905.0 0.0268 39 | 3930.0 0.0145 40 | 3955.0 0.0075 41 | 3980.0 0.0042 42 | 4005.0 0.0022 43 | 4030.0 0.001 44 | 4055.0 0.0006 45 | 4080.0 0.0004 46 | 4105.0 0.0002 47 | 4130.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/SLOAN_SDSS.z_AB.dat: -------------------------------------------------------------------------------- 1 | 7755.0 0.0 2 | 7780.0 0.0001 3 | 7805.0 0.0001 4 | 7830.0 0.0001 5 | 7855.0 0.0002 6 | 7880.0 0.0002 7 | 7905.0 0.0003 8 | 7930.0 0.0005 9 | 7955.0 0.0007 10 | 7980.0 0.0011 11 | 8005.0 0.0017 12 | 8030.0 0.0027 13 | 8055.0 0.004 14 | 8080.0 0.0057 15 | 8105.0 0.0079 16 | 8130.0 0.0106 17 | 8155.0 0.0139 18 | 8180.0 0.0178 19 | 8205.0 0.0222 20 | 8230.0 0.0271 21 | 8255.0 0.0324 22 | 8280.0 0.0382 23 | 8305.0 0.0446 24 | 8330.0 0.0511 25 | 8355.0 0.0564 26 | 8380.0 0.0603 27 | 8405.0 0.0637 28 | 8430.0 0.0667 29 | 8455.0 0.0694 30 | 8480.0 0.0717 31 | 8505.0 0.0736 32 | 8530.0 0.0752 33 | 8555.0 0.0765 34 | 8580.0 0.0775 35 | 8605.0 0.0782 36 | 8630.0 0.0786 37 | 8655.0 0.0787 38 | 8680.0 0.0785 39 | 8705.0 0.078 40 | 8730.0 0.0772 41 | 8755.0 0.0763 42 | 8780.0 0.0751 43 | 8805.0 0.0738 44 | 8830.0 0.0723 45 | 8855.0 0.0708 46 | 8880.0 0.0693 47 | 8905.0 0.0674 48 | 8930.0 0.0632 49 | 8955.0 0.0581 50 | 8980.0 0.0543 51 | 9005.0 0.0526 52 | 9030.0 0.0523 53 | 9055.0 0.0522 54 | 9080.0 0.0512 55 | 9105.0 0.0496 56 | 9130.0 0.0481 57 | 9155.0 0.0473 58 | 9180.0 0.0476 59 | 9205.0 0.0482 60 | 9230.0 0.0476 61 | 9255.0 0.0447 62 | 9280.0 0.0391 63 | 9305.0 0.0329 64 | 9330.0 0.0283 65 | 9355.0 0.0264 66 | 9380.0 0.0271 67 | 9405.0 0.0283 68 | 9430.0 0.0275 69 | 9455.0 0.0254 70 | 9480.0 0.0252 71 | 9505.0 0.0256 72 | 9530.0 0.0246 73 | 9555.0 0.0244 74 | 9580.0 0.0252 75 | 9605.0 0.0258 76 | 9630.0 0.0265 77 | 9655.0 0.0274 78 | 9680.0 0.0279 79 | 9705.0 0.0271 80 | 9730.0 0.0252 81 | 9755.0 0.0236 82 | 9780.0 0.0227 83 | 9805.0 0.0222 84 | 9830.0 0.0216 85 | 9855.0 0.0208 86 | 9880.0 0.0196 87 | 9905.0 0.0183 88 | 9930.0 0.0171 89 | 9955.0 0.016 90 | 9980.0 0.0149 91 | 10005.0 0.0138 92 | 10030.0 0.0128 93 | 10055.0 0.0118 94 | 10080.0 0.0108 95 | 10105.0 0.0099 96 | 10130.0 0.0091 97 | 10155.0 0.0083 98 | 10180.0 0.0075 99 | 10205.0 0.0068 100 | 10230.0 0.0061 101 | 10255.0 0.0055 102 | 10280.0 0.005 103 | 10305.0 0.0045 104 | 10330.0 0.0041 105 | 10355.0 0.0037 106 | 10380.0 0.0033 107 | 10405.0 0.003 108 | 10430.0 0.0027 109 | 10455.0 0.0025 110 | 10480.0 0.0023 111 | 10505.0 0.0021 112 | 10530.0 0.0019 113 | 10555.0 0.0018 114 | 10580.0 0.0017 115 | 10605.0 0.0016 116 | 10630.0 0.0015 117 | 10655.0 0.0014 118 | 10680.0 0.0013 119 | 10705.0 0.0012 120 | 10730.0 0.0011 121 | 10755.0 0.001 122 | 10780.0 0.0009 123 | 10805.0 0.0008 124 | 10830.0 0.0008 125 | 10855.0 0.0007 126 | 10880.0 0.0006 127 | 10905.0 0.0006 128 | 10930.0 0.0006 129 | 10955.0 0.0005 130 | 10980.0 0.0005 131 | 11005.0 0.0004 132 | 11030.0 0.0004 133 | 11055.0 0.0003 134 | 11080.0 0.0003 135 | 11105.0 0.0002 136 | 11130.0 0.0002 137 | 11155.0 0.0001 138 | 11180.0 0.0001 139 | 11205.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/SLOAN_SDSS.z_Vega.dat: -------------------------------------------------------------------------------- 1 | 7755.0 0.0 2 | 7780.0 0.0001 3 | 7805.0 0.0001 4 | 7830.0 0.0001 5 | 7855.0 0.0002 6 | 7880.0 0.0002 7 | 7905.0 0.0003 8 | 7930.0 0.0005 9 | 7955.0 0.0007 10 | 7980.0 0.0011 11 | 8005.0 0.0017 12 | 8030.0 0.0027 13 | 8055.0 0.004 14 | 8080.0 0.0057 15 | 8105.0 0.0079 16 | 8130.0 0.0106 17 | 8155.0 0.0139 18 | 8180.0 0.0178 19 | 8205.0 0.0222 20 | 8230.0 0.0271 21 | 8255.0 0.0324 22 | 8280.0 0.0382 23 | 8305.0 0.0446 24 | 8330.0 0.0511 25 | 8355.0 0.0564 26 | 8380.0 0.0603 27 | 8405.0 0.0637 28 | 8430.0 0.0667 29 | 8455.0 0.0694 30 | 8480.0 0.0717 31 | 8505.0 0.0736 32 | 8530.0 0.0752 33 | 8555.0 0.0765 34 | 8580.0 0.0775 35 | 8605.0 0.0782 36 | 8630.0 0.0786 37 | 8655.0 0.0787 38 | 8680.0 0.0785 39 | 8705.0 0.078 40 | 8730.0 0.0772 41 | 8755.0 0.0763 42 | 8780.0 0.0751 43 | 8805.0 0.0738 44 | 8830.0 0.0723 45 | 8855.0 0.0708 46 | 8880.0 0.0693 47 | 8905.0 0.0674 48 | 8930.0 0.0632 49 | 8955.0 0.0581 50 | 8980.0 0.0543 51 | 9005.0 0.0526 52 | 9030.0 0.0523 53 | 9055.0 0.0522 54 | 9080.0 0.0512 55 | 9105.0 0.0496 56 | 9130.0 0.0481 57 | 9155.0 0.0473 58 | 9180.0 0.0476 59 | 9205.0 0.0482 60 | 9230.0 0.0476 61 | 9255.0 0.0447 62 | 9280.0 0.0391 63 | 9305.0 0.0329 64 | 9330.0 0.0283 65 | 9355.0 0.0264 66 | 9380.0 0.0271 67 | 9405.0 0.0283 68 | 9430.0 0.0275 69 | 9455.0 0.0254 70 | 9480.0 0.0252 71 | 9505.0 0.0256 72 | 9530.0 0.0246 73 | 9555.0 0.0244 74 | 9580.0 0.0252 75 | 9605.0 0.0258 76 | 9630.0 0.0265 77 | 9655.0 0.0274 78 | 9680.0 0.0279 79 | 9705.0 0.0271 80 | 9730.0 0.0252 81 | 9755.0 0.0236 82 | 9780.0 0.0227 83 | 9805.0 0.0222 84 | 9830.0 0.0216 85 | 9855.0 0.0208 86 | 9880.0 0.0196 87 | 9905.0 0.0183 88 | 9930.0 0.0171 89 | 9955.0 0.016 90 | 9980.0 0.0149 91 | 10005.0 0.0138 92 | 10030.0 0.0128 93 | 10055.0 0.0118 94 | 10080.0 0.0108 95 | 10105.0 0.0099 96 | 10130.0 0.0091 97 | 10155.0 0.0083 98 | 10180.0 0.0075 99 | 10205.0 0.0068 100 | 10230.0 0.0061 101 | 10255.0 0.0055 102 | 10280.0 0.005 103 | 10305.0 0.0045 104 | 10330.0 0.0041 105 | 10355.0 0.0037 106 | 10380.0 0.0033 107 | 10405.0 0.003 108 | 10430.0 0.0027 109 | 10455.0 0.0025 110 | 10480.0 0.0023 111 | 10505.0 0.0021 112 | 10530.0 0.0019 113 | 10555.0 0.0018 114 | 10580.0 0.0017 115 | 10605.0 0.0016 116 | 10630.0 0.0015 117 | 10655.0 0.0014 118 | 10680.0 0.0013 119 | 10705.0 0.0012 120 | 10730.0 0.0011 121 | 10755.0 0.001 122 | 10780.0 0.0009 123 | 10805.0 0.0008 124 | 10830.0 0.0008 125 | 10855.0 0.0007 126 | 10880.0 0.0006 127 | 10905.0 0.0006 128 | 10930.0 0.0006 129 | 10955.0 0.0005 130 | 10980.0 0.0005 131 | 11005.0 0.0004 132 | 11030.0 0.0004 133 | 11055.0 0.0003 134 | 11080.0 0.0003 135 | 11105.0 0.0002 136 | 11130.0 0.0002 137 | 11155.0 0.0001 138 | 11180.0 0.0001 139 | 11205.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Swift_UVOT.B_AB.dat: -------------------------------------------------------------------------------- 1 | 3620.0 0.0 2 | 3630.0 0.001043 3 | 3640.0 0.001245 4 | 3650.0 0.001497 5 | 3660.0 0.001849 6 | 3670.0 0.002203 7 | 3680.0 0.002709 8 | 3690.0 0.003268 9 | 3700.0 0.00403 10 | 3710.0 0.004996 11 | 3720.0 0.006269 12 | 3730.0 0.007951 13 | 3740.0 0.009995 14 | 3750.0 0.012371 15 | 3760.0 0.015427 16 | 3770.0 0.019354 17 | 3780.0 0.024537 18 | 3790.0 0.030957 19 | 3800.0 0.039039 20 | 3810.0 0.049152 21 | 3820.0 0.06146 22 | 3830.0 0.075542 23 | 3840.0 0.091224 24 | 3850.0 0.109203 25 | 3860.0 0.130659 26 | 3870.0 0.15588 27 | 3880.0 0.181534 28 | 3890.0 0.201137 29 | 3900.0 0.209829 30 | 3910.0 0.21032 31 | 3920.0 0.210985 32 | 3930.0 0.219295 33 | 3940.0 0.237268 34 | 3950.0 0.261526 35 | 3960.0 0.28473 36 | 3970.0 0.299441 37 | 3980.0 0.304067 38 | 3990.0 0.304254 39 | 4000.0 0.30669 40 | 4010.0 0.314206 41 | 4020.0 0.324618 42 | 4030.0 0.331684 43 | 4040.0 0.329518 44 | 4050.0 0.319205 45 | 4060.0 0.305434 46 | 4070.0 0.295546 47 | 4080.0 0.293753 48 | 4090.0 0.300665 49 | 4100.0 0.313252 50 | 4110.0 0.326249 51 | 4120.0 0.333247 52 | 4130.0 0.331286 53 | 4140.0 0.32242 54 | 4150.0 0.310733 55 | 4160.0 0.302912 56 | 4170.0 0.302183 57 | 4180.0 0.308278 58 | 4190.0 0.318768 59 | 4200.0 0.330099 60 | 4210.0 0.338809 61 | 4220.0 0.343706 62 | 4230.0 0.345396 63 | 4240.0 0.346419 64 | 4250.0 0.350725 65 | 4260.0 0.356881 66 | 4270.0 0.363111 67 | 4280.0 0.366546 68 | 4290.0 0.364368 69 | 4300.0 0.355959 70 | 4310.0 0.343858 71 | 4320.0 0.332234 72 | 4330.0 0.324784 73 | 4340.0 0.323433 74 | 4350.0 0.325791 75 | 4360.0 0.332954 76 | 4370.0 0.341934 77 | 4380.0 0.349426 78 | 4390.0 0.352999 79 | 4400.0 0.35198 80 | 4410.0 0.347547 81 | 4420.0 0.341679 82 | 4430.0 0.336447 83 | 4440.0 0.332881 84 | 4450.0 0.330762 85 | 4460.0 0.328859 86 | 4470.0 0.326298 87 | 4480.0 0.322384 88 | 4490.0 0.317412 89 | 4500.0 0.312072 90 | 4510.0 0.307461 91 | 4520.0 0.304474 92 | 4530.0 0.303392 93 | 4540.0 0.303772 94 | 4550.0 0.307572 95 | 4560.0 0.31136 96 | 4570.0 0.314111 97 | 4580.0 0.315439 98 | 4590.0 0.315561 99 | 4600.0 0.314624 100 | 4610.0 0.313105 101 | 4620.0 0.311165 102 | 4630.0 0.309405 103 | 4640.0 0.307858 104 | 4650.0 0.30247 105 | 4660.0 0.297318 106 | 4670.0 0.292693 107 | 4680.0 0.288343 108 | 4690.0 0.284125 109 | 4700.0 0.279744 110 | 4710.0 0.274775 111 | 4720.0 0.268771 112 | 4730.0 0.26166 113 | 4740.0 0.253709 114 | 4750.0 0.248842 115 | 4760.0 0.244417 116 | 4770.0 0.241178 117 | 4780.0 0.239529 118 | 4790.0 0.239518 119 | 4800.0 0.240449 120 | 4810.0 0.241383 121 | 4820.0 0.241101 122 | 4830.0 0.23733 123 | 4840.0 0.227939 124 | 4850.0 0.211665 125 | 4860.0 0.187898 126 | 4870.0 0.158225 127 | 4880.0 0.126336 128 | 4890.0 0.096407 129 | 4900.0 0.07105 130 | 4910.0 0.051147 131 | 4920.0 0.03636 132 | 4930.0 0.025881 133 | 4940.0 0.018536 134 | 4950.0 0.01322 135 | 4960.0 0.009511 136 | 4970.0 0.006895 137 | 4980.0 0.005014 138 | 4990.0 0.003685 139 | 5000.0 0.002705 140 | 5010.0 0.00201 141 | 5020.0 0.001514 142 | 5030.0 0.001157 143 | 5040.0 0.000886 144 | 5050.0 0.000672 145 | 5060.0 0.000539 146 | 5070.0 0.000433 147 | 5080.0 0.000354 148 | 5090.0 0.000301 149 | 5100.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Swift_UVOT.B_Vega.dat: -------------------------------------------------------------------------------- 1 | 3620.0 0.0 2 | 3630.0 0.001043 3 | 3640.0 0.001245 4 | 3650.0 0.001497 5 | 3660.0 0.001849 6 | 3670.0 0.002203 7 | 3680.0 0.002709 8 | 3690.0 0.003268 9 | 3700.0 0.00403 10 | 3710.0 0.004996 11 | 3720.0 0.006269 12 | 3730.0 0.007951 13 | 3740.0 0.009995 14 | 3750.0 0.012371 15 | 3760.0 0.015427 16 | 3770.0 0.019354 17 | 3780.0 0.024537 18 | 3790.0 0.030957 19 | 3800.0 0.039039 20 | 3810.0 0.049152 21 | 3820.0 0.06146 22 | 3830.0 0.075542 23 | 3840.0 0.091224 24 | 3850.0 0.109203 25 | 3860.0 0.130659 26 | 3870.0 0.15588 27 | 3880.0 0.181534 28 | 3890.0 0.201137 29 | 3900.0 0.209829 30 | 3910.0 0.21032 31 | 3920.0 0.210985 32 | 3930.0 0.219295 33 | 3940.0 0.237268 34 | 3950.0 0.261526 35 | 3960.0 0.28473 36 | 3970.0 0.299441 37 | 3980.0 0.304067 38 | 3990.0 0.304254 39 | 4000.0 0.30669 40 | 4010.0 0.314206 41 | 4020.0 0.324618 42 | 4030.0 0.331684 43 | 4040.0 0.329518 44 | 4050.0 0.319205 45 | 4060.0 0.305434 46 | 4070.0 0.295546 47 | 4080.0 0.293753 48 | 4090.0 0.300665 49 | 4100.0 0.313252 50 | 4110.0 0.326249 51 | 4120.0 0.333247 52 | 4130.0 0.331286 53 | 4140.0 0.32242 54 | 4150.0 0.310733 55 | 4160.0 0.302912 56 | 4170.0 0.302183 57 | 4180.0 0.308278 58 | 4190.0 0.318768 59 | 4200.0 0.330099 60 | 4210.0 0.338809 61 | 4220.0 0.343706 62 | 4230.0 0.345396 63 | 4240.0 0.346419 64 | 4250.0 0.350725 65 | 4260.0 0.356881 66 | 4270.0 0.363111 67 | 4280.0 0.366546 68 | 4290.0 0.364368 69 | 4300.0 0.355959 70 | 4310.0 0.343858 71 | 4320.0 0.332234 72 | 4330.0 0.324784 73 | 4340.0 0.323433 74 | 4350.0 0.325791 75 | 4360.0 0.332954 76 | 4370.0 0.341934 77 | 4380.0 0.349426 78 | 4390.0 0.352999 79 | 4400.0 0.35198 80 | 4410.0 0.347547 81 | 4420.0 0.341679 82 | 4430.0 0.336447 83 | 4440.0 0.332881 84 | 4450.0 0.330762 85 | 4460.0 0.328859 86 | 4470.0 0.326298 87 | 4480.0 0.322384 88 | 4490.0 0.317412 89 | 4500.0 0.312072 90 | 4510.0 0.307461 91 | 4520.0 0.304474 92 | 4530.0 0.303392 93 | 4540.0 0.303772 94 | 4550.0 0.307572 95 | 4560.0 0.31136 96 | 4570.0 0.314111 97 | 4580.0 0.315439 98 | 4590.0 0.315561 99 | 4600.0 0.314624 100 | 4610.0 0.313105 101 | 4620.0 0.311165 102 | 4630.0 0.309405 103 | 4640.0 0.307858 104 | 4650.0 0.30247 105 | 4660.0 0.297318 106 | 4670.0 0.292693 107 | 4680.0 0.288343 108 | 4690.0 0.284125 109 | 4700.0 0.279744 110 | 4710.0 0.274775 111 | 4720.0 0.268771 112 | 4730.0 0.26166 113 | 4740.0 0.253709 114 | 4750.0 0.248842 115 | 4760.0 0.244417 116 | 4770.0 0.241178 117 | 4780.0 0.239529 118 | 4790.0 0.239518 119 | 4800.0 0.240449 120 | 4810.0 0.241383 121 | 4820.0 0.241101 122 | 4830.0 0.23733 123 | 4840.0 0.227939 124 | 4850.0 0.211665 125 | 4860.0 0.187898 126 | 4870.0 0.158225 127 | 4880.0 0.126336 128 | 4890.0 0.096407 129 | 4900.0 0.07105 130 | 4910.0 0.051147 131 | 4920.0 0.03636 132 | 4930.0 0.025881 133 | 4940.0 0.018536 134 | 4950.0 0.01322 135 | 4960.0 0.009511 136 | 4970.0 0.006895 137 | 4980.0 0.005014 138 | 4990.0 0.003685 139 | 5000.0 0.002705 140 | 5010.0 0.00201 141 | 5020.0 0.001514 142 | 5030.0 0.001157 143 | 5040.0 0.000886 144 | 5050.0 0.000672 145 | 5060.0 0.000539 146 | 5070.0 0.000433 147 | 5080.0 0.000354 148 | 5090.0 0.000301 149 | 5100.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Swift_UVOT.U_AB.dat: -------------------------------------------------------------------------------- 1 | 3000.0 0.0 2 | 3010.0 0.000627 3 | 3020.0 0.010699 4 | 3030.0 0.05295 5 | 3040.0 0.12376 6 | 3050.0 0.198651 7 | 3060.0 0.237385 8 | 3070.0 0.246552 9 | 3080.0 0.302168 10 | 3090.0 0.3495 11 | 3100.0 0.348293 12 | 3110.0 0.353033 13 | 3120.0 0.373387 14 | 3130.0 0.39699 15 | 3140.0 0.394722 16 | 3150.0 0.381624 17 | 3160.0 0.367024 18 | 3170.0 0.365845 19 | 3180.0 0.382155 20 | 3190.0 0.411985 21 | 3200.0 0.442156 22 | 3210.0 0.415836 23 | 3220.0 0.374593 24 | 3230.0 0.384742 25 | 3240.0 0.42803 26 | 3250.0 0.446535 27 | 3260.0 0.457309 28 | 3270.0 0.473338 29 | 3280.0 0.477045 30 | 3290.0 0.471418 31 | 3300.0 0.469602 32 | 3310.0 0.47416 33 | 3320.0 0.482948 34 | 3330.0 0.471347 35 | 3340.0 0.435755 36 | 3350.0 0.415866 37 | 3360.0 0.421237 38 | 3370.0 0.415827 39 | 3380.0 0.394273 40 | 3390.0 0.387898 41 | 3400.0 0.4102 42 | 3410.0 0.435551 43 | 3420.0 0.433702 44 | 3430.0 0.410745 45 | 3440.0 0.393707 46 | 3450.0 0.39644 47 | 3460.0 0.408976 48 | 3470.0 0.412809 49 | 3480.0 0.403479 50 | 3490.0 0.394852 51 | 3500.0 0.397161 52 | 3510.0 0.407705 53 | 3520.0 0.417563 54 | 3530.0 0.420622 55 | 3540.0 0.420591 56 | 3550.0 0.424241 57 | 3560.0 0.435132 58 | 3570.0 0.450969 59 | 3580.0 0.462034 60 | 3590.0 0.462345 61 | 3600.0 0.45394 62 | 3610.0 0.450832 63 | 3620.0 0.460983 64 | 3630.0 0.476999 65 | 3640.0 0.485881 66 | 3650.0 0.482076 67 | 3660.0 0.47746 68 | 3670.0 0.482144 69 | 3680.0 0.491617 70 | 3690.0 0.495903 71 | 3700.0 0.49094 72 | 3710.0 0.481416 73 | 3720.0 0.47181 74 | 3730.0 0.462478 75 | 3740.0 0.458796 76 | 3750.0 0.461859 77 | 3760.0 0.469602 78 | 3770.0 0.464551 79 | 3780.0 0.440322 80 | 3790.0 0.412446 81 | 3800.0 0.400006 82 | 3810.0 0.412595 83 | 3820.0 0.434128 84 | 3830.0 0.437413 85 | 3840.0 0.396947 86 | 3850.0 0.31418 87 | 3860.0 0.21513 88 | 3870.0 0.129645 89 | 3880.0 0.072651 90 | 3890.0 0.041031 91 | 3900.0 0.024611 92 | 3910.0 0.015879 93 | 3920.0 0.010817 94 | 3930.0 0.007612 95 | 3940.0 0.005359 96 | 3950.0 0.003682 97 | 3960.0 0.002476 98 | 3970.0 0.001645 99 | 3980.0 0.001092 100 | 3990.0 0.000771 101 | 4000.0 0.000587 102 | 4010.0 0.00045 103 | 4020.0 0.000359 104 | 4030.0 0.000313 105 | 4040.0 0.000267 106 | 4050.0 0.000267 107 | 4060.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Swift_UVOT.U_Vega.dat: -------------------------------------------------------------------------------- 1 | 3000.0 0.0 2 | 3010.0 0.000627 3 | 3020.0 0.010699 4 | 3030.0 0.05295 5 | 3040.0 0.12376 6 | 3050.0 0.198651 7 | 3060.0 0.237385 8 | 3070.0 0.246552 9 | 3080.0 0.302168 10 | 3090.0 0.3495 11 | 3100.0 0.348293 12 | 3110.0 0.353033 13 | 3120.0 0.373387 14 | 3130.0 0.39699 15 | 3140.0 0.394722 16 | 3150.0 0.381624 17 | 3160.0 0.367024 18 | 3170.0 0.365845 19 | 3180.0 0.382155 20 | 3190.0 0.411985 21 | 3200.0 0.442156 22 | 3210.0 0.415836 23 | 3220.0 0.374593 24 | 3230.0 0.384742 25 | 3240.0 0.42803 26 | 3250.0 0.446535 27 | 3260.0 0.457309 28 | 3270.0 0.473338 29 | 3280.0 0.477045 30 | 3290.0 0.471418 31 | 3300.0 0.469602 32 | 3310.0 0.47416 33 | 3320.0 0.482948 34 | 3330.0 0.471347 35 | 3340.0 0.435755 36 | 3350.0 0.415866 37 | 3360.0 0.421237 38 | 3370.0 0.415827 39 | 3380.0 0.394273 40 | 3390.0 0.387898 41 | 3400.0 0.4102 42 | 3410.0 0.435551 43 | 3420.0 0.433702 44 | 3430.0 0.410745 45 | 3440.0 0.393707 46 | 3450.0 0.39644 47 | 3460.0 0.408976 48 | 3470.0 0.412809 49 | 3480.0 0.403479 50 | 3490.0 0.394852 51 | 3500.0 0.397161 52 | 3510.0 0.407705 53 | 3520.0 0.417563 54 | 3530.0 0.420622 55 | 3540.0 0.420591 56 | 3550.0 0.424241 57 | 3560.0 0.435132 58 | 3570.0 0.450969 59 | 3580.0 0.462034 60 | 3590.0 0.462345 61 | 3600.0 0.45394 62 | 3610.0 0.450832 63 | 3620.0 0.460983 64 | 3630.0 0.476999 65 | 3640.0 0.485881 66 | 3650.0 0.482076 67 | 3660.0 0.47746 68 | 3670.0 0.482144 69 | 3680.0 0.491617 70 | 3690.0 0.495903 71 | 3700.0 0.49094 72 | 3710.0 0.481416 73 | 3720.0 0.47181 74 | 3730.0 0.462478 75 | 3740.0 0.458796 76 | 3750.0 0.461859 77 | 3760.0 0.469602 78 | 3770.0 0.464551 79 | 3780.0 0.440322 80 | 3790.0 0.412446 81 | 3800.0 0.400006 82 | 3810.0 0.412595 83 | 3820.0 0.434128 84 | 3830.0 0.437413 85 | 3840.0 0.396947 86 | 3850.0 0.31418 87 | 3860.0 0.21513 88 | 3870.0 0.129645 89 | 3880.0 0.072651 90 | 3890.0 0.041031 91 | 3900.0 0.024611 92 | 3910.0 0.015879 93 | 3920.0 0.010817 94 | 3930.0 0.007612 95 | 3940.0 0.005359 96 | 3950.0 0.003682 97 | 3960.0 0.002476 98 | 3970.0 0.001645 99 | 3980.0 0.001092 100 | 3990.0 0.000771 101 | 4000.0 0.000587 102 | 4010.0 0.00045 103 | 4020.0 0.000359 104 | 4030.0 0.000313 105 | 4040.0 0.000267 106 | 4050.0 0.000267 107 | 4060.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Swift_UVOT.V_AB.dat: -------------------------------------------------------------------------------- 1 | 4680.0 0.0 2 | 4690.0 0.000261 3 | 4700.0 0.000321 4 | 4710.0 0.000411 5 | 4720.0 0.000528 6 | 4730.0 0.000581 7 | 4740.0 0.000632 8 | 4750.0 0.00066 9 | 4760.0 0.000658 10 | 4770.0 0.000626 11 | 4780.0 0.000565 12 | 4790.0 0.000534 13 | 4800.0 0.000532 14 | 4810.0 0.00056 15 | 4820.0 0.000559 16 | 4830.0 0.000557 17 | 4840.0 0.000584 18 | 4850.0 0.000641 19 | 4860.0 0.000727 20 | 4870.0 0.000784 21 | 4880.0 0.000898 22 | 4890.0 0.00104 23 | 4900.0 0.00124 24 | 4910.0 0.001467 25 | 4920.0 0.001808 26 | 4930.0 0.002233 27 | 4940.0 0.002799 28 | 4950.0 0.003567 29 | 4960.0 0.004573 30 | 4970.0 0.005978 31 | 4980.0 0.007907 32 | 4990.0 0.010592 33 | 5000.0 0.014362 34 | 5010.0 0.019644 35 | 5020.0 0.027031 36 | 5030.0 0.036934 37 | 5040.0 0.049723 38 | 5050.0 0.065425 39 | 5060.0 0.083111 40 | 5070.0 0.101456 41 | 5080.0 0.118822 42 | 5090.0 0.133996 43 | 5100.0 0.146654 44 | 5110.0 0.157007 45 | 5120.0 0.165607 46 | 5130.0 0.173223 47 | 5140.0 0.180427 48 | 5150.0 0.188467 49 | 5160.0 0.196482 50 | 5170.0 0.204235 51 | 5180.0 0.211275 52 | 5190.0 0.216992 53 | 5200.0 0.221161 54 | 5210.0 0.223225 55 | 5220.0 0.223348 56 | 5230.0 0.221852 57 | 5240.0 0.219172 58 | 5250.0 0.214445 59 | 5260.0 0.210024 60 | 5270.0 0.206214 61 | 5280.0 0.203464 62 | 5290.0 0.201668 63 | 5300.0 0.200683 64 | 5310.0 0.20014 65 | 5320.0 0.199762 66 | 5330.0 0.19927 67 | 5340.0 0.198543 68 | 5350.0 0.198565 69 | 5360.0 0.198019 70 | 5370.0 0.197037 71 | 5380.0 0.19585 72 | 5390.0 0.194482 73 | 5400.0 0.192937 74 | 5410.0 0.19135 75 | 5420.0 0.18967 76 | 5430.0 0.188092 77 | 5440.0 0.186404 78 | 5450.0 0.185013 79 | 5460.0 0.183647 80 | 5470.0 0.182305 81 | 5480.0 0.180986 82 | 5490.0 0.179727 83 | 5500.0 0.178544 84 | 5510.0 0.177403 85 | 5520.0 0.176134 86 | 5530.0 0.174885 87 | 5540.0 0.173637 88 | 5550.0 0.172336 89 | 5560.0 0.170895 90 | 5570.0 0.169283 91 | 5580.0 0.16785 92 | 5590.0 0.166385 93 | 5600.0 0.165027 94 | 5610.0 0.163819 95 | 5620.0 0.162763 96 | 5630.0 0.161755 97 | 5640.0 0.160794 98 | 5650.0 0.159433 99 | 5660.0 0.158015 100 | 5670.0 0.156509 101 | 5680.0 0.154855 102 | 5690.0 0.152726 103 | 5700.0 0.150092 104 | 5710.0 0.147044 105 | 5720.0 0.143542 106 | 5730.0 0.139648 107 | 5740.0 0.135394 108 | 5750.0 0.132104 109 | 5760.0 0.128959 110 | 5770.0 0.125857 111 | 5780.0 0.122827 112 | 5790.0 0.119435 113 | 5800.0 0.115275 114 | 5810.0 0.109747 115 | 5820.0 0.102369 116 | 5830.0 0.092979 117 | 5840.0 0.082116 118 | 5850.0 0.072055 119 | 5860.0 0.06016 120 | 5870.0 0.04939 121 | 5880.0 0.040199 122 | 5890.0 0.032533 123 | 5900.0 0.026201 124 | 5910.0 0.02097 125 | 5920.0 0.016725 126 | 5930.0 0.013204 127 | 5940.0 0.010297 128 | 5950.0 0.007947 129 | 5960.0 0.006063 130 | 5970.0 0.004593 131 | 5980.0 0.003464 132 | 5990.0 0.002628 133 | 6000.0 0.002004 134 | 6010.0 0.001542 135 | 6020.0 0.001207 136 | 6030.0 0.000948 137 | 6040.0 0.000764 138 | 6050.0 0.000629 139 | 6060.0 0.00052 140 | 6070.0 0.000435 141 | 6080.0 0.000375 142 | 6090.0 0.000326 143 | 6100.0 0.00029 144 | 6110.0 0.000254 145 | 6120.0 0.000219 146 | 6130.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/observables/filters/Swift_UVOT.V_Vega.dat: -------------------------------------------------------------------------------- 1 | 4680.0 0.0 2 | 4690.0 0.000261 3 | 4700.0 0.000321 4 | 4710.0 0.000411 5 | 4720.0 0.000528 6 | 4730.0 0.000581 7 | 4740.0 0.000632 8 | 4750.0 0.00066 9 | 4760.0 0.000658 10 | 4770.0 0.000626 11 | 4780.0 0.000565 12 | 4790.0 0.000534 13 | 4800.0 0.000532 14 | 4810.0 0.00056 15 | 4820.0 0.000559 16 | 4830.0 0.000557 17 | 4840.0 0.000584 18 | 4850.0 0.000641 19 | 4860.0 0.000727 20 | 4870.0 0.000784 21 | 4880.0 0.000898 22 | 4890.0 0.00104 23 | 4900.0 0.00124 24 | 4910.0 0.001467 25 | 4920.0 0.001808 26 | 4930.0 0.002233 27 | 4940.0 0.002799 28 | 4950.0 0.003567 29 | 4960.0 0.004573 30 | 4970.0 0.005978 31 | 4980.0 0.007907 32 | 4990.0 0.010592 33 | 5000.0 0.014362 34 | 5010.0 0.019644 35 | 5020.0 0.027031 36 | 5030.0 0.036934 37 | 5040.0 0.049723 38 | 5050.0 0.065425 39 | 5060.0 0.083111 40 | 5070.0 0.101456 41 | 5080.0 0.118822 42 | 5090.0 0.133996 43 | 5100.0 0.146654 44 | 5110.0 0.157007 45 | 5120.0 0.165607 46 | 5130.0 0.173223 47 | 5140.0 0.180427 48 | 5150.0 0.188467 49 | 5160.0 0.196482 50 | 5170.0 0.204235 51 | 5180.0 0.211275 52 | 5190.0 0.216992 53 | 5200.0 0.221161 54 | 5210.0 0.223225 55 | 5220.0 0.223348 56 | 5230.0 0.221852 57 | 5240.0 0.219172 58 | 5250.0 0.214445 59 | 5260.0 0.210024 60 | 5270.0 0.206214 61 | 5280.0 0.203464 62 | 5290.0 0.201668 63 | 5300.0 0.200683 64 | 5310.0 0.20014 65 | 5320.0 0.199762 66 | 5330.0 0.19927 67 | 5340.0 0.198543 68 | 5350.0 0.198565 69 | 5360.0 0.198019 70 | 5370.0 0.197037 71 | 5380.0 0.19585 72 | 5390.0 0.194482 73 | 5400.0 0.192937 74 | 5410.0 0.19135 75 | 5420.0 0.18967 76 | 5430.0 0.188092 77 | 5440.0 0.186404 78 | 5450.0 0.185013 79 | 5460.0 0.183647 80 | 5470.0 0.182305 81 | 5480.0 0.180986 82 | 5490.0 0.179727 83 | 5500.0 0.178544 84 | 5510.0 0.177403 85 | 5520.0 0.176134 86 | 5530.0 0.174885 87 | 5540.0 0.173637 88 | 5550.0 0.172336 89 | 5560.0 0.170895 90 | 5570.0 0.169283 91 | 5580.0 0.16785 92 | 5590.0 0.166385 93 | 5600.0 0.165027 94 | 5610.0 0.163819 95 | 5620.0 0.162763 96 | 5630.0 0.161755 97 | 5640.0 0.160794 98 | 5650.0 0.159433 99 | 5660.0 0.158015 100 | 5670.0 0.156509 101 | 5680.0 0.154855 102 | 5690.0 0.152726 103 | 5700.0 0.150092 104 | 5710.0 0.147044 105 | 5720.0 0.143542 106 | 5730.0 0.139648 107 | 5740.0 0.135394 108 | 5750.0 0.132104 109 | 5760.0 0.128959 110 | 5770.0 0.125857 111 | 5780.0 0.122827 112 | 5790.0 0.119435 113 | 5800.0 0.115275 114 | 5810.0 0.109747 115 | 5820.0 0.102369 116 | 5830.0 0.092979 117 | 5840.0 0.082116 118 | 5850.0 0.072055 119 | 5860.0 0.06016 120 | 5870.0 0.04939 121 | 5880.0 0.040199 122 | 5890.0 0.032533 123 | 5900.0 0.026201 124 | 5910.0 0.02097 125 | 5920.0 0.016725 126 | 5930.0 0.013204 127 | 5940.0 0.010297 128 | 5950.0 0.007947 129 | 5960.0 0.006063 130 | 5970.0 0.004593 131 | 5980.0 0.003464 132 | 5990.0 0.002628 133 | 6000.0 0.002004 134 | 6010.0 0.001542 135 | 6020.0 0.001207 136 | 6030.0 0.000948 137 | 6040.0 0.000764 138 | 6050.0 0.000629 139 | 6060.0 0.00052 140 | 6070.0 0.000435 141 | 6080.0 0.000375 142 | 6090.0 0.000326 143 | 6100.0 0.00029 144 | 6110.0 0.000254 145 | 6120.0 0.000219 146 | 6130.0 0.0 -------------------------------------------------------------------------------- /mosfit/modules/outputs/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Output` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/outputs/output.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Output` class.""" 2 | from mosfit.modules.module import Module 3 | 4 | # Important: Only define one ``Module`` class per file. 5 | 6 | 7 | class Output(Module): 8 | """Template class for output Modules.""" 9 | 10 | def process(self, **kwargs): 11 | """Process module.""" 12 | return {} 13 | -------------------------------------------------------------------------------- /mosfit/modules/outputs/write.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `LightCurve` class.""" 2 | from mosfit.modules.outputs.output import Output 3 | 4 | 5 | # Important: Only define one ``Module`` class per file. 6 | 7 | 8 | class Write(Output): 9 | """Write keys to disk.""" 10 | 11 | def __init__(self, **kwargs): 12 | """Initialize module.""" 13 | super(Write, self).__init__(**kwargs) 14 | 15 | def process(self, **kwargs): 16 | """Process module.""" 17 | # Dummy function for now, not implemented. 18 | return {} 19 | -------------------------------------------------------------------------------- /mosfit/modules/parameters/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Parameter` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/parameters/arbitrary.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `arbitrary` class.""" 2 | from scipy import interpolate 3 | from scipy.integrate import quad 4 | from astropy.cosmology import WMAP9 as cosmo 5 | import numpy as np 6 | import pandas as pd 7 | 8 | from mosfit.modules.parameters.parameter import Parameter 9 | 10 | # Important: Only define one ``Module`` class per file. 11 | 12 | class Arbitrary(Parameter): 13 | """Parameter with Arbitrary prior. 14 | 15 | Contribution by Peter S. H. Cheung""" 16 | 17 | def __init__(self, **kwargs): 18 | """Initialize module.""" 19 | super(Arbitrary, self).__init__(**kwargs) 20 | self._filename = kwargs.get(self.key('filename'), None) 21 | 22 | """Input data from file""" #Put the axis label (X,Y) on the first row of file 23 | df = pd.read_csv(self._filename, header = 0) 24 | 25 | """Data treatment""" #Ignore this part if x and y are ready to fit. 26 | df.Y = 4 * np.pi * 10 ** df.Y * cosmo.differential_comoving_volume(df.X) 27 | 28 | """Generating distribution shape and normalizing factor""" 29 | self._min_value = self._min_value if self._min_value else df.X.min() 30 | self._max_value = self._max_value if self._max_value else df.X.max() 31 | self._f = interpolate.interp1d(df.X, df.Y, kind = 'linear', fill_value="extrapolate") 32 | norm_factor = quad(self._f, self._min_value, self._max_value)[0] 33 | 34 | """Generating icdf""" 35 | self._cdf = [] 36 | self._x = np.linspace(self._min_value, self._max_value, 100) 37 | for i in self._x: 38 | integral = quad(self._f, 0.1, i)[0] 39 | self._cdf.append(integral / norm_factor) 40 | self._icdf = interpolate.interp1d(self._cdf, self._x, kind = 'linear', fill_value = 'extrapolate') 41 | 42 | def lnprior_pdf(self, x): 43 | """Evaluate natural log of probability density function.""" 44 | value = self.value(x) 45 | if self._log: 46 | value = np.log(value) 47 | return self._f(value) 48 | 49 | def prior_icdf(self, u): 50 | """Evaluate inverse cumulative density function.""" 51 | value = self._icdf(u) 52 | value = (value - self._min_value) / (self._max_value - self._min_value) 53 | return value 54 | -------------------------------------------------------------------------------- /mosfit/modules/parameters/constant.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Constant` class.""" 2 | from mosfit.modules.parameters.parameter import Parameter 3 | 4 | # Important: Only define one ``Module`` class per file. 5 | 6 | 7 | class Constant(Parameter): 8 | """Constant parameter. 9 | 10 | `Parameter` that will throw an error if the user attempts to make the 11 | variable free. 12 | """ 13 | 14 | def __init__(self, **kwargs): 15 | """Initialize module.""" 16 | super(Constant, self).__init__(**kwargs) 17 | if self._min_value is not None or self._max_value is not None: 18 | raise ValueError('`Constant` class cannot be assigned minimum and ' 19 | 'maximum values!') 20 | -------------------------------------------------------------------------------- /mosfit/modules/parameters/covariance.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Covariance` class.""" 2 | 3 | from mosfit.modules.parameters.parameter import Parameter 4 | 5 | # Important: Only define one ``Module`` class per file. 6 | 7 | 8 | class Covariance(Parameter): 9 | """Model parameter that can either be free or fixed.""" 10 | -------------------------------------------------------------------------------- /mosfit/modules/parameters/gaussian.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Gaussian` class.""" 2 | import numpy as np 3 | from scipy.special import erf, erfinv 4 | 5 | from mosfit.modules.parameters.parameter import Parameter 6 | 7 | 8 | # Important: Only define one ``Module`` class per file. 9 | 10 | 11 | class Gaussian(Parameter): 12 | """Parameter with Gaussian prior. 13 | 14 | If the parameter must be positive, set the `pos` keyword to True. 15 | """ 16 | 17 | def __init__(self, **kwargs): 18 | """Initialize module.""" 19 | super(Gaussian, self).__init__(**kwargs) 20 | self._mu = kwargs.get(self.key('mu'), None) 21 | self._sigma = kwargs.get(self.key('sigma'), None) 22 | if self._log: 23 | self._mu = np.log(self._mu) 24 | self._sigma = np.log(10.0 ** self._sigma) 25 | 26 | if not self._mu: 27 | raise ValueError('Need to set a value for mu!') 28 | 29 | if not self._sigma: 30 | raise ValueError('Need to set a value for sigma!') 31 | 32 | def lnprior_pdf(self, x): 33 | """Evaluate natural log of probability density function.""" 34 | value = self.value(x) 35 | if self._log: 36 | value = np.log(value) 37 | return -(value - self._mu) ** 2 / (2. * self._sigma ** 2) 38 | 39 | def prior_icdf(self, u): 40 | """Evaluate inverse cumulative density function.""" 41 | tmin = (self._min_value - self._mu)/np.sqrt(2.0)/self._sigma 42 | tmax = (self._max_value - self._mu)/np.sqrt(2.0)/self._sigma 43 | norm = np.sqrt(2.0*np.pi)/2 * self._sigma * (erf(tmax) - erf(tmin)) 44 | 45 | value = (np.sqrt(2.0) * self._sigma * 46 | erfinv(2.0 * u * norm/np.sqrt(2.0 * np.pi)/self._sigma + erf(tmin)) 47 | + self._mu) 48 | 49 | #value = (erfinv(2.0 * u - 1.0) * np.sqrt(2.)) * self._sigma + self._mu 50 | value = (value - self._min_value) / (self._max_value - self._min_value) 51 | 52 | return np.clip(value, 0.0, 1.0) -------------------------------------------------------------------------------- /mosfit/modules/parameters/luminositydistance.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `LuminosityDistance` class.""" 2 | import numpy as np 3 | from astropy import units as un 4 | from astropy.cosmology import Planck15 as cosmo 5 | 6 | from mosfit.modules.parameters.parameter import Parameter 7 | 8 | 9 | # Important: Only define one ``Module`` class per file. 10 | 11 | 12 | class LuminosityDistance(Parameter): 13 | """LuminosityDistance parameter that depends on luminosity distance.""" 14 | 15 | def __init__(self, **kwargs): 16 | """Initialize module.""" 17 | super(LuminosityDistance, self).__init__(**kwargs) 18 | 19 | self._warned_small = False 20 | 21 | def process(self, **kwargs): 22 | """Process module.""" 23 | # If this parameter is not free and is already set, then skip 24 | if self._name in kwargs: 25 | return {} 26 | 27 | if self._value is None: 28 | self._redshift = kwargs.get(self.key('redshift'), self._redshift) 29 | if self._redshift is not None: 30 | if self._redshift <= 0.0: 31 | if not self._warned_small: 32 | self._printer.message( 33 | 'negative_redshift', [ 34 | str(np.around(self._redshift, decimals=2))], 35 | warning=True) 36 | self._warned_small = True 37 | value = 1.0e-5 38 | else: 39 | try: 40 | value = (cosmo.luminosity_distance( 41 | self._redshift) / un.Mpc).value 42 | except: 43 | value = (cosmo.luminosity_distance( 44 | self._redshift) / un.Mpc) 45 | else: 46 | value = self.value(kwargs['fraction']) 47 | else: 48 | value = self._value 49 | 50 | return {self._name: value} 51 | 52 | def send_request(self, request): 53 | """Send requests to other modules.""" 54 | if request == 'lumdist': 55 | return self._value 56 | 57 | def receive_requests(self, **requests): 58 | """Receive requests from other ``Module`` objects.""" 59 | self._redshift = requests.get('redshift', None) 60 | -------------------------------------------------------------------------------- /mosfit/modules/parameters/powerlaw.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `PowerLaw` class.""" 2 | import numpy as np 3 | 4 | from mosfit.modules.parameters.parameter import Parameter 5 | 6 | 7 | # Important: Only define one ``Module`` class per file. 8 | 9 | 10 | class PowerLaw(Parameter): 11 | """Standard power law, alpha must be > 1.""" 12 | 13 | def __init__(self, **kwargs): 14 | """Initialize module.""" 15 | super(PowerLaw, self).__init__(**kwargs) 16 | self._alpha = kwargs.get(self.key('alpha'), None) 17 | if self._log: 18 | self._miv = np.exp(self._min_value) 19 | self._mav = np.exp(self._max_value) 20 | else: 21 | self._miv = self._min_value 22 | self._mav = self._max_value 23 | self._mivap1 = self._miv ** (self._alpha + 1.0) 24 | self._mavap1 = self._mav ** (self._alpha + 1.0) 25 | self._miavap1 = self._mavap1 - self._mivap1 26 | self._cdf_exp = 1.0 / (self._alpha + 1.0) 27 | 28 | def lnprior_pdf(self, x): 29 | """Evaluate natural log of probability density function.""" 30 | value = self.value(x) 31 | return np.log(((value - self._miv) / (self._mav - self._miv)) ** 32 | self._alpha) 33 | 34 | def prior_icdf(self, u): 35 | """Evaluate inverse cumulative density function.""" 36 | value = ((self._mivap1 + u * self._miavap1) ** self._cdf_exp) 37 | if self._log: 38 | value = np.log(value) 39 | value = (value - self._min_value) / (self._max_value - self._min_value) 40 | return value 41 | -------------------------------------------------------------------------------- /mosfit/modules/parameters/redshift.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Redshift` class.""" 2 | import numpy as np 3 | from astropy import units as un 4 | from astropy.cosmology import Planck15 as cosmo 5 | from astropy.cosmology import z_at_value 6 | 7 | from mosfit.modules.parameters.parameter import Parameter 8 | 9 | 10 | # Important: Only define one ``Module`` class per file. 11 | 12 | 13 | class Redshift(Parameter): 14 | """Redshift parameter that depends on luminosity distance.""" 15 | 16 | def __init__(self, **kwargs): 17 | """Initialize module.""" 18 | super(Redshift, self).__init__(**kwargs) 19 | 20 | self._warned_small = False 21 | 22 | def process(self, **kwargs): 23 | """Process module.""" 24 | # If this parameter is not free and is already set, then skip 25 | if self._name in kwargs: 26 | return {} 27 | 28 | if self._value is None: 29 | self._lum_dist = kwargs.get(self.key('lumdist'), self._lum_dist) 30 | if self._value is None and self._lum_dist is not None: 31 | if self._lum_dist < 1.0: 32 | if not self._warned_small: 33 | self._printer.message( 34 | 'small_lumdist', [ 35 | str(np.around( 36 | self._lum_dist * 1.0e6, decimals=2))], 37 | warning=True) 38 | self._warned_small = True 39 | value = 0.0 40 | else: 41 | try: 42 | value = z_at_value(cosmo.luminosity_distance, 43 | self._lum_dist * un.Mpc).value 44 | except: 45 | value = z_at_value(cosmo.luminosity_distance, 46 | self._lum_dist * un.Mpc) 47 | 48 | else: 49 | value = self.value(kwargs['fraction']) 50 | else: 51 | value = self._value 52 | 53 | return {self._name: value} 54 | 55 | def send_request(self, request): 56 | """Send requests to other modules.""" 57 | if request == 'redshift': 58 | return self._value 59 | 60 | def receive_requests(self, **requests): 61 | """Receive requests from other ``Module`` objects.""" 62 | self._lum_dist = requests.get('lumdist', None) 63 | -------------------------------------------------------------------------------- /mosfit/modules/parameters/variance.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Variance` class.""" 2 | 3 | from mosfit.modules.parameters.parameter import Parameter 4 | 5 | # Important: Only define one ``Module`` class per file. 6 | 7 | 8 | class Variance(Parameter): 9 | """Model parameter that can either be free or fixed.""" 10 | -------------------------------------------------------------------------------- /mosfit/modules/photospheres/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Photosphere` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/photospheres/cocoon_photosphere.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `CocoonPhotosphere` class.""" 2 | import numpy as np 3 | from astrocats.catalog.source import SOURCE 4 | from astropy import constants as c 5 | 6 | from mosfit.constants import DAY_CGS, FOUR_PI, KM_CGS, C_CGS, M_SUN_CGS 7 | from mosfit.modules.photospheres.photosphere import Photosphere 8 | 9 | 10 | # Important: Only define one ``Module`` class per file. 11 | 12 | 13 | class CocoonPhotosphere(Photosphere): 14 | """ 15 | Piro and Kollmeier 2018 16 | """ 17 | 18 | _REFERENCES = [ 19 | {SOURCE.BIBCODE: '2018ApJ...855..103P'} 20 | ] 21 | 22 | DIFF_CONST = M_SUN_CGS / (FOUR_PI * C_CGS * KM_CGS) 23 | STEF_CONST = (FOUR_PI * c.sigma_sb).cgs.value 24 | RAD_CONST = KM_CGS * DAY_CGS 25 | C_KMS = C_CGS / KM_CGS 26 | 27 | def process(self, **kwargs): 28 | """Process module.""" 29 | kwargs = self.prepare_input(self.key('luminosities'), **kwargs) 30 | self._rest_t_explosion = kwargs[self.key('resttexplosion')] 31 | self._times = kwargs[self.key('rest_times')] 32 | self._luminosities = kwargs[self.key('luminosities')] 33 | self._v_ejecta = kwargs[self.key('vejecta')] 34 | self._m_ejecta = kwargs[self.key('mejecta')] 35 | self._kappa = kwargs[self.key('kappa')] 36 | self._shocked_fraction = kwargs[self.key('shock_frac')] 37 | 38 | m_shocked = self._m_ejecta * self._shocked_fraction 39 | 40 | self._tau_diff = np.sqrt(self.DIFF_CONST * self._kappa * 41 | m_shocked / self._v_ejecta) / DAY_CGS 42 | 43 | t_thin = (C_KMS / self._v_ejecta)**0.5 * self._tau_diff 44 | 45 | 46 | rphot = [] 47 | Tphot = [] 48 | for li, lum in enumerate(self._luminosities): 49 | 50 | ts = self._times[li] - self._rest_t_explosion 51 | 52 | vphot = self._v_ejecta * (ts/t_thin)**(-2./(s+3)) 53 | 54 | radius = RAD_CONST * vphot * max(ts, 0.0) 55 | 56 | if lum == 0.0: 57 | temperature = 0.0 58 | else: 59 | temperature = (lum / (self.STEF_CONST * radius**2)) ** 0.25 60 | 61 | rphot.append(radius) 62 | 63 | Tphot.append(temperature) 64 | 65 | return {self.key('radiusphot'): rphot, 66 | self.key('temperaturephot'): Tphot 67 | } 68 | -------------------------------------------------------------------------------- /mosfit/modules/photospheres/photosphere.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Photosphere` class.""" 2 | from mosfit.modules.module import Module 3 | 4 | # Important: Only define one ``Module`` class per file. 5 | 6 | 7 | class Photosphere(Module): 8 | """Template class for photosphere Modules.""" 9 | 10 | def process(self, **kwargs): 11 | """Process module.""" 12 | return {} 13 | -------------------------------------------------------------------------------- /mosfit/modules/photospheres/tde_photosphere.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `TdePhotosphere` class.""" 2 | from math import pi 3 | 4 | # import numexpr as ne 5 | import numpy as np 6 | from astropy import constants as c 7 | from mosfit.constants import C_CGS, DAY_CGS, KM_CGS, M_SUN_CGS # FOUR_PI 8 | from mosfit.modules.photospheres.photosphere import Photosphere 9 | 10 | 11 | # from scipy.interpolate import interp1d 12 | 13 | 14 | class TdePhotosphere(Photosphere): 15 | """Photosphere for a tidal disruption event. 16 | 17 | Photosphere that expands/recedes as a power law of Mdot 18 | (or equivalently L (proportional to Mdot) ). 19 | """ 20 | 21 | STEF_CONST = (4.0 * pi * c.sigma_sb).cgs.value 22 | RAD_CONST = KM_CGS * DAY_CGS 23 | 24 | def process(self, **kwargs): 25 | """Process module.""" 26 | kwargs = self.prepare_input('luminosities', **kwargs) 27 | self._times = np.array(kwargs['rest_times']) 28 | self._Mh = kwargs['bhmass'] 29 | self._Mstar = kwargs['starmass'] 30 | self._l = kwargs['lphoto'] 31 | self._Rph_0 = kwargs['Rph0'] 32 | self._luminosities = np.array(kwargs['luminosities']) 33 | self._rest_t_explosion = kwargs['resttexplosion'] 34 | self._beta = kwargs['beta'] # for now linearly interp between 35 | # beta43 and beta53 for a given 'b' if Mstar is in transition region 36 | 37 | Rsolar = c.R_sun.cgs.value 38 | self._Rstar = kwargs['Rstar'] * Rsolar 39 | 40 | 41 | tpeak = kwargs['tpeak'] 42 | 43 | Ledd = kwargs['Ledd'] 44 | self._Leddlim = kwargs['Leddlim'] 45 | Llim = self._Leddlim*Ledd # user defined multiple of Ledd 46 | 47 | rt = (self._Mh / self._Mstar)**(1. / 3.) * self._Rstar 48 | self._rp = rt / self._beta 49 | 50 | r_isco = 6 * c.G.cgs.value * self._Mh * M_SUN_CGS / (C_CGS * C_CGS) 51 | rphotmin = r_isco 52 | 53 | a_p = (c.G.cgs.value * self._Mh * M_SUN_CGS * (( 54 | tpeak - self._rest_t_explosion) * DAY_CGS / np.pi)**2)**(1. / 3.) 55 | 56 | rphot = self._Rph_0 * a_p * (self._luminosities / Llim)**self._l 57 | 58 | # adding rphotmin on to rphot for soft min 59 | rphot = rphot + rphotmin 60 | 61 | Tphot = (self._luminosities / (rphot**2 * self.STEF_CONST))**0.25 62 | 63 | return {self.key('radiusphot'): rphot, self.key('temperaturephot'): Tphot, 64 | 'rp': self._rp, 'rphotmin': rphotmin} 65 | -------------------------------------------------------------------------------- /mosfit/modules/photospheres/temperature_floor.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `TemperatureFloor` class.""" 2 | import numpy as np 3 | from astrocats.catalog.source import SOURCE 4 | from astropy import constants as c 5 | 6 | from mosfit.constants import DAY_CGS, FOUR_PI, KM_CGS 7 | from mosfit.modules.photospheres.photosphere import Photosphere 8 | 9 | 10 | # Important: Only define one ``Module`` class per file. 11 | 12 | 13 | class TemperatureFloor(Photosphere): 14 | """Photosphere with a minimum allowed temperature. 15 | 16 | Photosphere that expands and cools with ejecta then recedes at constant 17 | final temperature. 18 | """ 19 | 20 | _REFERENCES = [ 21 | {SOURCE.BIBCODE: '2017arXiv170600825N'} 22 | ] 23 | 24 | STEF_CONST = (FOUR_PI * c.sigma_sb).cgs.value 25 | RAD_CONST = KM_CGS * DAY_CGS 26 | 27 | def process(self, **kwargs): 28 | """Process module.""" 29 | kwargs = self.prepare_input(self.key('luminosities'), **kwargs) 30 | self._rest_t_explosion = kwargs[self.key('resttexplosion')] 31 | self._times = kwargs[self.key('rest_times')] 32 | self._luminosities = kwargs[self.key('luminosities')] 33 | self._temperature = kwargs[self.key('temperature')] 34 | self._v_ejecta = kwargs[self.key('vejecta')] 35 | self._radius2 = [(self.RAD_CONST * 36 | self._v_ejecta * max( 37 | x - self._rest_t_explosion, 0.0)) ** 2 38 | for x in self._times] 39 | self._rec_radius2 = [ 40 | x / (self.STEF_CONST * self._temperature ** 4) 41 | for x in self._luminosities 42 | ] 43 | rphot = [] 44 | Tphot = [] 45 | for li, lum in enumerate(self._luminosities): 46 | 47 | radius2 = self._radius2[li] 48 | rec_radius2 = self._rec_radius2[li] 49 | if lum == 0.0: 50 | temperature = 0.0 51 | elif radius2 < rec_radius2: 52 | temperature = (lum / (self.STEF_CONST * radius2)) ** 0.25 53 | else: 54 | radius2 = rec_radius2 55 | temperature = self._temperature 56 | 57 | rphot.append(np.sqrt(radius2)) 58 | 59 | Tphot.append(temperature) 60 | 61 | return {self.key('radiusphot'): rphot, 62 | self.key('temperaturephot'): Tphot} 63 | -------------------------------------------------------------------------------- /mosfit/modules/seds/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `SED` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/seds/multiblackbody.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `MultiBlackbody` class.""" 2 | from math import pi 3 | 4 | import numexpr as ne 5 | import numpy as np 6 | from astropy import constants as c 7 | from mosfit.constants import DAY_CGS, FOUR_PI, KM_CGS, M_SUN_CGS # noqa: F401 8 | from mosfit.modules.seds.sed import SED 9 | 10 | 11 | # Important: Only define one ``Module`` class per file. 12 | 13 | 14 | class MultiBlackbody(SED): 15 | """Generalized multiple blackbody spectral energy distribution.""" 16 | 17 | FLUX_CONST = FOUR_PI * (2.0 * c.h / (c.c ** 2) * pi).cgs.value 18 | X_CONST = (c.h / c.k_B).cgs.value 19 | STEF_CONST = (4.0 * pi * c.sigma_sb).cgs.value 20 | 21 | def process(self, **kwargs): 22 | """Process module.""" 23 | raise NotImplementedError('`MultiBlackbody` is not yet functional.') 24 | kwargs = self.prepare_input(self.key('luminosities'), **kwargs) 25 | self._luminosities = kwargs[self.key('luminosities')] 26 | self._bands = kwargs['all_bands'] 27 | self._band_indices = kwargs['all_band_indices'] 28 | self._areas = kwargs[self.key('areas')] 29 | self._radius_phots = kwargs[self.key('radiusphots')] 30 | self._temperature_phots = kwargs[self.key('temperaturephots')] 31 | xc = self.X_CONST # noqa: F841 32 | fc = self.FLUX_CONST # noqa: F841 33 | zp1 = 1.0 + kwargs[self.key('redshift')] 34 | seds = [] 35 | for li, lum in enumerate(self._luminosities): 36 | cur_band = self._bands[li] # noqa: F841 37 | bi = self._band_indices[li] 38 | rest_freqs = [x * zp1 # noqa: F841 39 | for x in self._sample_frequencies[bi]] 40 | wav_arr = np.array(self._sample_wavelengths[bi]) # noqa: F841 41 | radius_phot = self._radius_phots[li] # noqa: F841 42 | temperature_phot = self._temperature_phots[li] # noqa: F841 43 | 44 | if li == 0: 45 | sed = ne.evaluate( 46 | 'fc * radius_phot**2 * rest_freqs**3 / ' 47 | '(exp(xc * rest_freqs / temperature_phot) - 1.0)') 48 | else: 49 | sed = ne.re_evaluate() 50 | 51 | sed = np.nan_to_num(sed) 52 | 53 | seds.append(list(sed)) 54 | 55 | seds = self.add_to_existing_seds(seds, **kwargs) 56 | 57 | # Units of `seds` is ergs / s / Angstrom. 58 | return {'sample_wavelengths': self._sample_wavelengths, 59 | self.key('seds'): seds} 60 | -------------------------------------------------------------------------------- /mosfit/modules/seds/synchrotron.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Synchrotron` class.""" 2 | from math import pi 3 | 4 | import numpy as np 5 | from astropy import constants as c 6 | from astropy import units as u 7 | 8 | from mosfit.constants import FOUR_PI 9 | from mosfit.modules.seds.sed import SED 10 | 11 | 12 | # Important: Only define one ``Module`` class per file. 13 | 14 | 15 | class Synchrotron(SED): 16 | """Synchrotron spectral energy distribution.""" 17 | 18 | C_CONST = c.c.cgs.value 19 | FLUX_CONST = FOUR_PI * (2.0 * c.h / (c.c ** 2) * pi).cgs.value 20 | X_CONST = (c.h / c.k_B).cgs.value 21 | STEF_CONST = (4.0 * pi * c.sigma_sb).cgs.value 22 | ANG_CGS = u.Angstrom.cgs.scale 23 | 24 | def process(self, **kwargs): 25 | """Process module.""" 26 | kwargs = self.prepare_input(self.key('luminosities'), **kwargs) 27 | self._luminosities = kwargs[self.key('luminosities')] 28 | self._bands = kwargs['all_bands'] 29 | self._band_indices = kwargs['all_band_indices'] 30 | self._frequencies = kwargs['all_frequencies'] 31 | self._radius_source = kwargs[self.key(self.key('radiussource'))] 32 | self._nu_max = kwargs[self.key(self.key('numax'))] 33 | self._p = kwargs[self.key(self.key('p'))] 34 | self._f0 = kwargs[self.key(self.key('f0'))] 35 | cc = self.C_CONST 36 | ac = self.ANG_CGS 37 | zp1 = 1.0 + kwargs[self.key(self.key('redshift'))] 38 | seds = [] 39 | for li, lum in enumerate(self._luminosities): 40 | bi = self._band_indices[li] 41 | if lum == 0.0: 42 | if bi >= 0: 43 | seds.append(np.zeros_like(self._sample_frequencies[bi])) 44 | else: 45 | seds.append([0.0]) 46 | continue 47 | if bi >= 0: 48 | rest_freqs = self._sample_frequencies[bi] * zp1 49 | else: 50 | rest_freqs = [self._frequencies[li] * zp1] 51 | 52 | # Below is not scaled properly, just proof of concept 53 | fmax = self._f0 * self._radius_source ** 2 * self._nu_max ** 2.5 54 | sed = [ 55 | self._f0 * self._radius_source ** 2 * (x / self._nu_max) ** 56 | 2.5 * ac / cc * x ** 2 if x < self._nu_max 57 | else fmax * (x / self._nu_max) ** (-(self._p - 1.0) / 2.0) * 58 | ac / cc * x ** 2 for x in rest_freqs 59 | ] 60 | 61 | sed = np.nan_to_num(sed) 62 | 63 | seds.append(sed) 64 | 65 | seds = self.add_to_existing_seds(seds, **kwargs) 66 | 67 | # Units of `seds` is ergs / s / Angstrom. 68 | return {'sample_wavelengths': self._sample_wavelengths, 69 | self.key('seds'): seds} 70 | -------------------------------------------------------------------------------- /mosfit/modules/transforms/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Transform` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/transforms/diffusion.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Diffusion` class.""" 2 | import numpy as np 3 | from scipy.interpolate import interp1d 4 | 5 | from mosfit.constants import C_CGS, DAY_CGS, FOUR_PI, KM_CGS, M_SUN_CGS 6 | from mosfit.modules.transforms.transform import Transform 7 | 8 | 9 | # Important: Only define one ``Module`` class per file. 10 | 11 | 12 | class Diffusion(Transform): 13 | """Photon diffusion transform.""" 14 | 15 | N_INT_TIMES = 1000 16 | MIN_LOG_SPACING = -3 17 | DIFF_CONST = 2.0 * M_SUN_CGS / (13.7 * C_CGS * KM_CGS) 18 | TRAP_CONST = 3.0 * M_SUN_CGS / (FOUR_PI * KM_CGS ** 2) 19 | 20 | _REFERENCES = [ 21 | {'bibcode': '1982ApJ...253..785A'} 22 | ] 23 | 24 | def process(self, **kwargs): 25 | """Process module.""" 26 | Transform.process(self, **kwargs) 27 | self._kappa = kwargs[self.key('kappa')] 28 | self._kappa_gamma = kwargs[self.key('kappagamma')] 29 | self._m_ejecta = kwargs[self.key('mejecta')] 30 | self._v_ejecta = kwargs[self.key('vejecta')] 31 | 32 | self._tau_diff = np.sqrt(self.DIFF_CONST * self._kappa * 33 | self._m_ejecta / self._v_ejecta) / DAY_CGS 34 | self._trap_coeff = ( 35 | self.TRAP_CONST * self._kappa_gamma * self._m_ejecta / 36 | (self._v_ejecta ** 2)) / DAY_CGS ** 2 37 | td2, A = self._tau_diff ** 2, self._trap_coeff # noqa: F841 38 | 39 | new_lums = np.zeros_like(self._times_to_process) 40 | if len(self._dense_times_since_exp) < 2: 41 | return {self.dense_key('luminosities'): new_lums} 42 | min_te = min(self._dense_times_since_exp) 43 | tb = max(0.0, min_te) 44 | linterp = interp1d( 45 | self._dense_times_since_exp, self._dense_luminosities, copy=False, 46 | assume_sorted=True) 47 | 48 | uniq_times = np.unique(self._times_to_process[ 49 | (self._times_to_process >= tb) & ( 50 | self._times_to_process <= self._dense_times_since_exp[-1])]) 51 | lu = len(uniq_times) 52 | 53 | num = int(round(self.N_INT_TIMES / 2.0)) 54 | lsp = np.logspace( 55 | np.log10(self._tau_diff / 56 | self._dense_times_since_exp[-1]) + 57 | self.MIN_LOG_SPACING, 0, num) 58 | xm = np.unique(np.concatenate((lsp, 1 - lsp))) 59 | 60 | int_times = np.clip( 61 | tb + (uniq_times.reshape(lu, 1) - tb) * xm, tb, 62 | self._dense_times_since_exp[-1]) 63 | 64 | int_te2s = int_times[:, -1] ** 2 65 | int_lums = linterp(int_times) # noqa: F841 66 | int_args = int_lums * int_times * np.exp( 67 | (int_times ** 2 - int_te2s.reshape(lu, 1)) / td2) 68 | int_args[np.isnan(int_args)] = 0.0 69 | 70 | uniq_lums = np.trapz(int_args, int_times) 71 | uniq_lums *= -2.0 * np.expm1(-A / int_te2s) / td2 72 | 73 | new_lums = uniq_lums[np.searchsorted(uniq_times, 74 | self._times_to_process)] 75 | 76 | return {self.key('tau_diffusion'): self._tau_diff, 77 | self.dense_key('luminosities'): new_lums} 78 | -------------------------------------------------------------------------------- /mosfit/modules/transforms/transform.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Transform` class.""" 2 | import numpy as np 3 | from mosfit.modules.module import Module 4 | 5 | 6 | # Important: Only define one ``Module`` class per file. 7 | 8 | 9 | class Transform(Module): 10 | """Parent class for transforms.""" 11 | 12 | def __init__(self, **kwargs): 13 | """Initialize module.""" 14 | super(Transform, self).__init__(**kwargs) 15 | self._wants_dense = True 16 | 17 | def process(self, **kwargs): 18 | """Set `dense_*` and `*_since_exp` times/luminosities keys.""" 19 | self._times = kwargs['rest_times'] 20 | self._rest_t_explosion = kwargs[self.key('resttexplosion')] 21 | if 'dense_times' in kwargs: 22 | self._dense_times = kwargs['dense_times'] 23 | self._dense_luminosities = kwargs[self.key('dense_luminosities')] 24 | elif min(self._times) > self._rest_t_explosion: 25 | self._dense_times = np.concatenate( 26 | ([self._rest_t_explosion], self._times)) 27 | self._dense_luminosities = np.concatenate( 28 | ([0.0], kwargs[self.key('dense_luminosities')])) 29 | self._times_since_exp = self._times - self._rest_t_explosion 30 | self._dense_times_since_exp = ( 31 | self._dense_times - self._rest_t_explosion) 32 | if self._provide_dense: 33 | self._times_to_process = self._dense_times_since_exp 34 | else: 35 | self._times_to_process = self._times_since_exp 36 | -------------------------------------------------------------------------------- /mosfit/modules/transforms/viscous.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Viscous` class.""" 2 | import numpy as np 3 | from scipy.interpolate import interp1d 4 | 5 | from mosfit.modules.transforms.transform import Transform 6 | 7 | CLASS_NAME = 'Viscous' 8 | 9 | 10 | class Viscous(Transform): 11 | """Viscous delay transform.""" 12 | 13 | N_INT_TIMES = 1000 14 | MIN_LOG_SPACING = -3 15 | 16 | def process(self, **kwargs): 17 | """Process module.""" 18 | Transform.process(self, **kwargs) 19 | 20 | tvisc = kwargs['Tviscous'] 21 | 22 | new_lums = np.zeros_like(self._times_to_process) 23 | if len(self._dense_times_since_exp) < 2: 24 | return {self.dense_key('luminosities'): new_lums} 25 | min_te = min(self._dense_times_since_exp) 26 | tb = max(0.0, min_te) 27 | linterp = interp1d( 28 | self._dense_times_since_exp, self._dense_luminosities, copy=False, 29 | assume_sorted=True) 30 | 31 | uniq_times = np.unique(self._times_to_process[ 32 | (self._times_to_process >= tb) & ( 33 | self._times_to_process <= self._dense_times_since_exp[-1])]) 34 | lu = len(uniq_times) 35 | 36 | num = int(self.N_INT_TIMES / 2.0) 37 | lsp = np.logspace( 38 | np.log10(tvisc / 39 | self._dense_times_since_exp[-1]) + 40 | self.MIN_LOG_SPACING, 0, num) 41 | xm = np.unique(np.concatenate((lsp, 1 - lsp))) 42 | 43 | int_times = np.clip(tb + (uniq_times.reshape(lu, 1) - tb) * xm, tb, 44 | self._dense_times_since_exp[-1]) 45 | 46 | int_tes = int_times[:, -1] 47 | int_lums = linterp(int_times) 48 | 49 | int_args = int_lums * np.exp( 50 | (int_times - int_tes.reshape(lu, 1)) / tvisc) 51 | int_args[np.isnan(int_args)] = 0.0 52 | 53 | uniq_lums = np.trapz(int_args, int_times) / tvisc 54 | new_lums = uniq_lums[np.searchsorted(uniq_times, 55 | self._times_to_process)] 56 | 57 | return {self.dense_key('luminosities'): new_lums} 58 | -------------------------------------------------------------------------------- /mosfit/modules/utilities/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Utility` modules.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/modules/utilities/operator.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Utility` class.""" 2 | import numpy as np 3 | 4 | from mosfit.modules.utilities.utility import Utility 5 | 6 | 7 | # Important: Only define one ``Module`` class per file. 8 | 9 | 10 | class Operator(Utility): 11 | """Template class for photosphere Modules.""" 12 | 13 | ops = { 14 | '+': np.add, 15 | '-': np.subtract, 16 | '*': np.multiply, 17 | '/': np.divide 18 | } 19 | 20 | def set_attributes(self, task): 21 | """Set key replacement dictionary.""" 22 | Utility.set_attributes(self, task) 23 | self._operands = task.get('operands', []) 24 | if not self._operands: 25 | raise ValueError('`Operator` must have at least one operand.') 26 | self._result = task.get('result', 'result') 27 | self._op = self.ops.get(task.get('operator', '+'), np.add) 28 | 29 | def process(self, **kwargs): 30 | """Process module.""" 31 | ops = [ 32 | 'dense_' + x if self._wants_dense and 33 | not x.startswith('dense_') else x for x in self._operands] 34 | result = kwargs[ops[0]] 35 | for op in ops[1:]: 36 | result = self._op(result, kwargs[op]) 37 | return {self.dense_key(self._result): result} 38 | -------------------------------------------------------------------------------- /mosfit/modules/utilities/rename.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Utility` class.""" 2 | from collections import OrderedDict 3 | 4 | from mosfit.modules.utilities.utility import Utility 5 | 6 | 7 | # Important: Only define one ``Module`` class per file. 8 | 9 | 10 | class Rename(Utility): 11 | """Template class for photosphere Modules.""" 12 | 13 | def process(self, **kwargs): 14 | """Process module.""" 15 | output = OrderedDict([('_delete_keys', [])]) 16 | for rep in self._replacements: 17 | for key in kwargs: 18 | if rep in key: 19 | output['_delete_keys'].append(key) 20 | data = kwargs[key] 21 | output[key.replace(rep, self._replacements[rep])] = data 22 | return output 23 | -------------------------------------------------------------------------------- /mosfit/modules/utilities/utility.py: -------------------------------------------------------------------------------- 1 | """Definitions for the `Utility` class.""" 2 | from mosfit.modules.module import Module 3 | 4 | # Important: Only define one ``Module`` class per file. 5 | 6 | 7 | class Utility(Module): 8 | """Template class for utility Modules.""" 9 | 10 | def process(self, **kwargs): 11 | """Process module.""" 12 | return {} 13 | -------------------------------------------------------------------------------- /mosfit/requirements.txt: -------------------------------------------------------------------------------- 1 | setuptools 2 | astrocats>=0.3.33 3 | astropy>=5.0.1 4 | Cython>=3.0.0 5 | dynesty>=2.0.0 6 | emcee>=3.0.2 7 | extinction>=0.2.2 8 | inflect>=1.0.0 9 | matplotlib>=3.0.0 10 | mpi4py==3.1.6 11 | nbstripout>=0.2.9 12 | numexpr>=2.6.1 13 | numpy<=1.26.4 14 | palettable>=2.1.1 15 | schwimmbad==0.3.0 16 | scipy>=1.2 17 | seaborn>=0.7.1 18 | six>=1.0.0 19 | -------------------------------------------------------------------------------- /mosfit/samplers/__init__.py: -------------------------------------------------------------------------------- 1 | """Initilization procedure for `Sampler` classes.""" 2 | import inspect 3 | import os 4 | import sys 5 | 6 | path = os.path.dirname(os.path.abspath(__file__)) 7 | __all__ = [] 8 | 9 | for py in [ 10 | f[:-3] for f in os.listdir(path) 11 | if f.endswith('.py') and f != '__init__.py' 12 | ]: 13 | mod = __import__('.'.join([__name__, py]), fromlist=[py]) 14 | classes = [ 15 | x[1] for x in inspect.getmembers(mod) 16 | if (inspect.isroutine(x[1]) or inspect.isclass(x[1]) 17 | ) and inspect.getmodule(x[1]) == mod 18 | ] 19 | for cls in classes: 20 | __all__.append(cls.__name__) 21 | setattr(sys.modules[__name__], cls.__name__, cls) 22 | -------------------------------------------------------------------------------- /mosfit/samplers/sampler.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | """Definitions for `Sampler` class.""" 3 | 4 | import numpy as np 5 | import time 6 | 7 | 8 | class Sampler(object): 9 | """Sample the posterior distribution of a model against an observation.""" 10 | 11 | _MIN_WEIGHT = 1e-4 12 | 13 | def __init__(self, fitter, num_walkers=None, **kwargs): 14 | """Initialize `Sampler` class.""" 15 | self._printer = kwargs.get('printer') 16 | self._fitter = fitter 17 | self._pool = self._fitter._pool 18 | self._printer = self._fitter._printer 19 | 20 | self._num_walkers = num_walkers 21 | 22 | def get_samples(self): 23 | """Return samples from ensembler.""" 24 | samples = np.array([a for b in self._pout for a in b]) 25 | if self._lnprobout is None: 26 | return samples, None, np.array([ 27 | 1.0 / len(samples) for x in samples]) 28 | probs = np.array([a for b in self._lnprobout for a in b]) 29 | weights = np.array([a for b in self._weights for a in b]) 30 | 31 | min_weight = self._MIN_WEIGHT / len(samples) 32 | 33 | sel = weights > min_weight 34 | samples = samples[sel] 35 | probs = probs[sel] 36 | weights = weights[sel] 37 | 38 | wsis = np.argsort(weights) 39 | 40 | samples = samples[wsis] 41 | probs = probs[wsis] 42 | weights = weights[wsis] 43 | 44 | return samples, probs, weights 45 | 46 | def run(self): 47 | """Run the sampler.""" 48 | pass 49 | 50 | def psrf(self, chain): 51 | """Calculate PSRF for a chain.""" 52 | m = len(chain) 53 | n = len(chain[0]) 54 | mom = np.mean(np.mean(chain, axis=1)) 55 | b = n / float(m - 1) * np.sum( 56 | (np.mean(chain, axis=1) - mom) ** 2) 57 | w = np.mean(np.var(chain, axis=1, ddof=1)) 58 | v = float(n - 1) / float(n) * w + (b / float(n)) 59 | return np.sqrt(v / w) 60 | 61 | def time_running(self): 62 | return time.time() - self._fitter._start_time 63 | -------------------------------------------------------------------------------- /mosfit/tests/PTF10hgi.txt: -------------------------------------------------------------------------------- 1 | #Date MJD Phase u g r i z Telescope 2 | 2010 May 15 55331.61 −28.0 - (-) - (-) 19.10 (–) - (-) - (-) ATel-2740 3 | 2010 May 18 55334.57 −25.3 - (-) - (-) 18.90 (0.07) - (-) - (-) PS1 4 | 2010 May 26 55342.33 −18.2 - (-) - (-) - (-) 18.49 (0.07) - (-) PS1 5 | 2010 May 26 55342.34 −18.2 - (-) - (-) - (-) 18.48 (0.06) - (-) PS1 6 | 2010 Jun 15 55362.40 0.0 - (-) 18.23 (0.05) - (-) - (-) - (-) PS1 7 | 2010 Jun 19 55366.45 3.7 - (-) - (-) 18.04 (0.10) - (-) - (-) PS1 8 | 2010 Jun 20 55367.75 4.9 - (-) - (-) 18.00 (–) - (-) - (-) ATel-2740 9 | 2010 Jun 21 55368.53 5.4 - (-) - (-) - (-) 18.01 (0.05) - (-) PS1 10 | 2010 Jun 21 55368.55 5.4 - (-) - (-) - (-) 18.02 (0.05) - (-) PS1 11 | 2010 Jul 13 55390.81 25.8 20.08 (0.12) - (-) - (-) - (-) - (-) UVOT 12 | 2010 Jul 17 55395.39 30.0 - (-) 18.93 (0.05) 18.63 (0.08) 18.56 (0.05) 18.58 (0.14) LT 13 | 2010 Jul 18 55396.00 30.5 20.80 (0.15) - (-) - (-) - (-) - (-) UVOT 14 | 2010 Jul 20 55398.47 32.8 - (-) 19.24 (0.08) 18.88 (0.09) 18.84 (0.08) 18.91 (0.10) LT 15 | 2010 Jul 23 55401.50 35.5 - (-) 19.44 (0.08) 19.11 (0.09) 18.91 (0.08) 19.10 (0.10) LT 16 | 2010 Jul 27 55405.39 39.1 - (-) 19.60 (0.05) 19.17 (0.06) 19.03 (0.03) 19.16 (0.10) LT 17 | 2010 Jul 31 55409.40 42.7 - (-) 19.74 (0.02) 19.29 (0.03) 19.10 (0.04) 19.24 (0.10) LT 18 | 2010 Aug 14 55423.39 55.4 - (-) 20.16 (0.03) 19.59 (0.03) 19.44 (0.04) 19.30 (0.10) LT 19 | 2010 Aug 17 55426.42 58.2 - (-) 20.21 (0.04) 19.60 (0.05) 19.47 (0.05) 19.34 (0.11) LT 20 | 2010 Aug 19 55428.87 60.4 - (-) 20.28 (0.17) 19.64 (0.07) 19.52 (0.05) 19.37 (0.09) FTN 21 | 2010 Aug 20 55429.43 60.9 - (-) 20.33 (0.13) 19.66 (0.06) 19.53 (0.06) 19.39 (0.16) LT 22 | 2010 Aug 24 55433.38 64.5 - (-) 20.40 (0.07) 19.70 (0.05) 19.60 (0.07) 19.40 (0.05) LT 23 | 2010 Aug 27 55436.40 67.3 - (-) 20.48 (0.29) 19.77 (0.12) 19.62 (0.09) 19.44 (0.26) LT 24 | 2010 Aug 30 55439.82 70.4 - (-) 20.49 (0.08) 19.83 (0.04) 19.64 (0.03) 19.48 (0.09) FTN 25 | 2010 Sep 1 55441.37 71.8 - (-) 20.54 (0.01) 19.84 (0.04) 19.71 (0.05) 19.56 (0.05) LT 26 | 2010 Sep 5 55445.37 75.4 - (-) 20.64 (0.04) 19.89 (0.04) 19.76 (0.06) 19.65 (0.07) LT 27 | 2010 Sep 7 55447.80 77.6 - (-) 20.67 (0.03) 19.92 (0.04) 19.82 (0.03) 19.78 (0.07) FTN 28 | 2010 Sep 8 55448.38 78.2 - (-) 20.70 (0.03) 19.97 (0.04) 19.87 (0.04) 19.83 (0.08) LT 29 | 2010 Sep 13 55453.77 83.1 - (-) 20.85 (0.05) 20.06 (0.05) 19.97 (0.05) 20.04 (0.09) FTN 30 | 2010 Sep 20 55460.36 89.0 - (-) 21.01 (0.08) 20.21 (0.09) - (-) 20.21 (0.13) LT 31 | 2011 Feb 22 55615.21 229.8 - (-) - (-) - (-) 23.82 (0.31) - (-) WHT 32 | 2011 Feb 24 55616.23 231.2 - (-) - (-) 23.92 (0.30) - (-) - (-) WHT 33 | 2011 Apr 28 55679.56 288.3 - (-) >21.98 (-) - (-) - (-) - (-) PS1 34 | #Host 35 | 2012 May 26 56073.00 646.0 23.64 (0.23) 22.01 (0.09) - (-) - (-) - (-) WHT 36 | 2012 May 28 56075.00 648.0 - (-) - (-) 22.18 (0.15) 21.59 (0.15) - (-) TNG 37 | #Date MJD Phasea uvw2 uvm2 uvw1 Telescope 38 | 2010 Jul 13 55390.31 25.8 21.93 (0.24) 22.05 (0.27) 20.97 (0.22) Swift 39 | 2010 Jul 18 55395.50 30.5 22.38 (0.43) 22.40 (0.44) 21.77 (0.29) Swift 40 | -------------------------------------------------------------------------------- /mosfit/tests/event_list.txt: -------------------------------------------------------------------------------- 1 | SN2008ar 2 | SN2007bg 3 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | description-file = README.md 3 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | """Setup script for MOSFiT.""" 2 | import fnmatch 3 | import os 4 | import re 5 | 6 | from setuptools import find_packages, setup 7 | 8 | with open(os.path.join('mosfit', 'requirements.txt')) as f: 9 | required = f.read().splitlines() 10 | 11 | with open(os.path.join('mosfit', 'dependencies.txt')) as f: 12 | dependencies = f.read().splitlines() 13 | 14 | dir_path = os.path.dirname(os.path.realpath(__file__)) 15 | 16 | init_string = open(os.path.join(dir_path, 'mosfit', '__init__.py')).read() 17 | VERS = r"^__version__ = ['\"]([^'\"]*)['\"]" 18 | mo = re.search(VERS, init_string, re.M) 19 | __version__ = mo.group(1) 20 | AUTH = r"^__author__ = ['\"]([^'\"]*)['\"]" 21 | mo = re.search(AUTH, init_string, re.M) 22 | __author__ = mo.group(1) 23 | LICE = r"^__license__ = ['\"]([^'\"]*)['\"]" 24 | mo = re.search(LICE, init_string, re.M) 25 | __license__ = mo.group(1) 26 | 27 | matches = [] 28 | for root, dirnames, filenames in os.walk('mosfit'): 29 | for filename in fnmatch.filter(filenames, '*.pyx'): 30 | matches.append(os.path.join(root, filename)) 31 | 32 | 33 | try: 34 | import pypandoc 35 | with open('README.md', 'r') as f: 36 | txt = f.read() 37 | txt = re.sub('<[^<]+>', '', txt) 38 | long_description = pypandoc.convert(txt, 'rst', 'md') 39 | except ImportError: 40 | long_description = open('README.md').read() 41 | 42 | setup( 43 | name='mosfit', 44 | packages=find_packages(), 45 | entry_points={'console_scripts': [ 46 | 'mosfit = mosfit.main:main' 47 | ]}, 48 | include_package_data=True, 49 | version=__version__, # noqa 50 | description=('Modular software for fitting ' 51 | 'semi-analytical model predictions to observed ' 52 | 'astronomical transient data.'), 53 | license=__license__, # noqa 54 | author=__author__, # noqa 55 | author_email='guillochon@gmail.com', 56 | install_requires=required, 57 | dependency_links=dependencies, 58 | url='https://github.com/guillochon/mosfit', 59 | download_url=( 60 | 'https://github.com/guillochon/mosfit/tarball/' + __version__), # noqa 61 | keywords=['astronomy', 'fitting', 'monte carlo', 'modeling'], 62 | long_description=long_description, 63 | long_description_content_type='text/markdown', 64 | classifiers=[ 65 | 'Development Status :: 5 - Production/Stable', 66 | 'License :: OSI Approved :: MIT License', 67 | 'Natural Language :: English', 68 | 'Programming Language :: Python :: 2.7', 69 | 'Programming Language :: Python :: 3', 70 | 'Topic :: Scientific/Engineering :: Astronomy', 71 | 'Topic :: Scientific/Engineering :: Physics' 72 | ]) 73 | -------------------------------------------------------------------------------- /test.py: -------------------------------------------------------------------------------- 1 | """Run a test of instantiating `Fitter`, running `fit_events`.""" 2 | import mosfit 3 | import numpy as np 4 | 5 | # Test running the fitter. 6 | my_fitter = mosfit.fitter.Fitter(quiet=False, test=True, offline=True) 7 | 8 | print('Running `fit_events` test.') 9 | entries, ps, lnprobs = my_fitter.fit_events( 10 | events=['SN2009do', 'SN2007bg'], models=['magni', 'slsn'], iterations=1, 11 | user_fixed_parameters=['covariance']) 12 | 13 | print('Model WAICs: ', 14 | [[y['models'][0]['score']['value'] for y in x] for x in entries]) 15 | 16 | # Test a single call to the model. 17 | print('Testing single call to Model.likelihood().') 18 | my_fetcher = mosfit.fetcher.Fetcher() 19 | 20 | fetched = my_fetcher.fetch('SN2009do')[0] 21 | 22 | my_model = mosfit.model.Model(model='slsn') 23 | 24 | my_model.load_data(my_fetcher.load_data(fetched), event_name=fetched['name']) 25 | 26 | x = np.random.rand(my_model.get_num_free_parameters()) 27 | likelihood = my_model.likelihood(x) 28 | 29 | print('Model likelihood: `{}`'.format(likelihood)) 30 | 31 | outputs = my_model.run(x) 32 | 33 | print('Keys in output: `{}`'.format(', '.join(list(outputs.keys())))) 34 | -------------------------------------------------------------------------------- /test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | set -ev 3 | if [ "$1" = -c ]; then 4 | RUNNER="coverage run -p --source=mosfit" 5 | TRUNNER="coverage run -p" 6 | echo "travis_fold:start:FIT Fitting test data" 7 | else 8 | RUNNER=python 9 | TRUNNER=python 10 | fi 11 | 12 | mpirun -np 2 -H localhost,localhost $RUNNER -m mosfit -e SN2009do --test -i 1 -f 1 -p 0 -F covariance 13 | 14 | $RUNNER -m mosfit -e SN2009do.json --test -i 1 --no-fracking -m magnetar -T 2 -F covariance --cache-path mosfit/tests/cache 15 | $RUNNER -m mosfit -e SN2007bg --test -i 3 -m rprocess -D nester -F covariance 16 | $RUNNER -m mosfit -e mosfit/tests/LSQ12dlf.json --test -i 3 --no-fracking -m csm -F n 6.0 -W 120 -M 0.2 --offline 17 | $RUNNER -m mosfit -e SN2008ar --test -i 1 --no-fracking -m ia -F covariance --extra-times 2009-01-01 --extra-phases -3 +2 18 | $RUNNER -m mosfit -e mosfit/tests/event_list.txt --test -i 1 --no-fracking -m tde -F covariance --offline 19 | $RUNNER -m mosfit -e mosfit/tests/LSQ12dlf.json --test -i 2 --no-fracking -m kilonova --variance-for-each band --offline --extra-times 56000 --prefer-fluxes 20 | $RUNNER -m mosfit -m bns_generative -N 5 21 | if [ "$1" = -c ]; then 22 | $RUNNER -m mosfit -e SN2007bg --test -i 1 --no-fracking -m ic --language ru -F covariance --prefer-cache 23 | else 24 | $RUNNER -m mosfit -e SN2007bg --test -i 1 --no-fracking -m ic -F covariance --prefer-cache 25 | fi 26 | echo -ne '\n\n1\n1\n1\n\n\n9\n9\n\nu\n9\n\n\n\n\n\n1992ApJ...400L...1W\ny\ny\nn\n' | $RUNNER -m mosfit -m fallback -e mosfit/tests/PTF10hgi.txt -i 1 --no-write -u --test -F covariance 27 | $RUNNER -m mosfit -e 09do --test -i 1 --no-fracking -m slsn -S 20 -E 10.0 100.0 -g -c --no-copy-at-launch -x radiusphot -F covariance lumdist 500 -w products/walkers.json 28 | $RUNNER -m mosfit -e mosfit/tests/SN2006le.json --test -i 5 --no-fracking -m csmni --extra-bands u g --extra-instruments LSST -L 55540 55560 --exclude-bands B -s test --quiet -u --offline -F covariance redshift 0.1 29 | 30 | if [ "$1" = -c ]; then 31 | echo "travis_fold:end:FIT Fitting test data done" 32 | echo "travis_fold:start:GEN Generating random models" 33 | fi 34 | 35 | $RUNNER -m mosfit --test -i 0 36 | $RUNNER -m mosfit -i 0 -m default -P parameters_test.json -l 23 0.5 -F covariance 37 | $TRUNNER test.py 38 | 39 | if [ "$1" = -c ]; then 40 | echo "travis_fold:end:GEN Generating random models done" 41 | echo "travis_fold:start:JUP Testing Jupyter notebooks" 42 | echo "travis_fold:end:JUP Testing Jupyter notebooks" 43 | coverage combine 44 | fi 45 | --------------------------------------------------------------------------------