There are often problems with interpolating functions when the dependent and independent variables have such widely different ranges. The problem goes away if you rescale your values before finding the peaks,
data = << "http://pastebin.com/raw/EQFz1KFn";
peaks = {#1, 10^-10 #2} & @@@
FindPeaks[10^10 data[[All, 2]], 0, 0, -Infinity,
InterpolationOrder -> 1]
(* {{23, 5.13993*10^-10}, {68, 3.99016*10^-10}, {110,
3.43787*10^-10}, {150, 3.50107*10^-10}, {190, 3.5024*10^-10}} *)
ListPlot[data[[All, 2]],
Epilog -> {Red, PointSize[0.02], Point[peaks]}, ImageSize -> Large]
We can check what value of the rescaling is needed in order for the peaks to be found with Manipulate
,
Manipulate[
sf = 10^sff;
peaks = FindPeaks[ sf data[[All, 2]], 0, 0, -Infinity,
InterpolationOrder -> 1];
ListPlot[data[[All, 2]]/mx,
Epilog -> {Red, PointSize[0.02], Point[{#1, #2/mx/sf} & @@@ peaks]},
ImageSize -> Large]
, {{sff, 0}, 0, 2, .01}]
The fact that the largest peaks are found first indicates that there is some absolute threshold value of the peak-valley that must be reached, not a relative threshold.
What is that threshold value? To check I'll do a peak fitting on a single cycle of a cosine curve, and take the percent difference between the actual peak value and the peak value found by FindPeaks
, and plot it using a logarithmic x-axis.
scalingpeaklist = Table[
sf = 10^-n;
list = Table[sf (-Cos[x] + 1), {x, 0, 2 \[Pi] + 0, .01}];
{n, (Max[list] - #2)/
Max[list] & @@ (First@FindPeaks[list, 0, 0, -Infinity])},
{n, 0, 14, .1}];
ListLinePlot@scalingpeaklist
Around $10^{-8}$. If the difference between peaks and valleys is smaller than that, then the peak found is about half it's actual size (relative to the nearest valley).
If your peaks are going to be smaller than that, you are better off always rescaling before and after peak finding.