Finding a set of easily distinguishable local minima quickly and algorithmically.

I am evaluating some microsocpy images and am hoping to automate some of the analysis by writing code to determine the location of the spike minima in the following graph. These correspond to drasticaly reduced pixel intensities near a certain regular grid structures.
I am hoping to automate the process of finding these minima, but have been unable to find a way to do so due to the fact that the data contains a huge number of local minima cuumulatively. Is there an algorithm or function which returns local minima below a certain threshold only? Or has other parameters to restrict the search?
Also, is there a way to isolate the minima pattern in the FFT? My FFT looks somewhat garbled, with the complicated and non-regular pattern expressing itself as many frequency bands, but the minima pattern I'm interested in is located between the 100-150 range.
Is there a way to use the FFT in such a way to only focus on oscillations producing large mangnitude changes, or smooth out the dataset to remove this noise?
Thanks!
Alex
Edit: At the request of some answerers, I have attached the data for the first graph. If it matters, these are summed pixel values from a microscopy image of a grid used for callibration.

3 Comments

It would be advisable to attach a .mat file with the signal data so that we can demonstrate solutions.
I ended up using islocalmin and using the prominence output to select the most prominent minima, which were the ones I wanted. By setting a prominence threshold, I was able to experiment with it until only the desired minima were detected.
I believe this is equivalent to Matt J's answer as well, as his method similarly looked to filter out the other local minima via using a magnitude threashold.

Sign in to comment.

Answers (2)

load matlab
y=im_mean(:);
x=(1:numel(y)).';
k=(y==movmin(y,21));
plot(x,y,'-', x(k),y(k),'ro'); legend('Signal','Local Min')

Categories

Products

Release

R2023a

Asked:

on 5 Jul 2023

Edited:

on 6 Jul 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!