Skip to content

Commit

Permalink
Update docstring in geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
satwik-kambham committed Sep 13, 2022
1 parent 9226a83 commit b9142ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tardis/model/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ class Radial1DGeometry:
r_outer : astropy.units.quantity.Quantity
v_inner : astropy.units.quantity.Quantity
v_outer : astropy.units.quantity.Quantity
Attributes
----------
volume : astropy.units.quantity.Quantity
Volume in each shell
"""

def __init__(self, r_inner, r_outer, v_inner, v_outer):
Expand All @@ -44,6 +49,7 @@ def __init__(self, r_inner, r_outer, v_inner, v_outer):

@property
def volume(self):
"""Volume in shell computed from r_outer and r_inner"""
return (4.0 / 3) * np.pi * (self.r_outer**3 - self.r_inner**3)


Expand Down

0 comments on commit b9142ef

Please sign in to comment.