A Comptonized Fireball Bubble Fits the Second Extragalactic Magnetar Giant Flare GRB 231115A

Magnetar giant flares (MGFs), originating from noncatastrophic magnetars, share noteworthy similarities with some short gamma-ray bursts (GRBs). However, understanding their detailed origin and radiation mechanisms remains challenging due to limited observations. The discovery of MGF GRB 231115A, the second extragalactic MGF located in the Cigar galaxy at a luminosity distance of ∼3.5 Mpc, offers yet another significant opportunity for gaining insights into the aforementioned topics. This Letter explores its temporal properties and conducts a comprehensive analysis of both the time-integrated and time-resolved spectra through empirical and physical model fitting. Our results reveal certain properties of GRB 231115A that bear resemblances to GRB 200415A. We employ a Comptonized fireball bubble model, in which the Compton cloud, formed by the magnetar wind with high density e ±, undergoes Compton scattering and inverse Compton scattering, resulting in reshaped thermal spectra from the expanding fireball at the photosphere radius. This leads to dynamic shifts in dominant emission features over time. Our model successfully fits the observed data, providing a constrained physical picture, such as a trapped fireball with a radius of ∼1.95 × 105 cm and a high local magnetic field of 2.5 × 1016 G. The derived peak energy and isotropic energy of the event further confirm the burst’s MGF origin and its contribution to the MGF-GRB sample. We also discuss prospects for further gravitational wave detection associated with MGFs, given their high-event-rate density (∼8 × 105 Gpc−3 yr−1) and ultrahigh local magnetic field.


INTRODUCTION
Magnetar giant flares (MGFs) are rare and exceptionally powerful transient phenomena originating from noncatastrophic magnetars.They exhibit light-curve structures consisting of an initial spike lasting tenths of a second, followed by a much dimmer pulsating tail modulated by the magnetar's spin.The tail is only visible within close proximity, e.g., our Galaxy (Mazets et al. 1979;Barat et al. 1983;Hurley et al. 1999Hurley et al. , 2005;;Israel et al. 2005;Strohmayer & Watts 2005;Levin 2006).Despite the typical temporal characteristics extracted from the observed Galactic MGF events, all of them are saturated by the gamma-ray detectors due to the overwhelm-ing surge in photon numbers (Golenetskii et al. 1984;Feroci et al. 2002;Yamazaki et al. 2006).Consequently, obtaining both well-featured temporal data and the accurate spectral data of MGF has been unattainable, until the first spectrally confirmed MGF GRB 200415A (Yang et al. 2020;Zhang et al. 2023).This event suggests that MGFs in nearby galaxies could produce short gamma-ray bust (GRB)-like events and contribute to at least a subsample of the observed short gamma-ray bursts (Laros et al. 1986;Atteia et al. 1987;Duncan 2001;Hurley et al. 2005;Lazzati et al. 2005).Moreover, a comprehensive analysis and understanding of the MGF spectrum is of great importance in order to identify potential misclassified MGFs in short GRB population, which necessitates a validated and fittable MGF model that effectively accounts for the underlying cause and radiation mechanism.
To understand the mechanism of an MGF, various models involving either internal (Parker 1983a,b) or external (Moffatt 1985;Thompson & Duncan 2001) factors have been proposed.Radiation transfer models, such as the "trapped fireball" and "magnetar relativistic wind," have significantly contributed to providing clarity on the aspect of radiation mechanisms (Thompson & Duncan 1995).Subsequently, a composite model involving both these components was further proposed and developed in the form of the "Comptonized fireball" (Zhang et al. 2023).In this model, photons from the fireball are upscattered and downscattered by the dense e ± pairs at the photosphere radius, producing a multicomponent thermal-like spectrum.This physically derived model has been used and successfully fitted to the spectra of the first extragalactic MGF, GRB 200415A (Zhang et al. 2020;Burns et al. 2021;Yang et al. 2020;Svinkin et al. 2021), offering a method to explore MGF spectral data and gain physical insights into MGF GRBs.
Recently, yet another MGF GRB, 231115A, was detected and initially classified as a short GRB-like event (Fermi GBM Team 2023).Its MGF origin was later inferred by the positional consistency with the nearby galaxy M82 (aka Cigar galaxy; Burns 2023; Mereghetti et al. 2023a) and subsequent empirical spectral analysis (Frederiks et al. 2023;Minaev et al. 2023;Wang et al. 2023).This event provides us with an additional opportunity to conduct an in-depth study of MGF temporal and spectral properties using the modified Comptonized fireball model and state-of-the-art fitting tools.Such an approach will allow us to directly check if the observed properties can be fitted to the physical model, thus more directly revealing the physical origins.In this Letter, we first provide details of data reduction and analysis in section 2. Empirical and physical model fitting are presented in section 3. Finally, we summarize and discuss our results in section 4.

