Repository navigation
Conversation
| np.log10(9.0e9), | ||
| np.log10(15.0e9), | ||
| ]) | ||
| age_list = np.array(sorted(set(regular_ages) | set(exact_ages))) |
There was a problem hiding this comment.
What is the exact_ages thing doing?
| # The mass sampling varies with age, so there is no single exact list. | ||
| mass_list = [] | ||
|
|
||
| if model_dir is None: |
There was a problem hiding this comment.
If models_dir is none, the code is not going to be able to find the models. We warn at the top of this code if that is the case that things won't work, so we don't have to have checks for it on each individual model
There was a problem hiding this comment.
I took out the extra check for the models_dir. the "if model_dir is None" is for the optional directory argument. if there is none provided, then it uses the normal grid location. I'm happy to remove that as well though if you would prefer having this model always use the standard file location.
| mass_list, | ||
| z_list, | ||
| ) | ||
| self.model_version_name = ( |
There was a problem hiding this comment.
Does this make it a tuple? It needs to be a string
| 'MergedFlameSkimmerRedDiamondbackMIST' | ||
| ) | ||
| self.z_solar = 0.0142 | ||
| self.metallicity_list = np.array( |
There was a problem hiding this comment.
This already got defined above
| def __init__(self, model_dir=None): | ||
| self.z_solar = 0.0142 | ||
| self.metallicity_list = np.array( | ||
| [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5], dtype=float |
There was a problem hiding this comment.
Were you able to get the lower metallicity isochrones generated? I think they may be in the files but just not here
|
|
||
| @staticmethod | ||
| def _isochrone_filename(log_age): | ||
| if np.isclose(log_age, np.log10(9.0e9), rtol=0.0, atol=1.0e-8): |
There was a problem hiding this comment.
What are these special cases for? I can see the one being the max age possible, though I don't think MIST goes that far. It's not clear what the other one is for
| return Table.read(full_iso_file, format='fits') | ||
|
|
||
| @staticmethod | ||
| def _standardize_proxy_component(frame, model_ref): |
There was a problem hiding this comment.
Ok, I think I see now why the metallicity values did not go to lower values before. I think a cleaner way to handle this would be to derive the merged atmospheres for low metallicity MIST and -1.0 BDs in advance and just have them in the pre-computed grids. This will allow for much faster loading of them in things like synthpop.
There was a problem hiding this comment.
Then they can just be handled the same way as the -1.0 metallicity and up
| ensure a smooth transition. | ||
| """ | ||
|
|
||
| if metallicity < -1.0 and temperature < 5000: |
There was a problem hiding this comment.
The phoenix models only go down to 2300 (I think that's the right number). We should include a check for logg, and if the object is a dwarf (within/near the logg range in sonora), we should just use the lowest metallicity Sonora model available. But, if the object is a giant (lower logg), then we'll need to go with phoenix.
There was a problem hiding this comment.
So, maybe this works by just making a logg check here instead of metallicity
| # gravity=gravity) | ||
|
|
||
|
|
||
| def get_merged_atmosphere_atlas_phoenix_sonora_grid(rebin=True): |
There was a problem hiding this comment.
This will probably need adjusted for the logg dependence when that's done
| sp = stsyn.grid_to_spec(atm_model_name, temperature, metallicity, | ||
| gravity) | ||
| except Exception as original_error: | ||
| # Do not use get_atmosphere_bounds() here: its generic fallback snaps |
There was a problem hiding this comment.
Is there a physical reason for this change?
|
|
||
| def _atmosphere_grid_supports_request(model_dir, metallicity, temperature, | ||
| gravity): | ||
| """Return True only when a grid covers the request without clipping. |
There was a problem hiding this comment.
I think a lot of this stuff can probably be eliminated by putting the logg check in the get_merged_atmosphere... function for simplicity/speed
| @@ -18,13 +17,21 @@ def test_evo_model_grid_num(): | |||
|
|
|||
| def test_evolution_models(): | |||
| """ | |||
| Test to make sure the different evolution models work | |||
| Check each installed evolution model returns nonempty finite core fields | |||
There was a problem hiding this comment.
Honestly I can't parse this comment. Can you clarify it or just put it back to what it was before?
|
|
||
| # Array of metallicities for the specific evolution models to test | ||
| metal_vals = [metal_range, metal_solar, metal_solar, metal_solar, metal_solar, metal_solar, metal_solar, metal_Marley, metal_solar] | ||
| metal_vals = [metal_range, metal_solar, metal_solar, metal_solar, metal_solar, metal_solar, metal_solar, metal_Marley, metal_solar, | ||
| evo_models[-1].metallicity_list] |
There was a problem hiding this comment.
I suggest not using the model object to keep this consistent with the others
| @@ -169,7 +184,15 @@ def test_COSMIC_get_kick_differential(): | |||
|
|
|||
| def test_atmosphere_models(): | |||
| """ | |||
| Test the rebinned atmosphere models used for synthetic photometry | |||
| Check every installed atmosphere returns finite, nonnegative, nonzero | |||
There was a problem hiding this comment.
This includes a weird amount of detail about your new model, not the others, which isn't a huge deal, but may be confusing for a reader later trying to understand whether it tests all models.
There was a problem hiding this comment.
restored and refined, let me know if its still too much
|
|
||
| rebin: boolean | ||
| If true, rebins the atmospheres so that they are the same | ||
| resolution as the Castelli+04 atmospheres. Default is False, | ||
| resolution as the Castelli+04 atmospheres. Default is True, |
There was a problem hiding this comment.
Did this change or was it a documentation error before?
|
|
||
| def get_merged_atmosphere_atlas_phoenix_sonora(metallicity=0, temperature=20000, | ||
| gravity=4.5, verbose=False, rebin=True): | ||
| """Choose Flame, PHOENIX or ATLAS using temperature and log(g) in cgs. |
There was a problem hiding this comment.
super small thing, but we should say FlameSkimmer instead of Flame for clarity/consistency
No description provided.