- ccdproc.rebin(ccd, newshape)¶
Deprecated since version 1.1: The rebin function will be removed in ccdproc 3.0 Use block_reduce or block_replicate instead.
Rebin an array to have a new shape.
This is based on the scipy cookbook for rebinning: http://wiki.scipy.org/Cookbook/Rebinning
If rebinning a CCDData object to a smaller shape, the masking and uncertainty are not handled correctly.
Given an array that is 100x100:
import numpy as np from astropy import units as u arr1 = CCDData(np.ones([10, 10]), unit=u.adu)
The syntax for rebinning an array to a shape of (20,20) is: