11:22:08.399687685. Visualization is done by taking $\mu\pm 3\sigma$ from the
amplitude value in each panel, and they are not normalized to each other.

## References

  * Astropy Collaboration et al. (2018) Astropy Collaboration, Price-Whelan, A. M., Sipőcz, B. M., et al. 2018, AJ, 156, 123, doi: 10.3847/1538-3881/aabc4f
  * Bandura et al. (2014) Bandura, K., Addison, G. E., Amiri, M., et al. 2014, in Ground-based and Airborne Telescopes V, ed. L. M. Stepp, R. Gilmozzi, & H. J. Hall, Vol. 9145, International Society for Optics and Photonics (SPIE), 738 – 757, doi: 10.1117/12.2054950
  * Bandura et al. (2016) Bandura, K., Bender, A. N., Cliche, J. F., et al. 2016, Journal of Astronomical Instrumentation, 5, 1641005, doi: 10.1142/S2251171716410051
  * Bannister et al. (2017) Bannister, K. W., Shannon, R. M., Macquart, J. P., et al. 2017, ApJ, 841, L12, doi: 10.3847/2041-8213/aa71ff
  * Bannister et al. (2019) Bannister, K. W., Deller, A. T., Phillips, C., et al. 2019, Science, 365, 565, doi: 10.1126/science.aaw5903
  * Bhardwaj et al. (2021) Bhardwaj, M., Gaensler, B. M., Kaspi, V. M., et al. 2021, ApJ, 910, L18, doi: 10.3847/2041-8213/abeaa6
  * Bij et al. (2021) Bij, A., Lin, H.-H., Li, D., et al. 2021, ApJ, 920, 38, doi: 10.3847/1538-4357/ac1589
  * Broten et al. (1967) Broten, N. W., Legg, T. H., Locke, J. L., et al. 1967, Science, 156, 1592, doi: 10.1126/science.156.3782.1592
  * Cary et al. (2021) Cary, S., Mena-Parra, J., Leung, C., et al. 2021, Research Notes of the American Astronomical Society, 5, 216, doi: 10.3847/2515-5172/ac289d
  * CHIME/FRB Collaboration et al. (2018) CHIME/FRB Collaboration, Amiri, M., Bandura, K., et al. 2018, ApJ, 863, 48, doi: 10.3847/1538-4357/aad188
  * CHIME/FRB Collaboration et al. (2020) CHIME/FRB Collaboration, Andersen, B. C., Bandura, K. M., et al. 2020, Nature, 587, 54, doi: 10.1038/s41586-020-2863-y
  * Cordes et al. (2004) Cordes, J. M., Bhat, N. D. R., Hankins, T. H., McLaughlin, M. A., & Kern, J. 2004, ApJ, 612, 375, doi: 10.1086/422495
  * Cotton (1995) Cotton, W. D. 1995, in Astronomical Society of the Pacific Conference Series, Vol. 82, Very Long Baseline Interferometry and the VLBA, ed. J. A. Zensus, P. J. Diamond, & P. J. Napier, 289
  * Dawson (1970) Dawson, J. R. 1970, Astronomy receiver systems for the Algonquin Radio Observatory, Tech. rep., doi: 10.4224/21276289
  * Deng & Campbell-Wilson (2017) Deng, M., & Campbell-Wilson, D. 2017, arXiv e-prints, arXiv:1708.08521.  https://arxiv.org/abs/1708.08521
  * Eftekhari & Berger (2017) Eftekhari, T., & Berger, E. 2017, ApJ, 849, 162, doi: 10.3847/1538-4357/aa90b9
  * Eubanks et al. (1991) Eubanks, M., Treuhaft, R., J.B.Thomas, et al. 1991, Proceedings of the U.S. Naval Observatory Workshop on Relativistic Models for use in Space Geodesy
  * Foreman-Mackey (2016) Foreman-Mackey, D. 2016, Journal of Open Source Software, 1, 24, doi: 10.21105/joss.00024
  * Gordon et al. (2016) Gordon, D., Brisken, W., & Max-Moerbeck, W. 2016, in New Horizons with VGOS, ed. D. Behrend, K. D. Baver, & K. L. Armstrong, 187–192
  * Hankins & Rickett (1975) Hankins, T. H., & Rickett, B. J. 1975, Methods in Computational Physics, 14, 55, doi: 10.1016/B978-0-12-460814-6.50007-3
  * Harris & Haines (2011) Harris, C., & Haines, K. 2011, PASA, 28, 317, doi: 10.1071/AS11032
  * Harris et al. (2020) Harris, C. R., Millman, K. J., van der Walt, S. J., et al. 2020, Nature, 585, 357, doi: 10.1038/s41586-020-2649-2
  * Hunter (2007) Hunter, J. D. 2007, Computing in Science and Engineering, 9, 90, doi: 10.1109/MCSE.2007.55
  * Josephy et al. (2021) Josephy, A., Chawla, P., Curtin, A. P., et al. 2021, arXiv e-prints, arXiv:2106.04353.  https://arxiv.org/abs/2106.04353
  * Kirsten et al. (2021) Kirsten, F., Marcote, B., Nimmo, K., et al. 2021, arXiv e-prints, arXiv:2105.11445.  https://arxiv.org/abs/2105.11445
  * Leung et al. (2021) Leung, C., Mena-Parra, J., Masui, K., et al. 2021, AJ, 161, 81, doi: 10.3847/1538-3881/abd174
  * Lorimer et al. (2007) Lorimer, D. R., Bailes, M., McLaughlin, M. A., Narkevic, D. J., & Crawford, F. 2007, Science, 318, 777, doi: 10.1126/science.1147532
  * Lorimer & Kramer (2012) Lorimer, D. R., & Kramer, M. 2012, Handbook of Pulsar Astronomy
  * Lyne et al. (2015) Lyne, A. G., Jordan, C. A., Graham-Smith, F., et al. 2015, MNRAS, 446, 857, doi: 10.1093/mnras/stu2118
  * Manchester et al. (2005) Manchester, R. N., Hobbs, G. B., Teoh, A., & Hobbs, M. 2005, AJ, 129, 1993, doi: 10.1086/428488
  * Marcote et al. (2017) Marcote, B., Paragi, Z., Hessels, J. W. T., et al. 2017, ApJ, 834, L8, doi: 10.3847/2041-8213/834/2/L8
  * Marcote et al. (2020) Marcote, B., Nimmo, K., Hessels, J. W. T., et al. 2020, Nature, 577, 190, doi: 10.1038/s41586-019-1866-z
  * Masui et al. (2019) Masui, K. W., Shaw, J. R., Ng, C., et al. 2019, ApJ, 879, 16, doi: 10.3847/1538-4357/ab229e
  * Medd & Broten (1961) Medd, W. J., & Broten, N. W. 1961, Planet. Space Sci., 5, 307, doi: 10.1016/0032-0633(61)90102-7
  * Mena-Parra et al. (2021) Mena-Parra, J., Leung, C., Cary, S., et al. 2021, arXiv e-prints, arXiv:2110.00576.  https://arxiv.org/abs/2110.00576
  * Michilli et al. (2020) Michilli, D., Masui, K. W., Mckinven, R., et al. 2020, arXiv e-prints, arXiv:2010.06748.  https://arxiv.org/abs/2010.06748
  * Mini-Circuits (2017a) Mini-Circuits. 2017a, Low Noise Amplifier, Mini-Circuits, P.O. Box 350166, Brooklyn, NY 11235-0003.  https://www.minicircuits.com/pdfs/ZX60-112LN+.pdf
  * Mini-Circuits (2017b) —. 2017b, Bandpass Filter, Mini-Circuits, P.O. Box 350166, Brooklyn, NY 11235-0003.  https://www.minicircuits.com/pdfs/ZABP-598-S+.pdf
  * Moldón et al. (2015) Moldón, J., Deller, A. T., Wucknitz, O., et al. 2015, A&A, 574, A73, doi: 10.1051/0004-6361/201425042
  * National Research Council of Canada & Division (1969) National Research Council of Canada, R., & Division, E. E. 1969, Algonquin Radio Observatory, Tech. rep., doi: 10.4224/21276076
  * Ng et al. (2017) Ng, C., Vanderlinde, K., Paradise, A., et al. 2017, arXiv e-prints, arXiv:1702.04728.  https://arxiv.org/abs/1702.04728
  * Noll (2010) Noll, C. E. 2010, Advances in Space Research, 45, 1421, doi: https://doi.org/10.1016/j.asr.2010.01.018
  * Pearson (1999) Pearson, T. J. 1999, in Astronomical Society of the Pacific Conference Series, Vol. 180, Synthesis Imaging in Radio Astronomy II, ed. G. B. Taylor, C. L. Carilli, & R. A. Perley, 335
  * Pennucci et al. (2014) Pennucci, T. T., Demorest, P. B., & Ransom, S. M. 2014, ApJ, 790, 93, doi: 10.1088/0004-637X/790/2/93
  * Perley & Butler (2017) Perley, R. A., & Butler, B. J. 2017, ApJS, 230, 7, doi: 10.3847/1538-4365/aa6df9
  * Petroff et al. (2019) Petroff, E., Hessels, J. W. T., & Lorimer, D. R. 2019, A&A Rev., 27, 4, doi: 10.1007/s00159-019-0116-6
  * Petroff et al. (2016) Petroff, E., Barr, E. D., Jameson, A., et al. 2016, PASA, 33, e045, doi: 10.1017/pasa.2016.35
  * Ponce et al. (2019) Ponce, M., van Zon, R., Northrup, S., et al. 2019, in Proceedings of the Practice and Experience in Advanced Research Computing on Rise of the Machines (Learning), PEARC ’19 (New York, NY, USA: Association for Computing Machinery), doi: 10.1145/3332186.3332195
  * Popov et al. (2017) Popov, M. V., Rudnitskii, A. G., & Soglasnov, V. A. 2017, Astronomy Reports, 61, 178, doi: 10.1134/S1063772917030064
  * Price (2016) Price, D. C. 2016, arXiv e-prints, arXiv:1607.03579.  https://arxiv.org/abs/1607.03579
  * Rankin et al. (1970) Rankin, J. M., Comella, J. M., Craft, H. D., J., et al. 1970, ApJ, 162, 707, doi: 10.1086/150703
  * Ravi et al. (2019) Ravi, V., Catha, M., D’Addario, L., et al. 2019, Nature, 572, 352, doi: 10.1038/s41586-019-1389-7
  * Reid & Honma (2014) Reid, M. J., & Honma, M. 2014, ARA&A, 52, 339, doi: 10.1146/annurev-astro-081913-040006
  * Schwab & Cotton (1983) Schwab, F. R., & Cotton, W. D. 1983, AJ, 88, 688, doi: 10.1086/113360
  * Soffel et al. (1991) Soffel, M. H., Wu, X., Xu, C., & Mueller, J. 1991, AJ, 101, 2306, doi: 10.1086/115851
  * Spectrum Instruments (2007) Spectrum Instruments, I. 2007, Intelligent Reference/TM-4D.  http://www.spectruminstruments.net/products/tm4d/tm4d.html
  * T4Science (2018) T4Science. 2018, Passive Hydrogen Maser Clock, T4 Science iPrecision Maser Solutions.  https://www.t4science.com/products/phmaser-1008/
  * The CHIME/FRB Collaboration et al. (2021) The CHIME/FRB Collaboration, :, Amiri, M., et al. 2021, arXiv e-prints, arXiv:2106.04352.  https://arxiv.org/abs/2106.04352
  * Thompson et al. (2017) Thompson, A. R., Moran, J. M., & Swenson, George W., J. 2017, Interferometry and Synthesis in Radio Astronomy, 3rd Edition, doi: 10.1007/978-3-319-44431-4
  * Thulasiram & Lin (2021) Thulasiram, P., & Lin, H.-H. 2021, MNRAS, 508, 1947, doi: 10.1093/mnras/stab2692
  * Titov et al. (2020) Titov, O., Melnikov, A., & Lopez, Y. 2020, PASA, 37, e050, doi: 10.1017/pasa.2020.43
  * van Kerkwijk et al. (2020) van Kerkwijk, M., Robitaille, T., Zhu, C. C., et al. 2020, mhvk/baseband v4.0.3, v4.0.3, Zenodo, doi: 10.5281/zenodo.4292543
  * Virtanen et al. (2020) Virtanen, P., Gommers, R., Oliphant, T. E., et al. 2020, Nature Methods, 17, 261, doi: 10.1038/s41592-019-0686-2
  * Wall & Jenkins (2012) Wall, J. V., & Jenkins, C. R. 2012, Practical Statistics for Astronomers


11institutetext: Instituto de Estudios Astrofísicos, Facultad de Ingeniería y
Ciencias, Universidad Diego Portales, Av. Ejército Libertador 441, Santiago,
Chile
11email<EMAIL_ADDRESS>22institutetext: Millenium Nucleus ERIS
33institutetext: Millennium Institute of Astrophysics MAS, Nuncio Monseñor
Sotero Sanz 100, Off. 104, Providencia, Santiago, Chile 44institutetext:
Departamento de Astronomía, Universidad de Chile, Camino El Observatorio 1515,
Las Condes, Santiago, Chile 55institutetext: Department of Astronomy and
Astrophysics, University of Toronto, 50 St. George Street, Toronto, ON M5S
3H4, Canada

# Early flash-ionization lines in SN 2024ggi revealed by high-resolution
spectroscopy

Thallis Pessi 11 Régis Cartier 11 Emilio Hueichapan 11 Danielle de Brito Silva
1122 Jose L. Prieto 1133 Ricardo R. Muñoz 44 Gustavo E. Medina 55 Paula Diaz
44 Ting S. Li 55

###### Abstract

Context. We present an analysis of very early high-resolution spectroscopic
observations of the nearby core-collapse (CC) supernova (SN) 2024ggi, a Type
II SN that ocurred in the galaxy NGC 3621, at a distance of $7.11$ Mpc
($z\approx 0.002435$). These observations represent the earliest high-
resolution spectroscopy of a CCSN ever made.

Aims. We analyze the very early-phase spectroscopic evolution of SN 2024ggi
obtained in a short interval at $20.6$ and $27.8$ h after its discovery, or
$26.6$ and $33.8$ h after the SN first light. Observations were obtained with
the high-resolution spectrograph MIKE ($R\approx 22\ 600-28\ 000$) at the
$6.5$ m Magellan Clay Telescope, located at the Las Campanas Observatory,
during the night of 2024-04-12 UT.

Methods. We constrain emission line features in the early-phase spectroscopic
evolution of SN 2024ggi. We analyze the evolution of the main spectroscopic
features and the occurrence of high-ionization emission lines, by estimating
their full width at half maximum (FWHM), equivalent width (EW), and blueshift
velocities. We then compare our results to other early-time observations of
CCSNe with flash-ionization features.

Results. The spectra show strong and narrow (FWHM $<100$ km s-1) features of
Balmer emission lines and of high-ionization species of He I, He II, N III, C
III, together with relatively broader emission features of N IV and C IV. Some
of these features become broader or disappear in the interval of $8$ h,
indicating the rapid changes in the early evolution of CCSNe flash-ionization
features. The He II, C IV, N IV and Balmer emission lines have asymmetric
Lorentzian profiles, with the He II $\lambda 4686$ broad and weak component
showing blue wings that extends up to $\sim-1000$ km s-1. The He I, C III, and
N III emission lines show symmetric profiles. We measure a CSM expansion
velocity of $\sim 79\ \textrm{km}\ \textrm{s}^{-1}$ from the blueshift in the
H$\alpha$ emission profile, and report a blueshift of $\sim 24-29\
\textrm{km}\ \textrm{s}^{-1}$ in the evolution of the N III and C III features
between the two epochs. We also measure a total extinction in the line of
sight of $E(B-V)=0.16\pm 0.02$ mag. Finally, we note many similarities of SN
2024ggi to the early evolution of SN 2023ixf.

###### Key Words.:

supernovae: general - supernovae: individual (SN 2024ggi) - stars: massive

##  1 Introduction

Figure 1: The complete normalized MIKE / Magellan Clay spectra of SN 2024ggi.
The black and red spectra were obtained, respectively, at $26.6$ h and $33.8$
h after the SN’s first light. Vertical lines mark the main emission features
in the spectra, while horizontal dotted gray lines mark the telluric
absorption features, and the horizontal dotted purple lines mark the Na I D
and Ca II H&K absorption lines. The spectra show strong emission lines of H,
He I, He II, N III, N IV, C III, and C IV. The top panel shows the spectra
obtained by the blue arm of the spectrograph, while the three other panels
show the spectra obtained along the red arm.

The discovery of nearby and young core-collapse (CC) supernovae (SNe) provides
a singular opportunity to study these events in detail. The close proximity
allows for very detailed observations to be obtained, from the early explosion
to the late nebular phases. Observations of early CCSN phases allow for a
characterization of the initial explosion features and the last moments in the
life of their massive progenitor stars. A characteristic feature of these
early moments is the appearance of narrow emission lines (usually called
flash-ionization lines) generated by the ionization of dense circumstellar
material (CSM) close to the progenitor star (e.g., Gal-Yam et al., 2014;
Khazov et al., 2016; Yaron et al., 2017; Dessart et al., 2017; Bruch et al.,
2021, 2023). Analyses of these early features can constrain the chemical
composition, temperature, and density of the CSM, as well as properties of the
progenitor star (e.g., Boian & Groh, 2020; Terreran et al., 2022; Jacobson-
Galán et al., 2022, 2024a).

