krebin

jwst.ami.utils.krebin(a, shape)[source]

Rebin, applying Klaus P’s fastrebin from web.

Parameters:
a2D float array

Input array to rebin

shapetuple (int, int)

Dimensions of array ‘a’ binned down by dimensions of binning kernel

Returns:
reshaped_a: 2D float array

Reshaped input array