You can interact with this notebook online: Launch notebook

How to Read CMFGEN models with TARDISΒΆ

[1]:
from tardis.io.model import read_cmfgen_model
[2]:
cmfgen_model = read_cmfgen_model('cmfgen_model.csv')
[3]:
cmfgen_model.data
[3]:
velocity temperature densities electron_densities c o mg si ni56 ni58
0
0 871.66905 76395.577 4.253719e-09 2.600000e+14 0.0 0.0 0.0 0.6 0.4 0.0
1 877.44269 76395.577 4.253719e-09 2.600000e+14 0.0 0.0 0.0 0.1 0.5 0.4
2 894.99407 76395.631 4.253719e-09 2.600000e+14 0.0 0.0 0.0 0.3 0.0 0.7
3 931.15710 76396.057 4.253719e-09 2.600000e+14 0.0 0.2 0.8 0.0 0.0 0.0
4 990.30752 76399.042 4.253727e-09 2.600000e+14 0.0 0.3 0.7 0.0 0.0 0.0
5 1050.86760 76411.983 4.253954e-09 2.600000e+14 0.0 0.2 0.8 0.0 0.0 0.0
6 1115.15450 76459.592 4.256360e-09 2.600000e+14 0.0 0.2 0.8 0.0 0.0 0.0
7 1183.37410 76633.367 4.268308e-09 2.610000e+14 0.0 0.2 0.8 0.0 0.0 0.0
8 1255.76700 77312.120 4.290997e-09 2.640000e+14 0.5 0.5 0.0 0.0 0.0 0.0
9 1332.58860 79602.375 4.339684e-09 2.720000e+14 0.5 0.5 0.0 0.0 0.0 0.0
[4]:
cmfgen_model.metadata
[4]:
{'t0': <Quantity 0.976 d>,
 'velocity_unit': Unit("km / s"),
 'temperature_unit': Unit("K"),
 'densities_unit': Unit("g / cm3"),
 'electron_densities_unit': Unit("1 / cm3")}
[ ]: