[REMI][CORRECT] Move first pulse by missing PPL pulses if FEL-only
Description
One more small bugfix from p2979: When doing FEL-only runs, there are no PPL pulses in the table and hence a negative ppl_offset
was not applied to properly shift the FEL pulses back. As the digitizer trigger is relative to the first FEL pulse and not PPL, this caused reconstruction of four empty pulses in the front and missing 4 FEL pulses in the back.
As a solution, when no PPL pulses are present yet a negative offset is defined, the FEL pulses are artificially moved back by the offset.
How Has This Been Tested?
run = 195 # Run ID.
in_folder = '/gpfs/exfel/exp/SQS/202202/p002979/raw' # Partial input path appended with run ID.
calib_config_path = '/gpfs/exfel/exp/SQS/202202/p002979/usr/remi_proc_config.yaml' # Path to correction and transform configuration
ppl_offset = -96 # In units of the PPT.
first_pulse_offset = 18000
r195 is an FEL-only run that exhibits this problem without the fix, r198 is FEL+PPL and works fine either way.
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Reviewers
Edited by Philipp Schmidt