The Physical Conditions of Emission-line Galaxies at Cosmic Dawn from JWST/NIRSpec Spectroscopy in the SMACS 0723 Early Release Observations

We present rest-frame optical emission-line flux ratio measurements for five z > 5 galaxies observed by the James Webb Space Telescope Near-Infared Spectrograph (NIRSpec) in the SMACS 0723 Early Release Observations. We add several quality-control and post-processing steps to the NIRSpec pipeline reduction products in order to ensure reliable relative flux calibration of emission lines that are closely separated in wavelength, despite the uncertain absolute spectrophotometry of the current version of the reductions. Compared to z ∼ 3 galaxies in the literature, the z > 5 galaxies have similar [O iii]λ5008/Hβ ratios, similar [O iii]λ4364/Hγ ratios, and higher (∼0.5 dex) [Ne III]λ3870/[O II]λ3728 ratios. We compare the observations to MAPPINGS V photoionization models and find that the measured [Ne III]λ3870/[O II]λ3728, [O iii]λ4364/Hγ, and [O iii]λ5008/Hβ emission-line ratios are consistent with an interstellar medium (ISM) that has very high ionization ( log(Q)≃8−9 , units of cm s−1), low metallicity (Z/Z ⊙ ≲ 0.2), and very high pressure ( log(P/k)≃8−9 , units of cm−3). The combination of [O iii]λ4364/Hγ and [O iii]λ(4960 + 5008)/Hβ line ratios indicate very high electron temperatures of 4.1<log(Te/K)<4.4 , further implying metallicities of Z/Z ⊙ ≲ 0.2 with the application of low-redshift calibrations for “T e -based” metallicities. These observations represent a tantalizing new view of the physical conditions of the ISM in galaxies at cosmic dawn.

The advent of efficient, multi-object optical and nearinfrared spectroscopic surveys has expanded our knowledge of galaxy physical conditions from the local Universe to the peak of cosmic star formation at z ∼ 2 (Madau & Dickinson 2014).Galaxies at 1 < z < 3.5 have lower metallicity than z ∼ 0 galaxies of the same stellar mass (Henry et al. 2013;Steidel et al. 2014;Maiolino & Mannucci 2019;Sanders et al. 2021), as expected from enrichment by star formation.
About a quarter of the stars in our Universe assemble at z 2 (Madau & Dickinson 2014).Galaxies at these early times are expected to have even more extreme ISM conditions, with lower metallicity and higher ionization observed in their rest-frame UV emission (Smit et al. 2014;Stark et al. 2015;Amorín et al. 2017;Stark et al. 2017;Hutchison et al. 2019).The observed mid-infrared colors of high-redshift galaxies also suggest contribution from rest-frame optical emission lines with very high equivalent widths (van der Wel et al. 2011;González et al. 2012;Smit et al. 2014;Endsley et al. 2021), implying high star formation rates and a highlyionized ISM.But directly measuring rest-frame optical emission lines of galaxies at 2 < z 5 has been enormously chal-Figure 1.An illustration of the emission lines detectable by JWST/NIRSpec at different redshifts.The gray regions show the observed-frame wavelength range of three medium-resolution grating and filter combinations, with darker gray regions indicating the overlapping wavelength regions covered by two gratings.We do not use the G140M/F100LP grating/filter in this work and so show its wavelength coverage in a lighter shade for illustrative purposes only.In this work we use SMACS 0723 Early Release Observations with G235M/F170LP and G395M/F290LP to study rest-frame optical lines of five galaxies at 5 < z < 9. lenging due to high sky background from the ground, and has been entirely impossible at z > 5... until now.
The launch of the James Webb Space Telescope (JWST, Gardner et al. 2006) opens an entirely new window on the high-redshift Universe.JWST/NIRSpec spectroscopy spans observed-frame 1-5 µm, enabling detection of rest-frame optical emission lines to z 9. Figure 1 highlights the coverage of the JWST/NIRSpec medium-resolution gratings for various rest-frame optical emission lines as a function of redshift.The advent of JWST observations finally allows a direct comparison of physical conditions over 13 Gyr of cosmic time, using the same set of rest-frame optical emission-line diagnostics from cosmic dawn to the current epoch.
In this paper we investigate the emission-line properties of five z > 5 galaxies with JWST/NIRSpec spectroscopy from Early Release Observations of the galaxy cluster SMACS J0723.3-7327(henceforth SMACS 0723).Section 2 describes the observations and data reduction, which includes some post-processing to ensure reliable relative flux calibration.Section 3 describes our spectral fitting and measurements of emission-line flux ratios.In Section 4 we compare our new z > 5 line-ratio measurements with previous observations at lower redshift and with theoretical photoionization models, finding that the high-redshift galaxies have very high ionization (log(Q/[cm s −1 ]) ∼ 8 − 9) and low (but nonzero) metallicities (Z/Z ∼ 0.1).We summarize the results in Section 5.

OBSERVATIONS
SMACS 0723 was observed by program #2736 as part of the JWST Early Release Observations 1 (Pontoppidan et al. 2022).In this paper we focus on the NIRSpec observations of the 5 galaxies at z > 5 that were presented by Carnall et al. (2022).All 5 of these galaxies are gravitationally lensed by the foreground cluster: ID 4590 (z = 8.5) has a magnification factor of 8, while the other 4 galaxies have more modest magnification factors of 1.5-2 (using the parametric model of Pascale et al. 2022).SMACS 0723 was also observed with NIRISS spectroscopy and with NIRCam and MIRI imaging although we do not use those data in this work.
The JWST data used in this paper can be found in MAST: 10.17909/67ft-nb86.

NIRSpec Observational Setup
The details of the NIRSpec instrument and the microshutter array (MSA) are described by Jakobsen et al. (2022) and Ferruit et al. (2022), respectively.SMACS 0723 was observed with the G235M/F170LP (1.75-3.15µm)and G395M/F290LP (2.9-5.2µm)grating/filter pairs, each of which has spectral resolution of R 1000.Each grating was observed with two NIRSpec visits, with each visit using a three-nod pattern and two integrations of 20 groups (2918 s) per nod.The coadded spectra from each visit (combining from the three nods) have a total exposure time of 8754 s in each grating.Targets for the MSA configuration were selected using the NIRCam imaging in the field, especially prioritizing targets with photometric redshifts of z > 6.Each target was observed using a "slitlet" aperture of three microshutters and the design also included empty shutters for background subtraction.

