tardis.model.matter.composition module

class tardis.model.matter.composition.Composition(density, nuclide_mass_fraction, raw_isotope_abundance, element_masses, element_masses_unit=Unit('g'))[source]

Bases: object

Holds information about model composition

Parameters:
densityastropy.units.quantity.Quantity

An array of densities for each shell.

isotopic_mass_fractionpd.DataFrame
raw_isotope_abundancepd.DataFrame
atomic_masspd.DataFrame
atomic_mass_unit: astropy.units.Unit
Attributes:
atomic_masspd.DataFrame

Atomic mass of elements calculated for each shell.

elemental_number_densitypd.DataFrame

Elemental Number Density computed using the formula: (elemental_mass_fraction * density) / atomic mass

assemble_isotope_masses()[source]
calculate_cell_masses(volume)[source]

Calculate the cell masses.

Parameters:
volumeastropy.units.quantity.Quantity
The volume of the cell.
Returns:
astropy.units.quantity.Quantity
An array of cell masses.

Examples

>>> composition.calculate_cell_masses(10 * u.cm**3)
calculate_elemental_cell_masses(volume)[source]

Calculate the elemental cell masses.

Parameters:
volumeastropy.units.quantity.Quantity
The volume of the cell.
Returns:
numpy.ndarray
An array of elemental cell masses.

Examples

>>> composition.calculate_cell_masses(10 * u.cm**3)
calculate_mass_fraction_at_time(time_explosion)[source]

Calculate the mass fraction at a given time using the radioactive decay from the IsotopicMassFraction.

Parameters:
time_explosionastropy.units.quantity.Quantity

The time of the explosion.

Returns:
None

Examples

>>> composition.calculate_mass_fraction_at_time(10 * u.s)
static convert_element2nuclide_index(element_index)[source]
property effective_element_masses
property element_masses

Atomic mass of elements in each shell

property elemental_mass_fraction
property elemental_number_density

Elemental Number Density computed using the formula: (elemental_mass_fraction * density) / atomic mass

property isotopic_mass_fraction
property isotopic_number_density

Isotopic Number Density computed using the formula: (isotopic_mass_fraction * density) / atomic mass

tardis.model.matter.composition.compile_rd_isotope_masses()[source]

Compiles the masses of isotopes from the default data in RD_DEFAULT_DATA.

Parameters:
None
Returns:
pandas.Series

A series containing the masses of isotopes, indexed by atomic number and mass number.