tardis.io.model.readers.cmfgen_deprecated module

tardis.io.model.readers.cmfgen_deprecated.read_cmfgen_composition(fname, delimiter='\\s+')[source]

Read composition from a CMFGEN model file

The CMFGEN file format contains information about the ejecta state in the first four columns and the following ones contain elemental and isotopic abundances.

WARNING : deprecated

fnamestr

filename of the csv file

tardis.io.model.readers.cmfgen_deprecated.read_cmfgen_density(fname: str)[source]

Reading a density file of the following structure (example; lines starting with a hash will be ignored): The first density describes the mean density in the center of the model and is not used. The file consists of a header row and next row contains unit of the respective attributes Note that the first column has to contain a running index

Example:

index velocity densities electron_densities temperature - km/s g/cm^3 /cm^3 K 0 871.66905 4.2537191e-09 2.5953807e+14 7.6395577 1 877.44269 4.2537191e-09 2.5953807e+14 7.6395577

Rest columns contain abundances of elements and isotopes

Parameters:
fnamestr

filename or path with filename

Returns:
time_of_modelastropy.units.Quantity

time at which the model is valid

velocitynp.ndarray
mean_densitynp.ndarray
electron_densitiesnp.ndarray
temperaturenp.ndarray