Magglow: GRB Afterglow Modeling
- Magglow is an open-source Julia package that models GRB afterglows with finite shell thickness and arbitrary magnetization, addressing limitations of standard codes.
- It employs a semi-analytic treatment of forward and reverse shocks with Bayesian inference to fit multi-band data from events like GRB 110213A.
- The tool integrates detailed radiation physics and shock dynamics, enabling predictions across radio to gamma-ray bands and multi-messenger outputs.
Searching arXiv for the specified paper and closely related context. Magglow is a publicly available, open-source Julia package designed to simulate afterglow emission from gamma-ray bursts (GRBs) in regimes where the ejecta is magnetized, has non-negligible radial width, propagates into a stratified external medium, and generates both forward and reverse shocks. It is introduced in the context of the analysis of GRB 110213A in "Double-Peaked Optical Afterglows with X-ray Shallow Decay Inferring a Magnetized Thick Shell Ejecta" (Kusafuka et al., 18 Aug 2025). Within that framework, Magglow is presented as a state-of-the-art computational tool for physically motivated modeling of shock dynamics, multi-wavelength emission, and multi-messenger predictions, with particular emphasis on finite shell thickness and arbitrary magnetization.
1. Definition and modeling domain
Magglow targets afterglow scenarios in which the ejecta is parametrized by an initial magnetization , an initial width , an isotropic equivalent energy , and an initial Lorentz factor . The circumstellar medium is stratified and described by a number-density profile
with allowing ISM-like, wind-like, and more general profiles (Kusafuka et al., 18 Aug 2025).
The package is explicitly positioned in a regime that many public afterglow codes treat only partially: finite shell thickness, arbitrary magnetization, and reverse-shock emission outside thin-shell limits. The source description states that these factors are insufficiently treated or ignored in most other public afterglow codes. This suggests that Magglow is intended less as a generic replacement for standard afterglow solvers than as a specialized framework for magnetized thick-shell transients where those ingredients control the observables.
2. Dynamical framework
Magglow implements a semi-analytic treatment of the hydrodynamics for forward and reverse shocks generated by the interaction of an arbitrary magnetized ejecta with a finite thickness and a stratified circumstellar medium. The dynamics are described under a thin-shell approximation for radiation calculations, while the shell itself is allowed to be thick in the sense of non-negligible radial width (Kusafuka et al., 18 Aug 2025).
The evolution is divided into three phases. In the acceleration phase, if is large, the shell is accelerated by its own magnetic field before interacting significantly with the circumstellar medium, with for . In the transition phase, the reverse shock ignites and crosses into the shell, and the Lorentz factor decelerates more slowly than in the self-similar phase because of the inertia of the thick shell. In the Blandford–McKee phase, after all shell mass participates in shocks, classical self-similar deceleration resumes with .
The paper also identifies key timescales and asymptotic relations. The reverse-shock crossing time 0 is defined through an integral relation involving the shell width and reverse-shock kinematics, with 1 computed using relativistic MHD Rankine–Hugoniot conditions. During the transition phase, the forward- and reverse-shock Lorentz factors are taken to be equal, and the asymptotic behavior is given as
2
A plausible implication is that Magglow is structured to interpolate between idealized asymptotic regimes and the observationally important intermediate phase in which thick-shell effects modify the deceleration law.
3. Radiation physics and geometric treatment
Magglow computes emission from both the forward shock and the reverse shock. The radiative processes included are synchrotron emission, synchrotron self-Compton, synchrotron self-absorption, Klein–Nishina corrections, and 3 pair production absorption. The package also includes optional hadronic emission channels, specified as 4 and 5, although these are off by default for the GRB 110213A analysis (Kusafuka et al., 18 Aug 2025).
Microphysics is independently specified for the two shock zones through the fractions of internal energy given to electrons and magnetic field, 6, 7, 8, and 9; the electron spectral indices 0 and 1; and the fractional number of accelerated electrons 2 and 3. These parameters are fit jointly with the macroscopic ejecta and environmental parameters.
The observed radiation is integrated over the Equal Arrival Time Surface, using
4
with full angle and geometry treatment for observer location and jet structure. The geometry implemented is that of top-hat jets with finite opening angle and no lateral spreading, while being described as extending toward inclusion of additional geometric complexity. This suggests that the package prioritizes controlled treatment of magnetization and shell structure over maximal jet-structure generality.
4. Inference workflow and application to GRB 110213A
The package is applied to multi-band afterglow photometry and spectra of GRB 110213A, spanning X-ray, IR, optical, and UV data. Extinction correction is applied to all bands, and parameter inference is performed with multimodal Nested Sampling via PyMultiNest using Gaussian likelihoods to derive posterior probability density functions and Bayesian evidence (Kusafuka et al., 18 Aug 2025).
In that application, the inferred ejecta is described as thick and highly magnetized. The reported characteristic values are 5 s, much greater than the prompt 6; 7; 8 erg; 9; and 0 rad. The paper states that the thick shell ejecta naturally explains the shallow decay feature of the X-ray afterglow, while the combination of reverse-shock emission in the strongly magnetized jet and forward-shock emission in the weakly magnetized circumstellar medium produces the double peak feature of the optical afterglows.
The physical interpretation is divided by band and temporal feature. The shallow-decay X-ray afterglow is attributed to the transition phase, where thick, magnetized ejecta continues to inject energy into the forward shock and thereby slows deceleration. The first optical peak is attributed to the reverse shock, and the second to the forward shock, delayed by the thick shell and energy injection. The paper further states that the observed prompt radiative inefficiency, quoted as 1, matches the expectation for high-2 shells where shock dissipation is suppressed. Magglow is reported to fit all available light curves across bands simultaneously and to predict synchrotron and SSC emission from both shock zones, with figures in the paper showing fit quality and parameter correlations.
5. Capabilities and comparative positioning
The package is described as spanning radio to gamma-ray energies and as being multi-messenger ready through hadronic modules. It is also presented as supporting efficient parameter inference and evidence comparison. The following summary organizes capabilities explicitly stated in the source description (Kusafuka et al., 18 Aug 2025).
| Feature | Standard Afterglow Codes | Magglow |
|---|---|---|
| Magnetized Dynamics | No / limited | Yes (3 fully implemented) |
| Finite Shell Thickness | No / limited | Yes (4 unlimited) |
| Stratified CSM | Sometimes | Yes (5) |
| Reverse Shock Emission | Sometimes, thin shell only | Yes, arbitrary shell, full MHD |
| Multi-messenger Output | No | Yes |
| Bayesian Fitting/Inference | Sometimes | Yes |
| Public Availability | Yes (some) | Yes |
In contextual terms, the comparative claim is not that standard codes are uniformly incapable, but that Magglow occupies a specific technical niche: arbitrary magnetization, arbitrary shell thickness, full MHD treatment of reverse shocks, and integration with sampling-based inference. A common misconception would be to treat early afterglow morphology as adequately captured by unmagnetized or thin-shell prescriptions alone; the GRB 110213A analysis is presented precisely as a counterexample in which those additional degrees of freedom are necessary to explain the optical and X-ray phenomenology jointly.
6. Scientific significance and predicted use cases
The source description attributes three broader contributions to Magglow. First, it provides a physically consistent, modular, and community-ready simulation engine for GRB afterglow modeling, especially for magnetized and thick-shell effects that were previously accessible mainly to custom or unpublished codes. Second, its application to GRB 110213A is used to argue that double-peaked optical afterglows combined with X-ray shallow decay can probe ejecta magnetization and radial structure. Third, it is presented as a platform for rapid quantitative interpretation of future multi-wavelength and multi-messenger datasets (Kusafuka et al., 18 Aug 2025).
The package also generates predictions beyond the fitted dataset. For GRB 110213A, radio and GeV/TeV gamma-ray afterglow light curves are predicted even though they were not measured for that burst, including features such as Klein–Nishina-induced spectral bumps and shaping by synchrotron self-absorption. This suggests that Magglow is intended not only for retrospective fitting but also for forward modeling of observational signatures in incompletely sampled events.
Because the implementation is explicitly tied to top-hat jets without lateral spreading, some classes of structured-jet phenomenology remain outside the described core configuration. Within its intended domain, however, Magglow is characterized as a tool for decoding jet physics, energetics, and emission mechanisms when shell thickness, magnetization, and shock-zone separation are observationally consequential.