Data Reduction and Quality Checks
We perform a complete reduction from Level 0 raw uncalibrated data ("_uncal.fits"files) available on the Mikulski Archive for Space Telescopes server (MAST)2 , processed using version 1.8.2 of the JWST Science Calibration Pipeline with the "jwst-1015.pmap"calibration context.This reduction includes updates to the instrument models, gain response, flats and detector-level calibration files released in the months following the observations of the ERO programs.The reduced two-dimensional (2D) spectra ("s2d") have a rectified trace with a flat slope, drizzled from the significantly curved (by 14-24 pixels over the spectral range) trace observed on the detector.The pipeline-reduced onedimensional (1D) spectra ("x1d") are extracted from the 2D spectra using an "extended" aperture with a width of 8 pixels.We instead extract spectra using a narrower "point-source" aperture, as described below.
We confirmed that the reduced 1D spectra have excellent wavelength calibration, with differences of ∆z/z 10 −4 in best-fit line centers for different emission lines across the observed spectral range.We also confirmed that the reduced 2D spectra have a flat trace, with consistent spatial profiles of emission lines over the spectral range of each grating.The 2D line profiles for the galaxies are shown in Figure 2.
The current (version 1.8.2) data reduction pipeline uses a flux calibration that relies on knowledge of the instrument before launch.The pre-launch instrument throughput is known to differ from the post-launch performance (see Figure 20 of Rigby et al. 2022).We also find that synthetic photometry from the spectra have a median difference of ∼30% from the NIRCam photometry in the F200W, F356W, and F444W filters (and a smaller median difference of 14% in the F277W filter).For these reasons we avoid analysis and interpretation that require absolute spectrophotometric calibration, like using individual emission line fluxes or widely separated line ratios (e.g., [O III]/[O II]).We confirm below that the spectra have reliable relative spectrophotometry for pairs of emission lines that are closely separated in wavelength.
The default 8-pixel "extended" extraction width used by the current (version 1.8.2) pipeline is generally too large for the compact high-redshift sources that are the focus of this paper: Figure 2 shows that all of our sources have their spectral trace confined to 4-5 pixels.We also found that the "extended" extraction apertures were often not well-centered on the target, such that the 1D spectrum included a significant amount of the "negative-nod" flux above and below the coadded 2D spectrum.The 1D spectra produced by these wide extraction apertures often include emission from serendipitous sources and detector artifacts that lie outside the trace of the main source.The wide-extraction spectra generally have inconsistent emission-line flux measurements between the two visits that differ by up to a factor of ∼2, with even worse (factor of ∼10) differences in the continuum emission.In addition, the wide-extraction spectra often have unphysical Balmer line ratios: e.g., Hβ/Hγ ∼ 1 compared to atomic calculations of Hβ/Hγ 2.1 for a broad range of temperature and density (Osterbrock 1989).Other work on this same dataset (Schaerer et al. 2022;Curti et al. 2022;Taylor et al. 2022;Brinchmann 2022) noted some of the same issues with the flux calibration of the pipeline-reduced data and took independent approaches to mitigating them.
Rather than using the wide-extraction 1D spectra from the pipeline, we produce new 1D spectra from a narrower "point-source" extraction width individually optimized for each source (typically ∼4 pixels wide).This required significant customization of the (version 1.8.2) NIRSpec reduction pipeline in order to accurately align the extraction window with the position of the source.These narrow-extraction 1D spectra represent a dramatic improvement over the wideextraction versions: they avoid much of the contamination from serendipitous sources and detector artifacts and have emission-line fluxes that are 2-4× larger due to avoiding the negative-nod emission present in the "extended" apertures.Most importantly, they have consistent emission-flux measurements between visits (with one exception noted in Section 3).We also visually inspect the 1D and 2D spectra and mask obvious defects in the spectra, generally caused by chip gaps or bad pixels on the CCD.
The flux uncertainties of our reduced 1D spectra appear to be underestimated by a factor of ∼2 (and by a factor of ∼1.3 in the wide-extraction spectra), as measured from a comparison of the normalized median absolute deviation (NMAD) of the flux with the median of the flux uncertainty for each source, calculated in wavelength regions without emission lines and avoiding chip gaps and bad pixels.We increase the flux uncertainty of the spectra using the ratio of the NMAD of the flux to the median flux uncertainty, i.e. an error rescaling factor of NMAD( f )/median(σ f ).We note that this error rescaling may still remain an underestimate of the true noise if the pixels of the spectrum are correlated.Our post-processing improvements in flux calibration and 1D extraction represent a significant improvement over the (version 1.8.2) pipeline-reduced 1D spectra.However, our flux calibration additionally relies on pre-launch knowledge of the instrument that differs from the measured post-launch performance (Figure 20 of Rigby et al. 2022).In addition, the wavelength-dependent spatial resolution of NIR-Spec will cause wavelength-dependent effects from aperture losses when using a fixed-width 2D spectral extraction.Despite these potential problems in the absolute flux calibration, we find that the relative flux calibration is consistent for pairs of emission lines that are near one another in wavelength.The line ratios of near-pair lines are also consistent between visits, as discussed in the next Section.Thus we are confident in using ratios of emission lines that are closely separated in wavelength, but we caution against the use of emission-line fluxes and equivalent widths, and against the direct comparison of lines that are widely separated in wavelength (like

EMISSION-LINE FLUX RATIO MEASUREMENTS
We fit for the following emission lines in each spectrum (noted by vacuum wavelengths in Angstroms): We find the best-fit Gaussian function (and associated uncertainties) for each emission line using a Levenberg-Marquardt least-squares method implemented by the mpfit IDL code 3 .We subtract a continuum that is determined by smoothing (by a boxcar of 100 pixels) and interpolating the flux from all regions that are <5σ above the median flux of the spectrum (i.e., over line-free regions).We fit the spectra from each of the two visits independently.Examples of the emission-line fits are shown in Figure 3.In a few cases, a line flux cannot be measured due to contaminating emission that extends beyond the main spectral trace (likely from a detector artifact or serendipitous source): Table 1 presents the source IDs, spectroscopic redshifts, and signal-to-noise (SNR) of each emission-line measurement for each visit of the observations.Table 2  We determined the spectroscopic redshift for each source using the best-fit line center for [O III]λ5008, which was the brightest emission line in each spectrum.As noted in Section 2.2, the reduced NIRSpec 1D spectra have excellent wavelength calibration and we found differences of only ∆z/z 10 −4 when measuring the redshift from the line centers of other emission lines.
Most of the emission lines are measured from the G395M spectrum, with bluer lines measured in the G235M spectrum for the lower-redshift sources.Because comparison with NIRCam photometry of the same galaxies indicates that the absolute flux calibration is suspect by a factor of ∼30%, we use only ratios of near-pair emission lines rather than individual emission-line fluxes.In cases where an emission line is measured in the wavelength range 2.9 < λ (µm) < 3.2 that is covered by both gratings, we take care to measure both lines in a given ratio from the same grating, given the differences in line flux measured from each grating (noted in Section 2.2).
The measured line strengths are generally consistent within their uncertainties between the two visits.ID 4590 is an exception, with a a factor of ∼2 difference in the measured line fluxes between the two visits.This is caused by a shutter that failed to open in one of the nod positions of the first (007) visit, as identified by Curti et al. (2022).Excluding ID 4590, the ratio of emission-line strengths measured in each visit is 0.99 ± 0.14 (mean and standard deviation of the sample) for lines that are >3σ detected.Note that despite the difference in line fluxes, the emission-line ratios of ID 4590 are consistent between the two visits.Table 2 also demonstrates that the measured [O III]λ5008/[O III]λ4960 = 2.98 ± 0.12 (mean and standard deviation of the sample), matching the atomic physics calculation (Storey & Zeippen 2000) and establishing the reliability of the relative flux calibration for near-wavelength line pairs.In each subsection below, we compare the observations with model spectra from Kewley et al. (2019a), produced using the MAPPINGS V photoionization code (Sutherland et al. 2018).These models use input stellar ionizing spectra from Starburst99 (Leitherer et al. 1999), which use a Salpeter (1955) initial mass function and include stellar mass loss.MAPPINGS V uses atomic data from the CHIANTI 8 database (Dere et al. 1997;Del Zanna et al. 2015) and applies photoionization, recombination, excitation, and dust depletion of model H II regions in a plane-parallel geometry for the ionizing spectra.We use the "Pressure Models" of Kewley et al. (2019a) for a grid of pressure log(P/k), ionization 4 log(Q), and metallicity Z/Z : • Pressure log(P/k) = [7,8,9], units of cm −3 , noting that many papers also use The MAPPINGS V models are characterized in terms of the total metallicity Z with respect to solar, but relative abundances of each element are not simply scaled from the solar abundances.At low metallicities the models use α-enhanced abundances as described in Nicholls et al. (2017): for example, the relative [O/Fe] abundance is 0.5 dex higher than solar for Z/Z < 0.1.The alpha-enhancement at low metallicity in the MAPPINGS V models is motivated by studies of stellar abundances (e.g., Amarsi et al. 2019) and is also similar to the alpha-enhancement observed in nebular emission from both low-metallicity galaxies at z 2 (e.g., Steidel et al. 2016;Topping et al. 2020;Cullen et al. 2021) and from a more detailed study of relative abundances in our z > 5 galaxies (Arellano-Córdova et al. 2022) The ionizing spectra of low-metallicity stars are not wellconstrained by observations and at Z/Z = 0.05 the spectrum is essentially extrapolated from the Starburst99 inputs.That means the model spectra are most uncertain at the lowest metallicities, although they generally appear to be smooth continuations of the better-constrained models with higher metallicity.The MAPPINGS V models also use a single plane-parallel geometry for the ionization and may not effectively model H II regions with multi-phase pressure and ionization and/or more complex geometries (Xiao et al. 2018;Kewley et al. 2019b).with the line-ratio measurements of the z > 5 galaxies shown by large red stars.We use the samples of Backhaus et al. (2022) as a low-redshift comparison, with line ratios for z ∼ 2 galaxies in the CLEAR survey (Simons et al. in prep) measured from HST/WFC3 grism spectroscopy.A sample of ∼28,000 z ∼ 0 galaxies with detected OHNO emission lines from the Sloan Digital Sky Survey (SDSS, York et al. 2000) is shown by gray contours.Figure 4 also shows stacked line-ratio measurements from MOSDEF observations (Sanders et al. 2021) as pink and maroon points.The high-and low-redshift samples have different line-luminosity selection limits and so intercomparison is nontrivial.The lack of robust absolute flux calibration means that we cannot construct samples of lowredshift galaxies that are matched to our z > 5 galaxies (following, e.g., Juneau et al. 2014;Backhaus et al. 2022).Instead, we generally focus our discussion below on comparing the z > 5 galaxies to the most extreme (highest ionization and lowest metallicity) galaxies present in the low-redshift samples.
Compared to the lower-redshift comparison samples, the z > 5 galaxies in SMACS 0723 have similar [O III]/Hβ ratios but have [Ne III]/[O II] ratios that are higher by ∼0.5 dex. Figure 4 additionally compares the observed z > 5 line ratios with MAPPINGS V theoretical models, as described above.In general the z > 5 line ratios are well-described by MAPPINGS V models with an ISM that is highly ionized (log(Q) 8 − 9), high pressure (log(P/k) 8 − 9), and/or low metallicity (Z/Z 0.2), with some degeneracy between the three quantities to best describe the observations.Sanders et al. (2020).We also compare to a low-redshift (0.3 < z < 0.4) sample of "green pea" galaxies from Brunker et al. (2020) that are selected based on their high-EW emission lines and are potential analogs to high-redshift / high-ionization starburst galaxies (see also, e.g., Henry et al. 2015;Flury et al. 2022).In addition, the gray contours in Figure 5 show the line-ratio distribution of  [7,8,9] models lie very close together.As in Figure 4, the z > 5 galaxies have [O III]λ5008/Hβ ratios that are similar to the lower-redshift comparison sample.The high-redshift [O III]λ4364/Hγ ratios are higher than most (but not all) of the z ∼ 0 galaxies but only slightly ( 0.5 dex) larger than the z ∼ 3 sample.The z > 5 line ratios are well-described by MAPPINGS models for an ISM of very high ionization (log(Q) 8 − 9) and low metallicity (Z/Z 0.2).
As similarly noted in Section 4.1, the z > 5 galaxies have similar (high) [O III]λ5008/Hβ ratios to the z ∼ 3 and z ∼ 0 comparison samples.The z > 5 galaxies have [O III]λ4364/Hγ line ratios that are ∼0.5 dex higher than the general distribution of the low-redshift galaxies, although one of the green-pea galaxies has ratios as extreme as the z > 5 galaxies.The similarity of these high-redshift galaxies to low-redshift (high-ionization) green-pea galaxies was also noted in other work (Katz et al. 2023;Rhoads et al. 2022).The [O III]λ4364/Hγ ratios at z > 5 are similar to, or perhaps ∼0.1-0.2 dex higher, than those of galaxies at z ∼ 3.In the next subsection we describe how the high-redshift [O III]λ4364/Hγ and [O III]λ5008/Hβ line ratios are indicative of very high electron temperatures and low metallicities.4, the observed line ratios in Figure 5 are consistent with the MAP-PINGS models for a highly ionized and low-metallicity ISM, with log(Q) 8 − 9 and Z/Z 0.2.

Electron Temperature and Metallicity
The ratio of the [O III]λ4364 and the [O III]λ4960 + 5008 doublet can be used to measure the electron temperature of the ISM.These lines are all collisionally excited and the [O III]λ4364 line de-excites from a higher energy orbital, such that higher [O III]λ4364 emission relative to [O III]λ4960 + 5008 implies higher energy electrons responsible for the collisional excitation.The electron temperature can be used with the [O III]λ4960 + 5008, [O II]λ3728, and Balmer lines for a "direct" metallicity estimate (e.g., Izotov et al. 2006;Pérez-Montero 2017;Nicholls et al. 2020), although this requires good flux calibration between the widely separated [O II] and [O III] lines.In this work we use empirical correlations that have been found between electron temperature and the "direct" metallicity (Amorín et al. 2015;Pérez-Montero et al. 2021) to measure "T e -based" metallicities.
We cannot directly compare our measured [O III]λ4364 and [O III]λ4960 + 5008 line fluxes because of the uncertain absolute flux calibration of the NIRSpec spectra (see Section 2.2 for details).Instead, we rely on the reliable relative flux calibration and use the measured ratios of [O III]λ4364/Hγ and [O III]λ(4960 + 5008)/Hβ, along with the intrinsic (relatively insensitive to temperature) Balmer ratio Hβ/Hγ = 2.1 (Osterbrock 1989).In other words, we measure the [O III] ratio as follows, abbreviating the [O III] lines by their wavelengths: Note that this method also implicitly corrects the [O III]λ4364/[O III]λ4960 + 5008 ratio for dust attenuation.
We use Equation 4of Nicholls et al. (2020) to estimate T e and Equation 1 of Pérez-Montero et al. (2021) to estimate metallicity from the electron temperature5 .We use a T e -based metallicity because it can be calculated solely from near-pair line ratios (Equation 1), as opposed to the "direct" metallicity that additionally requires use of the [O II] line and, by extension, robust absolute flux calibration.Uncertainties are calculated for both T e and metallicity using Monte Carlo resampling of the line ratios, including the calibration uncertainties for T e -based metallicity reported in Equation 1 of Pérez-Montero et al. (2021).
The inferred electron temperatures and T e -based metallicities, and their 1σ uncertainties, are shown in Table 3. Electron temperature and metallicity cannot be calculated for ID 8140 (z = 5.3) because its [O III]λ4364/Hγ line ratio is unconstrained.Our electron temperature measurements agree very well with other studies of these galaxies (Schaerer et al. 2022;Curti et al. 2022;Arellano-Córdova et al. 2022;Katz et al. 2023;Taylor et al. 2022;Brinchmann 2022), despite the independent approaches to flux calibration and spectral extraction used in each work.ID 4590 has an estimated electron temperature that exceeds the maximum value (log(T e /K) 4.3) used in the calibration of Pérez-Montero et al. (2021) and so its low metallicity represents a (modest) extrapolation of the relation.The sample of metal-poor z ∼ 0 galaxies compiled by Nakajima et al. (2022) similarly lacks analogs to the high T e (and high-ionization line ratios) measured for the z > 5 galaxies.
It is important to note that the electron temperature measured in this fashion is associated with the portion of the  2021) metallicity relationship also implicitly assumes that the high-redshift galaxies have the same relationship between metallicity and [O III] electron temperature as the calibration sample of high-ionization galaxies at low redshift.
Nonetheless, the T e -based metallicity estimates presented in Table 3 have excellent agreement with the low metallicities implied from the comparison to the MAPPINGS models in Figures 4 and 5.
Figure 6 presents the mass-metallicity relation for the z > 6 galaxies, using our T e -based metallicity estimates from Table 3.The stellar masses are from Carnall et al. (2022) and are estimated from spectral energy distribution with a Kroupa (2001) initial mass function, Bruzual & Charlot (2003) stellar population models, and nebular emission computed using CLOUDY (Ferland et al. 2017).Curti et al. (2022) and Schaerer et al. (2022) estimated significantly larger stellar masses for three of these galaxies.In order to reflect the potential systematic uncertainties, we add 0.5 dex upper error bars for the stellar masses in Figure 6.
We compare our z > 6 mass-metallicity properties to a lower-redshift comparison sample of "direct" metallicity estimates from the Sanders et al. (2020) compilation of [O III]λ4364 (black points) and [O III]λ1663 (gray diamonds) galaxies at z ∼ 2.5.The Figure also includes strongline metallicities (using a Bayesian approach to R23) from stacked HST/WFC3 grism measurements of z ∼ 2 galaxies (blue squares) from Henry et al. (2021), as well as parametric mass-metallicity relations at z ∼ 0.2, z ∼ 1.3, z ∼ 1.9 (dashed lines) determined by Papovich et al. (2022).We additionally compare our 6 < z < 9 galaxies with mass-metallicity predictions of galaxies at z = 7 in the FLARES simulations (Lovell et al. 2021).2020), as well as R23 metallicities from stacked HST/WFC3 grism measurements (blue squares) from Henry et al. (2021).The gray shaded region indicates the 16-84% distribution of galaxies at z = 7 in the FLARES simulations (Lovell et al. 2021).
At fixed stellar mass, the metallicities of our z > 6 galaxies are generally consistent with the metallicities of auroral-[O III]-selected galaxies of similar (log(M /M ) < 9) stellar mass at z ∼ 2.5.The z > 6 galaxies are also consistent with the stacked z ∼ 2 strong-line metallicity measurements of Henry et al. (2021) and with a low-mass extrapolation of the z ∼ 1.9 mass-metallicity relationship of Papovich et al. (2022).However the large stellar mass uncertainties of our z > 6 galaxies mean that they are also broadly consistent with slightly lower metallicities at fixed stellar mass compared to the lower-redshift samples.
The broad distribution of mass and metallicity among the z > 6 sample is also notable.The galaxy with the highest metallicity (12 + log(O/H) = 8.1 for ID 6355) has very bright emission lines, implying a very high star formation rate.This galaxy also has a clumpy and extended morphology that is suggestive of a merger (Carnall et al. 2022).The other three z > 6 galaxies all have lower metallicities and lower stellar masses, with ID 4590 at z = 8.5 having the lowest metallicity and lowest stellar mass of the sample.It is interesting to measure such diversity in chemical enrichment and mass as-sembly in the early Universe among our limited sample of z > 6 galaxies.

