EmissionModel#

class synthesizAR.atomic.EmissionModel(density: Unit('1 / cm3'), *args, emissivity_table_filename=None, **kwargs)[source]#

Bases: IonCollection

Model for what atomic data is used to calculate emissivity.

This model calculates line and continuum emissivity as a function of temperature, density (for line emission), and wavelength. In the case of line emission, emissivity is calculated once and then saved to a table to avoid repeating expensive level populations calculations.

Parameters:
  • density (Quantity) – Array of densities over which line emissivity is computed

  • args (Ion) – All remaining positional arguments are the ions comprising the emission model. These can also be elements or collections.

  • emissivity_table_filename (str or pathlike, optional) – Path to Zarr store for saving the emissivity calculations. If this file already exists, care should be taken to ensure that all input parameters are the same as the model that originally generated this file. If not specified, the emissivity table will be saved to the current directory using the id of this object.

  • kwargs (dict, optional) – Additional keyword arguments to be passed to fiasco.Ion.level_populations.

Attributes Summary

Methods Summary

build_emissivity_table()

Save line and continuum emissivity to a Zarr file.

calculate_narrowband_emissivity(ion, channel)

Calculate ion emissivity integrated over an instrument wavelength response function.

from_asdf(filename)

Restore EmissionModel instance from an ASDF file

get_continuum_emissivity(ion)

Get continuum (free-free and free-bound) emissivity of a particular ion.

get_line_emissivity(ion[, transition])

Get bound-bound emissivity for all lines of a particular ion.

to_asdf(filename)

Serialize an EmissionModel to an ASDF file

Attributes Documentation

emissivity_table_filename#

Methods Documentation

build_emissivity_table()[source]#

Save line and continuum emissivity to a Zarr file.

Calculate line and continuum emissivity as a function of wavelength, temperature, and density for each ion in the emission model to a Zarr file. It is not necessary to call this function as emissivities will be automatically calculated and stored as needed, but it may be convenient in some instances.

calculate_narrowband_emissivity(ion, channel)[source]#

Calculate ion emissivity integrated over an instrument wavelength response function.

Compute product between wavelength response \(R_c\) for channel (\(c\)) and emissivity for an ion of ionization stage \(k\) from element \(X\) in this emission model,

\[\epsilon_{c,X,k} = \sum_{\{ij\}_{X,k}}\epsilon_{ij}R_c(\lambda_{ij}) + \int\mathrm{d}\lambda\,R_c(\lambda)C(T,\lambda)\]

This emissivity includes bound-bound, free-free, and free-bound emission as a function of temperature and density.

Note

This explicitly does not include the temperature-dependent ionization fraction for each ion. The reason for excluding this here is that this quantity can, in principle, be time-dependent and thus must be evaluated for each strand.

Parameters:
Returns:

emissivity (Quantity) – Total emissivity as a function of temperature and density.

classmethod from_asdf(filename)[source]#

Restore EmissionModel instance from an ASDF file

get_continuum_emissivity(ion)[source]#

Get continuum (free-free and free-bound) emissivity of a particular ion.

The continuum emissivity in this case is given by,

\[C(T,\lambda) = \frac{n_H}{n_e}\mathrm{Ab}_X(C_{ff}(T,\lambda) + C_{fb}(T,\lambda))\frac{\lambda}{hc}\]

where \(C_{ff},C_{fb}\) are the free-free and free-bound emissivities of the ion as computed by fiasco.Ion.free_free and fiasco.Ion.free_bound, respectively.

Parameters:

ion (fiasco.Ion) – Ion for which to calculate the continuum emissivity

get_line_emissivity(ion, transition=None)[source]#

Get bound-bound emissivity for all lines of a particular ion.

Note

This first searches the Zarr store at emissivity_table_filename and if no emissivity is found, it is calculated. As such, the first time this is run for a given ion it may be slow, but will cache the result on subsequent calls.

In this case, the emissivity, as a function of density \(n\) and temperature \(T\), for a transition \(ij\) is defined as,

\[G_{ij}(n,T) = \frac{n_H}{n_e}\frac{1}{n_e}\mathrm{Ab}_X N_j(n,T) A_{ij}\]

where \(N_j\) is the level population of level \(j\) for a given ion of element \(X\). Note that this has units of \(\mathrm{s}^{-1}\). Note that this is effectively the contribution function without the ionization fraction. The goal of this function is to compute, per ion and as a function of wavelength, every quantity that is dependent on the atomic physics. The ionization fraction is not included here because it can, in principle, be time-dependent and thus must be calculated later using the results of the field-aligned model.

Parameters:
  • ion (fiasco.Ion) – Ion instance for which to compute bound-bound line emission.

  • transition (str, optional) – Optionally return only a single transition. The reason for having this is it is faster to read out the emissivity for just one transition rather than reading out the whole array and then slicing.

to_asdf(filename)[source]#

Serialize an EmissionModel to an ASDF file