DATA REDUCTION AND ANALYSIS
At 15:36:21.201UT on 2023 November 15 (denoted as T 0 ), the Fermi Gamma-ray Burst Monitor (GBM; Meegan et al. 2009) detected the MGF GRB 231115A (Dalessi et al. 2023;Fermi GBM Team 2023).Almost immediately, INTEGRAL (Winkler et al. 2003) was also triggered by the event (D'Avanzo et al. 2023).Subsequently, the positional data indicated alignment with the nearby galaxy M82, situated at luminosity distance of ∼ 3.5 Mpc (Burns 2023;Mereghetti et al. 2023a).We retrieved the time-tagged event dataset covering the time range of MGF GRB 231115A from the Fermi/GBM 3.5 Event rate density (Gpc −3 yr −1 ) ∼ 8 × 10 5 public data archive 1 .Among all 12 sodium iodide (NaI) detectors, n6, n7 and n8 were selected with the smallest viewing angles with respect to the GRB source direction.Additionally, for temporal and spectral analysis, we included the brightest bismuth germanium oxide detector, b1.
We processed the Fermi/GBM data following the standard procedures described in Zhang et al. (2011) and Yang et al. (2022).Figure 1 demonstrates that the event lasts for ∼ 79 ms after T 0 , exhibiting consistent pulse profiles in different energy ranges.Upon analyzing multiwavelength light-curve pairs in the upper four panels of Figure 1, we derived spectral lags between the lowest energy band (10-50 keV) and higher energy bands (50-150, 150-300, 300-1000 keV), revealing tiny values of 0.60 +4.10  −4.30 ms, 2.20 +4.90 −7.30 ms and 0.50 +3.30   −2.70 ms, respectively.We further extracted the T 90 interval of 55.90 +3.43 −1.91 ms in the standard energy range of 10-1000 keV, as is depicted in the lower two panels of Figure 1.Following the same energy range, two Bayesian blocks were recognized by implementing Bayesian method (Scargle et al. 2013) on the timetagged event data.Half of the minimum bin size of these blocks, 13.95 ms, is regarded as the minimum variability timescale of this event.Those temporal properties fall within the expected range for a short GRB, similar to GRB 200415A (Yang et al. 2020).
Given the consecutive detection of MGF GRBs 200415A (Yang et al. 2020;Zhang et al. 2020;Burns et al. 2021;Svinkin et al. 2021) and231115A (Frederiks et al. 2023;Mereghetti et al. 2023b;Minaev et al. 2023;Wang et al. 2023), we calculated the event rate density (ρ) for extragalactic MGFs using the formula ΩT 4π ρV max = N = 2, where Ω ∼ 8 sr, and T ∼ 7.5 yr are associated with the Fermi/GBM field of view and effective operational time.We considered D max ∼ 5 Mpc from Burns et al. (2021) as the maximum distance for detecting such an event, from which we obtained the maximum volume V max .The derived event rate density (ρ) is approximately 8 × 10 5 Gpc −3 yr −1 , slightly surpassing the upper limit of the estimation (∼ 3.8 +4.0 −3.1 × 10 5 Gpc −3 yr −1 ) in Burns et al. (2021), given the inclusion of the recent detection of MGF GRB 231115A.This high-event-rate density, combined with temporal similarities to short GRBs, as summerized in Table 1, suggests that MGFs could constitute a subset of short GRBs.Therefore, a comprehensive analysis of the spectral properties of MGFs is essential to further identify and understand the nature of such events in existing GRB archival data.

SPECTRAL FIT
Thanks to the high temporal and spectral resolution of the Fermi/GBM data, we conducted both timeintegrated and time-resolved spectral fits and implemented the Comptonized fireball model to thoroughly examine the underlying radiation components.

Empirical Spectral Model Fit
We first performed both time-integrated and timeresolved spectral fits by adopting two empirical spectral models, namely cutoff power law (CPL) and blackbody (BB), over the entire event period, from -18 to 61 ms.To evaluate the goodness of fit, we examine the reduced statistic PGSTAT/degrees of freedom (dof), where PG-STAT (Arnaud 1996) is employed as the likelihood for Poisson data with Gaussian background, and dof is the degree of freedom.We conduct the model comparison on the basis of Bayesian information criterion (BIC; Schwarz 1978).The best-fit parameters obtained for each model within different time intervals are listed in Table 3.
It is noteworthy that the best-fit low-energy photon index, α, significantly surpasses the synchrotron "death line" defined by α = −2/3 (Preece et al. 1998) and is generally above zero, indicating that the spectra are thermal-like.An intensity tracking pattern (Golenetskii et al. 1983) emerges in the behavior of the peak energy and the temperature throughout this event, as depicted in the left panel of  3) for spectral analysis.
a sudden variation in the emission source.Subsequent decay evident in the latter two time slices may signify a cooling phase within the emission region.Such spectral evolution aligns with the characteristics expected of a rapidly expanding, followed by gradually cooling fireball-like emission source, prompting us to perform a physical fit involving a Comptonized fireball model to explain the observation.This further investigation aims to understand the origin and radiation mechanism of the event in detail.

