Open AnderBiguri opened 2 years ago
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.
a python code would be e.g.:
Ideally it also gets geometry as input and it modifies it accordingly. MATLAB code also is useful.