0

I have a data with noisy data which has lot of minimas. One such data file is shown here. What I have been trying to do is the following,

(1) I would to find all the minimas with respect to the common reference bar.

(2) then I have to find the distance between those minimas

(3) and make a histogram.

(2) ,(3) can be done if I could identify all the minimas. I tried couple of methods ,but did not get work here.

enter image description here

Jason B.
  • 68,381
  • 3
  • 139
  • 286
TM90
  • 380
  • 1
  • 13

1 Answers1

5

Try:

minima = TakeSmallestBy[#[[2]] &, 1] /@
         Split[
             Pick[data, MinDetect[data[[All, 2]], 0.001], 1],
             #1[[1]] + 0.002 == #2[[1]] &
         ]
ListPlot[minima, PlotRange -> All]
Differences@Flatten[minima, 1][[All, 1]]

I used the threshold 0.001 to define the "reference bar." I also used the fact that the x-values in the data set were all exactly 0.002 apart to separate distinct minima.

MinDetect forms the basis of this approach. The rest is just list manipulation to isolate the minima and the associated x-values for finding distances.

Josh Bishop
  • 741
  • 3
  • 8