[AGIPD] Fix missing memory cell index in SlopesPC constant sanitization
Description
For every memory cell in the SlopesPC constant, nan
values or values outside a certain boundary of amemory cell's median are meant to be replaced by the median. The masking operations for these replacements were missing the actual memory cell index, thus applying any change to all memory cells for a given pixel. This caused the result to both be wrong and the algorithm to scale quadratically with the number of memory cells. After the fix, the time for sanitization goes down from ~6min to ~3s.
How Has This Been Tested?
Low level deconstruction of the algorithm and what it's doing.
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Reviewers
Merge request reports
Activity
changed milestone to %3.4.3
added Waiting for review label
mentioned in commit ad858fba
removed Waiting for review label
LGTM.
In case this bit should get updated / accelerated in future: for calng, I added this sanitization step, but with high-level numpy operations instead of the loop over memory cells in agipd_gpu.py. As it stands, this code will get discarded as newer constants should be sanitized already. But could be nice to glance at in case of future agipdlib refactor.
mentioned in merge request !604 (merged)
mentioned in commit 7a2d3105