CONCLUSIONS
We use JWST/NIRSpec spectroscopy from the SMACS 0723 Early Release Observations to study the physical conditions of the interstellar medium in five galaxies at z > 5. We identify several caveats in the current (v1.8.2) reduction pipeline, including uncertain absolute flux calibration, too-wide spectral extractions, and underestimated uncertainties.We mitigate these issues using a custom spectral extraction, as described in detail in Section 2.2.We caution against uses of NIRSpec observations which require absolute spectrophotometry or accurate continuum detection, such as equivalent widths and comparisons of lines widely separated in wavelength, especially if using the standard (v1.8.2) pipeline products.However we find that the relative flux calibration is reliable, as determined by the stability of measured line ratios in different visits and by a measured [O III]λ5008/[O III]λ4960 = 3 for all galaxies.
We measure the ratios of rest-frame optical emission lines that are closely separated in wavelength, Compared to lower-redshift (z ∼ 3) galaxies, the z > 5 galaxies have similar [O III]λ5008/Hβ, similar [O III]λ4364/Hγ, and ∼0.5 dex higher [Ne III]λ3870/[O II]λ3728.The z > 5 emission-line ratios are generally well-described by MAPPING V photoionization models for an ISM that has very high ionization (log(Q) 8 − 9), very high pressure (log(P/k) 8 − 9), and low metallicity (Z/Z 0.2).The [O III]λ4364/Hγ and [O III]λ5008/Hβ emission-line ratios indicate very high electron temperatures of 4.1 < log(T e /K) < 4.4 in the four z > 6 galaxies.We use these electron temperatures to estimate T e -based nebular metallicities of 7.5 < 12 + log(O/H) < 8.1 (Z/Z 0.2) in the 4 z > 6 galaxies.Using stellar masses published in other work, we present a mass-metallicity diagram that compares the z > 6 galaxies with lower-redshift samples and with theoretical simulations.The z > 6 metallicities are broadly consistent with z ∼ 2 galaxies of similar stellar mass, although our interpretation is limited by highly uncertain stellar masses.
These measurements demonstrate the impressive capability of JWST spectroscopy for understanding the physical conditions of the gas in galaxies at cosmic dawn.We look forward to upcoming JWST observations of larger samples of galaxies that will further probe the assembly and chemical enrichment of the first galaxies in the Universe.
The authors are enormously grateful to all of the people who designed, built, launched, deployed, and commissioned the James Webb Space Telescope.The observations from this spacecraft are incredible.Seriously: much wow.The CEERS team thanks Pierre Ferruit and the NIRSpec GTO team for providing NIRSpec IPS simulated data and for general good counsel, and the STScI NIRSpec instrument team for extensive assistance regarding the JWST Pipeline and data simulations.We are grateful to the referee for constructive and thoughtful comments that improved the manuscript.The JWST Early Release Observations (ERO) and associated materials were developed, executed, and compiled by the ERO production team: Hannah Braun, Claire Blome, Matthew Brown, Margaret Carruthers, Dan Coe, Joseph De-Pasquale, Nestor Espinoza, Macarena Garcia Marin, Karl Gordon, Alaina Henry, Leah Hustak, Andi James, Ann Jenkins, Anton Koekemoer, Stephanie LaMassa, David Law, Alexandra Lockwood, Amaya Moro-Martin, Susan Mullally, Alyssa Pagan, Dani Player, Klaus Pontoppidan, Charles Proffitt, Christine Pulliam, Leah Ramsay, Swara Ravindranath, Neill Reid, Massimo Robberto, Elena Sabbi, Leonardo Ubeda.The EROs were also made possible by the foundational efforts and support from the JWST instruments, STScI planning and scheduling, and Data Management teams.

