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:
  • f (Parameter, optional) – The multiplicative factor \(f\), dimensionless.

  • latex (str, 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:
  • egrid (Array) – Photon energy grid in units of keV.

  • params (dict[str, Array]) – Parameter dict for the model.

Returns:

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:
  • Ec (Parameter, optional) – The threshold energy \(E_\mathrm{c}\), in units of keV.

  • D (Parameter, optional) – The absorption depth \(D\) at the threshold energy, dimensionless.

  • latex (str, 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:
  • egrid (Array) – Photon energy grid in units of keV.

  • params (dict[str, Array]) – Parameter dict for the model.

Returns:

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:
  • Ec (Parameter, optional) – The e-folding energy \(E_\mathrm{c}\) for the absorption, in units of keV.

  • latex (str, 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:
  • egrid (Array) – Photon energy grid in units of keV.

  • params (dict[str, Array]) – Parameter dict for the model.

Returns:

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:
  • A (Parameter, optional) – The amplitude of effect \(A\), dimensionless.

  • f (Parameter, optional) – The exponential factor \(f\), dimensionless.

  • Ec (Parameter, optional) – The start energy of modification \(E_\mathrm{c}\), in units of keV.

  • latex (str, 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:
  • egrid (Array) – Photon energy grid in units of keV.

  • params (dict[str, Array]) – Parameter dict for the model.

Returns:

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:
  • El (Parameter, optional) – The line energy \(E_\mathrm{l}\), in units of keV.

  • sigma (Parameter, optional) – The line width \(\sigma\), in units of keV.

  • tau (Parameter, optional) – The line depth \(\tau\), in units of keV.

  • latex (str, 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:
  • egrid (Array) – Photon energy grid in units of keV.

  • params (dict[str, Array]) – Parameter dict for the model.

Returns:

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:
  • Ec (Parameter, optional) – The cutoff energy \(E_\mathrm{c}\), in units of keV.

  • Ef (Parameter, optional) – The e-folding energy \(E_\mathrm{f}\), in units of keV.

  • latex (str, 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:
  • egrid (Array) – Photon energy grid in units of keV.

  • params (dict[str, Array]) – Parameter dict for the model.

Returns:

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:
  • alpha (Parameter, optional) – The power law index \(\alpha\), dimensionless.

  • K (Parameter, optional) – The coefficient \(K\), dimensionless.

  • latex (str, 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:
  • egrid (Array) – Photon energy grid in units of keV.

  • params (dict[str, Array]) – Parameter dict for the model.

Returns:

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:
  • nH (Parameter, optional) – The equivalent hydrogen column density \(\eta_\mathrm{H}\), in units of 10²² cm⁻².

  • latex (str, optional) – \(\LaTeX\) format of the component. Defaults to class name.

  • abund (str, optional) – Abundance table to use. Available options are:

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:
  • nH (Parameter, optional) – The equivalent hydrogen column density \(\eta_\mathrm{H}\), in units of 10²² cm⁻².

  • latex (str, optional) – \(\LaTeX\) format of the component. Defaults to class name.

  • abund (str, optional) – Abundance table to use. Available options are:

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:
  • nH (Parameter, optional) – The equivalent hydrogen column density \(\eta_\mathrm{H}\), in units of 10²² cm⁻².

  • latex (str, optional) – \(\LaTeX\) format of the component. Defaults to class name.

  • abund (str, optional) – Always use abundance table 'aneb' [2].

  • xsect (str, 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.