pyfli.io.data_operations#
Load raw decay, IRF, background, mask, and hot-pixel data from common FLI sources.
This module belongs to pyfli.io and is part of PyFLI detector importers, file
readers, saving helpers, and processed-data loaders. Public API includes classes
DataOperations.
Classes
|
Load primary data, IRF, background, masks, and hot-pixel maps from common FLI file formats. |
- class DataOperations(data_path=None, irf_path=None, bg_path=None, mask_path=None, hp_path=None)[source]#
Bases:
objectLoad primary data, IRF, background, masks, and hot-pixel maps from common FLI file formats. It provides a path-centric interface for raw loading, correction, and packaging into PyFLI-ready structures.
- Parameters:
data_path (
str | None) – Path to the primary decay data source.irf_path (
str | None) – Path to the instrument response data source.bg_path (
str | None) – Path to the background measurement used for subtraction or correction.mask_path (
str | None) – Path to a binary or labeled mask used to select valid pixels.hp_path (
str | None) – Path to a hot-pixel mask or image used for interpolation.
- load_background(pile_up=False, hot_pixel=False)[source]#
Loads background. If folder, returns the mean average of all files.
- make_dataset(name='Experiment_1', source='ICCD', sub_bg=True, pile_up=False, hot_pixel=False)[source]#
Create dataset.
- Parameters:
name (
str) – Dataset, experiment, figure, or output name.source (
str) – Source label recorded with the loaded dataset.sub_bg (
bool) – Whether background subtraction is applied.pile_up (
bool) – Whether pile-up correction should be applied.hot_pixel (
bool) – Whether hot-pixel correction should be applied.
- Returns:
Dictionary containing the data produced by make dataset.
- Return type:
dict[Any,Any]