Figure 2 .
Figure 2. The 2D profiles of the rest-frame optical emission lines of interest for the first visit of source 6355.The pixel scale is 0. 1/pixel in the cross-dispersion (vertical) direction and 17 Å/pixel in the wavelength (horizontal) direction.The darker regions are individual nod positions and the brighter regions are from the coadd of the three nods.The emission lines are well-detected and have a consistent spectral trace over a broad range of wavelength in the reduced 2D spectra.The complete figure set (10 images) of all 10 sets of emission-line profiles (2 visits each for 5 sources) is available in the online journal.

Figure 3 .
Figure 3.The spectrum and emission-line fits for the first visit of source 4590, in the rest-frame wavelength regions that include [O II] and [Ne III], Hγ and [O III]λ4364, Hβ and [O III]λ4960, 5008.Flux is shown by the black histogram and flux uncertainty by the gray error bars.The blue line indicates the continuum and the red lines indicate the best-fit Gaussian functions to each emission line.The complete figure set (10 images) of all 10 spectra and emission-line fits (2 visits each for 5 sources) is available in the online journal.
4. LINE-RATIO DIAGNOSTICS We infer galaxy properties from emission-line pairs that are closely separated in wavelength: namely [O III]λ5008/Hβ, [O III]λ4364/Hγ, and [Ne III]λ3870/[O II]λ3728.The use of ratios of emission lines that are closely separated in wavelength avoids the issues with the absolute flux calibration described in Section 2.2, and is also largely insensitive to dust attenuation.

