daxs.sources
: Sources#
The module provides classes to deal with different types of data sources.
- class daxs.sources.BlissPath(root: str, proposal: str, beamline: str, session: str, sample: str, dataset: str, data_type: str = 'RAW_DATA')[source]#
Bases:
object
- __init__(root: str, proposal: str, beamline: str, session: str, sample: str, dataset: str, data_type: str = 'RAW_DATA') None [source]#
- property collection: str#
- property filename: str#
- property path: str#
- class daxs.sources.Selection(items: int | str | list[int] | npt.NDArray[np.int64 | np.float64])[source]#
Bases:
object
- __init__(items: int | str | list[int] | npt.NDArray[np.int64 | np.float64]) None [source]#
Class to handle selections of items.
- Parameters:
items – The items to select.
- property items#
- class daxs.sources.Source[source]#
Bases:
ABC
Base class for sources of scans.
- abstract property filename: str | None#
The filename of the source.
- abstract property data_mappings: dict[str, Any]#
The mappings between scan attributes and paths in the source.
- class daxs.sources.Hdf5Source(filename: str, included_scan_ids: Any = None, excluded_scan_ids: Any = None, data_mappings: dict[str, Any] | None = None)[source]#
Bases:
Source
- __init__(filename: str, included_scan_ids: Any = None, excluded_scan_ids: Any = None, data_mappings: dict[str, Any] | None = None) None [source]#
Class for a HDF5 source of scans
- Parameters:
filename – Name of the HDF5 file.
included_scans_ids – Selection of included scans.
excluded_scans_ids – Selection of excluded scans.
data_mappings – Mappings between scan attributes (x, signal, monitor, etc.) and paths in the HDF5 file.
- property filename: str#
The filename of the source.
- property data_mappings: dict[str, Any]#
The mappings between scan attributes and paths in the source.
- property selected_scan_ids: list[int]#
Get the selected scans considering the included and excluded scan ids.