This notebook is available at https://github.com/tardis-sn/tardis/tree/master/docs/io/configuration/read_configuration.ipynb
Reading the Configuration FilesΒΆ
[4]:
from tardis.io.config_reader import Configuration
The configuration can be read this way. It will be validated by the json-schema schemas (including filling out default configuration options that had not been specified).
[14]:
conf = Configuration.from_yaml('tardis_example.yml')
Despite the very simple nature of tardis_example.yml, the output does contain all the default values
[18]:
conf.plasma
[18]:
{'disable_electron_scattering': False,
'excitation': 'lte',
'heating_rate_data_file': 'none',
'helium_treatment': 'none',
'initial_t_inner': <Quantity -1.0 K>,
'initial_t_rad': <Quantity -1.0 K>,
'ionization': 'lte',
'line_interaction_type': 'macroatom',
'nlte': {'classical_nebular': False,
'coronal_approximation': False,
'species': []},
'radiative_rates_type': 'dilute-blackbody',
'w_epsilon': 1e-10}
[ ]: