tardis.opacities.opacity_state module

class tardis.opacities.opacity_state.OpacityState(electron_density, t_electrons, line_list_nu, tau_sobolev, beta_sobolev, continuum_state)[source]

Bases: object

Opacity State in Python

Parameters:
electron_densitypd.DataFrame
t_electronsnumpy.ndarray
line_list_nupd.DataFrame
tau_sobolevpd.DataFrame
beta_sobolevpd.DataFrame
continuum_state: tardis.opacities.continuum.continuum_state.ContinuumState
classmethod from_legacy_plasma(plasma, tau_sobolev)[source]

Generates an OpacityStatePython object from a tardis BasePlasma

Parameters:
plasmatarids.plasma.BasePlasma

legacy base plasma

tau_sobolevpd.DataFrame

Expansion Optical Depths

Returns:
OpacityStatePython
classmethod from_plasma(plasma, tau_sobolev, beta_sobolev)[source]

Generates an OpacityStatePython object from a tardis BasePlasma

Parameters:
plasmatarids.plasma.BasePlasma

legacy base plasma

tau_sobolevpd.DataFrame

Expansion Optical Depths

beta_sobolevpd.DataFrame

Modified expansion Optical Depths

Returns:
OpacityStatePython
class tardis.opacities.opacity_state.OpacityStateNumba(*args, **kwargs)[source]

Bases: OpacityStateNumba

Plasma for the Numba code

Parameters:
electron_densitynumpy.ndarray
t_electronsnumpy.ndarray
line_list_nunumpy.ndarray
tau_sobolevnumpy.ndarray
transition_probabilitiesnumpy.ndarray
line2macro_level_uppernumpy.ndarray
macro_block_referencesnumpy.ndarray
transition_typenumpy.ndarray
destination_level_idnumpy.ndarray
transition_line_idnumpy.ndarray
bf_threshold_list_nunumpy.ndarray
class_type = jitclass.OpacityStateNumba#7feddc5a7b30<electron_density:array(float64, 1d, A),t_electrons:array(float64, 1d, A),line_list_nu:array(float64, 1d, A),tau_sobolev:array(float64, 2d, A),transition_probabilities:array(float64, 2d, A),line2macro_level_upper:array(int64, 1d, A),macro_block_references:array(int64, 1d, A),transition_type:array(int64, 1d, A),destination_level_id:array(int64, 1d, A),transition_line_id:array(int64, 1d, A),bf_threshold_list_nu:array(float64, 1d, A),p_fb_deactivation:array(float64, 2d, A),photo_ion_nu_threshold_mins:array(float64, 1d, A),photo_ion_nu_threshold_maxs:array(float64, 1d, A),photo_ion_block_references:array(int64, 1d, A),chi_bf:array(float64, 2d, A),x_sect:array(float64, 1d, A),phot_nus:array(float64, 1d, A),ff_opacity_factor:array(float64, 1d, A),emissivities:array(float64, 2d, A),photo_ion_activation_idx:array(int64, 1d, A),k_packet_idx:int64>
tardis.opacities.opacity_state.opacity_state_initialize(plasma, line_interaction_type, disable_line_scattering)[source]

Initialize the OpacityState object and copy over the data over from TARDIS Plasma

Parameters:
plasmatardis.plasma.BasePlasma
line_interaction_typeenum
tardis.opacities.opacity_state.opacity_state_to_numba(opacity_state: OpacityState, macro_atom_state: MacroAtomState, line_interaction_type) OpacityStateNumba[source]

Initialize the OpacityStateNumba object and copy over the data over from OpacityState class

Parameters:
opacity_statetardis.opacities.opacity_state.OpacityState
line_interaction_typeenum