**8. Conclusions**

Wavelet decomposition, combined with PCA and t-SNE, provides an effective method for extracting the similarities between gamma-ray light curves from BATSE, *Swift*/BAT and *Fermi*/GBM. The features extracted from the T<sup>100</sup> interval of light curves in four energy bands at 64 ms resolution reveal a separation between two groups of bursts. These groups are labelled Group 1 and Group 2. Two groups have also been identified through feature extraction from high resolution (4 ms) light curves within the first seconds of prompt emission. The shortest timescale at which this separation is clear is one second (T<sup>1</sup> interval).

The separation between groups is clearest for *Swift*/BAT and is less distinct for the BATSE and *Fermi*/GBM samples of bursts, perhaps due to instrumental effects. Despite the different timescales and resolutions that were studied, there is >95% agreement between the groups identified within the T<sup>100</sup> and T<sup>1</sup> interval for *Swift*/BAT. The T<sup>100</sup> interval is shown to produce different and more classical classifications for some bursts, especially those with long emission episodes. There is also >95% agreement between the results of the T<sup>1</sup> analysis with the results of the Fourier-based feature extraction of *Swift*/BAT light curves by Jespersen et al. [33]. The separation between *Swift*/BAT groups is clearest when all four energy bands are considered. However, energy-dependent characteristics are not the sole effect that drives the classification, as some separation can only be seen when one energy band is considered. Pulse shape and evolution may be important, and the accumulation of counts within the first second is found to be distinct between groups.

Group 1 mostly consists of short-duration, spectrally hard bursts. Group 2 mostly consists of spectrally soft, long-duration bursts. When segmented at T<sup>90</sup> = 2 s, the traditional dividing line between long and short GRBs, we found that 99% (97%) of *Swift*/BAT Group 2 bursts have durations >2 s when the T<sup>100</sup> (T1) interval is used. A total of 32% of the 107 GRBs with T<sup>90</sup> < 2 s are identified as Group 2 bursts when the T<sup>1</sup> interval is used, consistent (within 1*σ*) with a model in which the duration distribution of *Swift* bursts is fit with a function representing the merger and collapsar distributions, possibly reflecting the amount of collapsar 'contamination' in the short GRB sample. The observed contamination fraction is significantly lower (16%) when the T<sup>100</sup> interval is used. Thus, the groups can be associated with distinct progenitors, namely, mergers and collapsars. GRBs with associated supernovae are within Group 2, while GRBs with suspected kilonovae lie in Group 1.

Previous studies found that the pulse and spectral properties of the early seconds of long GRBs are similar to those of short GRBs. In this analysis, no significant differences can be identified in pulse or spectral properties to account for Group 1 and Group 2 GRBs being distinguishable in the T<sup>1</sup> interval. Differences in minimum variability timescale, identifiable only when the 4 ms resolution data are used, may account for some of the observed behaviour. However, the two groups in subsequent 1 s intervals should also be evident, which is not the case. The observed different slopes in the first second between the two groups in the combined cumulative counts may point towards differences in the central engine.

The presented results indicate that the nature of a burst may be inferred from the earliest prompt emission, without considering the full burst duration. Prompt classification will be helpful in the era of 'big data' in time-domain astronomy. Gravitational wave detectors will detect mergers at increased rates in the near- and longer-term [144]. State-ofthe-art optical surveys such as the Vera Rubin Observatory will deliver an increased number of transient targets in the crowded optical sky [145]. While many optical transients are false positives, the rare gamma-ray transients can pinpoint the unambiguous target of interest. The early detection and classification of these gamma-ray transients will help to prioritise counterpart follow-up for optical telescopes and spectroscopic observations. Classification schemes and triggering algorithms could incorporate a wavelet-based analysis, such as that presented here, to prioritise targets for follow-up observations.

**Supplementary Materials:** The following are available online at https://www.mdpi.com/article/ 10.3390/galaxies10040078/s1. The electronic version of this article showcases Figure 4 as three mp4 animations of the t-SNE plots for BATSE, *Swift* and *Fermi*. We provide the full version of Table 2 which includes the classification of *Swift*/BAT GRBs using the first second of prompt emission.

**Author Contributions:** Conceptualization, L.S., L.H. and A.M.-C.; methodology, L.S., L.H. and A.M.-C.; software, L.S.; validation, L.S., L.H. and A.M.-C.; formal analysis, L.S.; investigation, L.S.; resources, L.S., L.H. and A.M.-C.; data curation, L.S.; writing—original draft preparation, L.S.; writing—review and editing, L.H. and A.M.-C.; visualization, L.S.; supervision, L.H. and A.M.-C.; project administration, L.H. and A.M.-C.; funding acquisition, L.H. and A.M.-C. All authors have read and agreed to the published version of the manuscript.

**Funding:** L.S. acknowledges the Irish Research Council Postgraduate Scholarship No GOIPG/2017/1525. LH acknowledges support from Science Foundation Ireland (Grant number 19/FFP/6777) and the EU H2020 (Grant agreement 871158).

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** The BATSE Public Data Archive (https://heasarc.gsfc.nasa.gov/FTP/ compton/data/batse/trigger/, accessed on 17/ February 2021) hosts the 64 ms light curves in ascii files, and the TTE data which is used to generate the 4 ms BATSE light curves. The *Swift*/BAT light curves analysed in this paper are available as ascii files from the *Swift*/BAT Gamma-Ray Burst Catalogue (https://swift.gsfc.nasa.gov/results/batgrbcat/, accessed on 29 January 2021). The *Fermi*-GBM Data Tools [81] are used to access *Fermi*/GBM TTE files.

**Acknowledgments:** This research made use of the following Python packages: NumPy [146], Matplotlib [147], pandas [148,149], scikit-learn [150], GPFlow [83] and PyWavelets [89].

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.
