vipr_reflectometry.shared.load_data package¶
Submodules¶
vipr_reflectometry.shared.load_data.csv_spectrareader_data_loader module¶
- class vipr_reflectometry.shared.load_data.csv_spectrareader_data_loader.CSVSpectraReaderDataLoader(**kw)¶
Bases:
DataLoaderHandlerCSV/DAT/TXT data loader using SpectraReader for reflectometry data.
This loader integrates the SpectraReader API with the VIPR data loading pipeline for single CSV/DAT/TXT files (MARIA format or standard reflectometry format). It uses SpectraReader to load individual files and converts the data to VIPR’s DataSet format.
Supported formats: - CSV files (.csv) - DAT files (.dat) - TXT files (.txt) - MARIA format and standard reflectometry datasets - Error bar extraction (dx, dy) when available - Built on unified SpectraReader API
Each file contains exactly ONE spectrum and results in batch_size=1 DataSet.
- class vipr_reflectometry.shared.load_data.csv_spectrareader_data_loader.CSVSpectraReaderParams(*, data_path: str, column_mapping: dict[str, int | None] | None = None)¶
Bases:
BaseModelParameters for the csv_spectrareader data loader.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
vipr_reflectometry.shared.load_data.hdf5_spectrareader_data_loader module¶
- class vipr_reflectometry.shared.load_data.hdf5_spectrareader_data_loader.HDF5SpectraReaderDataLoader(**kw)¶
Bases:
DataLoaderHandlerHDF5 data loader using SpectraReader for reflectometry data.
This loader integrates the SpectraReader API with the VIPR data loading pipeline for HDF5 files. It uses SpectraReader to access HDF5 files and converts the data to VIPR’s DataSet format.
Supports: - Single and multi-spectrum HDF5 files - Dataset/group selection - Error bar extraction (dx, dy) - Metadata preservation - Built on colleague’s ExperimentalDataManager
- class vipr_reflectometry.shared.load_data.hdf5_spectrareader_data_loader.HDF5SpectraReaderParams(*, data_path: str, dataset_name: str | None = None, spectrum_index: int = 0, batch_processing: bool = False, batch_size: int | None = None)¶
Bases:
BaseModelParameters for the hdf5_spectrareader data loader.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Module contents¶
Data loaders for reflectometry analysis.
- class vipr_reflectometry.shared.load_data.CSVSpectraReaderDataLoader(**kw)¶
Bases:
DataLoaderHandlerCSV/DAT/TXT data loader using SpectraReader for reflectometry data.
This loader integrates the SpectraReader API with the VIPR data loading pipeline for single CSV/DAT/TXT files (MARIA format or standard reflectometry format). It uses SpectraReader to load individual files and converts the data to VIPR’s DataSet format.
Supported formats: - CSV files (.csv) - DAT files (.dat) - TXT files (.txt) - MARIA format and standard reflectometry datasets - Error bar extraction (dx, dy) when available - Built on unified SpectraReader API
Each file contains exactly ONE spectrum and results in batch_size=1 DataSet.
- class vipr_reflectometry.shared.load_data.HDF5SpectraReaderDataLoader(**kw)¶
Bases:
DataLoaderHandlerHDF5 data loader using SpectraReader for reflectometry data.
This loader integrates the SpectraReader API with the VIPR data loading pipeline for HDF5 files. It uses SpectraReader to access HDF5 files and converts the data to VIPR’s DataSet format.
Supports: - Single and multi-spectrum HDF5 files - Dataset/group selection - Error bar extraction (dx, dy) - Metadata preservation - Built on colleague’s ExperimentalDataManager