Fixed the pulse finder because it wasn't finding every pulse. Need to deal with the end of the samples vector correctly