frebin

sofia_redux.toolkit.image.adjust.frebin(data, shape, total=False, order=None, anti_aliasing=None, mode='reflect')[source]

Rebins an array to new shape

Parameters:
datanumpy.ndarray

input data (nrow, ncol)

shape2-tuple of int

output data shape (nrow2, ncol2)

totalbool, optional

if True the sum of the output data will equal the sum of the input data.

orderint, optional

0 = nearest neighbor 1 = bi-linear 2 = bi-quadratic 3 = bi-cubic 4 = bi-quartic 5 = bi-quintic By default, nearest neighbor will be used if the output shape is an integer factor of the input data shape. Otherwise, bi-linear interpolation will be used.

anti_aliasingbool, optional

passed into resize

modestr, optional

passed into resize

Returns:
numpy.ndarray

resized data array (nrow2, ncol2)