Data structures
Spectrum class
- class EVA.core.data_structures.spectrum.Spectrum(detector, run_number, x=None, y=None, time=None, energy=None, prompt_energy=None, prompt_count=None, delayed_energy=None, delayed_count=None, ibex_hist_2d=None, manual_hist_2d=None, cut_data=None, bin_range=None, efficiency_hist_counts=None, efficiency_hist_energy=None)
The ‘Spectrum’ dataclass holds the data from a single detector for a single run. It holds the name of the detector, associated run number and the x (energy) and y (counts) arrays, as well as references to hdf datasets to be loaded on to memory as needed. :type detector:
str:param detector: string, name of detector. :type run_number:str:param run_number: string, run number for the spectrum. :type x:ndarray:param x: numpy array, containing the x-data measured by the detector (histogram bin centers). :type y:ndarray:param y: numpy array, containing y-data measured by the detector (counts per bin).
Run class
- class EVA.core.data_structures.run.MetaQObjectABC(name, bases, namespace, /, **kwargs)
Metaclass combining QObject and ABC compatibility.
- class EVA.core.data_structures.run.Run(raw, loaded_detectors, run_num, momentum)
Abstract base class for experiment run file formats and logic. Provides shared logic and enforces a consistent interface for RunNexus and RunBiriani (and potentially other formats).
- is_empty()
Return True if all detectors have no data.
- Return type:
bool
- abstractmethod read_comment_data()
Return formatted metadata from comment file (comment, start time, end time, etc.) which may be different for different files.
- abstractmethod set_corrections(*args, **kwargs)
Reapply all corrections, normalisation, and binning in correct order, which may be different for different files.
Detector class
- class EVA.core.data_structures.detector.DetectorIndices(*values)
Enum class to map detector names to indices.