The Comptonized Fireball Model
Consider a trapped fireball bubble, formed by photonrich pair plasma captured by closed magnetic field lines, breaking free from its magnetic constraints and undergo-ing expansion toward the photosphere radius.Concurrently, due to the pressure from photon-pair plasma and the acceleration caused by the gap potential difference, a substantial number of e ± pairs-characterized by high density and a thermal distribution-propagate along the magnetic field lines, forming a relativistic wind.Consequently, within the magnetar wind region, these relativistic e ± pairs Comptonize the photons of the fireball, resulting in the production of high-energy gamma-ray emissions with a thermal-like distribution.
Under a strong magnetic field condition, the thermal photons of an expanding fireball undergo two fundamental scattering processes: coherent Compton (CC) and incoherent inverse Compton (IC) scattering.Hence, the Comptonized fireball model anticipates a modified thermal-like spectrum characterized by three components, each predominantly influenced by the Rayleigh-Jeans regime, coherent Compton scattering and inverse Compton process, from the low-energy end to the highenergy tail.According to Zhang et al. (2023), the observed flux can be written in the form of where n ± , T ′ and α IC are the number density of the e ± in the emission region, the thermodynamic equilibrium temperature in the comoving reference frame, and the index related to the IC intensity, respectively.l 0 denotes the initial radius of the expanding fireball.B * stands for the local surface magnetic field of the magnetar, which is assumed to be constant across different time intervals.
In Eq. 1, the parameter ⟨θ B ⟩ is considered as an effective incident angle between the photons and the magnetic field, serving as an average effect and consolidating the impact of all possible incident angles θ B of each individual photon.As noted in Zhang et al. (2023), information on the actual values of θ B as well as their distributions is limited and may only be viable through numerical simulation.Thus, Zhang et al. (2023) treat ⟨θ B ⟩ as a free parameter and have attempted to obtain some constraints from spectral fitting.However, as shown in Zhang et al. (2023), ⟨θ B ⟩ is loosely constrained by comparing the model to data, motivating us to further investigate the flux dependence of ⟨θ B ⟩.
Indeed, upon checking Eq. ( 17) in Zhang et al. (2023), (note that κ ff is the linear superposition of the absorption factor for O-mode and E-mode photons of the bremsstrahlung process, and κ es is the superimposed scattering opacity from e ± plasma.They are both functions of photon energy E).In the left panel of Figure A1, we plot f as a function of θ B and E and find that, for a certain energy E, f is almost constant for different values of θ B (right panel of Figure A1).Thus, for a bunch of photons, the effective ⟨θ B ⟩ is not sensitive to their distribution form.For simplicity, in this work, we assumed the photon incident angles, θ B , are isotropically distributed between 0 and π.We then further calculate the averaged f value by averaging f (θ B , E) over those angles, i.e., (2) Replacing f (θ B , E) with ⟨f (θ B , E)⟩ in Eq.1, we finally obtain which can be used to directly fit to the observed data in §3.2.2.

The Fit
The fitting is performed by utilizing the Python package, MySpecFit, following the methodology outlined in Yang et al. (2022Yang et al. ( , 2023)).The modified Comptonized fireball model with linked parameters B * and l 0 between all time slices was effectively employed to fit the observed time-resolved spectra of MGF GRB 231115A.We also performed a time-integrated spectral fit by fixing B * and l 0 to those values obtained from the time-resolved spectra fits.For all the fits, the prior ranges of the free parameters are listed in Table 2.
We derived best-fit parameter sets, along with their associated uncertainties (see also Figure 2), and corresponding statistics detailed in Table 3.The corner plots of the posterior probability distributions of the parameters for the fit are shown in Figure 4.The left panel of Figure 2 displays the evolution of the best-fit parameters.Based on those fits, we present the evolution of the νF ν spectra for different observed times, alongside the comparison between the observed and modeled photon count spectra for the time-integrated slice in the left panels of Figure 2.