Recently, the discovery of the nearby SN 2023ixf (on 2023-05-19, Itagaki,
2023) in the galaxy M101, at a distance of $6.85$ Mpc (Riess et al., 2022),
was followed by extensive analyses of its evolution (e.g., Hosseinzadeh et
al., 2023; Teja et al., 2023; Hiramatsu et al., 2023; Yamanaka et al., 2023).
The classification spectrum of SN 2023ixf showed flash-ionization features of
H, He, C, and N (Perley & Gal-Yam, 2023). Further analyses of the early
spectral evolution revealed highly-ionized species of He I, He II, C IV, N
III, N IV, and N V, and helped to put constraints in the progenitor and CSM
properties (e.g., Jacobson-Galán et al., 2023; Smith et al., 2023; Bostroem et
al., 2023).

SN 2024ggi was discovered extremely early by the ATLAS survey(Tonry et al.,
2018) on 2024-04-11.14 UT (MJD = 60411.14), at an apparent magnitude of
$o\approx 18.92$ (Tonry et al., 2024; Srivastav et al., 2024), and soon
reported by other dedicated surveys (Killestein et al., 2024; Chen et al.,
2024; Kumar et al., 2024). Early spectroscopic classification confirmed it to
be a Type II SN showing flash-ionization features (Hoogendam et al., 2024;
Zhai et al., 2024), and reports of the SN candidate progenitor star detected
by different instruments were also made (e.g., Yang et al., 2024; Pérez-
Fournon et al., 2024). A recent analysis of the early evolution of SN 2024ggi
was presented by Jacobson-Galán et al. (2024b). The SN is located at RA =
11:18:22.087, DEC = $-32$:50:15.27 (coordinates taken from the last object
coordinate update at the Transient Name Server111https://www.wis-
tns.org/object/2024ggi, made on 2024-04-18), in one of the south-east spiral
arms of the galaxy NGC 3621, at a projected distance of $3.87$ kpc from the
galaxy center (see Figure 5). The Cepheid distance to NGC 3621 is $7.11$ Mpc
(Saha et al., 2006), reported at the NASA/IPAC Extragalactic
Database222https://ned.ipac.caltech.edu/byname?objname=NGC+3621.

Here, we present an analysis of the very early spectroscopic evolution of SN
2024ggi, obtained at $20.6$ and $27.8$ h after its discovery ($26.6$ and
$33.8$ h after the SN’s first light), with the high-resolution Magellan
Inamori Kyocera Echelle (MIKE) spectrograph at the Magellan Clay Telescope
(Bernstein et al., 2003). This letter is organized as follows: In Section 2,
we describe our observations and data reduction; In Section 3, we report
constraints on the early-phase spectroscopic features of SN 2024ggi and a
comparison with other early observations of CCSNe; Finally, in Section 4, we
present a summary and our conclusions.

##  2 Observations

Observations of SN 2024ggi were conducted with the double echelle MIKE
instrument at the $6.5$ m Magellan Clay Telescope, located at the Las Campanas
Observatory. The spectra were obtained during the night of 2024-04-12 UT, at
00:22:01 UT (MJD = 60412.015) and 07:04:24 UT (MJD = 60412.294), respectively
$20.6$ h and $27.8$ h after its discovery. Observations of the two spectra
were taken with a $1.0\arcsec\times 5.0\arcsec$ slit, a $2\times 2$ binning
mode, at an airmass of $1.15$ and $1.81$, respectively. The MIKE spectra have
wavelength resolutions of $R\approx 22\ 600$ for the red side, and $R\approx
28\ 000$ for the blue side (measured at the calibration lamp spectra). The
spectral regions considered in this analysis are from $3570\ \AA$ to $4780\
\AA$, in the blue arm, and from $4900\ \AA$ to $7400\ \AA$, in the red arm.
The spectral regions below $3570\ \AA$ and between $4780\ \AA$ and $4900\ \AA$
have low signal-to-noise ratio and no clear spectral features are detected.
The spectral regions above $7400\ \AA$, in the red arm, are dominated by
telluric lines.

The data was reduced using the standard Carnegie Python Mike pipeline (Kelson
et al., 2000; Kelson, 2003). The pipeline automatically performs wavelength
calibration and flat-fielding, and provide as a result a spectrum divided in
different orders. With the aim of creating the complete 1D spectrum with all
the orders combined, we carefully inspected the wavelength calibration of the
output spectra, checking the consistency between different orders in their
overlapping regions, and using the position of narrow lines as a sanity check.
The 1D spectra (in units of counts) were carefully normalized using a low
order polynomial to fit the continuum, with a particular attention to the
normalization at the edge of each order. In the fitting process we avoided
regions including narrow or broad spectral features. Once normalized, the
different orders were joined, computing the mean of the normalized flux
weighted by its uncertainty in the overlapping regions between the orders.
After the red and blue arms were normalized, the barycentric correction was
performed. This corrects for the Doppler shift introduced by the rotation of
the earth around the sun, thus placing the spectra in the heliocentric system
of reference.

We use the publicly available early ATLAS photometry to estimate the time of
first light of SN 2024ggi, and report the methodology in Appendix B. We find
the best fit for the time of first light to be at $t_{0}=60410.89\pm 0.14$
days, or $6$ h before the time of discovery. We adopt this value throughout
this work. From the early ATLAS light curve, we estimate that the SN had an
apparent magnitude of $o\approx 14.4$ at the time of the first observation,
and of $o\approx 13.7$ during the second observation.

The spectra presented here were corrected by the heliocentric recession
velocity of NGC 3621 of $730\ \textrm{km}\ \textrm{s}^{-1}$ ($z\approx
0.002435$ Koribalski et al., 2004). In Appendix C, Figure 6 shows the detail
of the Na I D and Ca II H&K absorption lines detected in the spectra. Using
these absorption features, we measure a total Galactic extinction in the line
of sight of SN 2024ggi of $E(B-V)_{\textrm{Gal}}=0.12\pm 0.02$ mag and a host
galaxy extinction of $E(B-V)_{\textrm{host}}=0.036\pm 0.007$ mag, resulting in
a total extinction of $E(B-V)_{\textrm{total}}=0.16\pm 0.02$ mag (see our
methodology in Appendix C). Additionally, we measure a velocity blueshift of
$v\approx 71.7\ \textrm{km}\ \textrm{s}^{-1}$ of the center position of these
absorption features relative to the heliocentric velocity of NGC 3621, which
we adopt as the projected rotation velocity of the host at the SN location.

##  3 Results and discussion

Figure 2: The evolution of the H$\alpha$ and He II $\lambda 6560$ emission
lines, between at $26.6$ h (in black) and $33.8$ h (in red) after the time of
first light. The black dotted vertical line marks the zero velocity position
of H$\alpha$, while the pink dotted vertical line marks the host galaxy
rotation velocity of $71.7\ \textrm{km}\ \textrm{s}^{-1}$, measured from the
Na I D and Ca II H&K absorption lines. The H$\alpha$ becomes broader and have
a decrease in EW between the first and second spectrum, while the He II
$\lambda 6560$ emission line disappear in the second epoch. The center of the
H$\alpha$ profile is marked by the blue dotted line, and is blueshifted to a
velocity of $v\approx 151\ \textrm{km}\ \textrm{s}^{-1}$, or to a host
rotation-corrected velocity of $\sim 79\ \textrm{km}\ \textrm{s}^{-1}$.

Figure 3: The evolution of the He II $\lambda 4686$ (top left panel), He I $\lambda 6678$ (top right), C IV $\lambda\lambda 5801,5811$ (bottom left), and N IV $\lambda\lambda\lambda 7103,7109,7123$ (bottom right) lines, at $26.6$ h (in black) and $33.8$ h (in red) after the first light. Spectra are shifted to the zero velocity position of He II $\lambda 4686$, He I $\lambda 6678$, C IV $\lambda 5801$, and N IV $\lambda 7109$, respectively. The lines of He II, C IV, and N IV present a decrease in EW and broadening between the two epochs (see text and Table 1), while the narrow line of He I $\lambda 6678$ disappear in the second spectrum.  Table 1: The measured EW and FWHM for the strong emission lines detected in the two epochs.  Line | EWa | EWb | FWHMa | FWHMb | Wavelength
---|---|---|---|---|---
| [$\AA$] | [$\AA$] | [km s-1] | [km s-1] | [$\AA$]
N III | 0.4 | 0.2 | $42\pm 1$ | $48\pm 2$ | 4641
C III | 0.1 | 0.1 | $43\pm 4$ | $46\pm 5$ | 4647
He II | 1.2 | 0.8 | $66\pm 2$ | $125\pm 5$ | 4686
C IV | 1.4 | 1.3 | $156\pm 7$ | $305\pm 13$ | 5801
H $\alpha$ | 2.7 | 0.8 | $55\pm 2$ | $61\pm 5$ | 6563
He II | 0.5 | - | $40\pm 12$ | - | 6560
He I | 0.3 | - | $37\pm 3$ | - | 6678
N IV | 1.1 | 0.9 | $110\pm 4$ | $210\pm 10$ | 7123

