HiSPARC/sapphire — pull request #28 by 153957 (2014-05-22 06:32:38+00:00)
Title: Speed up the timing reconstructions

Make ProcessEvents._get_trace return an generator instead of a list, if the trace does not need to be completely traversed this can save time.
Without TriggerOffset the trace needs only to be traverse to find the first pulse.
Traces are only loaded if a signal is expected, pulsheight > adc_threshold or baseline + pulseheight >= low_threshold.

ProcessEventsWithTriggerOffset is faster in most cases.
Sometimes even 8x as fast!

Data for 2013/11/5.
Station 104: slow: 00:25, fast: 00:18
Station 506: slow: 04:18, fast: 00:57
Station 502: slow: 27:31, fast: 03:47

And the restults are equal.

Todo:
- Still needs logic if adc_threshold > ADC_LOW_THRESHOLD
- And tests..
- Other improvements?