The Results and Implications
Examining the PGSTAT/dof values in Table 3, both empirical models and the Comptonized fireball model achieve good fits.Notably, the statistical preference for the Comptonized fireball model, indicated by the smallest BIC across all time slices, emphasizes its effectiveness.This suggests the robustness of our physical model in providing a more comprehensive and adequate description of the observed data in terms of understanding the underlying radiation mechanism.Consequently,  3. Right bottom panels: the observed and modeled photon count spectra of the time-integrated slice.All error bars mark the 1 σ confidence level.The values of best-fit parameters are overall consistent with the theoretical predictions as detailedly described in Zhang et al. (2023).Our results highlight the following radiation properties of this MGF burst: 1. n ± is confined within the range of [3.55 × 10 23 , 1.48 × 10 24 ] cm −3 , corroborating the notably high density of charged particles in the relativistic wind attributed to the substantial e ± from the magnetosphere and the generation of secondary e ± pairs.The abrupt drop of n ± from T 0 -18 ms to T 0 +1 ms indicates an expansion of the fireball radius, consistent with the estimation in Eq. ( 3) in Zhang et al. (2023), considering the same B * across each time interval.After T 0 +1 ms, the number density stabilizes within a generally constant value, as indicated by the 1-σ uncertainty.The latter evolu-  tion might be caused by the increase of secondary e ± pairs while interacting with the magnetic field or the injection of the relativistic wind.
2. l 0 , well-constrained at 1.95 × 10 5 cm as a linked parameter in all time slices, provides us with the radius of the trapped fireball.
3. Using the time-integrated spectra, we constrained the thermal energy of the expanding fireball in the comoving frame kT ′ ∼ 12.73 keV.By requiring the value of Rosseland mean optical depth for the E-mode photons to be unity in Eq. ( 5) in Zhang et al. (2023), we can derive the minimal radiation radius, l x , of the expanding fireball as follows: where σ T is the Thomson cross section, m e is the electron mass, c is the speed of light, B Q is the quantum critical field (Thompson & Duncan 1995), and B R is the magnetic field at radius R, i.e., B R = B * (R/R S ) −3 .R S ∼ 10 6 cm.Eq. 4 yields l x ∼ 1.09 × 10 6 cm.We can then further calculate the value of the bulk Lorentz factor for the expanding fireball as Γ ∼ (l x /l 0 ) 3/2 ∼ 13.30.Utilizing Γ and kT ′ , we can estimate the observed kT obs = ΓkT ′ ∼ 169.31 keV.This estimation aligns with the temperature derived from the averaged BB spectrum, which stands at ∼ 119.66 keV, as listed in Table 3.
4. As the model requires small-scale magnetic field lines intertwining, the increase of line density could result in the local magnetic field surpassing 10 16 G.The best-fit local surface magnetic field of the neutron star, B * , yields a value of 2.51 × 10 16 G, constrained within prior ranges.
5. α IC is constrained in the range of [0, 6] in the time-integrated time slice and the first two timeresolved slices, reflecting the domination of the IC process in the high-energy spectrum.We conducted a flux ratio estimation between the ICdominated Wien spectrum and the entire spectrum in the 1-10000 keV energy range, revealing a significant value in each time slice shown in the left panel of Figure 2. Similar findings were observed in GRB 200415A, where α IC across all time slices remains below 6.However, the last two time slices lack precise constraints even if we set the prior upper limits to 10.This outcome stems from the scarcity of high-energy photons, insufficient for a comprehensive representation of the IC process.Thus, simply elevating α IC beyond 6 would not appropriately account for the last two time slices.
The isotropic energy predicted by the model can be derived as E iso = 4πD 2 L F obs /(1 + z), where F obs is the model fluence calculated using the best-fit parameters and the time interval.From the time-integrated νF ν spectrum, the peak energy E p is determined to be 610.07+110.68  −38.62 keV, in agreement with E p (CPL) at ∼ 605.54 +84.72  −67.84 keV.The E p and E iso trace the giant flares track on the E pz − E iso diagram (Amati et al. 2002) in Figure 3, indicating a broader energetic range for extragalactic MGFs, alongside GRB 200415A.

