Skip to content

[AGIPD][DARK] FIX: Make sure to process darks out of sequence file with the highest trainIds

Karim Ahmed requested to merge fix/process_sequences_with_highest_trainIds into master

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.

Description

  • The main problem:

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.

  • The 1st proposed solution:

Is to use S00001 in the first cell. (Currently this is hotfixed in production until we decide with this MR.)

  • This MR solution:

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.

How Has This Been Tested?

Relevant Documents (optional)

Tested by running the notebook with the available parameters in the first cell.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

Reviewers

@kluyvert @schmidtp @danilevc

Edited by Karim Ahmed

Merge request reports