Involved: @lleguy @gortr @mercurio
The aim is to clarify/simplify the code for data extraction of point detectors (pulse-resolved data that produces one value per pulse, such as digitizer peaks, XGM, BAM values). The detectors should each have a simple function get_xgm()
, get_bam()
, get_tim_peaks()
, etc, that extracts the relevant values and aligns the pulse ID according to the bunch pattern table. Eventually, these functions should be run in the load
function.
The new features are:
get_digitizers_peaks
that can take any FastADC or ADQ412 data. For convenience, get_tim_peaks()
and get_laser_peaks()
are special calls to get_digitizers_peaks
, tailored for SCS data. The peaks are loaded from peak-integrated values by the digitizer or automatically detected from raw traces and the bunchpattern is used to assign pulse ID.check_peaks_params
xgm.py
functions are simplified to 3 functions: get_xgm()
, align_xgm_array()
and calibrate_xgm()
.bam_detectors.py
that extracts and aligns any BAM data.is_pulse_at()
load
function is modified and returns both the extra_data
DataCollection
and the processed xarray
Dataset
.The consequences are:
sase1
, sase3
, npulses_sase1
, npulses_sase3
arrays in the load
function are not required and not loaded anymore.bunchPatternTable
is loaded by default, to speed up each of these new functions (currently they each load the bunch pattern table).extractBunchPattern
, and, in general, the file bunch_pattern.py
is not useful and could be removed.