enable binning by BAM corrected time delay
at the moment it is possible to bin by the time delay. The delay is a 10 Hz property (motor position of the delay stage), therefore it is identical for all the pulses within a train. BAM data are pulse-resolved properties and it can happen that the arrival time of the FEL changes by few 100s fs within a train, besides of course from train to train. Therefore the need to correct the delay values of the PP laser by BAM values and bin DSSC images according to the BAM-corrected delay values.
At the moment the binning can be along the PulseId and along the TrainId. Once delays are BAM-corrected it is necessary to have in the same delay bin images with different TraiId and different PulseId, while keeping the information of the frames with FEl light and those with intradark, for the dark subtraction.
the folder with how it is done so far (without BAM-corrected delay can be found here):
/GPFS/exfel/exp/SCS/202002/p002719/usr/nzh/for_BAM_corr
Files are also attached to this issueBAM.ipynb
These files are given by Nanna and refer to the Silva beamtime in October last year. The problem is not specific of this beamtime but it's shared by all DSSC users doing pump-probe experiments and using the ToolBox.