I study how the intensity of the ring changes depending on the angle. Here is an example image:

What I would like to do is take a circle of values โโfrom the inside of the center of this donut and build them against the corner. What I'm doing now is to use scipy.ndimage.interpolation.rotate and take slices radially around the ring and extract a maximum of two peaks and apply them depending on the angle.
crop = np.ones((width,width)) #this is my image slices = np.arange(0,width,1) stack = np.zeros((2*width,len(slices))) angles = np.linspace(0,2*np.pi,len(crop2)) for j in range(len(slices2)): # take slices stack[:,j] = rotate(crop,slices[j],reshape=False)[:,width]
However, I do not think this does what I am really looking for. I am basically trying to extract the data I need. I also tried applying a mask that looks like this:

but then I donโt know how to get the values โโinside this mask in the correct order (i.e. in the ascending order of the angle 0 - 2pi)
Any other ideas would be very helpful!
source share