Skip to content

Refactor DetectorAssembler

David Hammer requested to merge refactor-detectorassembler into master

For a while, I've been meaning to make the mapping of sources to module indices more accessible and configurable. This MR does that.

I also thought that we could use stacking (see !73 (merged)) to make the DetectorAssembler simpler. As it turns out, the latter is quite a hassle to configure and for single-frame data, probably not worth throwing thread pools at for performance. In the meantime, I learned that one can use xarray to assemble just a subset of modules; and as the data in an xarray.DataArray can apparently be a list, let's just forgo stacking entirely!

Note that I've now gotten rid of the preallocated buffers for stacking (not needed anymore) and for assembly. The latter will now incur more dynamic memory allocation. However, the reuse of the buffer as it worked before was actually a problem with safeNDArray...

Merge request reports