diff --git a/species/data/model_data.json b/species/data/model_data.json index 5a054756..1e01afd5 100644 --- a/species/data/model_data.json +++ b/species/data/model_data.json @@ -55,7 +55,7 @@ "reference": "Phillips et al. (2020)", "url": "https://ui.adsabs.harvard.edu/abs/2020A%26A...637A..38P/abstract" }, - "petrus2023": { + "atmo-petrus2023": { "parameters": ["teff", "logg", "feh", "c_o_ratio", "ad_index"], "name": "ATMO (Petrus et al. 2023)", "file size": "2.1 GB", @@ -212,6 +212,26 @@ "reference": "Mollière et al. (2015)", "url": "https://ui.adsabs.harvard.edu/abs/2015ApJ...813...47M/abstract" }, + "petitcode-linder2019-clear": { + "parameters": ["teff", "logg", "feh"], + "name": "petitCODE (Linder et al. 2019)", + "file size": "225 MB", + "wavelength range": [0.1, 250], + "resolution": 1000, + "teff range": [150, 1000], + "reference": "Linder et al. (2019)", + "url": "https://ui.adsabs.harvard.edu/abs/2019A%26A...623A..85L/abstract" + }, + "petitcode-linder2019-cloudy": { + "parameters": ["teff", "logg", "feh", "fsed"], + "name": "petitCODE hot cloudy", + "file size": "1.4 GB", + "wavelength range": [0.1, 250], + "resolution": 1000, + "teff range": [150, 1000], + "reference": "Linder et al. (2019)", + "url": "https://ui.adsabs.harvard.edu/abs/2019A%26A...623A..85L/abstract" + }, "saumon2008-clear": { "parameters": ["teff", "logg"], "name": "Saumon & Marley (2008) clear", diff --git a/species/read/read_isochrone.py b/species/read/read_isochrone.py index 0793058c..c5896ea4 100644 --- a/species/read/read_isochrone.py +++ b/species/read/read_isochrone.py @@ -133,11 +133,40 @@ def __init__( "atmo-neq-strong": "atmo-neq-strong", "atmo-neq-weak": "atmo-neq-weak", "bt-settl": "bt-settl", + "linder2019-petitCODE-metal_-0.4": "petitcode-linder2019-clear", + "linder2019-petitCODE-metal_0.0": "petitcode-linder2019-clear", + "linder2019-petitCODE-metal_0.4": "petitcode-linder2019-clear", + "linder2019-petitCODE-metal_0.8": "petitcode-linder2019-clear", + "linder2019-petitCODE-metal_1.2": "petitcode-linder2019-clear", + "linder2019-petitCODE-metal_-0.4-fsed_1.0": "petitcode-linder2019-cloudy", + "linder2019-petitCODE-metal_0.0-fsed_1.0": "petitcode-linder2019-cloudy", + "linder2019-petitCODE-metal_0.4-fsed_1.0": "petitcode-linder2019-cloudy", + "linder2019-petitCODE-metal_0.8-fsed_1.0": "petitcode-linder2019-cloudy", + "linder2019-petitCODE-metal_1.2-fsed_1.0": "petitcode-linder2019-cloudy", "saumon2008-nc_solar": "saumon2008-clear", "saumon2008-f2_solar": "saumon2008-cloudy", "sonora+0.0": "sonora-bobcat", } + # Set attribute with extra parameters + # The attribute will be overwritten by any of + # the methods that have the extra_param parameter + + self.extra_param = None + + if self.tag.split("-")[0] == "linder2019": + self.extra_param = {} + tag_split = self.tag.split("_") + + if len(tag_split) == 2: + self.extra_param['feh'] = float(tag_split[1]) + + elif len(tag_split) == 3: + self.extra_param['feh'] = float(tag_split[1][:-5]) + self.extra_param['fsed'] = float(tag_split[2]) + + print(f"Setting 'extra_param' attribute: {self.extra_param}") + @typechecked def _read_data( self, @@ -385,6 +414,9 @@ def _update_param( the evolutionary model. """ + if len(extra_param) == 0 and self.extra_param is not None: + extra_param = self.extra_param.copy() + for key, value in param_bounds.items(): if key not in model_param: if key in extra_param: diff --git a/species/read/read_model.py b/species/read/read_model.py index 73d917e2..e4007d00 100644 --- a/species/read/read_model.py +++ b/species/read/read_model.py @@ -148,7 +148,7 @@ def open_database(self) -> h5py._hl.files.File: "If this does not work (e.g. currently without an " "internet connection) then please use the " "'add_model' method of 'Database' to add the " - "grid of spectra yourself." + "grid of spectra at a later moment." ) species_db = database.Database() diff --git a/species/util/plot_util.py b/species/util/plot_util.py index c886ab96..43506916 100644 --- a/species/util/plot_util.py +++ b/species/util/plot_util.py @@ -879,6 +879,9 @@ def convert_model_name(in_name: str) -> str: elif in_name == "petrus2023": out_name = "ATMO (Petrus et al. 2023)" + elif in_name == "atmo-petrus2023": + out_name = "ATMO (Petrus et al. 2023)" + elif in_name == "bt-cond": out_name = "BT-Cond" @@ -895,16 +898,22 @@ def convert_model_name(in_name: str) -> str: out_name = "BT-NextGen" elif in_name == "petitcode-cool-clear": - out_name = "petitCODE" + out_name = "petitCODE clear" elif in_name == "petitcode-cool-cloudy": - out_name = "petitCODE" + out_name = "petitCODE cloudy" elif in_name == "petitcode-hot-clear": - out_name = "petitCODE" + out_name = "petitCODE clear" elif in_name == "petitcode-hot-cloudy": - out_name = "petitCODE" + out_name = "petitCODE cloudy" + + elif in_name == "petitcode-linder2019-clear": + out_name = "petitCODE clear (Linder et al. 2019)" + + elif in_name == "petitcode-linder2019-cloudy": + out_name = "petitCODE cloudy (Linder et al. 2019)" elif in_name == "exo-rem": out_name = "Exo-REM"