Peak Detection Of Every Pulse
filtering -> thresholding -> edge detection

apply low pass filter:

averageFilterCoefficient = 0.01
for each sample of x:
  y[i] = y[i-1]*(1-averageFilterCoefficient) + x[i]*averageFilterCoefficient


this simple code should remove all high frequencies and produce more smooth signal. Now apply thresholding:

threshold = 100
for each sample of y:
  if y[i] &gt; threshold then
    z[i] = 1
  else
    z[i] = 0


Now you have nice logical signal, lets find rising edges:

for each sample of z:
  if z[i-1] = 0 and z[i] = 1 then
    print i


You just need to find the right values for exponential average filter
coefficient and thresholding level.