Reading the Configuration Files


In [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).


In [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


In [18]:
conf.plasma


Out[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}

In [ ]: