API

mosfit.modules Package

Initilization procedure for Module.

Functions

bbody(lam, T, R2, sup_lambda, power_lambda)

Calculate the corresponding blackbody radiance for a set of wavelengths given a temperature and radiance.

Classes

Module(name, model, **kwargs)

Base Module class.

DenseTimes(**kwargs)

Generate an evenly-spaced array of times for use in calculations.

Array(name, model, **kwargs)

Template class for arrays.

AllTimes(**kwargs)

Generate all times for which observations will be constructed.

Kernel(**kwargs)

Calculate the kernel for use in computing the likelihood score.

RestTimes(name, model, **kwargs)

This class converts the observed times to rest-frame times.

Diagonal(**kwargs)

Calculate the diagonal/residuals for a model kernel.

SLSNConstraints(**kwargs)

SLSN constraints.

BNSConstraints(**kwargs)

BNS constraints.

Constraint(name, model, **kwargs)

Template class for constraints.

TDEConstraints(**kwargs)

TDE constraints.

MagnetarConstraints(**kwargs)

Magnetar constraints.

SLSNConstraints(**kwargs)

SLSN constraints.

IaConstraints(**kwargs)

Ia constraints.

NSBHConstraints(**kwargs)

NSBH constraints.

CSMConstraints(name, model, **kwargs)

CSM constraints.

FallbackConstraints(**kwargs)

fallback constraints.

Transient(**kwargs)

Structure to store transient data.

AsphericalKilonova(name, model, **kwargs)

Uses viewing angle and lanthanide-poor opening angle from Darbha and Kasen 2020.

NSBHEjecta(name, model, **kwargs)

Generate mejecta and vejecta from black hole - neutron star binary parameters.

AsphericalWind(name, model, **kwargs)

Uses viewing angle and half-opening angle from Darbha and Kasen 2020.

Energetic(name, model, **kwargs)

Template class for energy/velocity conversions.

HomologousExpansion(name, model, **kwargs)

Generate vejecta from kinetic_energy assuming homologous expansion.

BNSEjecta(name, model, **kwargs)

Generate mejecta, vejecta and kappa from neutron star binary parameters.

NSBHEjecta(name, model, **kwargs)

Generate mejecta and vejecta from black hole - neutron star binary parameters.

BNSEjecta(name, model, **kwargs)

Generate mejecta, vejecta and kappa from neutron star binary parameters.

ThinShell(name, model, **kwargs)

Generate vejecta from kinetic_energy if ejecta in thin shell.

RProcess(**kwargs)

r-process decay engine.

Engine(**kwargs)

Generic engine module.

NickelCobalt(**kwargs)

Nickel/Cobalt decay engine.

Simplefallback(**kwargs)

Simple fallback energy input.

CSM(**kwargs)

CSM energy injection.

Fallback(**kwargs)

A tde engine.

ExpPow(**kwargs)

A simple analytical engine.

Shock(**kwargs)

Cooling emission from shock-heated cocoon.

Magnetar(**kwargs)

Magnetar spin-down engine.

Likelihood(**kwargs)

Calculate the maximum likelihood score for a model.

Photometry(**kwargs)

Band-pass filters.

Output(name, model, **kwargs)

Template class for output Modules.

Write(**kwargs)

Write keys to disk.

LightCurve(**kwargs)

Output a light curve to disk.

Parameter(**kwargs)

Model parameter that can either be free or fixed.

Kroupa(**kwargs)

Kroupa IMF from https://arxiv.org/pdf/astro-ph/0102155.pdf.

Covariance(**kwargs)

Model parameter that can either be free or fixed.

Gaussian(**kwargs)

Parameter with Gaussian prior.

Variance(**kwargs)

Model parameter that can either be free or fixed.

Arbitrary(**kwargs)

Parameter with Arbitrary prior.

PowerLaw(**kwargs)

Standard power law, alpha must be > 1.

LuminosityDistance(**kwargs)

LuminosityDistance parameter that depends on luminosity distance.

Redshift(**kwargs)

Redshift parameter that depends on luminosity distance.

Constant(**kwargs)

Constant parameter.

TdePhotosphere(name, model, **kwargs)

Photosphere for a tidal disruption event.

Photosphere(name, model, **kwargs)

Template class for photosphere Modules.

DenseCore(name, model, **kwargs)

Photosphere with a dense core and a low-mass envelope.

CocoonPhotosphere(name, model, **kwargs)

Piro and Kollmeier 2018

TemperatureFloor(name, model, **kwargs)

Photosphere with a minimum allowed temperature.

MultiBlackbody(**kwargs)

Generalized multiple blackbody spectral energy distribution.

BlackbodyCutoff(**kwargs)

Blackbody SED with cutoff.

BlackbodyCutoff(**kwargs)

Blackbody SED with cutoff.

Line(**kwargs)

Line spectral energy distribution, modifies existing SED.

