rebin

jwst.ami.utils.rebin(a=None, rc=(2, 2))[source]

Perform simple flux-conserving binning using specified binning kernel.

Trailing size mismatch is clipped: eg a 10x3 array binned by 3 results in a 3x1 array

Parameters:
a2D float array

Input array to bin

rc2D float array

Binning kernel

Returns:
binned_arrfloat array

Binned array