tardis.plasma.assembly.base module

class tardis.plasma.assembly.base.PlasmaSolverFactory(atom_data, config=None)[source]

Bases: object

assemble(number_densities, dilute_planckian_radiation_field, time_explosion, electron_densities=None, **kwargs)[source]

Assemble the plasma based on the provided parameters and settings.

Parameters:
number_densitiesdict

Dictionary of number densities for different species.

dilute_planckian_radiation_fieldobject

The dilute Planckian radiation field object.

time_explosionfloat

The time of explosion.

electron_densitiesarray-like, optional

Optional electron densities.

Returns:
BasePlasma

The assembled plasma object.

Raises:
ValueError

If an error occurs during assembly.

check_continuum_interaction_species()[source]

Check if all continuum interaction species belong to atoms that have been specified in the configuration.

Raises:
PlasmaConfigError: If not all continuum interaction species belong to specified atoms.
continuum_interaction_species: list = []
property continuum_interaction_species_multi_index
delta_treatment = None
enable_adiabatic_cooling: bool = False
enable_two_photon_decay: bool = False
excitation_analytical_approximation: str = 'lte'
heating_rate_data_file: str = 'none'
helium_treatment: str = 'none'
initialize_continuum_properties(dilute_planckian_radiation_field)[source]

Initialize the continuum properties of the plasma.

Parameters:
dilute_planckian_radiation_fieldDilutePlanckianRadiationField

The dilute Planckian radiation field.

Returns:
initial_continuum_propertiesContinuumProperties

The initial continuum properties of the plasma.

initialize_j_blues(dilute_planckian_radiation_field, lines_df)[source]

Initialize the j_blues DataFrame based on the radiative_rates_type and the dilute_planckian_radiation_field.

Parameters:
dilute_planckian_radiation_fieldobject

The dilute Planckian radiation field object.

lines_dfpandas.DataFrame

The DataFrame containing lines information.

Returns:
pandas.DataFrame

The DataFrame with calculated mean intensity values.

Raises:
ValueError

If the radiative_rates_type is unknown.

ionization_analytical_approximation: str = 'lte'
kwargs: dict = {}
legacy_nlte_species: list = []
line_interaction_type: str = 'scatter'
nebular_ionization_delta_treatment: tuple
nlte_excitation_species: list = []
nlte_ionization_species: list = []
nlte_solver: str = 'lu'
parse_plasma_config(plasma_config)[source]

Parse the plasma configuration.

Parameters:
plasma_configPlasmaConfig

The plasma configuration object containing the plasma parameters.

Returns:
None
plasma_modules: list = []
prepare_factory(selected_atomic_numbers, config=None)[source]

Set up the plasma factory.

Parameters:
configobject, optional

Configuration object containing plasma settings (default: None).

property_kwargs: dict = {}
radiative_rates_type: str = 'dilute-blackbody'
set_continuum_interaction_species_from_string(continuum_interaction_species)[source]

Set the continuum interaction species from a list of species strings.

Parameters:
continuum_interaction_specieslist of str

List of species strings representing the continuum interaction species.

Returns:
None
set_nlte_species_from_string(nlte_species)[source]

Sets the non-LTE species from a string representation.

Parameters:
nlte_speciesstr

A string representation of the non-LTE species.

Returns:
None

This method does not return anything.

setup_analytical_approximations()[source]

Setup the analytical approximations for excitation and ionization.

Returns:
None
setup_continuum_interactions()[source]

Set up continuum interactions for the plasma assembly.

Raises:
PlasmaConfigError: If the line_interaction_type is not “macroatom”.
PlasmaConfigError: If an NLTE ionization species is not in the continuum species.
PlasmaConfigError: If an NLTE excitation species is not in the continuum species.
PlasmaConfigError: If the NLTE solver type is unknown.
setup_electron_densities(electron_densities)[source]
setup_helium_treatment()[source]

Set up the helium treatment for the plasma assembly.

Parameters:
helium_treatmentstr

The type of helium treatment to be used. Possible values are: - “recomb-nlte”: Use recombination NLTE treatment for helium. - “numerical-nlte”: Use numerical NLTE treatment for helium.

heating_rate_data_filestr or None

The path to the heating rate data file. Required when using “numerical-nlte” helium treatment.

Raises:
PlasmaConfigError

If the helium NLTE treatment is incompatible with the NLTE ionization and excitation treatment.

If the heating rate data file is not specified when using “numerical-nlte” helium treatment.

setup_legacy_nlte(nlte_config)[source]

Set up the non-LTE (NLTE) properties for the legacy species.

Parameters:
nlte_configdict

A dictionary containing the NLTE configuration.

tardis.plasma.assembly.base.convert_species_to_multi_index(species_strs)[source]
tardis.plasma.assembly.base.map_species_from_string(species)[source]