tardis.io.model.csvy.writers module
Writers for CSVY model files.
- tardis.io.model.csvy.writers.write_csvy(path: str | Path, density_t_0: Quantity, isotope_t_0: Quantity, velocity: Quantity, density: Quantity, abundance: DataFrame, elements: list[str], overwrite: bool = False) Path[source]
Write a CSVY model file.
- Parameters:
- pathstr or pathlib.Path
Output path. The
.csvysuffix is added or replaced.- density_t_0astropy.units.Quantity
Initial time for the density model.
- isotope_t_0astropy.units.Quantity
Initial time for isotope decay.
- velocityastropy.units.Quantity
Shell boundary velocities.
- densityastropy.units.Quantity
Shell densities.
- abundancepandas.DataFrame
Abundance values indexed by shell and species.
- elementslist of str
Species names corresponding to the abundance columns.
- overwritebool, optional
Whether to overwrite an existing file. Defaults to False.
- Returns:
- pathlib.Path
The path of the written CSVY file.
- Raises:
- FileExistsError
If the output exists and
overwriteis False.