-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Given the complexity of new models, I think moving to the YAML format will probably be worth doing as it provides far greater flexibility than configobj (Which is becoming very deprecated).
For example loading in 3D data, nesting models or replicating contributions or having generic dataloaders. It will also get rid of the need to build proxies (looking at @QuentChangeat here).
For example we can couple the temperature, planet and star to a fictional multimodel model that simulates a bunch of models simultaneously while giving them different chemistries:
globals:
xsec_path: $TAUREX_XSEC_PATH
cia_path: $TAUREX_CIA_PATH
shared:
sample_temperature:
type: temperature:array_temp
temperature_array: [300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500]
temperature_unit: K
sample_planet:
type: planet:planet
planet_radius: 1.0
planet_mass: 1.0
planet_sma: 1.0
sample_star:
type: star:blackbody
temperature: 5778
radius: 1.0
distance: 10.0
main_model:
type: model:multimodel
model_list:
- type: model:eclipse
temperature: sample_temperature
atm_min_pressure: 10
atm_max_pressure: 100
chemistry:
type: chemistry:free
fill_species: ['H2','He']
fill_ratio: 0.78
gases:
- type: gas:constant
molecule_name: H2O
mix_ratio: 1e-3
- type: gas:constant
molecule_name: CO2
mix_ratio: 1e-4
- type: gas:constant
molecule_name: CH4
mix_ratio: 1e-5
planet: sample_planet
star: sample_star
contributions:
- type: contribution:absorption
- type: contribution:cia
cia_pairs: ['H2-H2','H2-He']
- type: model:transit
temperature: sample_temperature
atm_min_pressure: 10
atm_max_pressure: 100
chemistry:
type: chemistry:free
fill_species: ['H2','He']
fill_ratio: 0.78
gases:
- type: gas:constant
molecule_name: CO2
mix_ratio: 1e-3
- type: gas:constant
molecule_name: NH3
mix_ratio: 1e-4
planet: sample_planet
star: sample_star
contributions:
- type: contribution:absorption
- type: contribution:cia
cia_pairs: ['H2-H2','H2-He']
- type: contribution:rayleigh
- type: contribution:clouds
In addition we can easily support environment variables so files can be shared between users.
Additionally since the YAML format converts to a dictionary it is easily integrated into the taurex factory system and we can still maintain compatibility with the old par format as well.