SED(**kwargs)

Template class for SED Modules.

Blackbody(**kwargs)

Blackbody spectral energy dist.

Synchrotron(**kwargs)

Synchrotron spectral energy distribution.

LOSExtinction(**kwargs)

Adds extinction to SED from both host galaxy and MW.

Transform(**kwargs)

Parent class for transforms.

Diffusion(**kwargs)

Photon diffusion transform.

Viscous(**kwargs)

Viscous delay transform.

DiffusionCSM(**kwargs)

Photon diffusion transform for CSM model.

DiffusionAspherical(**kwargs)

Photon diffusion transform.

Class Inheritance Diagram

Inheritance diagram of mosfit.modules.module.Module, mosfit.modules.arrays.densetimes.DenseTimes, mosfit.modules.arrays.array.Array, mosfit.modules.arrays.alltimes.AllTimes, mosfit.modules.arrays.kernel.Kernel, mosfit.modules.arrays.resttimes.RestTimes, mosfit.modules.arrays.diagonal.Diagonal, mosfit.modules.constraints.slsn_constraints.SLSNConstraints, mosfit.modules.constraints.bns_constraints.BNSConstraints, mosfit.modules.constraints.constraint.Constraint, mosfit.modules.constraints.tde_constraints.TDEConstraints, mosfit.modules.constraints.magnetar_constraints.MagnetarConstraints, mosfit.modules.constraints.slsn_constraints.SLSNConstraints, mosfit.modules.constraints.ia_constraints.IaConstraints, mosfit.modules.constraints.nsbh_constraints.NSBHConstraints, mosfit.modules.constraints.csmconstraints.CSMConstraints, mosfit.modules.constraints.fallback_constraints.FallbackConstraints, mosfit.modules.datas.transient.Transient, mosfit.modules.energetics.aspherical_kilonova.AsphericalKilonova, mosfit.modules.energetics.nsbh_ejecta.NSBHEjecta, mosfit.modules.energetics.aspherical_wind.AsphericalWind, mosfit.modules.energetics.energetic.Energetic, mosfit.modules.energetics.homologous_expansion.HomologousExpansion, mosfit.modules.energetics.bns_ejecta.BNSEjecta, mosfit.modules.energetics.nsbh_ejecta.NSBHEjecta, mosfit.modules.energetics.bns_ejecta.BNSEjecta, mosfit.modules.energetics.thin_shell.ThinShell, mosfit.modules.engines.rprocess.RProcess, mosfit.modules.engines.engine.Engine, mosfit.modules.engines.nickelcobalt.NickelCobalt, mosfit.modules.engines.simplefallback.Simplefallback, mosfit.modules.engines.csm.CSM, mosfit.modules.engines.fallback.Fallback, mosfit.modules.engines.exppow.ExpPow, mosfit.modules.engines.shock_cocoon.Shock, mosfit.modules.engines.magnetar.Magnetar, mosfit.modules.objectives.likelihood.Likelihood, mosfit.modules.observables.photometry.Photometry, mosfit.modules.outputs.output.Output, mosfit.modules.outputs.write.Write, mosfit.modules.outputs.lightcurve.LightCurve, mosfit.modules.parameters.parameter.Parameter, mosfit.modules.parameters.kroupa.Kroupa, mosfit.modules.parameters.covariance.Covariance, mosfit.modules.parameters.gaussian.Gaussian, mosfit.modules.parameters.variance.Variance, mosfit.modules.parameters.arbitrary.Arbitrary, mosfit.modules.parameters.powerlaw.PowerLaw, mosfit.modules.parameters.luminositydistance.LuminosityDistance, mosfit.modules.parameters.redshift.Redshift, mosfit.modules.parameters.constant.Constant, mosfit.modules.photospheres.tde_photosphere.TdePhotosphere, mosfit.modules.photospheres.photosphere.Photosphere, mosfit.modules.photospheres.densecore.DenseCore, mosfit.modules.photospheres.cocoon_photosphere.CocoonPhotosphere, mosfit.modules.photospheres.temperature_floor.TemperatureFloor, mosfit.modules.seds.multiblackbody.MultiBlackbody, mosfit.modules.seds.blackbody_supressed.BlackbodyCutoff, mosfit.modules.seds.blackbody_supressed.BlackbodyCutoff, mosfit.modules.seds.line.Line, mosfit.modules.seds.sed.SED, mosfit.modules.seds.blackbody.Blackbody, mosfit.modules.seds.synchrotron.Synchrotron, mosfit.modules.seds.losextinction.LOSExtinction, mosfit.modules.transforms.transform.Transform, mosfit.modules.transforms.diffusion.Diffusion, mosfit.modules.transforms.viscous.Viscous, mosfit.modules.transforms.diffusion_csm.DiffusionCSM, mosfit.modules.transforms.diffusion_aspherical.DiffusionAspherical