tardis.opacities.tau_sobolev module¶
- class tardis.opacities.tau_sobolev.BetaSobolev(plasma_parent)[source]¶
Bases:
ProcessingPlasmaProperty
- Attributes:
- beta_sobolevNumpy Array, dtype float
- latex_name = ('\\beta_{\\textrm{sobolev}}',)¶
- outputs = ('beta_sobolev',)¶
- class tardis.opacities.tau_sobolev.TauSobolev(plasma_parent)[source]¶
Bases:
ProcessingPlasmaProperty
- Attributes:
- tau_sobolevPandas DataFrame, dtype float
Sobolev optical depth for each line. Indexed by line. Columns as zones.
- calculate(lines, level_number_density, time_explosion, stimulated_emission_factor)[source]¶
Calculate Sobolev line opacity.
Calculates the Sobolev line opacity based on the provided parameters.
- Parameters:
- linespandas.DataFrame
DataFrame containing information about spectral lines.
- level_number_densitypandas.DataFrame
DataFrame with level number densities.
- time_explosionastropy.units.Quantity
Time since explosion.
- stimulated_emission_factorfloat
Factor for stimulated emission.
- Returns:
- pandas.DataFrame
Calculated Sobolev line opacity values.
- Raises:
- ValueError
If any calculated tau_sobolevs are nan or inf.
- latex_formula = ('\\dfrac{\\pi e^{2}}{m_{e} c}f_{lu}\\lambda t_{exp}\\\n n_{lower} \\Big(1-\\dfrac{g_{lower}n_{upper}}{g_{upper}n_{lower}}\\Big)',)¶
- latex_name = ('\\tau_{\\textrm{sobolev}}',)¶
- outputs = ('tau_sobolevs',)¶
- tardis.opacities.tau_sobolev.calculate_beta_sobolev(tau_sobolevs)[source]¶
Calculate the beta Sobolev values based on the provided tau_sobolevs. Values from the previous iteration can be provided.
- Parameters:
- tau_sobolevspd.DataFrame
Tau Sobolev opacities.
- Returns:
- pd.DataFrame
The latest Beta Sobolev opacities.
- tardis.opacities.tau_sobolev.calculate_sobolev_line_opacity(lines, level_number_density, time_explosion, stimulated_emission_factor)[source]¶
Calculates the Sobolev line opacity based on the provided parameters.
- Parameters:
- linespandas.DataFrame
DataFrame containing information about spectral lines.
- level_number_densitypandas.DataFrame
DataFrame with level number densities.
- time_explosionastropy.units.Quantity
Time since explosion.
- stimulated_emission_factorfloat
Factor for stimulated emission.
- Returns:
- pandas.DataFrame
Calculated Sobolev line opacity values.
- Raises:
- ValueError
If any calculated tau_sobolevs are nan or inf.
Examples
>>> calculate_sobolev_line_opacity(lines_data, level_density_data, time_exp, stim_factor)