4. 1 .
Figure 4 presents the "OHNO" line-ratio diagnostic of [O III]/Hβ vs. [Ne III]/[O II],with the line-ratio measurements of the z > 5 galaxies shown by large red stars.We use the samples ofBackhaus et al. (2022) as a low-redshift comparison, with line ratios for z ∼ 2 galaxies in the CLEAR survey(Simons et al. in prep)  measured from HST/WFC3 grism spectroscopy.A sample of ∼28,000 z ∼ 0 galaxies with detected OHNO emission lines from the Sloan Digital Sky Survey (SDSS,York et al. 2000) is shown by gray contours.Figure4also shows stacked line-ratio measurements from MOSDEF observations(Sanders et al. 2021) as pink and maroon points.The high-and low-redshift samples have different line-luminosity selection limits and so intercomparison is nontrivial.The lack of robust absolute flux calibration means that we cannot construct samples of lowredshift galaxies that are matched to our z > 5 galaxies (following, e.g.,Juneau et al. 2014;Backhaus et al. 2022).Instead, we generally focus our discussion below on comparing the z > 5 galaxies to the most extreme (highest ionization and lowest metallicity) galaxies present in the low-redshift samples.Compared to the lower-redshift comparison samples, the z > 5 galaxies in SMACS 0723 have similar [O III]/Hβ ratios but have [Ne III]/[O II] ratios that are higher by ∼0.5 dex.

