Open Brow71189 opened 3 months ago
Request from Vienna!
I'm close enough to implementing the general case of applying any processing to sequences/collections that I think we could focus our effort on (a) doing that; (b) implementing the 2D binning algorithm nicely; (c) providing reduction options for all potential coordinate sets.
To that end, is there anything more to the binning for an individual 2D element than "reduce by
And, is there anything unique about binning in the collection/sequence coordinate systems?
I think having a binning that can bin any axis of a multi-D dataset will be enough. So probably your general case will work. We just need to make sure this is fast, i.e. don't do any weird resampling but simplay sum groups of neighboring pixels, just like camera binning does.
The py4DSTEM guys have some code to handle edges that might be worth glancing at: https://github.com/py4dstem/py4DSTEM/blob/dev/py4DSTEM/preprocess/preprocess.py#L155