pleiades.nuclear.manager module
Manages access to nuclear data files packaged with PLEIADES.
- class pleiades.nuclear.manager.NuclearDataManager(isotope_manager: IsotopeManager | None = None)[source]
Bases:
objectManager for nuclear data files and caching.
- __init__(isotope_manager: IsotopeManager | None = None)[source]
Initialize the NuclearDataManager.
- Parameters:
isotope_manager – Optional instance of IsotopeManager. If not provided, a new instance will be created.
- create_isotope_parameters_from_string(isotope_str: str) IsotopeParameters[source]
Create an IsotopeParameters instance with the isotope set.
- Parameters:
isotope_str – String representation of the isotope (e.g., “U-238”).
- Returns:
IsotopeParameters instance with the isotope set.
- Raises:
ValueError – If the isotope string is invalid or not found.
- clear_cache(method: DataRetrievalMethod | None = None, library: EndfLibrary | None = None) None[source]
Clear the specified cache directories.
- Parameters:
method – Optional data retrieval method to clear. If None, clears all methods.
library – Optional library to clear. If None, clears all libraries.
- download_endf_resonance_file(isotope: IsotopeInfo, library: str, output_dir: str = '.', method: DataRetrievalMethod = DataRetrievalMethod.DIRECT, use_cache: bool = True) Path[source]
Download and extract resonance parameter section from ENDF library.
This function first checks if the file is available in cache. If not, it downloads the data using the specified method and then processes as needed: - DIRECT: Downloads complete ENDF file and extracts resonance parameters - API: Downloads only resonance data section (more efficient, no extraction needed)
- Parameters:
isotope – IsotopeInfo instance with atomic_number, element, mass_number, material_number
library – ENDF library version string (e.g., “ENDF-B-VIII.0”)
output_dir – Directory to write the .par output file
method – Data retrieval method to use: - DIRECT: Downloads complete ENDF file (all sections) - API: Downloads only resonance data section (more efficient)
use_cache – Whether to check cache before downloading
- Returns:
Path to the saved resonance parameter file