###  3.1 Properties of the emission features

Figure 1 shows the complete high-resolution MIKE spectra of SN 2024ggi, at
$26.6$ h (in black) and $33.8$ h (in red) after the time of first light,
normalized to the continuum counts. Vertical lines mark the positions of the
main emission features identified in the spectra. Telluric absorption
features, Ca II H&K, and the Na I D absorption lines are also highlighted in
the figure. The spectra are dominated by strong Balmer narrow emission lines,
a characteristic of flash-ionization generated in a dense, H-rich CSM.
Notably, both spectra show high ionization lines of He I, He II, N III, C III,
N IV, and C IV. We identify He I $\lambda 5876$, $\lambda 6678$, and $\lambda
7065$, and He II $\lambda 4686$, $\lambda 5411$, and $\lambda 6560$ emission
features. We identify the N III $\lambda\lambda 4634,4641$ and C III
$\lambda\lambda 4647,4650$ doublets in the blue part of the spectra, and a
emission line of C III $\lambda 5697$. The spectra also show strong C IV
$\lambda\lambda 5801,5811$ doublet emission features, and from the N IV
$\lambda\lambda\lambda 7103,7109,7123$ triplet, together with the N IV
$\lambda 4058$ emission line. The C IV and N IV emission lines show broader
profiles compared to the C III and N III lines, at the two epochs. We measure
the equivalent width (EW) and the full width at half maximum (FWHM) of the
strongest emission lines in the spectra by fitting a Gaussian profile to the
lines and report these values in Table 1 for the first ($a$) and second ($b$)
epochs.

Figure 2 shows the spectral region around the H $\alpha$ emission line, with
the black dotted line marking the zero velocity position of H $\alpha$ and the
pink dotted line marking the projected rotation velocity of the host the at SN
location of $71.7\ \textrm{km}\ \textrm{s}^{-1}$. The narrow H $\alpha$
profile has an EW of $\sim 2.7\ \AA$ in the first spectrum, and of $\sim 0.8\
\AA$ in the second. The line also shows an initial FWHM of $\sim 55\
\textrm{km}\ \textrm{s}^{-1}$ and becomes relatively broader at the later
epoch, with a FWHM of $\sim 61\ \textrm{km}\ \textrm{s}^{-1}$. We measure a
blueshift velocity of $v\approx 151\ \textrm{km}\ \textrm{s}^{-1}$ for H
$\alpha$, which after correcting by host rotation velocity gives a value of
$\sim 79\ \textrm{km}\ \textrm{s}^{-1}$, and indicates the expansion velocity
of the CSM. A red dotted vertical line in Figure 2 marks the position of a
narrow (FWHM $\approx 66\ \textrm{km}\ \textrm{s}^{-1}$) He II emission
feature, which is strong in the first spectrum, but fades and gets blended
with H $\alpha$ in the later spectrum.

Figure 3 shows the region around the emission lines of He II $\lambda 4686$,
He I $\lambda 6678$, C IV $\lambda\lambda 5801,5811$, and N IV
$\lambda\lambda\lambda 7103,7109,7123$, where we see their evolution between
$26.6$ h and $33.8$ h after the first light. The features of He II $\lambda
4686$, C IV, N IV, and Balmer lines show narrow cores with broader and
significantly weaker asymmetric Lorentzian wings, with a decrease in EW and
broadening of the narrow component between the two spectra. For He II $\lambda
4686$, we measure FWHM velocities of $\sim 66\ \textrm{km}\ \textrm{s}^{-1}$
and $\sim 125\ \textrm{km}\ \textrm{s}^{-1}$, and EW values of $\sim 1.2\ \AA$
and $\sim 0.8\ \AA$, between the first and second epoch, respectively, by
fitting a Gaussian profile to the narrow components. For C IV $\lambda 5801$,
we measure FWHM velocities of its narrow component of $\sim 156\ \textrm{km}\
\textrm{s}^{-1}$ and $\sim 305\ \textrm{km}\ \textrm{s}^{-1}$, for the first
and second spectrum, respectively. The blue wing of the broad, weaker
component of He II $\lambda 4686$ extend up to $\sim-500\ \textrm{km}\
\textrm{s}^{-1}$ in the first epoch, and up to $\sim-1000\ \textrm{km}\
\textrm{s}^{-1}$ in the second. These velocities are consistent with the broad
components of the C IV, N IV, and Balmer lines. We also notice that the C IV
lines present strong double peak features in the first epoch, which disappear
in the second spectrum. The emission lines of N IV show a decrease in EW and a
significant broadening between the two epochs. We measure FWHM velocities of
$\sim 110\ \textrm{km}\ \textrm{s}^{-1}$ and $\sim 210\ \textrm{km}\
\textrm{s}^{-1}$, for the first and second spectrum, respectively, by fitting
a Gaussian profile to the N IV $\lambda 7123$ emission line. Finally, we
notice that the narrow emission line of He I $\lambda 6678$, with a FWHM
$\approx 37\ \textrm{km}\ \textrm{s}^{-1}$, disappears in the interval of time
between the two spectra, with the spectral region at the later epoch being
dominated by noise. We measure the center positions of the Gaussian profiles
fitted to these lines to be at $\sim-183\ \textrm{km}\ \textrm{s}^{-1}$,
$\sim-156\ \textrm{km}\ \textrm{s}^{-1}$, $\sim-177\ \textrm{km}\
\textrm{s}^{-1}$, and $\sim-205\ \textrm{km}\ \textrm{s}^{-1}$, for the He II
$\lambda 4686$, He I $\lambda 6678$, C IV $\lambda 5801$, and N IV $\lambda
7123$ emission features, respectively.

Figure 4 shows the region around the N III $\lambda\lambda 4634,4641$ and C
III $\lambda\lambda 4647,4650$ emission lines, which are narrow and symmetric.
In the first spectrum, we measure a FWHM of $\sim 42\ \textrm{km}\
\textrm{s}^{-1}$ for N III $\lambda 4641$ and $\sim 43\ \textrm{km}\
\textrm{s}^{-1}$ for C III $\lambda 4647$. In the second spectrum, we measure
FWHM values of $\sim 48\ \textrm{km}\ \textrm{s}^{-1}$ and $\sim 46\
\textrm{km}\ \textrm{s}^{-1}$, respectively. Notably, these lines show a
significant blueshift during their evolution between the two epochs. We
measure the center of the Gaussian profile fitted to the N III $\lambda 4641$
line in the first spectrum at $v\approx-191\ \textrm{km}\ \textrm{s}^{-1}$ and
in the second spectrum at $v\approx-215\ \textrm{km}\ \textrm{s}^{-1}$. For
the C III $\lambda 4647$ feature, we measure center positions at
$v\approx-200\ \textrm{km}\ \textrm{s}^{-1}$ and $-229\ \textrm{km}\
\textrm{s}^{-1}$, for the first and second epochs, respectively. This increase
in velocity of $\sim 24-29\ \textrm{km}\ \textrm{s}^{-1}$ might be caused by
the acceleration of the wind by the radiation pressure generated in the
explosion. The profiles of the He I, N III, and C III lines are fairly
symmetric, in contrast to the broad and weak Lorenzian wings observed in the
He II $\lambda 4686$, C IV, N IV, and Balmer lines.

###  3.2 Comparison with the literature

The early spectra of SN 2024ggi presented here show similar emission lines to
the early high-resolution spectra of SN 2023ixf, taken at $2.6-7.6$ d after
the explosion, analyzed in Smith et al. (2023). We identify flash-ionization
lines of He II, N III, C III, N IV, and C IV present in both SNe, with the He
II and C IV having a narrow core with a broader wing component in both cases.
The narrow components have similar FWHMs of $<100\ \textrm{km}\
\textrm{s}^{-1}$, with the broad wings of He II $\lambda 4686$ for SN 2023ixf
also extending up from $\sim-500\ \textrm{km}\ \textrm{s}^{-1}$ to $\sim-1000\
\textrm{km}\ \textrm{s}^{-1}$ during its earliest epochs. However, the C IV
lines in SN 2023ixf seem to have broader features than SN 2024ggi, with the
broad wings extending up to $\sim-2000\ \textrm{km}\ \textrm{s}^{-1}$. We also
note that H$\alpha$ in SN 2023ixf shows broad features that are not present in
our earlier spectra of SN 2024ggi. However, flash-ionization lines in SN
2024ggi might evolve in a similar way to SN 2023ixf at later times.

