forked from tardis-sn/stardis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup and rename cell length (tardis-sn#100)
* add functionality to read not gzipped files to marcs reader * remove WIP for geometry that would break the reader Co-authored-by: Jing Lu <[email protected]> Co-authored-by: Yuki Matsumura <[email protected]> Co-authored-by: 饒孝節 <[email protected]> * Co-authored-by: Jing Lu <[email protected]> Co-authored-by: Yuki Matsumura <[email protected]> Co-authored-by: 饒孝節 <[email protected]> * Change documentation and names of "cells" * change radial1d.py mentions of cell to depth point --------- Co-authored-by: Jing Lu <[email protected]> Co-authored-by: Yuki Matsumura <[email protected]> Co-authored-by: 饒孝節 <[email protected]> Co-authored-by: Sona Chitchyan <[email protected]>
- Loading branch information
1 parent
ea93b48
commit 4ab24a4
Showing
2 changed files
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
class Radial1DGeometry: | ||
|
||
""" | ||
Holds information about model geometry for radial 1D models. | ||
Holds information about model geometry (distribution of depth points) for radial 1D models. | ||
Parameters | ||
---------- | ||
r : astropy.units.quantity.Quantity | ||
The spacial coordinate of the depth point | ||
---------- | ||
Attributes | ||
---------- | ||
cell_length : astropy.units.quantity.Quantity | ||
Length in each shell | ||
dist_to_next_depth_point : astropy.units.quantity.Quantity | ||
distance to the next depth point | ||
""" | ||
|
||
def __init__(self, r): | ||
self.r = r | ||
|
||
@property | ||
def cell_length(self): | ||
# NEED TO CHANGE THE NAME!! | ||
def dist_to_next_depth_point(self): | ||
return self.r[1:] - self.r[:-1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters