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.

continuum_interaction_species: list = []
property continuum_interaction_species_multi_index
delta_treatment = None
excitation_analytical_approximation: str = 'lte'
heating_rate_data_file: str = 'none'
helium_treatment: str = 'none'
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
parse_plasma_config(plasma_config)[source]

Parse the plasma configuration.

Parameters:
plasma_configPlasmaConfig

The plasma configuration object containing the plasma parameters.

Returns:
None
plasma_collection = <module 'tardis.plasma.properties.legacy_property_collections' from '/home/runner/work/tardis/tardis/tardis/plasma/properties/legacy_property_collections.py'>
plasma_modules: list = []
prepare_factory(selected_atomic_numbers, property_collections, config=None)[source]

Set up the plasma factory.

Parameters:
selected_atomic_numberslist of int

Selected atomic numbers in the simulation.

property_collectionsstr

The property collection module to be used in the plasma assembly.

configobject, optional

Configuration object containing plasma settings (default: None).

property_kwargs: dict = {}
radiative_rates_type: str = 'dilute-blackbody'
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_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.

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]