Skip to content

Commit

Permalink
Added atomic mass unit as a keyword argument
Browse files Browse the repository at this point in the history
  • Loading branch information
satwik-kambham committed Aug 8, 2022
1 parent d386a88 commit 41e5eca
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tardis/model/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,24 @@ class Composition:
An array of densities for each shell.
isotopic_mass_fraction : pd.DataFrame
atomic_mass : pandas.core.series.Series
atomic_mass_unit: astropy.units.Unit
Attributes
----------
number_density : pd.DataFrame
Number density of each isotope in each shell.
"""

def __init__(self, density, elemental_mass_fraction, atomic_mass):
def __init__(
self,
density,
elemental_mass_fraction,
atomic_mass,
atomic_mass_unit=u.g,
):
self.density = density
self.elemental_mass_fraction = elemental_mass_fraction
self.atomic_mass_unit = u.g
self.atomic_mass_unit = atomic_mass_unit
self.atomic_mass = atomic_mass

@property
Expand Down

0 comments on commit 41e5eca

Please sign in to comment.