tardis.io.atom_data.base module

class tardis.io.atom_data.base.AtomData(atom_data, ionization_data, levels=None, lines=None, macro_atom_data=None, macro_atom_references=None, zeta_data=None, collision_data=None, collision_data_temperatures=None, synpp_refs=None, photoionization_data=None, yg_data=None, two_photon_data=None, linelist=None, decay_radiation_data=None)[source]

Bases: object

Class for storing atomic data

Parameters:
atom_datapandas.DataFrame
A DataFrame containing the *basic atomic data* with:

index : atomic_number columns : symbol, name, mass[u].

ionization_datapandas.DataFrame
A DataFrame containing the *ionization data* with:

index : atomic_number, ion_number columns : ionization_energy[eV].

It is important to note here is that `ion_number` describes the *final ion state*
e.g. H I - H II is described with ion=1
levelspandas.DataFrame
A DataFrame containing the *levels data* with:

index : numerical index columns : atomic_number, ion_number, level_number, energy[eV], g[1], metastable.

linespandas.DataFrame
A DataFrame containing the *lines data* with:

index : numerical index columns : line_id, atomic_number, ion_number, level_number_lower, level_number_upper, wavelength[angstrom], nu[Hz], f_lu[1], f_ul[1], B_ul[?], B_ul[?], A_ul[1/s].

macro_atom_data
A DataFrame containing the *macro atom data* with:

index : numerical index columns : atomic_number, ion_number, source_level_number, destination_level_number, transition_line_id, transition_type, transition_probability;

macro_atom_references
A DataFrame containing the *macro atom references* with:

index : numerical index columns : atomic_number, ion_number, source_level_number, count_down, count_up, count_total.

Refer to the docs: http://tardis.readthedocs.io/en/latest/physics/plasma/macroatom.html
collision_data(pandas.DataFrame, np.array)
A DataFrame containing the *electron collisions data* with:

index : atomic_number, ion_number, level_number_lower, level_number_upper columns : e_col_id, delta_e, g_ratio, c_ul;

collision_data_temperaturesnp.array

An array with the collision temperatures.

zeta_data
A DataFrame containing the *zeta data* for the
nebular ionization calculation
(i.e., the fraction of recombinations that go directly to the
ground state) with:

index : atomic_number, ion_charge columns : temperatures[K]

synpp_refs?
photoionization_datapandas.DataFrame
A DataFrame containing the *photoionization data* with:

index : numerical index columns : atomic_number, ion_number, level_number, nu[Hz], x_sect[cm^2]

two_photon_datapandas.DataFrame
A DataFrame containing the *two photon decay data* with:

index: atomic_number, ion_number, level_number_lower, level_number_upper columns: A_ul[1/s], nu0[Hz], alpha, beta, gamma

decay_radiation_datapandas.DataFrame
A dataframe containing the *decay radiation data* with:

index: Isotope names columns: atomic_number, element, Rad energy, Rad intensity decay mode. Curated from nndc

Notes

  1. The units of some columns are given in the square brackets. They are NOT the parts of columns’ names!

Attributes:
preparedbool
atom_datapandas.DataFrame
ionization_datapandas.DataFrame
macro_atom_data_allpandas.DataFrame
macro_atom_references_allpandas.DataFrame
collision_datapandas.DataFrame
collision_data_temperaturesnumpy.array
zeta_datapandas.DataFrame
synpp_refspandas.DataFrame
symbol2atomic_numberOrderedDict
atomic_number2symbolOrderedDict
photoionization_datapandas.DataFrame
two_photon_datapandas.DataFrame
decay_radiation_datapandas.DataFrame

Methods

from_hdf:

Function to read the atom data from a TARDIS atom HDF Store

prepare_atom_data:

Prepares the atom data to set the lines, levels and if requested macro atom data. This function mainly cuts the levels and lines by discarding any data that is not needed (any data for atoms that are not needed

classmethod from_hdf(fname=None)[source]

Function to read the atom data from a TARDIS atom HDF Store

Parameters:
fnamePath, optional

Path to the HDFStore file or name of known atom data file (default: None)

hdf_names = ['atom_data', 'ionization_data', 'levels', 'lines', 'macro_atom_data', 'macro_atom_references', 'zeta_data', 'collision_data', 'collision_data_temperatures', 'synpp_refs', 'photoionization_data', 'yg_data', 'two_photon_data', 'linelist', 'decay_radiation_data']
prepare_atom_data(selected_atomic_numbers, line_interaction_type, nlte_species, continuum_interaction_species)[source]

Prepares the atom data to set the lines, levels and if requested macro atom data. This function mainly cuts the levels and lines by discarding any data that is not needed (any data for atoms that are not needed

Parameters:
selected_atomsset

set of selected atom numbers, e.g. set([14, 26])

line_interaction_typestr

can be ‘scatter’, ‘downbranch’ or ‘macroatom’

prepare_continuum_interaction_data(continuum_interaction_species)[source]

Prepares the atom data for the continuum interaction

Parameters:
continuum_interactionContinuumInteraction

The continuum interaction object

prepare_macro_atom_data(line_interaction_type, tmp_lines_lower2level_idx, tmp_lines_upper2level_idx)[source]
related_groups = [('macro_atom_data_all', 'macro_atom_references_all'), ('collision_data', 'collision_data_temperatures')]
exception tardis.io.atom_data.base.AtomDataMissingError[source]

Bases: Exception

exception tardis.io.atom_data.base.AtomDataNotPreparedError[source]

Bases: Exception

class tardis.io.atom_data.base.NLTEData(atom_data, nlte_species)[source]

Bases: object

get_collision_matrix(species, t_electrons)[source]

Creat collision matrix by interpolating the C_ul values for the desired temperatures.