Use preview friends in all correction devices, do away with stanadalone mode
As discussed after discussion with FXE, it would be nice to be able to preview a single module (like in standalone mode) and still have assembler work out. One obvious thing to do is to just make all the preview outputs GUI-friendly: wrap in ImageData
, remove NaN and such. Then, standalone mode doesn't really mean anything other than switching between shmem handles or full data in stream.
This MR does this by using PreviewFriend
in all correction device classes - so it's the same GUI-friendly code as used for DetectorAssembler
.
I realized the old code would preserve the original input source name on the preview outputs (like on dataOutput
).
Instead of re-implementing this behavior, I'm leaning towards using "real" source name (correction device and channel), hence the update in the manager and the index guessing bit in DetectorAssembler
You'll see I'm still passing metadata for the timestamps to work.
Oh wait, should the DetectorAssembler
use the matched timestamp on its output (instead of "now" when matching)?
Probably yes.
I've still to test different detectors.
GOTTHARD-II certainly needs some custom handling.
And the guessing of index for assembly still relies on regexes, so needs testing.
Could go by source table order like in ShmemTrainMatcher
if we don't like this.
Bonus: fixed Epix100Correction
which was merged next to a different branch and so needed some love.
If this is too out of scope from this MR, can spin off.
tl;dr: can preview modules individually and assembled
If I were smart, I might have made the generated scene take image dimensions into account...