Similar to Smith et al. (2023), we do not detect the broad emission feature
near to $4600\ \AA$, observed in other Type II SNe at early times (e.g.,
Quimby et al., 2007; Bullivant et al., 2018; Hosseinzadeh et al., 2018;
Pearson et al., 2023), nor P-Cygni profiles from the unshocked CSM. However,
different than Smith et al. (2023), we do detect strong and narrow emission
features of He I in our first epoch. This line is also observed in the early
spectra of the Type IIn SN 1998S and PTF11iqb (Shivvers et al., 2015; Smith et
al., 2015), and the Type IIb SN 2013cu (Gal-Yam et al., 2014).

Finally, we measure a CSM velocity of $\sim 79\ \textrm{km}\ \textrm{s}^{-1}$,
using the blueshift velocity of the H$\alpha$ emission, corrected by the host
galaxy rotation velocity. This is relatively lower than the CSM velocity of
$\sim 115\ \textrm{km}\ \textrm{s}^{-1}$ measured by Smith et al. (2023) for
SN 2023ixf, and is consistent with the expected wind velocity for red
supergiants of $\sim 50\ \textrm{km}\ \textrm{s}^{-1}$ (Dessart et al., 2016;
Jacobson-Galán et al., 2024a).

Figure 4: The region around the N III $\lambda\lambda 4634,4641$ and C III
$\lambda\lambda 4647,4650$ emission lines, for the epochs $26.6$ h (in black)
and $33.8$ h (in red) after the first light. Spectra are shifted to the zero
velocity position of N III $\lambda 4641$. The emission lines of N III and C
III present a small broadening with time (see text). The lines also show a
blueshift during their evolution, with an increase of $\sim 24\ \textrm{km}\
\textrm{s}^{-1}$, measured for N III $\lambda 4641$, and of $\sim 29\
\textrm{km}\ \textrm{s}^{-1}$, for C III $\lambda 4647$.

##  4 Summary and conclusions

In this letter, we have presented very early-phase spectroscopy of the nearby
Type II SN 2024ggi, with two epochs obtained with the high-resolution
spectrograph MIKE, at the Magellan Clay Telescope. We have shown that the
spectra are marked by several high-ionization emission lines, notably narrow
lines (FWHM $<100\ \textrm{km}\ \textrm{s}^{-1}$) of He I, He II, N III, and C
III, and relatively broader features of N IV, and C IV. We have shown that the
emission lines of H, C III, C IV, N III, N IV, and He II $\lambda 4686$ have a
decrease in EW and a broadening between the first and the second spectrum. The
features of He II $\lambda 4686$, C IV and N IV are composed by narrow cores
with broader asymmetric Lorentzian wings. The emission lines of He I , N III,
and C III do not clearly show these wings. The blue wings of He II $\lambda
4686$ extend up to $\sim-500\ \textrm{km}\ \textrm{s}^{-1}$ in the first
spectrum, and up to $\sim-1000\ \textrm{km}\ \textrm{s}^{-1}$ in the second.
Additionally, narrow features of He II $\lambda 6560$ and He I $\lambda 6678$
are detected in the first spectrum, but disappear in the later epoch.

We have shown that the H$\alpha$ emission line is blueshifted to a host
rotation-corrected velocity of $\sim 79\ \textrm{km}\ \textrm{s}^{-1}$, which
indicates the expansion velocity of the CSM. We also have observed a blueshift
in the evolution of the N III and C III emission features, indicating an
increase in velocity of $\sim 24-29\ \textrm{km}\ \textrm{s}^{-1}$, which
might be generated by the radiation pressure acceleration of the wind.

We have detected similar high-ionization emission lines to those observed in
the early evolution of SN 2023ixf. The evolution of He II $\lambda 4686$ seem
similar in both SNe, although SN 2023ixf show broader features of C IV. We
also do not detect a broad component for the H$\alpha$ profile, as it is
observed in SN 2023ixf. Finally, we detect strong narrow features of He I,
which are not visible in SN 2023ixf, but observed in other early spectra of
CCSNe. These differences are probably due to the rapid evolution of SNe II at
early phases and due to the high-resolution spectra of SN 2023ixf were
observed at a later phase.

The spectra presented here represent the earliest high-resolution
spectroscopic observations of a CCSN ever made. The short period between the
two observations, of around $8$ h, allowed us to detect significant changes in
a small interval of time, demonstrating the rapid evolution and dramatic
changes in the ionization of the CSM located close to CCSNe at early times.
Fast triggering and a higher cadence of early observations for future events
are therefore extremely important. Further observations of SN 2024ggi are
strongly encouraged, as well as modeling of the CSM and the SN progenitor star
using the data presented here.

###### Acknowledgements.

T.P. acknowledges the support by ANID through the Beca Doctorado Nacional
202221222222. J.L.P. acknowledges support by the Millennium Science Initiative
grant ICN12_009, awarded to The Millennium Institute of Astrophysics, MAS.
D.D.B.S. acknowledges the support by Millennium Nucleus ERIS NCN2021_017.
R.R.M. gratefully acknowledges support by the ANID BASAL project FB210003.
G.E.M. acknowledges support from the University of Toronto Arts & Science
Postdoctoral Fellowship program.

