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 N + 1 shell-boundary velocities
- unscaled_mean_densitiesnp.ndarray
the array containing the N shell densities
- electron_densitiesnp.ndarray
The array containing the N shell electron densities
- temperaturenp.ndarray
The array containing the N shell temperatures
Notes
Every supported file type stores one row per velocity edge. The first row’s velocity is the inner edge of the innermost shell, and the cell values in that row are discarded by the file parsers. See Tabular Inputs and the Leading Row.
- tardis.io.model.readers.base.read_mass_fractions_file(mass_fractions_filename, mass_fractions_filetype, inner_boundary_idx=None, outer_boundary_idx=None, density_filename=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_idxint
index of the inner shell, default None
- outer_boundary_idxint
index of the outer shell, default None
- density_filenamestr or pathlib.Path
Matching density file. Required for ARTIS isotope mass fractions, which are stored in the ARTIS density file.