[REMI] Add compatibility with old DAQ files
Description
When building the output files, the current REMI reconstruction code assumes daqLibrary=1.0
fields to be present. SQS recently tried to reconstruct runs from 2019, which were still lacking this fields and thus causing the notebook to throw an exception. This MR preserves the output format, but catches old files by supplying default values.
Also fixes a bug in edge trigger code (only used for old data) and fixes a potential exception in plotting code when there's no signal in the data, which a corresponding MR in EXtra-remi: https://git.xfel.eu/dataAnalysis/EXtra-remi/-/merge_requests/1
How Has This Been Tested?
run = 100
in_folder = '/gpfs/exfel/exp/SQS/201802/p002159/raw'
calib_config_path = '/gpfs/exfel/exp/SQS/201802/p002159/usr/remi_proc_config.yaml'
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Reviewers
Merge request reports
Activity
changed milestone to %3.5.0
added Waiting for review label
484 484 " col = (signal_idx % 2) if signal_idx < 6 else np.s_[:]\n", 485 485 " ax = fig.add_subplot(grid[row, col])\n", 486 486 " \n", 487 " pulse_idx = np.where(np.isfinite(edges[:, signal_idx, 0]))[0][0]\n", 488 " train_idx = np.where(pulse_idx >= pulse_offsets)[0][-1]\n", 489 " trigger = triggers[pulse_idx]\n", 487 " try:\n", 488 " pulse_idx = np.where(np.isfinite(edges[:, signal_idx, 0]))[0][0]\n", 489 " train_idx = np.where(pulse_idx >= pulse_offsets)[0][-1]\n", 490 " trigger = triggers[pulse_idx]\n", 491 " except (ValueError, IndexError):\n", added 1 commit
- a7d0b67c - Make plots in REMI reconstruct robust against bad data
- Resolved by Thomas Kluyver
added 1 commit
- db81d25f - Use ndarray.nonzero() rather than np.where() in REMI reconstruct
- Resolved by Cyril Danilevski
mentioned in commit 8e18be82
removed Waiting for review label