## References

  * Bernstein et al. (2003) Bernstein, R., Shectman, S. A., Gunnels, S. M., Mochnacki, S., & Athey, A. E. 2003, in Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series, Vol. 4841, Instrument Design and Performance for Optical/Infrared Ground-based Telescopes, ed. M. Iye & A. F. M. Moorwood, 1694–1704, doi: 10.1117/12.461502
  * Boian & Groh (2020) Boian, I., & Groh, J. H. 2020, MNRAS, 496, 1325, doi: 10.1093/mnras/staa1540
  * Bostroem et al. (2023) Bostroem, K. A., Pearson, J., Shrestha, M., et al. 2023, ApJ, 956, L5, doi: 10.3847/2041-8213/acf9a4
  * Bruch et al. (2021) Bruch, R. J., Gal-Yam, A., Schulze, S., et al. 2021, ApJ, 912, 46, doi: 10.3847/1538-4357/abef05
  * Bruch et al. (2023) Bruch, R. J., Gal-Yam, A., Yaron, O., et al. 2023, ApJ, 952, 119, doi: 10.3847/1538-4357/acd8be
  * Bullivant et al. (2018) Bullivant, C., Smith, N., Williams, G. G., et al. 2018, MNRAS, 476, 1497, doi: 10.1093/mnras/sty045
  * Cartier et al. (2017) Cartier, R., Sullivan, M., Firth, R. E., et al. 2017, MNRAS, 464, 4476, doi: 10.1093/mnras/stw2678
  * Chen et al. (2024) Chen, T. W., K, A. S., Yang, S., et al. 2024, Transient Name Server AstroNote, 102, 1
  * Dessart et al. (2017) Dessart, L., Hillier, D. J., & Audit, E. 2017, A&A, 605, A83, doi: 10.1051/0004-6361/201730942
  * Dessart et al. (2016) Dessart, L., Hillier, D. J., Audit, E., Livne, E., & Waldman, R. 2016, MNRAS, 458, 2094, doi: 10.1093/mnras/stw336
  * Gal-Yam et al. (2014) Gal-Yam, A., Arcavi, I., Ofek, E. O., et al. 2014, Nature, 509, 471, doi: 10.1038/nature13304
  * Hiramatsu et al. (2023) Hiramatsu, D., Tsuna, D., Berger, E., et al. 2023, ApJ, 955, L8, doi: 10.3847/2041-8213/acf299
  * Hoogendam et al. (2024) Hoogendam, W., Auchettl, K., Tucker, M., et al. 2024, Transient Name Server AstroNote, 103, 1
  * Hosseinzadeh et al. (2018) Hosseinzadeh, G., Valenti, S., McCully, C., et al. 2018, ApJ, 861, 63, doi: 10.3847/1538-4357/aac5f6
  * Hosseinzadeh et al. (2023) Hosseinzadeh, G., Farah, J., Shrestha, M., et al. 2023, ApJ, 953, L16, doi: 10.3847/2041-8213/ace4c4
  * Itagaki (2023) Itagaki, K. 2023, Transient Name Server Discovery Report, 2023-1158, 1
  * Jacobson-Galán et al. (2022) Jacobson-Galán, W. V., Dessart, L., Jones, D. O., et al. 2022, ApJ, 924, 15, doi: 10.3847/1538-4357/ac3f3a
  * Jacobson-Galán et al. (2023) Jacobson-Galán, W. V., Dessart, L., Margutti, R., et al. 2023, ApJ, 954, L42, doi: 10.3847/2041-8213/acf2ec
  * Jacobson-Galán et al. (2024a) Jacobson-Galán, W. V., Dessart, L., Davis, K. W., et al. 2024a, arXiv e-prints, arXiv:2403.02382, doi: 10.48550/arXiv.2403.02382
  * Jacobson-Galán et al. (2024b) Jacobson-Galán, W. V., Davis, K. W., Kilpatrick, C. D., et al. 2024b, arXiv e-prints, arXiv:2404.19006.  https://arxiv.org/abs/2404.19006
  * Kelson (2003) Kelson, D. D. 2003, Publications of the Astronomical Society of the Pacific, 115, 688
  * Kelson et al. (2000) Kelson, D. D., Illingworth, G. D., van Dokkum, P. G., & Franx, M. 2000, The Astrophysical Journal, 531, 159
  * Khazov et al. (2016) Khazov, D., Yaron, O., Gal-Yam, A., et al. 2016, ApJ, 818, 3, doi: 10.3847/0004-637X/818/1/3
  * Killestein et al. (2024) Killestein, T., Ackley, K., Kotak, R., et al. 2024, Transient Name Server AstroNote, 101, 1
  * Koribalski et al. (2004) Koribalski, B. S., Staveley-Smith, L., Kilborn, V. A., et al. 2004, AJ, 128, 16, doi: 10.1086/421744
  * Kumar et al. (2024) Kumar, B., Chen, X., Lin, W., et al. 2024, Transient Name Server AstroNote, 108, 1
  * Pearson et al. (2023) Pearson, J., Hosseinzadeh, G., Sand, D. J., et al. 2023, ApJ, 945, 107, doi: 10.3847/1538-4357/acb8a9
  * Pérez-Fournon et al. (2024) Pérez-Fournon, I., Poidevin, F., Aguado, D. S., et al. 2024, Transient Name Server AstroNote, 107, 1
  * Perley & Gal-Yam (2023) Perley, D., & Gal-Yam, A. 2023, Transient Name Server Classification Report, 2023-1164, 1
  * Poznanski et al. (2012) Poznanski, D., Prochaska, J. X., & Bloom, J. S. 2012, MNRAS, 426, 1465, doi: 10.1111/j.1365-2966.2012.21796.x
  * Quimby et al. (2007) Quimby, R. M., Wheeler, J. C., Höflich, P., et al. 2007, ApJ, 666, 1093, doi: 10.1086/520532
  * Riess et al. (2022) Riess, A. G., Yuan, W., Macri, L. M., et al. 2022, ApJ, 934, L7, doi: 10.3847/2041-8213/ac5c5b
  * Saha et al. (2006) Saha, A., Thim, F., Tammann, G. A., Reindl, B., & Sandage, A. 2006, ApJS, 165, 108, doi: 10.1086/503800
  * Schlafly & Finkbeiner (2011) Schlafly, E. F., & Finkbeiner, D. P. 2011, ApJ, 737, 103, doi: 10.1088/0004-637X/737/2/103
  * Schlegel et al. (1998) Schlegel, D. J., Finkbeiner, D. P., & Davis, M. 1998, ApJ, 500, 525, doi: 10.1086/305772
  * Shivvers et al. (2015) Shivvers, I., Groh, J. H., Mauerhan, J. C., et al. 2015, ApJ, 806, 213, doi: 10.1088/0004-637X/806/2/213
  * Smith et al. (2023) Smith, N., Pearson, J., Sand, D. J., et al. 2023, ApJ, 956, 46, doi: 10.3847/1538-4357/acf366
  * Smith et al. (2015) Smith, N., Mauerhan, J. C., Cenko, S. B., et al. 2015, MNRAS, 449, 1876, doi: 10.1093/mnras/stv354
  * Srivastav et al. (2024) Srivastav, S., Chen, T. W., Smartt, S. J., et al. 2024, Transient Name Server AstroNote, 100, 1
  * Teja et al. (2023) Teja, R. S., Singh, A., Basu, J., et al. 2023, ApJ, 954, L12, doi: 10.3847/2041-8213/acef20
  * Terreran et al. (2022) Terreran, G., Jacobson-Galán, W. V., Groh, J. H., et al. 2022, ApJ, 926, 20, doi: 10.3847/1538-4357/ac3820
  * Tonry et al. (2024) Tonry, J., Denneau, L., Weiland, H., et al. 2024, Transient Name Server Discovery Report, 2024-1020, 1
  * Tonry et al. (2018) Tonry, J. L., Denneau, L., Heinze, A. N., et al. 2018, PASP, 130, 064505, doi: 10.1088/1538-3873/aabadf
  * Yamanaka et al. (2023) Yamanaka, M., Fujii, M., & Nagayama, T. 2023, PASJ, 75, L27, doi: 10.1093/pasj/psad051
  * Yang et al. (2024) Yang, S., Chen, T. W., Stevance, H. F., et al. 2024, Transient Name Server AstroNote, 105, 1
  * Yaron et al. (2017) Yaron, O., Perley, D. A., Gal-Yam, A., et al. 2017, Nature Physics, 13, 510, doi: 10.1038/nphys4025
  * Zhai et al. (2024) Zhai, Q., Li, L., Wang, Z., Zhang, J., & Wang, X. 2024, Transient Name Server AstroNote, 104, 1

##  Appendix A SN 2024ggi at NGC 3621

Figure 5 shows the position of SN 2024ggi in the spiral arms of NGC 3621, in a
composite $gri$ image, obtained with the LCO $1.0$ m telescope on 2024-04-17.
The SN is located at at RA = 11:18:22.087, DEC = $-32$:50:15.27. Considering
the most recent Cepheid distance for NGC 3621 of $7.11$ Mpc (Saha et al.,
2006), we estimate the distance of SN 2024ggi to the galaxy center to be of
$3.87$ kpc.

Figure 5: The SN 2024ggi on the spiral arms of NGC 3621. The composite $gri$
image was obtained with the LCO $1.0$ m telescope on 2024-04-17. The supernova
is located at a projected distance of $3.87$ kpc from the galaxy center.

##  Appendix B Epoch of the first light

The very early discovery of SN 2024ggi by the ATLAS survey and its subsequent
detailed follow-up, allows a detailed investigation of its infant phase. We
used the public ATLAS forced photometry obtained from the ATLAS forced
photometry server333https://fallingstar-data.com/forcedphot/ to estimate the
epoch of the first SN light. It is assumed that the early evolution of SN
2024ggi can be described by a power law of the form
$F\propto(t-t_{0})^{\alpha}$, where $t_{0}$ is the epoch of the first light
and $\alpha$ is the power law exponent (see e.g., Cartier et al., 2017). A
power law fit to the ATLAS $o_{\mathrm{ATLAS}}$ photometry during the first
$24$ h following the SN discovery (6 photometric observations) yields
$t_{0}=60410.89\pm 0.14$ days (MJD, with $\alpha=2.9\pm 0.9$), or $6$ h before
the discovery time. The power-law fit describes remarkably well the early rise
in the SN brightness, yielding a reduced $\chi^{2}_{\nu}=0.85$ with an average
difference between the model and the observations of <$1$%. The uncertainty in
$t_{0}$ and $\alpha$ parameters was estimated using a jackknife methodology
removing one of the photometric measurements from the fit and re-fitting,
finding an excellent agreement in the parameters each time, in particular on
the time of the first light in the $o_{ATLAS}$ filter.

##  Appendix C Extinction and intervening absorbing clouds

The galactic longitude and latitude of SN 2024ggi are $l=281.24449207$ deg and
$b=26.08475353$ deg, respectively. Thus, the line of sight to SN 2024ggi is
not far from the galactic plane. The high-resolution spectroscopy of SN
2024ggi reveals three intervening galactic clouds in the line of sight to the
SN, producing absorption lines of Ca II $H\&K$ and Na I D1&D2 lines, at
velocities of $-22.0\pm 0.2$ km s-1, $0.6\pm 0.1$,km s-1 and $+110.4\pm 0.4$
km s-1 (see Figure 6). In the same way, the spectra reveal Ca II and Na I
absorption lines produced by intervening clouds in NGC 3621 at a velocity of
$-71.7\pm 0.4$ km s-1 and a weak absorption in the Ca II H&K lines at a
velocity of $+19.3\pm 0.9$ km s-1 relative to the heliocentric velocity of NGC
3621 ($v_{\mathrm{helio}}=730\pm 2$ km s-1).

Using the Poznanski et al. (2012) relations, we estimate the galactic and the
host galaxy reddening. By means of fitting a Gaussian profile to the
absorption lines we obtain average Na I D1+D2 $EW$s of $0.26\pm 0.01$ Å,
$0.36\pm 0.01$ Å, and $0.63\pm 0.01$ Å for the three intervening galactic
clouds and of $0.41\pm 0.01$ Å for the Na I D1+D2 absorption lines in NGC
3621. Using the Poznanski et al. (2012) relation for the Na I D1+D2 $EW$,
these $EW$s translate in $E(B-V)$ of $0.029\pm 0.007$ mag, $0.037\pm 0.009$
mag, $0.078\pm 0.018$ mag for the three clouds in our galaxy, respectively and
of $0.042\pm 0.008$ mag for NGC 3621. Very similar results were obtained when
the relations of Poznanski et al. (2012) for the individual $EW$ of Na I D2 or
Na I D1 lines were used. Note that Poznanski et al. (2012) relations were
derived using the original extinction maps of Schlegel et al. (1998), and the
$E(B-V)$ values computed from Poznanski et al. (2012) relations must be
multiplied by $0.86$ to be placed in the more recent recalibration of Schlafly
& Finkbeiner (2011).

