tardis.io.model.readers.base module

tardis.io.model.readers.base.read_density_file(filename, filetype)[source]

read different density file formats

Parameters:
filenamestr

filename or path of the density file

filetypestr

type of the density file

Returns:
time_of_modelastropy.units.Quantity

time at which the model is valid

velocitynp.ndarray

the array containing the velocities

unscaled_mean_densitiesnp.ndarray

the array containing the densities

electron_densitiesnp.ndarray

The array containing electron densities

temperaturenp.ndarray

The array containing temperatures

tardis.io.model.readers.base.read_mass_fractions_file(mass_fractions_filename, mass_fractions_filetype, inner_boundary_index=None, outer_boundary_index=None)[source]

read different density file formats

Parameters:
mass_fractions_filenamestr

filename or path of the density file

mass_fractions_filetypestr

type of the density file

inner_boundary_indexint

index of the inner shell, default None

outer_boundary_indexint

index of the outer shell, default None