[AGIPD][LFF] Improve lit frame selection
This improves lit frame selection, including:
- fix the misalignment of selection by trains
- introduce super pattern selection
- guess missed patterns for patterns which repeat with constant step
- shows patterns which repeat with constant step as one line in the report
Description
The code which transforms the LitFrameFinder data into selection is moved to EXtra-redu
package. This code actually identifies pattern repetition with constant step, fills the gaps in LFF data, extracts the selection for requested list of trains and so on.
The integration with the EXtra-redu
is left here.
The misalignment of selection by trains is a bug, which discovered recently. It happens when some trains missed in the LFF data. Current code doesn't generate the any selection for missed trains and all consequent selection applies with a shift by the number of missed trains. It spoils processing if the bunch pattern varies during the run.
Super pattern selection allows to apply selection which is an union of all patterns in the run. It solves the issue with common mode correction in the case of varying pattern. It's also requested by MID for rolling bunch pattern.
Guess of missed patterns allows to fill the gaps in LFF data and prevent the drop of good detector trains.
Report improvement allows to present the pattern list in more readable way and prevent flooding (but not for every possible case)
How Has This Been Tested?
The changes were tested using a few runs from the last proposal (3025) with fixed bunch pattern and a few runs from the proposal (3118) with rolling bunch pattern.
See some reports: check_r0130.pdf check_r0140.pdf
The check of trains alignment (with disabled filling of the gaps in LFF data): p3025_r72_notrain_guess