f4enix.output.decay_pathways.PathwayLibrary#
- class f4enix.output.decay_pathways.PathwayLibrary(df: DataFrame | None = None)#
Bases:
objectCreate a library of decay pathways for ITER
The object allows to filter the pathways by any combinations of spectrum, dose and materials and to get an ordered dataframe that contains only the pathways that contribute to the requested dose, for the requested materials, spectra and cooling times.
- Parameters:
df (pd.DataFrame | None, optional) – Global library of pathways, by default None
Methods
__init__([df])Create a library of decay pathways for ITER
filter_pathways([spectrum, ...])Filter the pathways by any combinations of spectrum, dose and materials
get_pathways([spectrum, ...])Get an ordered datafrme that contains only the pathways that contribute to the requested dose, for the requested materials, spectra and cooling times.
- filter_pathways(spectrum: list[AVAIL_SPECTRUM] | None = None, irradiation_scenario: list[AVAIL_IRR_SCENARIO] | None = None, dose: int = 95, materials: list[MaterialComposition] | None = None, cooling_times: list[str] | None = None) DataFrame#
Filter the pathways by any combinations of spectrum, dose and materials
- Parameters:
spectrum (list[AvailableSpectra] | None, optional) – allowed spectra are available at f4enix.decay_pathways.AVAILABLE_SPECTRA, by default None. If None, all spectra are selected
irradiation_scenario (list[AvailableIrradiationScenarios] | None, optional) – allowed irradiation scenarios are available at f4enix.decay_pathways.AVAILABLE_IRRADIATION_SCENARIOS, by default None. If None, all irradiation scenarios are selected
dose (int | None, optional) – select the decay pathways that contribute to either 95 or 99 percent, by default 95.
materials (list[MaterialComposition] | None, optional) – available materials are at f4enix.core.material_library.AVAILABLE_MATERIALS, by default None. If None, all materials are selected
cooling_times (list[str] | None, optional) – select the decay pathways that contribute to the requested cooling times, allowed times are available at f4enix.decay_pathways.AVAILABLE_COOLING_TIMES, by default None. If None, all cooling times are selected
- Returns:
filtereted dataframe containing only the rows related to the subset of materials, spectra, irradiation scenarios and dose requested.
- Return type:
pd.DataFrame
- Raises:
ValueError – if either a spectrum, cooling time, material, or irradiation scenario is requested that is not available
- get_pathways(spectrum: list[AVAIL_SPECTRUM] | None = None, irradiation_scenario: list[AVAIL_IRR_SCENARIO] | None = None, dose: int = 95, materials: list[MaterialComposition] | None = None, cooling_times: list[str] | None = None) DataFrame#
Get an ordered datafrme that contains only the pathways that contribute to the requested dose, for the requested materials, spectra and cooling times. When a pathway is important for more than one material, the maximum dose reported in the table will refer to the material with the highest dose.
- Parameters:
spectrum (list[AvailableSpectra] | None, optional) – allowed spectra are available at f4enix.decay_pathways.AVAILABLE_SPECTRA, by default None. If None, all spectra are selected
irradiation_scenario (list[AvailableIrradiationScenarios] | None, optional) – allowed irradiation scenarios are available at f4enix.decay_pathways.AVAILABLE_IRR
dose (int | None, optional) – select the decay pathways that contribute to either 95 or 99 percent, by default 95.
materials (list[MaterialComposition] | None, optional) – available materials are at f4enix.core.material_library.AVAILABLE_MATERIALS, by default None. If None, all materials are selected
cooling_times (list[str] | None, optional) – select the decay pathways that contribute to the requested cooling times, allowed times are available at f4enix.decay_pathways.AVAILABLE_COOLING_TIMES, by default None. If None, all cooling times are selected
- Returns:
resulting summary of important decay pathways for the requested dose, materials, spectra, irradiation scenarios, and cooling times.
- Return type:
pd.DataFrame