tardis.opacities.macro_atom.base module

class tardis.opacities.macro_atom.base.NonMarkovChainTransitionProbabilities(plasma_parent)[source]

Bases: TransitionProbabilities

outputs = ('non_markov_transition_probabilities',)
class tardis.opacities.macro_atom.base.TransitionProbabilities(plasma_parent)[source]

Bases: ProcessingPlasmaProperty

Attributes:
transition_probabilitiesPandas DataFrame, dtype float
calculate(atomic_data, beta_sobolev, j_blues, stimulated_emission_factor, tau_sobolevs)[source]
calculate_transition_probabilities(macro_atom_data, beta_sobolev, j_blues, stimulated_emission_factor)[source]
initialize_macro_atom_transition_type_filters(atomic_data, macro_atom_data)[source]
outputs = ('transition_probabilities',)
prepare_transition_probabilities(macro_atom_data, beta_sobolev, j_blues, stimulated_emission_factor)[source]
tardis.opacities.macro_atom.base.calculate_transition_probabilities(atomic_data, beta_sobolev, j_blues, stimulated_emission_factor, tau_sobolevs, transition_probability_coef, block_references, normalize=True)[source]

Computes transition probabilities and provides them as a pd.DataFrame

Parameters:
atomic_datatardis.io.atom_data.AtomData

Atomic Data

beta_sobolevpd.DataFrame

Beta Sobolevs

j_bluespd.DataFrame

mean intensity

stimulated_emission_factornp.ndarray

Stimulated Emission Factors

tau_sobolevpd.DataFrame

Expansion Optical Depths

transition_probability_coefnp.ndarray

Reshaped macro atom transition probabilities

block_referencesnp.ndarray

macro atom block references

normalizebool

Whether or not to normalize the transition probabilities to unity

Returns:
pd.DataFrame

transition probabilities

tardis.opacities.macro_atom.base.calculate_transition_probability(macro_atom_data, beta_sobolev, j_blues, stimulated_emission_factor, transition_probability_coef, block_references, normalize)[source]

Calculate the transition probabilities using optimized functions Parameters ———- macro_atom_data : pd.DataFrame

Macro Atom Data

beta_sobolevpd.DataFrame

Beta Sobolevs

j_bluespd.DataFrame

mean intensity

stimulated_emission_factornp.ndarray

Stimulated Emission Factors

transition_probability_coefnp.ndarray

Reshaped macro atom transition probabilities

block_referencesnp.ndarray

macro atom block references

normalizebool

Whether or not to normalize the transition probabilities to unity

Returns:
np.ndarray

transition probabilities

tardis.opacities.macro_atom.base.get_macro_atom_data(atomic_data)[source]

Get the macro atom data from the atomic data

Parameters:
atomic_datatardis.io.atom_data.AtomData

Atomic Data

Returns:
pd.DataFrame

The macro atom data in the plasma

tardis.opacities.macro_atom.base.get_transition_probability_coefs(macro_atom_data)[source]

Coefficients of the transition probabilities

Parameters:
macro_atom_datapd.DataFrame

Macro Atom Data

Returns:
np.ndarray

Reshaped macro atom transition probabilities

tardis.opacities.macro_atom.base.initialize_macro_atom_transition_type_filters(atomic_data, macro_atom_data)[source]

Get the filters and block references from the macro atom

Parameters:
atomic_datatardis.io.atom_data.AtomData

Atomic Data

macro_atom_datapd.DataFrame

Macro Atom Data

Returns:
np.ndarray

Mask where the transition type is 1

np.ndarray

index of lines at these locations

pd.ndarray

macro atom block references

tardis.opacities.macro_atom.base.initialize_transition_probabilities(atomic_data)[source]

Convienience Function for initializing the transition probabilities

Parameters:
atomic_datatardis.io.atom_data.AtomData

Atomic Data

Returns:
dict
“transition_probability_coef”np.ndarray

Reshaped macro atom transition probabilities

“block_references”: np.ndarray

macro atom block references