tardis.io.model.density module¶
- tardis.io.model.density.calculate_density_after_time(densities: Quantity, time_0: Quantity, time_explosion: Quantity) Quantity [source]¶
scale the density from an initial time of the model to the time of the explosion by ^-3
- Parameters:
- densitiesastropy.units.Quantity
densities
- time_0astropy.units.Quantity
time of the model
- time_explosionastropy.units.Quantity
time to be scaled to
- Returns:
- scaled_densityastropy.units.Quantity
in g / cm^3
- tardis.io.model.density.calculate_exponential_density(velocities, velocity_0, rho_0)[source]¶
This function computes the exponential density profile. \(\rho = \rho_0 \times \exp \left( -\frac{v}{v_0} \right)\)
- Parameters:
- velocitiesastropy.Quantity
Array like velocity profile
- velocity_0astropy.Quantity
reference velocity
- rho_0astropy.Quantity
reference density
- Returns:
- densitiesastropy.Quantity
- tardis.io.model.density.calculate_power_law_density(velocities, velocity_0, rho_0, exponent)[source]¶
This function computes a descret exponential density profile. \(\rho = \rho_0 \times \left( \frac{v}{v_0} \right)^n\)
- Parameters:
- velocitiesastropy.Quantity
Array like velocity profile
- velocity_0astropy.Quantity
reference velocity
- rho_0astropy.Quantity
reference density
- exponentfloat
exponent used in the powerlaw
- Returns:
- densitiesastropy.Quantity
- tardis.io.model.density.parse_config_v1_density(config: Configuration) Quantity [source]¶
Create a new HomologousDensity instance from a Configuration object.
- Parameters:
- configtardis.io.config_reader.Configuration
- Returns:
- HomologousDensity
- tardis.io.model.density.parse_csvy_density(csvy_model_config, time_explosion: Quantity)[source]¶
Create a new HomologousDensity instance from a base Configuration object and a csvy model Configuration object.
- Parameters:
- configtardis.io.config_reader.Configuration
- csvy_model_configtardis.io.config_reader.Configuration
- Returns:
- HomologousDensity
- tardis.io.model.density.parse_density_section(density_configuration: Configuration, v_middle: Quantity, time_explosion: Quantity)[source]¶