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.
- property continuum_interaction_species_multi_index¶
- delta_treatment = 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_properties
ContinuumProperties
The initial continuum properties of the plasma.
- initial_continuum_properties
- 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.
- 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'>¶
- 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).
- 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_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.