SUMMARY AND DISCUSSION
In this Letter, we found that the second observed extragalactic MGF GRB, 231115A, is similar to GRB 200415A with respect to both temporal and spectral properties.We further employed a physically driven model to successfully infer the radiation origin of the burst.We conducted time-integrated and time-resolved spectral fits using the Comptonized fireball model, comparing it with empirical model fits.Our results reveal that the observed temperature and peak energy derived from the physical model align well with those obtained from CPL and BB models.Notably, the fitting statistics indicate a preference for the Comptonized fireball model.Utilizing the best-fit parameters, the Comptonized fireball model predicts local surface magnetic field instability, projecting strengths reaching up to ∼ 2.51 × 10 16 G.This instability leads to strong magnetic reconnection, forming the trapped fireball with a radius of ∼ 1.95×10 5 cm.Meanwhile, the high-density electrons and positrons manifest into a relativistic wind, serving as a Compton cloud, causing CC and IC scattering of the photons from the fireball.Initially, the IC process gives rise to a dominant Wien spectrum component, accounting for 75.59% of the entire flux.Subsequently, both CC and IC processes exert significant influence on the spectrum, with CC dominating the intermediate-energy region and IC prevailing in the high-energy region.Furthermore, we determine the E p and E iso from the physical model and place the burst onto the E pz − E iso diagram, confirming its physical origin as an MGF.
The successful fit of the Comptonized fireball model to the spectra of MGF GRB 231115A establishes a clear and self-consistent scenario to explain those peculiar bursts.Additionally, our fits indicate relatively higher local magnetic fields (2.5 × 10 16 G), increasing the likelihood of detecting gravitational waves generated by magnetar oscillations (Kashiyama & Ioka 2011).This makes MGF GRBs promising candidates for kilohertz gravitational wave sources (The LIGO Scientific Collaboration et al. 2022), especially if they can occur within our Galaxy.
We are grateful to M. van Putten, Bing Zhang and Zhen-Yu Yan for the helpful discussions.We acknowledge the support from the National Key Research and Development Programs of China (2022YFF0711404, 2022SKA0130102), the National SKA Program of China (2022SKA0130100), the National Natural Science Foundation of China (grant Nos.11833003, U2038105, U1831135 and 12121003), the science research grants from the China Manned Space Project with NO.CMS-CSST-2021-B11, the Fundamental Research Funds for the Central Universities, and the Program for Innovative Talents and Entrepreneurs in Jiangsu.This work was performed on an HPC server equipped with two Intel Xeon Gold 6248 modules at Nanjing University.We acknowledge IT support from the computer lab of the School of Astronomy and Space Science at Nanjing University.

Figure 1 .
Figure 1.Multiwavelength light curves of MGF GRB 231115A (top panel).The bin size is set to 5 ms for all light curves.The bottom two panels show the light curve of Fermi/GBM in the energy range of 10-1000 keV and the accumulated counts.The red dashed vertical lines represent the T90 interval.The gray curve corresponds to the derived Bayesian blocks from time-tagged event data.The blue dashed vertical lines mark four time slices (as listed in Table3) for spectral analysis.

Figure 2 .
Figure2.Left panels: the observed light curve of MGF GRB 231115A and its spectral evolution based on the best-fit parameters of the Comptonized fireball model, CPL, and BB models, along with the derived flux ratio between the IC process-dominated Wien spectrum and the entire spectrum in the energy range of 1-10000 keV.The red curve represents IC domination with an IC flux ratio surpassing 50%, while the blue curve represents CC domination with an IC flux ratio below 50%.Right top panel: the evolution of the νFν spectra as a function of the observed times corresponding to the time-resolved slices listed in Table3.Right bottom panels: the observed and modeled photon count spectra of the time-integrated slice.All error bars mark the 1 σ confidence level.

Figure 3 .
Figure 3.The Epz − Eiso correlation diagram.The red, blue, and gray solid lines represent the best-fit correlations for Type-I, Type-II, and MGF populations, respectively.The yellow dot marks the position of GRB 200415A from Yang et al. (2020).The purple dot marks the position of MGF GRB 231115A.All error bars on data points represent their 1 σ confidence level.

Figure 4 .Figure A1 .
Figure 4. Left bottom panel: corner plot of the posterior probability distributions of the parameters for the linked fit of time-resolved spectra using the modified Comptonized fireball model.Right upper panel: corner plot of the posterior probability distributions of the parameters for the fit of time-integrated spectrum using the modified Comptonized fireball model with fixed B * and l0.The red error bars represent 1 σ uncertainties.

Table 1 .
Summary of the observed properties of MGF GRB 231115A.

Table 2 .
The Prior Ranges for the Free Parameters of the Comptonized Fireball Model it further confirms the MGF origin of GRB 231115A.

Table 3 .
Time-integrated and Time-resolved Spectral Fitting of GRB 231115A