tardis.montecarlo.montecarlo_numba.opacities module¶
- tardis.montecarlo.montecarlo_numba.opacities.calculate_tau_electron(electron_density, distance)[source]¶
Calculate tau for Thomson scattering
- Parameters
- electron_densityfloat
- distancefloat
- Returns
- tau_electronfloat
tau for thomson scattering
- tardis.montecarlo.montecarlo_numba.opacities.chi_bf_interpolator(numba_plasma, nu, shell)[source]¶
Interpolate the bound-free opacity.
This function interpolates the tabulated bound-free opacities and cross-sections to new frequency values
nu
.- Parameters
- numba_plasmaNumbaPlasma
- nufloat, dtype float
Comoving frequency of the r-packet.
- shellint, dtype float
Current computational shell.
- Returns
- chi_bf_totfloat
Total bound-free opacity at frequency
nu
.- chi_bf_contributionsnumpy.ndarray, dtype float
Cumulative distribution function of the contributions of the individual bound free continua to the total bound-free opacity.
- current_continuanumpy.ndarray, dtype int
Continuum ids for which absorption is possible for frequency
nu
.- x_sect_bfsnumpy.ndarray, dtype float
Photoionization cross-sections of all bound-free continua for which absorption is possible for frequency
nu
.
- tardis.montecarlo.montecarlo_numba.opacities.chi_continuum_calculator(numba_plasma, nu, shell)[source]¶
- Returns
- chi_bf_totfloat
Total bound-free opacity at frequency
nu
.- chi_bf_contributionsnumpy.ndarray, dtype float
Cumulative distribution function of the contributions of the individual bound free continua to the total bound-free opacity.
- current_continuanumpy.ndarray, dtype int
Continuum ids for which absorption is possible for frequency
nu
.- x_sect_bfsnumpy.ndarray, dtype float
Photoionization cross-sections of all bound-free continua for which absorption is possible for frequency
nu
.- chi_fffloat64
Free Free opacity at frequency
nu
- Attributes
- numba_plasmaNumbaPlasma
- nufloat64
Comoving frequency of the r_packet
- shellint64
Current shell id of the r_packet
- tardis.montecarlo.montecarlo_numba.opacities.chi_electron_calculator(numba_plasma, nu, shell)[source]¶
Calculate chi for Thomson scattering
- Parameters
- numba_plasmaNumbaPlasma
- nufloat
Comoving frequency of the r-packet.
- shellint
Shell of current r_packet
- Returns
- numpy.ndarray, dtype int
Continuum ids for which absorption is possible for frequency
nu
.
- tardis.montecarlo.montecarlo_numba.opacities.chi_ff_calculator(numba_plasma, nu, shell)[source]¶
- Returns
- chi_fffloat64
Free Free opacity
- Attributes
- numba_plasmaNumbaPlasma
- nufloat64
Comoving frequency of the r_packet
- shellint64
Current shell id of the r_packet
- tardis.montecarlo.montecarlo_numba.opacities.get_current_bound_free_continua(numba_plasma, nu)[source]¶
Determine bound-free continua for which absorption is possible.
- Parameters
- numba_plasmaNumbaPlasma
- nufloat
Comoving frequency of the r-packet.
- Returns
- numpy.ndarray, dtype int
Continuum ids for which absorption is possible for frequency
nu
.