elisa.models.mul#

Multiplicative models.

class Constant(f: 'Parameter' | float | None = None, latex: str | None = None)[source]#

Bases: AnaIntMultiplicative

Energy-independent multiplicative factor.

\[M(E) = f.\]
Parameters:
fParameter, optional

The multiplicative factor \(f\), dimensionless.

latexstr, optional

\(\LaTeX\) format of the component. Defaults to class name.

Attributes

eval

Get side-effect free component evaluation function.

f

Constant parameter \(f\).

latex

\(\LaTeX\) format of the component.

name

Component name.

param_names

Component's parameter names.

type

Component type is multiplicative.

Methods

integral(egrid, params)

Calculate the average value of the model between the grid.

static integral(egrid: JAXArray, params: NameValMapping) JAXArray[source]#

Calculate the average value of the model between the grid.

Parameters:
egridndarray

Photon energy grid in units of keV.

paramsdict

Parameter dict for the model.

Returns:
jax.Array

The model value, dimensionless.

property f: Parameter#

Constant parameter \(f\).

class Edge(Ec: 'Parameter' | float | None = None, D: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#

Bases: NumIntMultiplicative

Absorption edge.

\[\begin{split}M(E) = \begin{cases} \exp\left[-D \bigl(\frac{E}{E_\mathrm{c}}\bigr)^3\right], &\text{if } E \ge E_\mathrm{c}, \\\\ 1, &\text{otherwise.} \end{cases}\end{split}\]
Parameters:
EcParameter, optional

The threshold energy \(E_\mathrm{c}\), in units of keV.

DParameter, optional

The absorption depth \(D\) at the threshold energy, dimensionless.

latexstr, optional

\(\LaTeX\) format of the component. Defaults to class name.

method{‘trapz’, ‘simpson’}, optional

Numerical integration method. Defaults to ‘trapz’.

Attributes

D

Edge parameter \(D\).

Ec

Edge parameter \(E_\mathrm{c}\).

eval

Get side-effect free component evaluation function.

latex

\(\LaTeX\) format of the component.

method

Numerical integration method.

name

Component name.

param_names

Component's parameter names.

type

Component type is multiplicative.

Methods

continuum(egrid, params)

Calculate the model value at the energy grid.

static continuum(egrid: Array, params: dict[str, Array]) Array[source]#

Calculate the model value at the energy grid.

Parameters:
egridndarray

Photon energy grid in units of keV.

paramsdict

Parameter dict for the model.

Returns:
jax.Array

The model value at egrid, dimensionless.

property D: Parameter#

Edge parameter \(D\).

property Ec: Parameter#

Edge parameter \(E_\mathrm{c}\).

class ExpAbs(Ec: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#

Bases: NumIntMultiplicative

Low-energy exponential rolloff.

\[M(E) = \exp\left(-\frac{E_\mathrm{c}}{E}\right).\]
Parameters:
EcParameter, optional

The e-folding energy \(E_\mathrm{c}\) for the absorption, in units of keV.

latexstr, optional

\(\LaTeX\) format of the component. Defaults to class name.

method{‘trapz’, ‘simpson’}, optional

Numerical integration method. Defaults to ‘trapz’.

Attributes

Ec

ExpAbs parameter \(E_\mathrm{c}\).

eval

Get side-effect free component evaluation function.

latex

\(\LaTeX\) format of the component.

method

Numerical integration method.

name

Component name.

param_names

Component's parameter names.

type

Component type is multiplicative.

Methods

continuum(egrid, params)

Calculate the model value at the energy grid.

static continuum(egrid: Array, params: dict[str, Array]) Array[source]#

Calculate the model value at the energy grid.

Parameters:
egridndarray

Photon energy grid in units of keV.

paramsdict

Parameter dict for the model.

Returns:
jax.Array

The model value at egrid, dimensionless.

property Ec: Parameter#

ExpAbs parameter \(E_\mathrm{c}\).

class ExpFac(A: 'Parameter' | float | None = None, f: 'Parameter' | float | None = None, Ec: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#

Bases: NumIntMultiplicative

Exponential modification.

\[\begin{split}M(E) = \begin{cases} 1 + A \exp\bigl(-\frac{f E}{E_0}\bigr), &\text{if } E \ge E_\mathrm{c}, \\\\ 1, &\text{otherwise,} \end{cases}\end{split}\]

where \(E_0\) is the pivot energy fixed at 1 keV.

Parameters:
AParameter, optional

The amplitude of effect \(A\), dimensionless.

fParameter, optional

The exponential factor \(f\), dimensionless.

EcParameter, optional

The start energy of modification \(E_\mathrm{c}\), in units of keV.

latexstr, optional

\(\LaTeX\) format of the component. Defaults to class name.

method{‘trapz’, ‘simpson’}, optional

Numerical integration method. Defaults to ‘trapz’.

Attributes

A

ExpFac parameter \(A\).

Ec

ExpFac parameter \(E_\mathrm{c}\).

eval

Get side-effect free component evaluation function.

f

ExpFac parameter \(f\).

latex

\(\LaTeX\) format of the component.

method

Numerical integration method.

name

Component name.

param_names

Component's parameter names.

type

Component type is multiplicative.

Methods

continuum(egrid, params)

Calculate the model value at the energy grid.

static continuum(egrid: Array, params: dict[str, Array]) Array[source]#

Calculate the model value at the energy grid.

Parameters:
egridndarray

Photon energy grid in units of keV.

paramsdict

Parameter dict for the model.

Returns:
jax.Array

The model value at egrid, dimensionless.

property A: Parameter#

ExpFac parameter \(A\).

property Ec: Parameter#

ExpFac parameter \(E_\mathrm{c}\).

property f: Parameter#

ExpFac parameter \(f\).

class GAbs(El: 'Parameter' | float | None = None, sigma: 'Parameter' | float | None = None, tau: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#

Bases: NumIntMultiplicative

Gaussian absorption line.

\[M(E) = \exp\left[ -\frac{\tau}{\sqrt{2\pi} \sigma} \exp\left[ -\frac{\left(E - E_\mathrm{l}\right)^2}{2 \sigma^2} \right] \right].\]

The optical depth at line center is \(\frac{\tau}{\sqrt{2\pi}\sigma}\).

Parameters:
ElParameter, optional

The line energy \(E_\mathrm{l}\), in units of keV.

sigmaParameter, optional

The line width \(\sigma\), in units of keV.

tauParameter, optional

The line depth \(\tau\), in units of keV.

latexstr, optional

\(\LaTeX\) format of the component. Defaults to class name.

method{‘trapz’, ‘simpson’}, optional

Numerical integration method. Defaults to ‘trapz’.

Attributes

El

GAbs parameter \(E_\mathrm{l}\).

eval

Get side-effect free component evaluation function.

latex

\(\LaTeX\) format of the component.

method

Numerical integration method.

name

Component name.

param_names

Component's parameter names.

sigma

GAbs parameter \(\sigma\).

tau

GAbs parameter \(\tau\).

type

Component type is multiplicative.

Methods

continuum(egrid, params)

Calculate the model value at the energy grid.

static continuum(egrid: Array, params: dict[str, Array]) Array[source]#

Calculate the model value at the energy grid.

Parameters:
egridndarray

Photon energy grid in units of keV.

paramsdict

Parameter dict for the model.

Returns:
jax.Array

The model value at egrid, dimensionless.

property El: Parameter#

GAbs parameter \(E_\mathrm{l}\).

property sigma: Parameter#

GAbs parameter \(\sigma\).

property tau: Parameter#

GAbs parameter \(\tau\).

class HighECut(Ec: 'Parameter' | float | None = None, Ef: 'Parameter' | float | None = None, latex: str | None = None, method=None)[source]#

Bases: NumIntMultiplicative

High-energy cutoff.

\[\begin{split}M(E) = \begin{cases} \exp\bigl(\frac{E_\mathrm{c}-E}{E_\mathrm{f}}\bigr), &\text{if } E \ge E_\mathrm{c}, \\\\ 1, &\text{otherwise.} \end{cases}\end{split}\]
Parameters:
EcParameter, optional

The cutoff energy \(E_\mathrm{c}\), in units of keV.

EfParameter, optional

The e-folding energy \(E_\mathrm{f}\), in units of keV.

latexstr, optional

\(\LaTeX\) format of the component. Defaults to class name.

method{‘trapz’, ‘simpson’}, optional

Numerical integration method. Defaults to ‘trapz’.

Attributes

Ec

HighECut parameter \(E_\mathrm{c}\).

Ef

HighECut parameter \(E_\mathrm{f}\).

eval

Get side-effect free component evaluation function.

latex

\(\LaTeX\) format of the component.

method

Numerical integration method.

name

Component name.

param_names

Component's parameter names.

type

Component type is multiplicative.

Methods

continuum(egrid, params)

Calculate the model value at the energy grid.

static continuum(egrid: Array, params: dict[str, Array]) Array[source]#

Calculate the model value at the energy grid.

Parameters:
egridndarray

Photon energy grid in units of keV.

paramsdict

Parameter dict for the model.

Returns:
jax.Array

The model value at egrid, dimensionless.

property Ec: Parameter#

HighECut parameter \(E_\mathrm{c}\).

property Ef: Parameter#

HighECut parameter \(E_\mathrm{f}\).

class PLAbs(alpha: 'Parameter' | float | None = None, K: 'Parameter' | float | None = None, latex: str | None = None)[source]#

Bases: AnaIntMultiplicative

Absorption as a power-law in energy. Useful for things like dust.

\[M(E) = K \left(\frac{E}{E_0}\right)^{-\alpha},\]

where \(E_0\) is the pivot energy fixed at 1 keV.

Parameters:
alphaParameter, optional

The power law index \(\alpha\), dimensionless.

KParameter, optional

The coefficient \(K\), dimensionless.

latexstr, optional

\(\LaTeX\) format of the component. Defaults to class name.

Attributes

K

PLAbs parameter \(K\).

alpha

PLAbs parameter \(\alpha\).

eval

Get side-effect free component evaluation function.

latex

\(\LaTeX\) format of the component.

name

Component name.

param_names

Component's parameter names.

type

Component type is multiplicative.

Methods

integral(egrid, params)

Calculate the average value of the model between the grid.

static integral(egrid: Array, params: dict[str, Array]) Array[source]#

Calculate the average value of the model between the grid.

Parameters:
egridndarray

Photon energy grid in units of keV.

paramsdict

Parameter dict for the model.

Returns:
jax.Array

The model value, dimensionless.

property K: Parameter#

PLAbs parameter \(K\).

property alpha: Parameter#

PLAbs parameter \(\alpha\).

class PhAbs(nH: 'Parameter' | float | None = None, latex: str | None = None, abund=None, xsect=None, method=None)[source]#

Bases: PhotonAbsorption

Photoelectric absorption.

\[M(E) = \exp \left[ -\eta_\mathrm{H}\ \sigma(E) \right],\]

where \(\sigma(E)\) is the photo-electric cross-section, NOT including Thomson scattering.

Parameters:
nHParameter, optional

The equivalent hydrogen column density \(\eta_\mathrm{H}\), in units of 10²² cm⁻².

latexstr, optional

\(\LaTeX\) format of the component. Defaults to class name.

abundstr, optional

Abundance table to use. Available options are:

  • 'angr' [1] (Photospheric, using Table 2)

  • 'aspl' [2] (Photospheric, using Table 1)

  • 'feld' [3]

  • 'aneb' [4]

  • 'grsa' [5]

  • 'wilm' [6]

  • 'lodd' [7] (Photospheric, using Table 1)

  • 'lpgp' [8] (Photospheric, using Table 4)

  • 'lpgs' [8] (Proto-solar, using Table 10)

The default is 'angr'.

xsectstr, optional

Photon cross-section to use. Available options are:

The default is 'vern'.

method{‘trapz’, ‘simpson’}, optional

Numerical integration method. Defaults to ‘trapz’.

Attributes

abund

Current abundance table.

eval

Get photon absorption model function.

latex

\(\LaTeX\) format of the component.

method

Numerical integration method.

nH

PhAbs parameter \(\eta_\mathrm{H}\).

name

Component name.

param_names

Component's parameter names.

type

Component type is multiplicative.

xsect

Current photon cross-section.

Methods

abund_list()

Get available abundance list.

continuum(egrid, params, abs_model, abund, xsect)

Photon absorption model.

xsect_list()

Get available photon cross-section list.

References

static abund_list() list[str][source]#

Get available abundance list.

static xsect_list() list[str][source]#

Get available photon cross-section list.

property nH: Parameter#

PhAbs parameter \(\eta_\mathrm{H}\).

class TBAbs(nH: 'Parameter' | float | None = None, latex: str | None = None, abund=None, xsect=None, method=None)[source]#

Bases: PhotonAbsorption

The Tuebingen-Boulder ISM absorption model.

This model calculates the cross-sections for X-ray absorption by the ISM as the sum of the cross-sections for X-ray absorption due to the gas-phase ISM, the grain-phase ISM, and the molecules in the ISM.

Parameters:
nHParameter, optional

The equivalent hydrogen column density \(\eta_\mathrm{H}\), in units of 10²² cm⁻².

latexstr, optional

\(\LaTeX\) format of the component. Defaults to class name.

abundstr, optional

Abundance table to use. Available options are:

  • 'angr' [1] (Photospheric, using Table 2)

  • 'aspl' [2] (Photospheric, using Table 1)

  • 'feld' [3]

  • 'aneb' [4]

  • 'grsa' [5]

  • 'wilm' [6]

  • 'lodd' [7] (Photospheric, using Table 1)

  • 'lpgp' [8] (Photospheric, using Table 4)

  • 'lpgs' [8] (Proto-solar, using Table 10)

The default is 'wilm'.

xsectstr, optional

Always use cross-section 'vern' [9] as baseline.

method{‘trapz’, ‘simpson’}, optional

Numerical integration method. Defaults to ‘trapz’.

Attributes

abund

Current abundance table.

eval

Get photon absorption model function.

latex

\(\LaTeX\) format of the component.

method

Numerical integration method.

nH

TBAbs parameter \(\eta_\mathrm{H}\).

name

Component name.

param_names

Component's parameter names.

type

Component type is multiplicative.

xsect

Current photon cross-section.

Methods

abund_list()

Get available abundance list.

continuum(egrid, params, abs_model, abund, xsect)

Photon absorption model.

xsect_list()

Get available photon cross-section list.

References

static abund_list() list[str][source]#

Get available abundance list.

static xsect_list() list[str][source]#

Get available photon cross-section list.

property nH: Parameter#

TBAbs parameter \(\eta_\mathrm{H}\).

class WAbs(nH: 'Parameter' | float | None = None, latex: str | None = None, abund=None, xsect=None, method=None)[source]#

Bases: PhotonAbsorption

A photo-electric absorption using Wisconsin cross-sections [1].

\[M(E) = \exp \left[ -\eta_\mathrm{H}\ \sigma(E) \right],\]

where \(\sigma(E)\) is the photo-electric cross-section, NOT including Thomson scattering.

Warning

The WAbs model is obsolete and is only included for comparison with historical results. The TBAbs model should be used for the ISM or PhAbs for general photoelectric absorption.

Parameters:
nHParameter, optional

The equivalent hydrogen column density \(\eta_\mathrm{H}\), in units of 10²² cm⁻².

latexstr, optional

\(\LaTeX\) format of the component. Defaults to class name.

abundstr, optional

Always use abundance table 'aneb' [2].

xsectstr, optional

Always use Wisconsin cross-sections [1].

method{‘trapz’, ‘simpson’}, optional

Numerical integration method. Defaults to ‘trapz’.

Attributes

abund

Current abundance table.

eval

Get photon absorption model function.

latex

\(\LaTeX\) format of the component.

method

Numerical integration method.

nH

WAbs parameter \(\eta_\mathrm{H}\).

name

Component name.

param_names

Component's parameter names.

type

Component type is multiplicative.

xsect

Current photon cross-section.

Methods

abund_list()

Get available abundance list.

continuum(egrid, params, abs_model, abund, xsect)

Photon absorption model.

xsect_list()

Get available photon cross-section list.

References

property nH: Parameter#

WAbs parameter \(\eta_\mathrm{H}\).

static abund_list() list[str][source]#

Get available abundance list.

static xsect_list() list[str][source]#

Get available photon cross-section list.