The recalibrated galactic extinction maps of Schlegel et al. (1998) predict a
Milky Way extinction of $E(B-V)=0.0694$ mag (Schlafly & Finkbeiner, 2011) in
the line of sight to SN 2024ggi. This value compares favorably with the
combined extinction from clouds 1 ($-22.0\pm 0.2$ km s-1) and 2 ($0.6\pm
0.1$,km s-1) of $E(B-V)=0.057\pm 0.009$ which was scaled by $0.86$ to place
this value in the recent recalibration of Schlafly & Finkbeiner (2011), or
with the extinction of the third cloud of $E(B-V)=0.067\pm 0.015$ (scaled to
Schlafly & Finkbeiner, 2011), but does not seem to account for the total
extinction estimated for the three Galactic clouds detected using high-
resolution spectroscopy. As noted in the cautionary
notes444https://irsa.ipac.caltech.edu/applications/DUST/docs/background.html##notes,
the dust extinction map of Schlegel et al. (1998) is most accurate when a
single dust temperature describes the bulk of the dust that is
absorbing/scattering background starlight, but closer to the Galactic plane
multiple dust clouds can be encountered which emits multiple dust temperature
distributions yielding a less accurate estimate on $E(B-V)$, this may explain
the discrepancy in the Galactic extinction along the line of sight to SN
2024ggi. In summary we report a total Galactic extinction of
$E(B-V)_{\textrm{gal}}=0.12\pm 0.02$ mag and a host galaxy extinction of
$E(B-V)_{\textrm{host}}=0.036\pm 0.007$ mag, producing a total extinction
along the line of sight to SN 2024ggi of $E(B-V)_{\textrm{total}}=0.16\pm
0.02$ mag.

Figure 6: The spectral region around the Na I D1, Na I D2, Ca II H, and Ca II
K absorption features, from top to bottom, respectively. The cyan dotted lines
mark the position of the MW intervening absorbing clouds, while the pink
dotted lines mark the position of the host galaxy features. Velocity scale
relative to the center of NGC 3621.


# Want Drugs? Use Python.

Michał Nowotka∗†, George Papadatos†, Mark Davies†, Nathan Dedman†, Anne
Hersey† * Corresponding author<EMAIL_ADDRESS>European Molecular Biology
Laboratory, European Bioinformatics Institute (EMBL-EBI), Wellcome Genome
Campus, Hinxton, Cambridgeshire CB10 1SD, UKCopyright © 2015 Michał Nowotka et
al. This is an open-access article distributed under the terms of the Creative
Commons Attribution License, which permits unrestricted use, distribution, and
reproduction in any medium, provided the original author and source are
credited. http://creativecommons.org/licenses/by/3.0/

###### Abstract

We describe how Python can be leveraged to streamline the curation, modelling
and dissemination of drug discovery data as well as the development of
innovative, freely available tools for the related scientific community. We
look at various examples, such as chemistry toolkits, machine-learning
applications and web frameworks and show how Python can glue it all together
to create efficient data science pipelines.

###### Index Terms:

drugs, drug-design, chemistry, cheminformatics, pipeline

##  1 Introduction

ChEMBL [ChEMBL12, ChEMBL14] is a large open access database resource in the
field of computational drug discovery, chemoinformatics, medicinal chemistry
[MedChem] and chemical biology. Developed by the Chemogenomics team at the
European Bioinformatics Institute, the ChEMBL database stores curated two-
dimensional chemical structures and standardised quantitative bioactivity data
alongside calculated molecular properties. The majority of the ChEMBL data is
derived by manual extraction and curation from the primary scientific
literature, and therefore covers a significant fraction of the publicly
available chemogenomics space.

In this paper, we describe how Python is used by the ChEMBL group, in order to
process data and deliver high quality tools and services. In particular, we
cover the following topics:

  * 1.

Distributing data

  * 2.

Performing core cheminformatics operations

  * 3.

Rapid data analysis and prototyping

  * 4.

Curating data

##  2 Data distribution

ChEMBL offers two basic channels to share its contents: SQL dump downloads
_via_ FTP and web services. Both channels have different characteristics -
data dumps are typically used by organizations ready to host their own private
instance of the database. This method requires downloading a SQL dump file and
hosting on a machine (physical or virtual). This approach can be expensive,
both in terms of time and hardware infrastructure costs. An alternative
approach to accessing the ChEMBL data, is to use the dedicated web services.
This method, supported with detailed online documentation and examples, can be
used by developers, who wish to create simple widgets, web sites, RIAs or
mobile applications, that consume chemical and biological data.

The ChEMBL team uses Python to deliver the SQL dumps and web services to end
users. In the case of the SQL dumps, the Django ORM (Object Relational
Mapping) is employed to export data from a production Oracle database into two
other popular formats: MySQL and PostgreSQL. The Django data model, which
describes the ChEMBL database schema, is responsible for translating
incompatible data types, indicating possible problems with data during the
fully automated migration process. After data is populated to separate Oracle,
MySQL and PostgreSQL instances, the SQL dumps in the respective dialects are
produced.

The Django ORM is also used by the web services [WS15]. This technique
simplifies the implementation of data filtering, ordering and pagination by
avoiding raw SQL statements inside the code. The entire ChEMBL web services
code base is written in Python using the Django framework, Tastypie (used to
expose RESTful resources) and Gunicorn (used as an application server). In
production, Oracle is used as a database engine and MongoDB for caching
results. As a plus, the ORM allows for the same codebase to be used with open
source database engines.

Currently, the ChEMBL web services provide 18 distinct resource endpoints,
which offer advanced filtering and ordering of the results in JSON, JSONP, XML
and YAML formats. The web services also support CORS, which allows them to be
accessed _via_ AJAX calls from web pages. There is also an online
documentation, that allows users to perform web services calls from a web
browser.

Figure 1: Diagram depicting relations between resources. Ellipses represent
ChEMBL web service endpoints and the line between two resources indicates that
they share a common attribute. The arrow direction shows where the primary
information about a resource type can be found. A dashed line indicates the
relationship between two resources behaves differently.

The web services codebase is Apache 2.0 licensed and available from GitHub.
The code is also registered in the Python Package Index (PyPI), which allows
quick deployment by third-party organizations hosting the ChEMBL database.

##  3 Performing core cheminformatics operations

There are some commonly used algorithms and methods, that are essential in the
field of cheminformatics. These include:

  * 1.

2D/3D compound depiction.

  * 2.

Finding compounds similar to the given query compound with some similarity
threshold.

  * 3.

Finding all compounds, that have the given query compound as substructure.

  * 4.

Computing useful descriptors, such as molecular weight, polar surface area,
number of rotatable bonds etc.

  * 5.

Converting between popular chemical formats/identifiers such as SMILES, InChI,
MDL molfile.

There are several software libraries, written in different languages, that
implement some or all of the operations described above. Two of these toolkits
offer robust and comprehensive functionality, coupled with a permissive
license, namely RDKit (developed and maintained by Greg Landrum) and Indigo
(created by GGA software, now Epam). They both provide Python bindings and
database cartridges, that, among other things, allow performing substructure
and similarity searches on compounds stored in RDBMS.

The ChEMBL web services that we’ve described so far are focused on the
retrieval of structured data stored in databases. Talking with colleagues,
we’ve identified a gap in efficient pipelines, that allow researchers to
handle data process and curating chemical datasets, and we thus focused on
building additional _cheminformatics-focused_ services. To fix this gap, the
Beaker project was setup. Beaker [Beaker14] exposes most functionality offered
by RDKit using REST. This means that the functionality RDKit provides, can now
be accessed _via_ HTTP, using any programming language, without requiring a
local RDKit installation.

Following a similar setup to the _data_ part of ChEMBL web services, the
_utils_ part (Beaker) is written in pure Python (using Bottle framework),
Apache 2.0 licensed, available on GitHub, registered to PyPI and has its own
live online documentation. This means, that it is possible to quickly set up a
local instance of the Beaker server.

Figure 2: ChEMBL Beaker online documentation

In order to facilitate Python software development, the ChEMBL client library
has been created. This small Python package wraps around Requests library,
providing more convenient API, similar to Django QuerySet, offering lazy
evaluation of results, chaining filters and caching results locally. This
effectively reduces the number of requests to the remote server, which speeds
up data retrieval process. The package covers full ChEMBL web services
functionality, allowing users to retrieve data as well as perform chemical
computations without installing chemistry toolkits.

The following code example demonstrates how to retrieve all approved drugs for
a given target:

