time_intervals function works well now

Finds spikes well in LaBr detectors but may return errors for other
detectors.