This notebook rebin an image or set of images. You have the option of defining the way the pixels are grouped on the horizontal and vertical axis. For example, if you select a rebin value of 2  for the width and height, pixels will be grouped 2 by 2 (see next two illustrations) and those pixels will be averaged.

In the following example, we start with an image of 8 by 8 pixels. Each box contains the number of counts for that pixel.

Original image of 8 by 8 pixels


Then if we select a rebin value of 2 for the x-axis, and 2 for the y-axis

Rebin image (2 by 2) for a final image size of 4 by 4


In this other case, the x-axis is rebin using 2, and the y-axis using 3.

and the new image will look like this

In the case where the width and/or height of the image can not be evenly divided by the rebin coefficient, the last uncompleted bin is removed from the final image.

Select your IPTS

Need help using the IPTS selector?

Select the images to rebin

Using the file selection tool, select the images you want to rebin.

Select the bin parameter

It’s time to select the bin parameter. The cell will also display some information such as the size of the raw and rebinned images.


Select output folder

Select the final location where you want to export the rebinned images using the folder selection tool.

The naming convention used by the notebooks is as follows:

  • input folder: my_data
  • output folder: my_data_rebin_by_6height_3width (if you chose to bin by 6 pixels on the vertical axis, and 3 on the horizontal axis).