In experimental materials science, we are often given images such as the one below, called an X-ray diffraction pattern.
In this case, the symmetry of the sample measured causes the images to have rings of constant intensity, knows as Debye-Scherrer rings. For us, this is redundant data, we need to reduce this image down to a simple plot of radial distance (from the center of all the rings) vs. the intensity at each radial distance. The simplest possible way to do this is to just take a line that begins at the center and goes radially outward, recording intensity at each radial point. A more robust method, however, is to use the average intensity from the entire ring, to ensure that variability gets averaged out.
It turns out that this is very simple to do! The example shown here will be done using the Python package numpy and visualized using matplotlib. Additionally, to import the TIFF file in this example, I will use a package called tifffile, which can be found here.

#python #image-processing #science #data-science #programming

A Simple Method to Calculate Circular Intensity Averages in Images
2.20 GEEK