I'm pretty new to numpy. I have been looking around how to do this but I can't find anything easy enough.
This is the problem. I'm identifying particles in red (it's ok and done) so I have an array with locations.
I make a new image with these locations with grey dilation and scipy.ndimage, having the dilated positions with a value and the rest 0.
Then I multiply this image with another image (green color), so that the new color only has signals where you have particles in red. What I want to do is to detect the mean of intensities in this other color per given point, in a given radius or square for example.
How can I do this? Do I make scipy.ndimage.measurements.label in the initial color and then use the same array indexes to have the means? Or I can just have x,y coordinates and do the mean() over a given radius?