elisa.models.add#
Additive models.
- class Band(alpha: 'Parameter' | float | None = None, beta: 'Parameter' | float | None = None, Ec: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#
Bases:
NumIntAdditiveGamma-ray burst continuum developed by Band et al. (1993) [1].
\[\begin{split}N(E) = K \begin{cases} \bigl(\frac{E}{E_0}\bigr)^\alpha \exp\bigl(-\frac{E}{E_\mathrm{c}}\bigr), &\text{if } E < (\alpha-\beta) E_\mathrm{c}, \\\\ \bigl(\frac{E}{E_0}\bigr)^\beta \exp(\beta-\alpha) \left[ \frac{(\alpha-\beta)E_\mathrm{c}}{E_0} \right]^{\alpha-\beta}, &\text{otherwise,} \end{cases}\end{split}\]where \(E_0\) is the reference energy fixed at 100 keV.
- Parameters:
alpha (
Parameter, optional) – The low-energy power law index \(\alpha\), dimensionless.beta (
Parameter, optional) – The high-energy power law index \(\beta\), dimensionless.Ec (
Parameter, optional) – The characteristic energy \(E_\mathrm{c}\), in units of keV.K (
Parameter, optional) – The amplitude \(K\), in units of ph cm⁻² s⁻¹ keV⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.method ({'trapz', 'simpson'}, optional) – Numerical integration method. Defaults to ‘trapz’.
Attributes
Band parameter \(E_\mathrm{c}\).
Band parameter \(K\).
Band parameter \(\alpha\).
Band parameter \(\beta\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
methodNumerical integration method.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
continuum(egrid, params)Calculate the photon flux at the energy grid.
References
- class BandEp(alpha: 'Parameter' | float | None = None, beta: 'Parameter' | float | None = None, Ep: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#
Bases:
NumIntAdditiveGamma-ray burst continuum developed by Band et al. (1993) [1], parametrized by the peak of \(\nu F_\nu\).
\[\begin{split}N(E) = K \begin{cases} \bigl(\frac{E}{E_0}\bigr)^\alpha \exp\left[-\frac{(2+\alpha)E}{E_\mathrm{p}}\right], &\text{if } E < \frac{(\alpha-\beta)E_\mathrm{p}}{2+\alpha}, \\\\ \bigl(\frac{E}{E_0}\bigr)^\beta \exp(\beta-\alpha) \left[ \frac{(\alpha-\beta)E_\mathrm{p}}{(2+\alpha)E_0} \right]^{\alpha-\beta}, &\text{otherwise}, \end{cases}\end{split}\]where \(E_0\) is the reference energy fixed at 100 keV.
Warning
This model requires the low-energy power law index \(\alpha\) to be greater than -2.0.
- Parameters:
alpha (
Parameter, optional) – The low-energy power law index \(\alpha\), dimensionless.beta (
Parameter, optional) – The high-energy power law index \(\beta\), dimensionless.Ep (
Parameter, optional) – The peak energy \(E_\mathrm{p}\) of \(\nu F_\nu\), in units of keV.K (
Parameter, optional) – The amplitude \(K\), in units of ph cm⁻² s⁻¹ keV⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.method ({'trapz', 'simpson'}, optional) – Numerical integration method. Defaults to ‘trapz’.
Attributes
BandEp parameter \(E_\mathrm{p}\).
BandEp parameter \(K\).
BandEp parameter \(\alpha\).
BandEp parameter \(\beta\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
methodNumerical integration method.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
continuum(egrid, params)Calculate the photon flux at the energy grid.
References
- class BentPL(alpha: 'Parameter' | float | None = None, Eb: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#
Bases:
NumIntAdditiveBent power law.
\[N(E) = 2K \left[ 1 + \left(\frac{E}{E_\mathrm{b}}\right)^\alpha \right]^{-1}\]- Parameters:
alpha (
Parameter, optional) – The power law photon index \(\alpha\), dimensionless.Eb (
Parameter, optional) – The break energy \(E_\mathrm{b}\), in units of keV.K (
Parameter, optional) – The amplitude \(K\), in units of ph cm⁻² s⁻¹ keV⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.method ({'trapz', 'simpson'}, optional) – Numerical integration method. Defaults to ‘trapz’.
Attributes
BentPL parameter \(E_\mathrm{b}\).
BentPL parameter \(K\).
BentPL parameter \(alpha\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
methodNumerical integration method.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
continuum(egrid, params)Calculate the photon flux at the energy grid.
- class Blackbody(kT: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#
Bases:
NumIntAdditiveBlackbody function.
\[N(E) = \frac{C K E^2}{(kT)^4 [\exp(E/kT)-1]},\]where \(C=8.0525\) ph.
- Parameters:
kT (
Parameter, optional) – The temperature \(kT\), in units of keV.K (
Parameter, optional) – The amplitude \(K = L_{39}/D_{10}^2\), where \(L_{39}\) is the source luminosity in units of 10³⁹ erg s⁻¹ and \(D_{10}\) is the distance to the source in units of 10 kpc.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.method ({'trapz', 'simpson'}, optional) – Numerical integration method. Defaults to ‘trapz’.
Attributes
Blackbody parameter \(K\).
evalGet side-effect free component evaluation function.
Blackbody parameter \(kT\).
latex\(\LaTeX\) format of the component.
methodNumerical integration method.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
continuum(egrid, params)Calculate the photon flux at the energy grid.
- class BlackbodyRad(kT: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#
Bases:
NumIntAdditiveBlackbody function with normalization proportional to the surface area.
\[N(E) = \frac{C K E^2}{\exp(E/kT)-1},\]where \(C=1.0344 \times 10^{-3}\) ph cm⁻² s⁻¹ keV⁻³.
- Parameters:
kT (
Parameter, optional) – The temperature \(kT\), in units of keV.K (
Parameter, optional) – The amplitude \(K = R_\mathrm{km}^2/D_{10}^2\), where \(R_\mathrm{km}\) is the source radius in km and \(D_{10}\) is the distance to the source in units of 10 kpc.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.method ({'trapz', 'simpson'}, optional) – Numerical integration method. Defaults to ‘trapz’.
Attributes
BlackbodyRad parameter \(K\).
evalGet side-effect free component evaluation function.
BlackbodyRad parameter \(kT\).
latex\(\LaTeX\) format of the component.
methodNumerical integration method.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
continuum(egrid, params)Calculate the photon flux at the energy grid.
- class BrokenPL(alpha1: 'Parameter' | float | None = None, Eb: 'Parameter' | float | None = None, alpha2: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None)[source]#
Bases:
AnaIntAdditiveBroken power law.
\[\begin{split}N(E) = K \begin{cases} \left(\frac{E}{E_\mathrm{b}}\right)^{-\alpha_1}, &\text{if } E \le E_\mathrm{b}, \\\\ \left(\frac{E}{E_\mathrm{b}}\right)^{-\alpha_2}, &\text{otherwise}. \end{cases}\end{split}\]- Parameters:
alpha1 (
Parameter, optional) – The low-energy power law photon index \(\alpha_1\), dimensionless.alpha2 (
Parameter, optional) – The high-energy power law photon index \(\alpha_2\), dimensionless.Eb (
Parameter, optional) – The break energy \(E_\mathrm{b}\), in units of keV.K (
Parameter, optional) – The amplitude \(K\), in units of ph cm⁻² s⁻¹ keV⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.method ({'trapz', 'simpson'}, optional) – Numerical integration method. Defaults to ‘trapz’.
Attributes
BrokenPL parameter \(E_\mathrm{b}\).
BrokenPL parameter \(K\).
BrokenPL parameter \(alpha_1\).
BrokenPL parameter \(alpha_2\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
integral(egrid, params)Calculate the photon flux integrated over the energy grid.
- class Compt(alpha: 'Parameter' | float | None = None, Ep: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#
Bases:
NumIntAdditivePower law with high-energy exponential cutoff, parametrized by the peak of \(\nu F_\nu\).
\[N(E) = K \left(\frac{E}{E_0}\right)^{-\alpha} \exp \left[-\frac{(2-\alpha)E}{E_\mathrm{p}}\right],\]where \(E_0\) is the reference energy fixed at 1 keV.
- Parameters:
alpha (
Parameter, optional) – The power law photon index \(\alpha\), dimensionless.Ep (
Parameter, optional) – The peak energy \(E_\mathrm{p}\) of \(\nu F_\nu\), in units of keV.K (
Parameter, optional) – The amplitude \(K\), in units of ph cm⁻² s⁻¹ keV⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.method ({'trapz', 'simpson'}, optional) – Numerical integration method. Defaults to ‘trapz’.
Attributes
Compt parameter \(E_\mathrm{p}\).
Compt parameter \(K\).
Compt parameter \(\alpha\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
methodNumerical integration method.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
continuum(egrid, params)Calculate the photon flux at the energy grid.
- class CutoffPL(alpha: 'Parameter' | float | None = None, Ec: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#
Bases:
NumIntAdditivePower law with high-energy exponential cutoff.
\[N(E) = K \left(\frac{E}{E_0}\right)^{-\alpha} \exp \left(-\frac{E}{E_\mathrm{c}}\right),\]where \(E_0\) is the reference energy fixed at 1 keV.
- Parameters:
alpha (
Parameter, optional) – The power law photon index \(\alpha\), dimensionless.Ec (
Parameter, optional) – The e-folding energy of exponential cutoff \(E_\mathrm{c}\), in units of keV.K (
Parameter, optional) – The amplitude \(K\), in units of ph cm⁻² s⁻¹ keV⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.method ({'trapz', 'simpson'}, optional) – Numerical integration method. Defaults to ‘trapz’.
Attributes
CutoffPL parameter \(E_\mathrm{c}\).
CutoffPL parameter \(K\).
CutoffPL parameter \(\alpha\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
methodNumerical integration method.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
continuum(egrid, params)Calculate the photon flux at the energy grid.
- class Gauss(El: 'Parameter' | float | None = None, sigma: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#
Bases:
NumIntAdditiveGaussian line profile.
\[N(E) = \frac{K}{\sqrt{2\pi} \sigma} \exp\left[ -\frac{\left(E - E_\mathrm{l}\right)^2}{2 \sigma^2} \right].\]- Parameters:
El (
Parameter, optional) – The line energy \(E_\mathrm{l}\), in units of keV.sigma (
Parameter, optional) – The line width \(\sigma\), in units of keV.K (
Parameter, optional) – The total photon flux \(K\) of the line, in units of ph cm⁻² s⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.method ({'trapz', 'simpson'}, optional) – Numerical integration method. Defaults to ‘trapz’.
Attributes
Gauss parameter \(E_\mathrm{l}\).
Gauss parameter \(K\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
methodNumerical integration method.
nameComponent name.
param_namesComponent's parameter names.
Gauss parameter \(\sigma\).
typeComponent type is additive.
Methods
continuum(egrid, params)Calculate the photon flux at the energy grid.
- class Lorentz(El: 'Parameter' | float | None = None, sigma: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None)[source]#
Bases:
AnaIntAdditiveLorentzian line profile.
\[N(E) = \frac{K/\mathcal{F}}{(E - E_\mathrm{l})^2 + (\sigma/2)^2},\]where
\[\mathcal{F}=\int_0^{+\infty} \frac{1}{(E - E_\mathrm{l})^2 + (\sigma/2)^2} \ \mathrm{d}E.\]- Parameters:
El (
Parameter, optional) – The line energy \(E_\mathrm{l}\), in units of keV.sigma (
Parameter, optional) – The FWHM line width \(\sigma\), in units of keV.K (
Parameter, optional) – The total photon flux \(K\) of the line, in units of ph cm⁻² s⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.
Attributes
Lorentz parameter \(E_\mathrm{l}\).
Lorentz parameter \(K\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
nameComponent name.
param_namesComponent's parameter names.
Lorentz parameter \(\sigma\).
typeComponent type is additive.
Methods
integral(egrid, params)Calculate the photon flux integrated over the energy grid.
- class OTTB(kT: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#
Bases:
NumIntAdditiveOptically-thin thermal bremsstrahlung.
\[N(E) = K \left(\frac{E}{E_0}\right)^{-1} \exp\left(-\frac{E}{kT}\right) \exp\left(\frac{E_0}{kT}\right),\]where \(E_0\) is the reference energy fixed at 1 keV.
- Parameters:
kT (
Parameter, optional) – The electron energy \(kT\), in units of keV.K (
Parameter, optional) – The amplitude \(K\), in units of ph cm⁻² s⁻¹ keV⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.method ({'trapz', 'simpson'}, optional) – Numerical integration method. Defaults to ‘trapz’.
Attributes
OTTB parameter \(K\).
evalGet side-effect free component evaluation function.
OTTB parameter \(kT\).
latex\(\LaTeX\) format of the component.
methodNumerical integration method.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
continuum(egrid, params)Calculate the photon flux at the energy grid.
- class OTTS(Ec: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#
Bases:
NumIntAdditiveOptically-thin thermal synchrotron [1].
\[N(E) = K \exp\left[-\left(\frac{E}{E_\mathrm{c}}\right)^{1/3}\right].\]- Parameters:
Ec (
Parameter, optional) – The energy scale \(E_\mathrm{c}\), in units of keV.K (
Parameter, optional) – The amplitude \(K\), in units of ph cm⁻² s⁻¹ keV⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.method ({'trapz', 'simpson'}, optional) – Numerical integration method. Defaults to ‘trapz’.
Attributes
OTTS parameter \(E_\mathrm{c}\).
OTTS parameter \(K\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
methodNumerical integration method.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
continuum(egrid, params)Calculate the photon flux at the energy grid.
References
- class PLEnFlux(emin, emax, alpha: 'Parameter' | float | None = None, F: 'Parameter' | float | None = None, latex: str | None = None)[source]#
Bases:
PLFluxNormPower law function with energy flux used as normalization.
\[\begin{split}N(E) &= \mathcal{F}_\mathrm{en} \left[ \int_{E_\mathrm{min}}^{E_\mathrm{max}} \left(\frac{E}{E_0}\right)^{-\alpha} \, E \, \mathrm{d}E \right]^{-1} \left(\frac{E}{E_0}\right)^{-\alpha}\\ &= \mathcal{F}_\mathrm{en} (2 - \alpha) \left[ \left(\frac{E_\mathrm{max}}{E_0}\right)^{2 - \alpha} - \left(\frac{E_\mathrm{min}}{E_0}\right)^{2 - \alpha} \right]^{-1} \left(\frac{E}{E_0}\right)^{-\alpha},\end{split}\]where \(E_0\) is the reference energy fixed at 1 keV.
- Parameters:
emin (
floatorint) – Minimum energy of the band to calculate the flux, in units of keV.emax (
floatorint) – Maximum energy of the band to calculate the flux, in units of keV.alpha (
Parameter, optional) – Power law photon index \(\alpha\), dimensionless.F (
Parameter, optional) – Energy flux \(\mathcal{F}_\mathrm{en}\), in units of erg cm⁻² s⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.
Attributes
PLEnFlux parameter \(\mathcal{F}_\mathrm{en}\).
PLEnFlux parameter \(\alpha\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
integral(egrid, params)Calculate the photon flux integrated over the energy grid.
- class PLPhFlux(emin, emax, alpha: 'Parameter' | float | None = None, F: 'Parameter' | float | None = None, latex: str | None = None)[source]#
Bases:
PLFluxNormPower law function with photon flux used as normalization.
\[\begin{split}N(E) &= \mathcal{F}_\mathrm{ph} \left[ \int_{E_\mathrm{min}}^{E_\mathrm{max}} \left(\frac{E}{E_0}\right)^{-\alpha} \, \mathrm{d}E \right]^{-1} \left(\frac{E}{E_0}\right)^{-\alpha}\\ &= \mathcal{F}_\mathrm{ph} (1 - \alpha) \left[ \left(\frac{E_\mathrm{max}}{E_0}\right)^{1 - \alpha} - \left(\frac{E_\mathrm{min}}{E_0}\right)^{1 - \alpha} \right]^{-1} \left(\frac{E}{E_0}\right)^{-\alpha},\end{split}\]where \(E_0\) is the reference energy fixed at 1 keV.
- Parameters:
emin (
floatorint) – Minimum energy of the band to calculate the flux, in units of keV.emax (
floatorint) – Maximum energy of the band to calculate the flux, in units of keV.alpha (
Parameter, optional) – Power law photon index \(\alpha\), dimensionless.F (
Parameter, optional) – Photon flux \(\mathcal{F}_\mathrm{ph}\), in units of ph cm⁻² s⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.
Attributes
PLPhFlux parameter \(\mathcal{F}_\mathrm{ph}\).
PLPhFlux parameter \(\alpha\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
integral(egrid, params)Calculate the photon flux integrated over the energy grid.
- class PowerLaw(alpha: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None)[source]#
Bases:
AnaIntAdditivePower law function.
\[N(E) = K \left(\frac{E}{E_0}\right)^{-\alpha},\]where \(E_0\) is the reference energy fixed at 1 keV.
- Parameters:
Attributes
PowerLaw parameter \(K\).
PowerLaw parameter \(\alpha\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
nameComponent name.
param_namesComponent's parameter names.
typeComponent type is additive.
Methods
integral(egrid, params)Calculate the photon flux integrated over the energy grid.
- class SmoothlyBrokenPL(alpha1: 'Parameter' | float | None = None, Eb: 'Parameter' | float | None = None, alpha2: 'Parameter' | float | None = None, rho: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#
Bases:
NumIntAdditiveSmoothly broken power law.
\[N(E) = K \left( \frac{E}{E_0} \right) ^ {-\alpha_1} \left\{ 2\left[ 1 + \left(\frac{E}{E_\mathrm{b}} \right)^{\left( \alpha_2 - \alpha_1 \right) / \rho} \right] \right\}^{-\rho},\]where \(E_0\) is the reference energy fixed at 1 keV.
- Parameters:
alpha1 (
Parameter, optional) – The low-energy power law index \(\alpha_1\), dimensionless.Eb (
Parameter, optional) – The break energy \(E_\mathrm{b}\), in units of keV.alpha2 (
Parameter, optional) – The high-energy power law index \(\alpha_2\), dimensionless.rho (
Parameter, optional) – The smoothness parameter \(\rho\), dimensionless.K (
Parameter, optional) – The amplitude \(K\), in units of ph cm⁻² s⁻¹ keV⁻¹.latex (
str, optional) – \(\LaTeX\) format of the component. Defaults to class name.method ({'trapz', 'simpson'}, optional) – Numerical integration method. Defaults to ‘trapz’.
Attributes
SmoothlyBrokenPL parameter \(E_\mathrm{b}\).
SmoothlyBrokenPL parameter \(K\).
SmoothlyBrokenPL parameter \(alpha_1\).
SmoothlyBrokenPL parameter \(alpha_2\).
evalGet side-effect free component evaluation function.
latex\(\LaTeX\) format of the component.
methodNumerical integration method.
nameComponent name.
param_namesComponent's parameter names.
SmoothlyBrokenPL parameter \(\rho\).
typeComponent type is additive.
Methods
continuum(egrid, params)Calculate the photon flux at the energy grid.