webbpsf_ext.image_manip.zrebin
- webbpsf_ext.image_manip.zrebin(image, oversample, order=3, mode='reflect', total=True, rescale_pix=False, **kwargs)[source]
Rebin image using scipy.ndimage.zoom
- Parameters:
image (ndarray) – Input image
oversample (float) – Factor to scale output array size. A scale of 2 will increase the number of pixels by 2 (ie., finer pixel scale). If less than 1, then will decrease the number of pixels using frebin; no interpolation is performed.
order (int) – The order of the spline interpolation, default is 3. Only used if oversample>1. If order=0, then frebin is used.
mode (str) – Points outside the boundaries of the input are filled according to the given mode (‘constant’, ‘nearest’, ‘reflect’, ‘mirror’ or ‘wrap’). Default is ‘reflect’. Only used if oversample>1.
total (bool) – Conserves the surface flux. If True, the output pixels will be the sum of pixels within the appropriate box of the input image. Otherwise, they will be the average.