FAST-MEPSA: an optimised and faster version of peak detection algorithm MEPSA
Manuele Maistrello, Romain Maccary, Cristiano Guidorzi
TL;DR
FAST-MEPSA delivers an optimized MEPSA peak-detection framework for GRB light curves by introducing a sparser offset-scanning strategy and a parabolic-linear re-binning schedule, achieving about 400× faster runtimes without major drops in detection efficiency. It also adds a 40th pattern targeted at rising-edge, sub-threshold peaks, increasing completeness for faint events. Validated on simulated GRB light curves, FAST-MEPSA substantially reduces false positives and preserves performance while enabling large-scale analyses; the 40th pattern further improves recovery of elusive peaks, especially in the sub-threshold regime. The authors provide practical guidelines on when to use the faster code and when to adopt the expanded pattern set, and make the implementation publicly available.
Abstract
We present FAST-MEPSA, an optimised version of the MEPSA algorithm developed to detect peaks in uniformly sampled time series affected by uncorrelated Gaussian noise. Although originally conceived for the analysis of gamma-ray burst (GRB) light curves (LCs), MEPSA can be readily applied to other transient phenomena. The algorithm scans the input data by applying a set of 39 predefined patterns across multiple timescales. While robust and effective, its computational cost becomes significant at large re-binning factors. To address this, FAST-MEPSA introduces a sparser offset-scanning strategy. In parallel, building on MEPSA's flexibility, we introduce a 40th pattern specifically designed to recover a class of elusive peaks that are typically sub-threshold and lie on the rising edge of broader structures - often missed by the original pattern set. Both versions of FAST-MEPSA - with 39 and 40 patterns - were validated on simulated GRB LCs. Compared to MEPSA, the new implementation achieves a speed-up of nearly a factor 400 at high re-binning factors, with only a minor (~4%) reduction in the number of detected peaks. It retains the same detection efficiency while significantly lowering the false positive rate of low significance. The inclusion of the new pattern increases the recovery of previously undetected and sub-threshold peaks. These improvements make FAST-MEPSA an effective tool for large-scale analyses where a robust trade-off between speed, efficiency, and reliability is essential. The adoption of 40 patterns instead of the classical 39 is advisable when an enhanced efficiency in detecting faint events is desired. The code is made publicly available.
