tardis.model.matter.composition module¶
- class tardis.model.matter.composition.Composition(density, nuclide_mass_fraction)[source]¶
 Bases:
objectHolds 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
 Number density of each element in each shell.
- 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_elemental_number_density(element_masses)[source]¶
 Elemental Number Density computed using the formula: (elemental_mass_fraction * density) / atomic mass
- 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)
- property elemental_mass_fraction¶
 
- property isotopic_mass_fraction¶
 
- property isotopic_number_density¶
 Isotopic Number Density computed using the formula: (isotopic_mass_fraction * density) / atomic mass