from chembl_webresource_client.new_client \ import new_client# Receptor
protein-tyrosine kinase erbB-2chembl_id = "CHEMBL1824"activities =
new_client.mechanism\ .filter(target_chembl_id=chembl_id)compound_ids =
[x[’molecule_chembl_id’] for x in activities]approved_drugs =
new_client.molecule\ .filter(molecule_chembl_id__in=compound_ids)\
.filter(max_phase=4)Another example will use Beaker to convert approved drugs
from the previous example to SDF file and compute maximum common substructure:

from chembl_webresource_client.utils import utilssmiles =
[drug[’molecule_structures’]\ [’canonical_smiles’] for drug in
approved_drugs]mols = [utils.smiles2ctab(smile) for smile in smiles]sdf =
’’.join(mols)result = utils.mcs(sdf)

##  4 Rapid data analysis and prototyping

Access to a very comprehensive cheminformtics toolbox, consisting of a
chemically-aware relational database, efficient data access methods (ORM, web
services, client library), specialized chemical toolkits and many other
popular general purpose, scientific and data science libraries, facilitates
sophisticated data analysis and rapid prototyping of advanced cheminformatics
applications.

This is complemented by an IPython notebook server, which executes a Python
code along with rich interactive plots and markdown formatting to improve
sharing results with other scientists.

In order to demonstrate capabilities of the software environment used inside
ChEMBL a collection of IPython notebooks has been prepared. They contain
examples at different difficulty levels, covering following topics:

  * 1.

Retrieving data using raw SQL statements, Django ORM, web services and the
client library.

  * 2.

Plotting charts using matplotlib and D3.js.

  * 3.

Detailed RDKit tutorial.

  * 4.

Machine learning - classification and regression using scikit-learn.

  * 5.

Building predictive models - ligand-based target prediction tutorial using
RDKit, scikit-learn and pandas.

  * 6.

Data mining - MDS tutorial, mining patent data provided by the SureChEMBL
project.

  * 7.

NoSQL approaches - data mining using Neo4j, fast similarity search
approximation using MongoDB.

Since many notebooks require quite complex dependencies (RDKit, numpy, scipy,
lxml etc.) in order to execute them, preparing the right environment may pose
a challenge to non-technical users. This is the reason that the ChEMBL team
has created a project called _myChEMBL_ [myChEMBL14]. myChEMBL encapsulates an
environment consisting of the ChEMBL database running on PostgreSQL engine
with RDKit chemistry cartridge, web services, IPython Notebook server hosting
collection of notebooks described above, RDKit and Indigo toolkits, data-
oriented Python libraries, simple web interface for performing substructure
and similarity search by drawing a compound and many more.

Figure 3: myChEMBL launchpad

myChEMBL comes preconfigured and can be used immediately. The project is
distributed as a Virtual Machine, that can be downloaded _via_ FTP or obtained
using Vagrant by executing the following commands:

>
>     vagrant init chembl/mychembl_20_ubuntu
>     vagrant up --provider virtualbox
>

There are two variants - one based on Ubuntu 14.04 LTS and the second one
based on CentOS 7. Virtual Machine disk images are available in vmdk, qcow2
and img formats. Docker containers are available as well. The scripts used to
build and configure machines are available on GitHub so it is possible to run
them on physical machines instead of VMs.

Again, Python plays important role in configuring myChEMBL. Since Docker is
designed to run one process per container and ignores OS-specific
initialization daemons such as upstart, systemd etc. myChEMBL ships with
supervisor, which is responsible for managing and monitoring all core myChEMBL
services (such as Postgres, Apache, IPython server) and providing a single
point of entry.

##  5 Target prediction

The wealth and diversity of structure-activity data freely available in the
ChEMBL database has enabled large scale data mining and predictive modelling
analyses [Ligands12, Targets13]. Such analyses typically involve the
generation of classification models trained on the structural features of
compounds with known activity. Given a new compound, the model predicts likely
biological targets, based on the enrichment of structural features against
known targets in the training set. We implemented our own classification model
using:

  * 1.

a carefully selected subset of ChEMBL as a training set stored as a pandas
dataframe,

  * 2.

structural features computed by RDKit,

  * 3.

the naive Bayesian classification method implemented in scikit-learn.

As a result, ChEMBL provides predictions of likely targets for known drug
compounds available online (e.g. in
https://www.ebi.ac.uk/chembl/compound/inspect/CHEMBL502), along with the
models themselves available to download
(ftp://ftp.ebi.ac.uk/pub/databases/chembl/target_predictions/). This is
complemented with an IPython Notebook tutorial on using these models and
getting predictions for arbitrary input structures.

Furthermore, similar models have been used in a publicly available web
application called ADME SARfari [Sarfari]. This resource allows cross-species
target prediction and comparison of ADME (Absorption, Distribution,
Metabolism, and Excretion) related targets for a particular compound or
protein sequence. The application uses SQLAlchemy as an ORM, contained within
a web framework (Pyramid & Cornice) to provide an API and HTML5 interactive
user interface.

##  6 Curation of data

Supporting and automating the process of extracting and curating data from
scientific publications is another area where Python plays a pivotal role. The
ChEMBL team is currently working on a web application, that can aid in-house
expert curators with this challenging and time-consuming process. The
application can open a scientific publication in PDF format or a scanned
document and extract compounds presented as images or identifiers. The
extracted compounds are presented to the user in order to correct possible
errors and save them to database. The system can detect compounds already
existing in database and take appropriate action.

Figure 4: Extracting data from a scientific publication.

In addition to processing scientific papers and images, curation interface can
handle the most popular chemical formats, such as SDF files, MDL molfiles,
SMILES and InChIs. Celery is used as a synchronous task queue for performing
the necessary chemistry calculations when a new compound is inserted or
updated. This system allows a chemical curator to focus on domain specific
tasks and no longer interact directly with the database, using raw SQL
statements, which can be hard to master and difficult to debug.

##  7 Discussion

Python has become an essential technology requirement of the core activities
undertaken by ChEMBL group, in order to streamline data distribution, curation
and analysis in the field of computational drug discovery. The tools built
using Python are robust, flexible and web friendly, which makes them ideal for
collaborating in a scientific environment. As an interpreted, dynamically
typed scripting language, Python is ideal for prototyping diverse computing
solutions and applications. The combination of a plethora of powerful general
purpose and scientific libraries, that Python has at its disposal, (e.g.
scikit-learn, pandas, matplotlib), along with domain specific toolkits (e.g.
RDKit), collaborative platforms (e.g. IPython Notebooks) and web frameworks
(e.g. Django), provides a complete and versatile scientific computing
ecosystem.

##  8 Acknowledgments

We acknowledge the following people, projects and communities, without whom
the projects described above would not have been possible:

  * 1.

Greg Landrum and the RDKit community (http://www.rdkit.org/)

  * 2.

Francis Atkinson, Gerard van Westen and all former and current members of the
ChEMBL group.

  * 3.

All ChEMBL users, in particular those who have contacted chembl-help and
suggested enhancements to the existing services

## References

  * [ChEMBL12] A. Gaulton, L.J. Bellis, A.P. Bento et al. _ChEMBL: a large-scale bioactivity database for drug discovery_ , Nucl. Acids Res., 40(database issue):D1100–D1107, January 2012.
  * [ChEMBL14] A.P. Bento, A. Gaulton, A. Hersey et al. _The ChEMBL bioactivity database: an update_ , Nucl. Acids Res., 42(D1):D1083-D1090, January 2014.
  * [MedChem] G. Papadatos, J.P. Overington. _The ChEMBL database: a taster for medicinal chemists_ , Future Med Chem., 6(4):361-364, March 2014.
  * [WS15] M. Davies, M. Nowotka, G. Papadatos et al. _ChEMBL web services: streamlining access to drug discovery data and utilities_ , Nucl. Acids Res., April 2015.
  * [Beaker14] M. Nowotka, M. Davies, G. Papadatos et al. _ChEMBL Beaker: A Lightweight Web Framework Providing Robust and Extensible Cheminformatics Services_ , Challenges, 5(2):444-449, November 2014.
  * [myChEMBL14] M. Davies, M. Nowotka, G. Papadatos et al. _myChEMBL: A Virtual Platform for Distributing Cheminformatics Tools and Open Data_ , Challenges, 5(2):334-337, November 2014.
  * [Ligands12] J. Besnard, G.F. Ruda, V.Setola et al. _Automated design of ligands to polypharmacological profiles_ , Nature, 492(7428):215–220, December 2012.
  * [Targets13] F. Martínez-Jiménez, G. Papadatos, L. Yang et al. _Target Prediction for an Open Access Set of Compounds Active against Mycobacterium tuberculosis_ , PLoS Comput Biol, 9(10): e1003253, October 2013.
  * [Sarfari] M. Davies, N. Dedman, A. Hersey et al. _ADME SARfari: comparative genomics of drug metabolizing systems_ , Bioinformatics, 31(10):1695-7, May 2015.