Figure 4 .
Figure 4.The "OHNO" diagram of [O III]λ5008/Hβ vs. [Ne III]λ3870/[O II]λ3728.As indicated in the legend, the new high-z galaxy measurements are shown by red stars, z ∼ 2 galaxies from CLEAR in black(Backhaus et al. 2022), and z ∼ 0 galaxies from SDSS in gray contours(York et al. 2000).MAPPINGS models are shown by the colored curves, with different curves for different ionization (log(Q) =[7, 8, 9]   increasing left to right), metallicity along each curve (Z/Z = [1, 0.4, 0.2, 0.05] decreasing left to right), and curves shown for each of three pressures (log P/k = [7, 8, 9]).The OHNO line ratios of the z > 5 galaxies indicate higher ionization, lower metallicity, and higher pressure than the z ∼ 2 (and z ∼ 0) galaxies, and are broadly consistent with an ISM of log(Q) 8 − 9, log(P/k) 8 − 9, and/or Z/Z 0.2.The redshift evolution of [Ne III]/[O II] at fixed [O III]/Hβ appears to be broadly consistent from z ∼ 0 to z ∼ 2 to z ∼ 3 to z > 5, with z ∼ 3 MOSDEF and z ∼ 2 CLEAR [Ne III]/[O II] ratios that are higher than the "evolution-matched" z ∼ 0 sample and z > 5 [Ne III]/[O II] ratios that are even higher than the z ∼ 2 and z ∼ 3) ratios.The redshift evolution of [Ne III]/[O II] from z ∼ 0 to z ∼ 2 and z ∼ 3 has been discussed in previous work (e.g.Zeimann et al. 2015; Strom et al. 2017; Kewley et al. 2019b; Jeong et al. 2020; Sanders et al. 2021; Backhaus et al. 2022) and requires a harder ionizing spectrum, likely caused by some combination of massive α-enhanced low-metallicity stars, higher-density (and higher-pressure) H II regions, and increased AGN content at higher redshift.Here we demonstrate the same trend of increasing [Ne III]/[O II] with redshift in galaxies at z > 5.The redshift evolution cannot be explained by the observed anticorrelation of [Ne III]/[O II] with stellar mass (e.g., Sanders et al. 2021; Backhaus et al. 2022) since the lowest-mass SDSS, CLEAR, and MOSDEF galaxies have lower (by ∼0.5 dex) [Ne III]/[O II] than the low-mass z > 5 galaxies.We note that there is not an obvious trend of [Ne III]/[O II] with redshift among the z > 5 galaxies: for example a z = 7.7 (ID 6355) galaxy has the lowest [Ne III]/[O II] and a z = 6.4 (ID 5144) galaxy has the highest [Ne III]/[O II], with ratios that are >3σ inconsistent given their observational uncertainties.
Figure 5 presents a comparison of the measured [O III]λ5008/Hβ and [O III]λ4364/Hγ line ratios of the four z > 6 galaxies in our sample (shown again as large red stars).ID 8140 (z = 5.3) is not shown in this Figure because its [O III]λ4364 and Hγ lines are only marginally (<2σ) detected.Also shown in Figure 5 are line ratios of 5 z ∼ 3 galaxies measured bySanders et al. (2020).We also compare to a low-redshift (0.3 < z < 0.4) sample of "green pea" galaxies fromBrunker et al. (2020) that are selected based on their high-EW emission lines and are potential analogs to high-redshift / high-ionization starburst galaxies (see also, e.g.,Henry et al. 2015;Flury et al. 2022).In addition, the gray contours in Figure5show the line-ratio distribution of

