A hacky temporary solution to the bug of processing darks out of one of the available sequences in raw folder.
I though about the fastest fix to deploy without giving any assumptions for a specific sequence number to always process. This was the result.
Processing darks out of the sequences with highest number of trainIds.
AGIPD dark notebook is designed to parallelize the processing of the 3 gains, based on processing only a file for each gain.
Not realizing this I switched before the value of sequences
from [0] to [-1]. This lead to having N files processed in parallel. But still 3 values would only be stored for each gain.
The issue is that the values of the last sequence file could be stored (but not always). The last sequence can have about 30 or 70 trains only compared to about 256 in sequence number 1 S00001
.
Is to use S00001 in the first cell. (Currently this is hotfixed in production until we decide with this MR.)
Is to not assume always that there will be S00001 available, use [-1] to read all sequences and process only the file with the highest number of images.
Tested by running the notebook with the available parameters in the first cell.