-
Notifications
You must be signed in to change notification settings - Fork 14
Added SANDee models #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Added SANDee models #161
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @efrain-alvarado-iii , I am a bit confused about the naming of the evolutionary models, what does each name mean? For example, [SAND_z-0.15_a0.15_age.txt], what does the z, a mean in the names? |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,10 @@ | |
|
|
||
| # A list of all supported evolutionary models | ||
| try: | ||
| EVO_MODELS = [os.path.basename(m).replace('.txt', '') for m in glob.glob(str(importlib.resources.files('sedkit')/ 'data/models/evolutionary/*'))] | ||
| EVO_MODELS = [os.path.basename(m).replace('.txt', '') for m in | ||
| glob.glob(str(importlib.resources.files('sedkit') / 'data/models/evolutionary/*.txt')) + | ||
| glob.glob(str(importlib.resources.files('sedkit') / 'data/models/evolutionary/SANDee/*.txt'))] | ||
|
|
||
| # Fails RTD build for some reason | ||
| except: | ||
| EVO_MODELS = ['COND03', 'dmestar_solar', 'DUSTY00', 'f2_solar_age', 'hybrid_solar_age', 'nc+03_age','nc+0.0_age', 'nc-03_age', 'nc_solar_age','nc+0.5_age','nc-0.5_age', 'parsec12_solar','ATMO_NEQ_strong','ATMO_NEQ_strong_MIRI','chaubrier_2022.txt'] | ||
|
|
@@ -54,7 +57,10 @@ def __init__(self, name, units=None, verbose=True, **kwargs): | |
|
|
||
| # Set the path | ||
| self.name = name | ||
| self.path = str(importlib.resources.files('sedkit')/ 'data/models/evolutionary/{}.txt').format(self.name) | ||
| self.path = str(importlib.resources.files('sedkit') / 'data/models/evolutionary/{}.txt').format(self.name) | ||
|
|
||
| if not os.path.exists(self.path): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should work, since all the checks are being passed, but I think we could possibly format the two attempts to get the path, instead of just having a if statement that is going to be true even if the evo model you attempt is not the Sandee nor the one's already added. Does that make sense? |
||
| self.path = str(importlib.resources.files('sedkit') / 'data/models/evolutionary/SANDee/{}.txt').format(self.name) | ||
| self._age_units = None | ||
| self._mass_units = None | ||
| self._radius_units = None | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not familiar with the values from the evo model, but are the first values for age supposed to be zero @efrain-alvarado-iii ?