Figure 5 .
Figure 5.The ratio of [O III]λ5008/Hβ vs. [O III]λ4364/Hγ.Red stars indicate the new high-z galaxy line ratios.Lower-redshift comparison samples are also shown in the figure: 5 z ∼ 3 galaxies from Sanders et al. (2020) (black points), 9 z ∼ 0.35 "green-pea" galaxies from Brunker et al. (2020) (dark gray diamonds), and ∼1800 extreme equivalent-width SDSS galaxies from Pérez-Montero et al. (2021) (gray contours).Colored curves indicate theoretical MAPPINGS models for different ionization, metallicity, and pressure.The [O III]λ5008/Hβ and [O III]λ4364/Hγ ratios are not very sensitive to pressure and so the three log P/k = [7, 8, 9] models lie very close together.As in Figure4, the z > 5 galaxies have [O III]λ5008/Hβ ratios that are similar to the lower-redshift comparison sample.The high-redshift [O III]λ4364/Hγ ratios are higher than most (but not all) of the z ∼ 0 galaxies but only slightly ( 0.5 dex) larger than the z ∼ 3 sample.The z > 5 line ratios are well-described by MAPPINGS models for an ISM of very high ionization (log(Q) 8 − 9) and low metallicity (Z/Z 0.2).

Figure 5
also compares the observations to the MAP-PINGS V model line ratios (shown by the colored curves of ionization, metallicity, and pressure).The log(Q) = 7 curve lies outside the range of the Figure (to the lower left) and is not shown.The [O III]λ5008/Hβ and [O III]λ4364/Hγ line ratios are largely insensitive to ISM pressure and so the three curves of different pressure (log(P/k) = [7, 8, 9]) have very similar line ratios.As in the OHNO diagram in Figure
based on observations made with the NASA/ESA/CSA James Webb Space Telescope.The data were obtained from the Mikulski Archive for Space Telescopes at the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., under NASA contract NAS 5-03127 for JWST.These observations are associated with program #2736.The authors acknowledge the ERO team for developing their observing program with a zero-exclusive-access period.
supported by NASA grants JWST-ERS-01345 and JWST-AR-01721.JRT and BEB additionally acknowledge support from NSF grant CAREER-1945546.RCS appreciates support from a Giacconi Fellowship at the Space Telescope Science Institute.RA acknowledges support from Fondecyt Regular 1202007.PGP-G acknowledges support from grant PGC2018-093499-B-I00 funded by MCIN/AEI/10.13039/501100011033.AY is supported by an appointment to the NASA Postdoctoral Program (NPP) at NASA Goddard Space Flight Center, administered by Oak Ridge Associated Universities under contract with NASA.

Table 1 .
Target ID, Redshift, and Emission-Line SNR

Table 1 .
Emission lines are measured independently for each of the 2 NIRSpec visits for each source.Asterisks (***) indicate a problem in the spectrum (a detector artifact or other emission beyond the main spectral trace) that prevents a measurement of the emission line.

Table 2 .
Line ratios are measured from the average of the two visits (excepting the cases where a line cannot be measured in one visit).Error bars indicate 1σ uncertainties.The [O III]λ4364/Hγ ratio cannot be measured for ID 8140 and is marked by asterisks (***).
presents 3 https://pages.physics.wisc.edu/∼craigm/idl/fitting.html the measured line ratios, generally computed from the average line measurements of the two visits.The line ratio is measured from only one visit if a line of the ratio cannot be measured in the other visit, i.e. [O III]λ5008/[O III]λ4960 for ID 4590 and [Ne III]/[O II] for ID 10612.Neither [O III]λ4364 nor Hγ are robustly (>3σ) detected in ID 8140 and so the [O III]λ4364/Hγ line ratio is unconstrained for this galaxy.

Table 3 .
Electron Temperature and Inferred Metallicity

Table 3 .
Carnall et al. (2022)omCarnall et al. (2022).Error bars indicate 1σ uncertainties, and for metallicity include the calibration uncertainty associated with the Te-based relationship.ISM emitting the [O III] lines and may not be representative of the broader gas conditions.Significant gradients in density and/or ionization in the ISM may lead to a mix of highand low-ionization regions and the [O III] electron temperature probes only the former.Our use of the Pérez-Montero et al. (