Add projection binning utility
Open
- Dominant language
- MATLAB
- Stars
- 803
- Forks
- 262
- Avg merge
- 9d 13h
- Merged PRs (30d)
- 8
Description
a python code would be e.g.:
```
def BinProjection(array, factor, average=True):
if average:
if array.shape[0] % factor or array.shape[1] % factor:
array = array[
: (array.shape[0] // factor) * factor, : (array.shape[1] // factor) * factor
]
shape = (array.shape[0] // factor, factor, array.shape[1] // factor, factor)
return array.reshape(shape).mean(axis=(-1, 1), dtype=numpy.float32)
else:
return array[::factor, ::factor]
```
Ideally it also gets geometry as input and it modifies it accordingly. MATLAB code also is useful.
Contributor guide
Assessment
This issue has not been assessed yet.