Euclid: Calibrating photometric redshifts with spectroscopic cross-correlations

Cosmological constraints from key probes of the Euclid imaging survey rely critically on the accurate determination of the true redshift distributions, $n(z)$, of tomographic redshift bins. We determine whether the mean redshift, $$, of ten Euclid tomographic redshift bins can be calibrated to the Euclid target uncertainties of $\sigma()<0.002\,(1+z)$ via cross-correlation, with spectroscopic samples akin to those from the Baryon Oscillation Spectroscopic Survey (BOSS), Dark Energy Spectroscopic Instrument (DESI), and Euclid's NISP spectroscopic survey. We construct mock Euclid and spectroscopic galaxy samples from the Flagship simulation and measure small-scale clustering redshifts up to redshift $z<1.8$ with an algorithm that performs well on current galaxy survey data. The clustering measurements are then fitted to two $n(z)$ models: one is the true $n(z)$ with a free mean; the other a Gaussian Process modified to be restricted to non-negative values. We show that $$ is measured in each tomographic redshift bin to an accuracy of order 0.01 or better. By measuring the clustering redshifts on subsets of the full Flagship area, we construct scaling relations that allow us to extrapolate the method performance to larger sky areas than are currently available in the mock. For the full expected Euclid, BOSS, and DESI overlap region of approximately 6000 deg$^{2}$, the uncertainties attainable by clustering redshifts exceeds the Euclid requirement by at least a factor of three for both $n(z)$ models considered, although systematic biases limit the accuracy. Clustering redshifts are an extremely effective method for redshift calibration for Euclid if the sources of systematic biases can be determined and removed, or calibrated-out with sufficiently realistic simulations. We outline possible future work, in particular an extension to higher redshifts with quasar reference samples.


Introduction
The European Space Agency's Euclid space mission 1 (Laureijs et al. 2011) will map out the positions of billions of galaxies in the Universe.The imaging survey is designed to measure the flux of galaxies in broadband photometric filters over visual and infrared wavelengths, and spectroscopic redshifts will be determined for a subsample of these galaxies using slitless spectroscopy of emission line galaxies (ELGs).Cosmological metric sample n(z) through the re-weighting of spectroscopic colour-redshift spaces (Lima et al. 2008;Hildebrandt et al. 2017;Wright et al. 2020); and, the focus of this paper, crosscorrelations with spectroscopic samples, or 'clustering redshifts' (Newman 2008).
Since the seminal work of Newman (2008), cross-correlation redshift calibration has seen a fair amount of development (Schmidt et al. 2013;Ménard et al. 2013;McQuinn & White 2013;Sánchez et al. 2014;Scottez et al. 2016;Morrison et al. 2017;Scottez et al. 2018;Alarcon et al. 2019) but has only recently made its way into state-of-the-art large-scale structure analyses (Hoyle et al. 2018;Gatti et al. 2018Gatti et al. , 2022;;Hildebrandt et al. 2020;Myles et al. 2021;Cawthon et al. 2022).Clustering redshifts use small angular scales where the signal-to-noise of galaxy clustering is highest, and thus the achievable precision scales directly with the area of photometric-spectroscopic overlap (see Cawthon et al. 2018).Next-generation photometric surveys such as Euclid and the Rubin Observatory's Legacy Survey of Space and Time (LSST; LSST Science Collaboration et al. 2009) will be able to employ thousands of square degrees of such overlap, in collaboration with the new generation of spectroscopic surveys, such as the Dark Energy Spectroscopic Instrument (DESI; DESI Collaboration et al. 2016), allowing for the most powerful application of clustering redshifts to date.
Clustering redshifts are estimated through the angular crosscorrelations of galaxy samples.A tracer sample with secure redshift estimates (from spectroscopy or narrow-band photometry) is cross-correlated with a target sample (which typically has only broadband photometry), for which we wish to accurately and precisely determine the redshift distribution, n(z).Underlying the method is the assertion that the on-sky positions of galaxies in the two samples will only be correlated where they inhabit similar ranges in redshift, that is, where their n(z) overlap.Thus, the amplitude of the cross-correlation at a given redshift contains information about the amplitude of the (known) tracer, n(z), and the unknown target, n(z), but is degenerate with the galaxy biases of both the photometric and spectroscopic galaxy samples.For the spectroscopic sample, the bias can be estimated by measuring the auto-correlation function.However, the photometric sample bias is more difficult to constrain and is the primary source of systematic errors for this mode of study (van den Busch et al. 2020).
Clustering redshift calibration is complementary to the more standard methods of photo-z calibration frequently employed in the literature.Such approaches rely upon real or simulated source photometry, either for characterising colour-redshift relations or for the use of photo-z estimation algorithms.Photometric uncertainties and biases then propagate directly into the n(z) determination.The potential for biased n(z) determination from these techniques can be significant due to degeneracies in the colour-redshift distribution and to the incompleteness of spectroscopic samples in colour-redshift space (Hartley et al. 2020;Wright et al. 2020).Clustering redshifts suffer none of these limitations, as they rely instead upon the accuracy and sufficient coverage of point-estimated redshifts.Being susceptible to independent sources of bias, each method is well suited to cross-check the others; Alarcon et al. (2019) combined the photometry-and clustering-based approaches in a hierarchical Bayesian framework, leveraging all available information to recover mean redshifts with uncertainties of ∼ 3 × 10 −3 , even in scenarios of poor or biased spectroscopic completeness.
For Euclid to achieve one of its primary science goals, specifically a figure of merit (FoM) on dark energy of > 400 (Laureijs et al. 2011), uncertainties on the mean redshift, σ ( z ) , for each tomographic redshift bin must be less than 0.002 (1 + z) (68% confidence limits; Laureijs et al. 2011).In this paper we assess the potential for photometric-spectroscopic crosscorrelations to form a major component of the redshift calibration in Euclid.We aim to use approximately 402 deg 2 of the Euclid Flagship simulation (Potter et al. 2017), with realistic photoz point estimates based upon LSST-like photometry, to forecast the expected uncertainties of clustering redshift calibration as the Euclid data volume grows.We define realistic spectroscopic samples in the simulation, based upon DESI and Baryon Oscillation Spectroscopic Survey (BOSS) selection criteria (DESI Collaboration et al. 2016;Dawson et al. 2013), and make use of the clustering redshift method (Schmidt et al. 2013;Ménard et al. 2013) as implemented in the yet_another_wizz (YAW) software package (van den Busch et al. 2020).We explore the dependence of σ ( z ) upon the area of spectroscopic overlap and extrapolate from 402 deg 2 to the full projected overlap region for Euclid, BOSS, and DESI.We also explore various methods of mitigation for systematic biases associated with the unknown redshift evolution of the photometric galaxy bias, including the use of spectroscopic auto-correlations and internal consistency checks available only to simulations.
This paper is organised as follows.In Sect. 2 we describe the Flagship simulated data, the realistic photo-z employed in our analysis, and our definitions of spectroscopic sub-samples.Section 3 details our cross-correlation methodology, galaxy bias correction, and the extrapolation of uncertainties to the full Euclid, BOSS, and DESI overlap.In Sect. 4 we present the results of clustering redshift calibration for these simulations and in Sect. 5 discuss the implications for Euclid clustering redshifts and avenues to pursue for future research.

Data: Simulated photometric and spectroscopic samples
Below we explain our process for constructing simulated Euclid photometric 'target' samples and spectroscopic 'tracer' samples used to study clustering redshifts for Euclid.

Summary of photometric and spectroscopic samples
In this study, we cross-correlate simulated photometric target galaxies with Euclid-like mock photo-z and mock spectroscopic tracer samples from the BOSS-like LOWZ and CMASS; the DESI-like Bright Galaxy Survey (BGS); luminous red galaxies (LRGs) and ELGs; and the Euclid-like NISP-S galaxies.We defined our BOSS-and DESI-like galaxy samples on simulated, noiseless photometry, wherein randomly distributed redshift 'failures' are modelled by sparse sampling to appropriate number densities.However, systematic failures arising from noisy photometry, and potentially correlating spatially, or with variable survey depth, were not implemented -the impact of these should be explored in future work.
In Fig. 1 we display the true redshift distributions for the ten photometric bins, defined using one of the photo-z samples defined in Sec.2.2, and compare them with our mock spectroscopic sample redshift distributions.The lack of spectroscopic samples above redshift 1.8 sets a hard upper-limit for our inferred target n(z)'s.Future studies will benefit greatly from understanding the role that quasar galaxy samples from BOSS, eBOSS (Dawson et al. 2016), or DESI (Yèche et al. 2020) can play in better constraining the Euclid photometric sample at higher redshifts.We also note the relatively small tracer-target redshift overlap for Unfortunately most of this overlap takes place across the Northern Hemisphere, where photometry from LSST will be limited to the southern-most regions, and therefore the accuracy of the photo-z is likely be worse than that for the ones used in this study.Since these photo-z catalogues were not produced without LSST-like photometry, we could not isolate this study to purely Euclid photometry.We have instead chosen to assume that either the ugrizy bands of LSST will be supplemented in the Northern Hemisphere by other photometric surveys of equivalent depth (as assumed by Euclid Collaboration: Pocino et al. 2021) or that the spectroscopic overlaps of BOSS and DESI are supplied by an equivalent Southern Hemisphere survey such as those that will be observed with the 4-metre Multi-Object Spectroscopic Tele-scope4 (4MOST).This means the quality of the Euclid photo-z will depends on the angular footprint of the supplementary photometry used from other surveys such as LSST and needs to be factored into future studies as this may also result in n(z) that are angular dependent -which, if this is the case, will drastically complicate cosmological inference and analysis.

Euclid photometric sample
The Flagship simulation (Potter et al. 2017) is a large N-body simulation computed with over two trillion dark matter particles in a box of length 3.78 h −1 Gpc using the PKDGRAV3 Nbody code.The simulation is constructed assuming a flat Λ cold dark matter model with cosmological parameters Ω m = 0.319, Ω b = 0.049, Ω Λ = 0.681, σ 8 = 0.83, n s = 0.96 and h = 0.67.Dark matter haloes were identified using ROCKSTAR (Behroozi et al. 2013), and galaxies assigned using halo abundance matching and halo occupation distribution techniques.Simulated Euclid photo-z were constructed for galaxies in the Flagship simulation over the RA range 15 • to 75 • , and Dec range 62 • to 90 • (Euclid Collaboration: Pocino et al. 2021).We briefly describe the construction of this catalogue below but refer the reader to Euclid Collaboration: Pocino et al. (2021) for a complete description.
To generate realistic photo-z catalogues, realistic fluxes were created by adding Gaussian noise to Flagship galaxy fluxes.The Gaussian noise is defined with a standard deviation of f 5σ /5 (the flux error associated with each galaxy) where f 5σ is the limiting flux depth at a signal-to-noise ratio (S/N) of 5.The limiting magnitudes at 5σ depth considered to compute flux observations were 26.3, 27.5, 27.7, 27, 26.2, and 24.9 for the ugrizy bands of Rubin LSST,and 24.6,23,23,and 23 for the I E and Y E , J E , H E bands of Euclid at 10σ depth assuming both surveys are at endof-survey depth.
The noisy I E magnitudes were cut to less than 24.5 (Laureijs et al. 2011) to simulate the Euclid I E galaxy sample.Realistic estimates of the photometric redshift of simulated galaxies were made using the directional neighbourhood fitting (DNF; De Vicente et al. 2016) training-based algorithm.The DNF photo-z are estimated according to the proximity in colour-magnitude space of target and training galaxies, where redshifts are known for the training set.The DNF algorithm produces two photoz estimates; 'z mean ' takes the mean of neighbouring galaxies in colour and magnitude space, and 'z mc ' draws a random redshift from the neighbouring galaxies.A 3.35 deg 2 patch of Flagship was used to create training samples for the DNF.The first training sample was defined to be fully representative in redshift and magnitude space, and produced the photo-z catalogues z mean and z mc .A second training sample featured a completeness drop in I E magnitude (emulating the expected spectroscopic completeness fraction versus photometric depth function for surveys such as Rubin; see Newman et al. 2015), and produced the photo-z catalogues z mean Rubin and z mc Rubin .We repeated our analysis on each of these four photo-z catalogues.
We produced ten tomographic redshift bins for each photoz catalogue.These were constructed by selecting galaxies with photo-z between 0.2 and 1.6, and then dividing them into ten bins with approximately equal numbers of galaxies.The definition for the tomographic bins used in this study differ in two important ways to the definitions currently planned for Euclid; in the real survey the maximum photo-z will extend up to z = 2.6 rather than z = 1.6 and secondly 13 rather than 10 tomographic bins will be used (Euclid Collaboration et al. 2020).The justification for these difference is motivated by two factors, (1) a limit to the galaxies in the Flagship mocks of z < 2.2 and (2) a sharp cut off in simulated spectroscopic tracers to z < 1.8.Including galaxies with photo-z of greater than z > 1.6 will introduce a substantial set of galaxies with true redshifts beyond z > 1.8 where clustering redshift measurement cannot be made.Since this limitation is purely based on our setup we wish to limit any effect it may pose on the results and implications for Euclid.Quasars (e.g. as observed by DESI; DESI Collaboration et al. 2016) will eventually provide reference samples for calibration at these high redshifts.We note that the clustering redshifts method will need to be carefully optimised for quasar samples, where bias modelling and angular scale utilisation are likely to pose challenges for the much sparser quasar population.
We note that Euclid's ground-based photometry complement in the Northern Hemisphere will be somewhat shallower and less homogeneous than the LSST.Nevertheless, the photometry will meet the stringent Euclid requirements and hence yield high-quality photometric redshifts, so that our conclusions remain valid.

Reference spectroscopic samples
We detail below the various spectroscopic tracer samples that we define in the Flagship simulation, each designed to mimic a current or future galaxy sample observed by Euclid, BOSS, or DESI.

Euclid NISP-S samples
The Euclid near-infrared spectrometer (Euclid Collaboration et al. 2022b) is designed to measure spectroscopic redshifts for over 50 million galaxies (referred to as the NISP-S sample).The redshift determination is to be made with slitless spectroscopy dependent on the detection of emission lines, in particular the Hα line, in the near-infrared.We defined mock NISP-S samples in Flagship by selecting galaxies with Hα fluxes greater than 3 × 10 −16 erg cm −2 s −1 (Laureijs et al. 2011), and cutting to a redshift range between 0.9 and 1.8.Comparisons of the mock NISP-S redshift distribution to the optimistic and pessimistic predictions made by Euclid Collaboration: Blanchard et al. (2020), we found consistency above redshifts of 1.35, but an overproduction of galaxies at lower redshifts.To correct for this we carry out sparse sampling for mock NISP-S galaxies with z < 1.35 to approximately match the optimistic expectation from Euclid Collaboration: Blanchard et al. (2020).

Baryon Oscillation Spectroscopic Survey LOWZ & CMASS samples
We defined BOSS-like samples according to the colourmagnitude selections specified by Dawson et al. (2013).BOSS produced two spectroscopic LRG samples, LOWZ and CMASS, targeting adjacent redshift intervals z ∈ [0.15, 0.43] and z ∈ (0.43, 0.7], respectively, and with true densities of about 30 deg −2 and 120 deg −2 , respectively.We replicated the BOSS colourmagnitude selections as follows, first defining where gri denote apparent magnitudes (at our simulated LSST depth).We then defined mock LOWZ samples with the following criteria: and mock CMASS samples with 17.5 < i < 19.9 , (7) These cuts provided LOWZ-and CMASS-like objects in the Flagship simulation at rates of 67 deg −2 and 139 deg −2 , respectively.We sparse sample our selections to the desired densities, with sparse sampling fractions of 0.44 and 0.86.

Dark Energy Spectroscopic Instrument BGS, LRG, and ELG samples
We based our DESI-like sample selections on those detailed in Sect. 3 of DESI Collaboration et al. (2016).DESI will measure the spectra of galaxies at relatively low redshifts with the BGS (designed to use spectra obtained during brighter sky conditions), and will also target two deeper surveys of LRGs and ELGs.We define our mock BGS sample with the following criteria, where z is the true object redshift.We define the mock LRG sample with where color_kind is a flag labelling red sequence (0), green valley (1) and blue cloud (2) galaxies.Lastly, we defined the mock ELG sample of galaxies with [O ii] emission line strengths greater than 8 × 10 −17 erg s −1 cm −2 , and with the following cuts, which act to isolate ELGs in colour-colour space, minimising contamination of the sample by lower-redshift objects or by stars.We also applied a hard cut to the expected redshift range, and required that the color_kind not specify a red sequence object, though these have comparatively small impacts upon the selection.These cuts provided BGS-, LRG-, and ELG-like objects in the Flagship simulation at rates of 1174 deg −2 , 392 deg −2 , and 2021 deg −2 , respectively.We achieved the expected number densities (of 700 deg −2 for BGS, 285 deg −2 for LRG, and 1220 deg −2 for ELG) by sparse sampling with sparse sampling fractions of 0.6, 0.73, and 0.6, respectively.
We omitted DESI LRGs with z < 0.6, which have selection criteria similar to BOSS.Therefore, the dearth of reference galaxies in the range 0.4 < z < 0.6 will be much less pronounced for real data, which makes our analysis conservative.

Method
In this section we briefly outline the clustering redshift method used in this study, the subsequent method for modelling the redshift distributions, and lastly the area rescaling approach used to predict the uncertainty on the mean redshift for the full Euclid survey.

Clustering redshifts
The angular correlation function ω 12 (θ, z) for two samples on the sky (denoted by 1 and 2), where sample 1 is at a fixed redshift z, is given by the Limber (1953) relation, where b 1 (z) and b 2 (z) are the redshift-dependent biases for samples 1 and 2, respectively, n 2 (z) is the normalised redshift selection function for sample 2, ξ(R, z) is the matter auto-correlation function at redshift z and comoving three-dimensional separation where χ(z) is the radial comoving distance at redshift z and f K (z) is the angular diameter distance at redshift z.
For the computation of clustering redshifts, the following assumptions are made.We first consider the angular correlation function for a spectroscopic tracer sample (denoted with an index s) and photometric target sample (denoted with an index p) Angular correlation functions are computed for narrow redshift slices of the spectroscopic tracer with a mean redshift z i (where i denotes the redshift bin) and bin width of ∆z.Furthermore, assuming measurements are only made for small values of θ we can can make the approximation that ξ 0 only if the integral is calculated within the bin's redshift range z i ± ∆z/2.The narrow sizes of the bins means n p and b p can be approximated as constants and therefore Eq. ( 23) simplifies to where In our study these expressions were evaluated for the transverse physical scale r = θχ/(1 + z), which led to the final definition of the angular correlation function for clustering redshifts, Thus we can evaluate the target sample's redshift selection function n p by rearranging Eq. ( 26) for The above equation requires knowledge of the bias-redshift relation for both the spectroscopic tracer and photometric target sample.By evaluating Eq. ( 26) for the angular auto-correlation functions for the spectroscopic and photometric samples we can define the bias functions as where x can denote either the spectroscopic tracer or photometric target sample.Since the auto-correlation function is evaluated in a single, narrow redshift bin, the normalised redshift selection function n x → 1/∆z.Using these relations, Eq. ( 27) can be expressed as However, in practice ω pp (r, z) is difficult to obtain, since we do not know the photometric sample redshifts a priori, and thus cannot bin target galaxies to measure the correct auto-correlations and anchor the photometric sample galaxy bias.The result is that the n p (z) is biased and requires a correction scheme to account for any redshift evolution of the photometric sample galaxy bias.Several bias mitigation strategies can be employed.Method 1: No corrections are applied.This is useful to test the success of the following bias correction methods.This means we assume n p (z) ∝ ω sp (r, z).
Method 2: The spectroscopic biases are computed from the auto-correlation functions and are incorporated in the n p (z) computation.This means we use Eq. ( 29) but ω pp (r, z) is evaluated for the entire tomographic bin instead of within thin redshift slices.
Method 3: 'Self-consistent bias mitigation' uses a oneparameter redshift power law, B α (z), fitted to the observed autoand cross-correlations to account for redshift evolution in b p (Davis et al. 2018;van den Busch et al. 2020) where α is a free model parameter, and barred correlations ω(z) correspond to integrals over ω(r, z) between chosen limits r min and r max .This means ω pp in Eq. ( 29) is replaced with B α (z) 2 /∆z.Method 4: The bias for the photometric sample is computed from the auto-correlation function for only the photometric galaxies with true redshifts within a given redshift slice.Eq. ( 29) is therefore applied exactly.We note that this method can only be applied to simulated data, and is useful for assessing the accuracy of other bias correction schemes.

Cross-correlating redshifts
We compute clustering correlations in the Flagship data using the single-bin (defined by r min , r max ) method of Schmidt et al. (2013) and Ménard et al. (2013), implemented with the Davis-Peebles clustering estimator (Davis & Peebles 1983) as follows: where W(r) ∝ r β (e.g.β = −1; Schmidt et al. 2013;Ménard et al. 2013), DD(r) and DR(r) are galaxy-galaxy and galaxy-random pair counts (in the comoving bin centred on r), respectively, and N R /N D re-normalises pair counts to account for over-sampling of random points relative to the data.The method follows van den Busch et al. ( 2020) and uses the software package YAW5 described in van den Busch et al. ( 2020) with errors and covariance matrices estimated using bootstrap resampling.

Redshift distribution fitting
Since the clustering redshift measurements have Gaussian error distributions, they allow for negative n(z) values.Of course, no true PDF can exhibit this property and as a result the raw clustering redshift measurements will artificially inflate the uncertainties on the mean redshift z .Therefore, we did not determine z directly from the clustering redshift measurements but rather by fitting model n(z) distributions.Two model n(z) distributions were considered.The first model, the shifted-true model, is simply the true n(z) measured from simulations with the addition of two free parameters: A and δz, which are the amplitude and shift parameters, respectively (explained in greater detail in Sect.

3.3.1)
. The second model is the suppressed Gaussian process (suppressed-GP) model discussed in Sect.3.3.2,which, unlike the first model, makes no assumptions about the shape of the n(z) distribution.In both cases, the models are not normalised, since normalisation cannot be enforced on the clustering redshift measurements.Normalisation of the model is therefore only conducted when we are calculating the mean of the PDF.

Shifted-true
In the shifted-true model the clustering redshift measurements are fitted to the true n(z).If these were real data, this true n(z) would not be known and would have to be estimated through forward modelling on simulations such as Flagship, or from direct calibration (van den Busch et al.Fitting with the true distribution allows us to test the robustness of the output clustering redshift measurements, since the resultant best-fit values should be consistent with δz = 0 in the absence of systematic errors.The parameters are determined using a Gaussian likelihood, where n(z) and σ n(z) are the clustering redshift measurements and 68.3% confidence intervals, respectively.

Suppressed Gaussian process
Whilst the shifted-true model is a valuable test for systematic errors, it is important to note that we will not have access to such a model for real data.In previous studies, clustering redshifts were fitted to models based on simulated photometric redshift samples while Gatti et al. (2022) used direct calibration of the data.Although the simulated photometric redshift n(z) may work as a good proxy for the real model, it may be better to have a model that is more flexible and could be relied upon in a more general setting.With this in mind, we present a new, non-parametric approach to fitting clustering redshift distributions based upon Gaussian processes (GPs, and featuring a suppression function that damps signals in regions where the clustering redshift measurements are consistent with zero.
A GP is first fitted to the clustering redshift measurements.This is carried out by the Python package George6 using a Matern-3/2 kernel.One benefit of such a model is that we can now draw random samples from the distribution to measure the mean redshift and its uncertainty.However, as with the clustering redshift measurements there is nothing limiting the GP model from drawing samples that are negative.This issue is further compounded by the fact that uncertainties crossing zero will create spurious fluctuations in the GP samples.To ensure that the GP is positive, and to remove spurious signals where the clustering redshift measurement is consistent with zero, we apply a suppression function to the GP realisations.The suppression function is defined by the following expression, where k is a damping factor taken to be 0.3 in this study and n i GP (z) is a random GP realisation, Σ T = 3 is the S/N threshold, Σ = n GP (z)/σ GP (z) is the S/N function (where n GP and σ GP are the GP mean and 68.3% confidence interval), G is a Gaussian with standard deviation of 0.05 and * is the convolution operator.The Gaussian convolution with the S/N prevents spurious random fluctuations in the S/N from impacting the activation of the suppression function and ensures the tails of the clustering redshift n(z) are not too harshly damped.A standard deviation drastically smaller than 0.05 will be smaller than the bin size of the clustering redshift measurements and therefore will be equivalent to no smoothing.On the other hand, larger values will more strongly correlate bins that may be problematic since, in some cases, the n(z) profile spans across only ∼5 bins and may be completely washed out.An example of this procedure is shown in Fig. 3.The suppressed-GP has the desired effect, that is to say, noisy PDFs are not drawn in regions of the clustering redshifts that are consistent with zero.A potential shortcoming is that tails in the distribution will be suppressed if they have low S/N.Steps to mitigate this effect could be studied in future work by exploring alternative suppression functions and techniques.

Area rescaling
We seek to provide estimates for the uncertainties of the n p (z) determination as a function of the projected Euclid data volume; thus we must extrapolate from the 402 deg 2 of the Flagship area to the larger spectroscopic overlap areas, and also attempt to characterise the impact of sample variance.Euclid is projected to overlap with DESI over 9015 deg 2 , and with both DESI and BOSS over 6005 deg 2 .To rescale the determined uncertainties on mean redshifts, we divided the Flagship lightcone into multiple subdivisions (see Fig. 4) and re-ran our analysis on each of these subdivisions independently.This allowed us to approximate the relationship between the tracer-target overlap area and the uncertainties on z .We then fitted these relationships with power laws, and extrapolated to estimate the uncertainties from the full Euclid, BOSS, and DESI overlap area.We note we do not redefine the bootstrap regions when we run the analysis on each subdivision, this means estimates of the error are less accurate for smaller regions since they are based on fewer defined bootstrap regions.An alternative approach would be to use purely shot-noise covariance, but we leave this for future work.Furthermore, since these regions overlap, measurements on the subregions will be strongly correlated.

Results
This section details the results of our clustering redshift calibration, focusing on the uncertainties of mean redshift determination across our ten mock tomographic bins.

Clustering redshift measurements
We measured clustering redshifts using the YAW software package between scales r min = 100 kpc and r max = 1000 kpc (following the scales used by KiDS; van den Busch et al. 2020), considering separately each of the four simulated Euclid pho-tometric redshift catalogues presented by Euclid Collaboration: Pocino et al. (2021).We performed the analysis independently for the full Flagship region (with photo-z), and for each subregion (shown in Fig. 4).
In Fig. 5 we compare the clustering redshift measurements obtained by YAW (shown with purple error bars) to the true redshift distribution of the 'mean Rubin' photometric catalogue on Flagship.The measurements clearly trace the true distribution, and showcase the capability of clustering redshifts to retrieve redshift distributions for photometric catalogues.There are, however, some significant fluctuations, for example at the peak of bin 2. The measurements in Fig. 5 are corrected for the spectroscopic sample galaxy bias (method 2, discussed in Sect.3.1).

Mean redshifts
Having measured the clustering redshifts, we wished to constrain and compare each bin's n(z) distribution by measuring the mean redshift z and comparing to the truth.The mean redshift is determined by calculating where n(z) is the normalised model redshift distribution within the redshift ranges z min and z max , z i is the redshift centre of a clustering redshift bin and n(z i ) a clustering redshift measurement.The i is used to denote a specific measurement and N CC the total number of measurements.We computed z for the n(z) model only within the redshift range where clustering redshift measurements were made (therefore z min = 0.05 and z max = 1.8) while true values z truth were computed from the true n(z) measured across the entire Flagship range z < 2.2.For both the shiftedtrue and suppressed-GP models, we drew 1000 realisations of the redshift distribution (for the shifted-true model, this means drawing random shift parameters from the posterior likelihood).We determine the mean redshift z from the sample n(z), and the standard deviation on the mean σ ( z ) from the variance of the sample z .In Fig. 6 we display the mean redshift error z − z truth for both models, in each bin and for the different photometric catalogues, constrained by the full Flagship footprint.The constraints show significant biases, in particular for bins 7-10, which are biased to lower redshifts for both models.
For the shifted-true model we see some significant biases in bins 2 and 4, independent of photo-z method.The suppressed-GP is biased for bins 1 and 4, but only for the photometric catalogue 'mc'.The broadly similar performance of the suppressed-GP and shifted-true models shows that the suppressed-GP model is performing well, and that it is a robust alternative for n(z) fitting.We also note that the directions and amplitudes of biases appear to be consistent between models, suggesting that systematic errors are independent of the fitting method for this analysis.Rather surprisingly, bin 3, which is placed in the region (z = 0.4 to 0.6) with fewer spectroscopic tracers, is relatively unbiased.One in-teresting property of this bin is that the tails on both sides are well constrained, due to the high number of spectroscopic tracers on either of the tails of the distribution.This suggests the clustering redshift performance on the tails may be driving biases in the other results.We note that we also find the errors on z mean and z meanRubin to be smaller than the z mc and z mcRubin for the suppressed-GP owing to the larger tails in the 'mc' methods.
In Fig. 7 we compare the bias correction methods outlined in Sect.3.1 by calculating the reduced χ 2 r for each method, on the photometric catalogue 'mean Rubin', where N Bins is the number of tomographic bins.We see that method 1 (no galaxy bias correction) performs worst with a χ 2 r = 7.8, while method 2 (spectroscopic sample bias correction; the baseline method for all other figures) performs slightly better with a χ 2 r = 4.2.Method 3, which fits a power law for photometric sample bias correction, performs very similarly to method 2 -with a χ 2 r = 4.2.Method 4, which performs the best with a χ 2 r = 3.7, measures the true bias for photometric galaxies in each of the spectroscopic slices, and cannot be measured on real data.However, in simulations like Flagship, it allows us to test the significance and implications of residual biases.Method 4 shows that cor- recting for photometric galaxy biases in bins 1-6 removes any systematic biases on the determination of the mean redshift, and indicates that the mean redshift uncertainties may be underestimated by other methods.It should be possible to calibrate for such underestimations of σ( z ) with realistic simulations like Flagship.We assess whether or not the extra noise component revealed by method 4 is likely to affect our conclusions, as we forecast uncertainties on z versus tracer-target overlap area in Sect.4.3.Bins 7-10 remain significantly biased in z , even for method 4, which is why the χ 2 r is still significantly larger than 1.The causes of these persistent biases are currently unknown, and require further investigation.They may be affected by the cross-correlation estimator; a move to the superior Landy & Szalay (1993) estimator should be explored in future work.Alternatively, the definition of target sample tomographic bins may be sub-optimal; wider equi-populated bins at higher redshifts will offer lower signal-to-noise of clustering redshift measurements, since those galaxies span a larger volume in a flux-limited survey where the number density falls with increasing redshift.Optimisation of the target tomography is another promising avenue for future work.

Area rescaling
A determination of whether or not clustering redshifts can constrain the σ( z ) of Euclid tomographic redshift bins to less than 0.002 (1 + z) requires extrapolation.We estimated the relation between σ( z ) and tracer-target overlap area by measuring z within subregions of the Flagship region (see Fig. 4).We fitted the σ( z ) data with power laws and then extrapolated to the total projected overlap.The relations can be seen in Fig. 8 for the shifted-true model, calibrated by method 2 (Sect.3.1) clustering redshifts measured on the 'mean Rubin' photometric catalogue.The extrapolation projects the uncertainties to be significantly smaller than the required uncertainties for Euclid.We can be confident of this statement, as even the 402 deg 2 Flagship area yields uncertainties approaching or surpassing the Euclid requirement.Similar results are seen for the other three photometric catalogues.A possible cause for concern is the underestimation of the errors in the four highest-redshift bins, shown in Fig. 7.This underestimation can be calibrated with comparisons to simulations (such as Flagship), and accommodated by widening the error bars.We find that these uncertainties are underestimated by a factor of about two.Since Fig. 8 3.3.1).In dark blue is method 1, where no corrections are applied; in purple is method 2, where the spectroscopic galaxy bias is calibrated by spectroscopic auto-correlations; in magenta is method 3, where the photometric galaxy bias is calibrated by a power-law fit to noisy, photoz-binned photometric auto-correlations; and in light pink is method 4, where the photometric galaxy bias is calibrated using auto-correlations binned by true redshifts (not applicable to real data).Dark and light shades indicate 68.3% and 95.5% confidence intervals.The grey band shows the target uncertainties for Euclid.Method 4 shows that systematic biases in bins 1-6 are caused by incomplete bias corrections, whilst the biases persist for higher-redshift bins, suggesting some other source of systematic error.
projected errors for the full overlap region to be around an order of magnitude smaller than the Euclid's required uncertainties, we are confident that these underestimated errors can be accommodated, and that the Euclid target remains achievable.

Conclusion
We measured clustering redshifts in the Flagship simulation to test their uncertainties in determining the mean redshifts, z , for Euclid tomographic bins.The method uses cross-correlations with mock spectroscopic samples, modelled after BOSS, DESI, and Euclid NISP-S.Clustering redshifts were determined using the YAW software, for transverse pair separations between 100 kpc and 1000 kpc, using simple galaxy bias correction schemes.Simulated photometric samples were constructed using the DNF photometric redshift code (Euclid Collaboration: Pocino et al. 2021).The redshift determinations were constructed from two sets of training samples, one that is fully representative in redshift and magnitude and a second that has a completeness drop off in I E magnitudes similar to surveys such as Rubin LSST (denoted with 'Rubin').
The clustering redshift distributions were fitted with two models: The first modifies the true n(z) with an amplitude and a shift parameter (the 'shifted-true' model).The second fits a 'suppressed-GP' model, taking advantage of the non-parametric fitting ability of GPs and suppressing low signal-to-noise and negative fluctuations with a S/N-dependent suppression function.
These two models were fitted to Flagship measurements over an area of 402 deg 2 .By making measurements of the clustering redshifts on subregions of the Flagship footprint, we established power-law relations between the uncertainty on the mean redshift and the spectroscopic-photometric overlapping area.We used these relations to extrapolate the uncertainty to the full expected overlap area for BOSS, DESI, and Euclid (approximately 6000 deg 2 ) and showed that both models achieve uncertainties on the mean redshifts of less than 0.002 (1 + z) -well within the required uncertainties for the Euclid FoM on dark energy of > 400.
However, systematic biases currently dominate the mean redshift determination and are independent of the redshift distribution model.Determining and mitigating these sources of systematic biases will be critical for the usage of cross-correlation redshifts by Euclid.The most difficult step for clustering redshift calibration is determining the galaxy bias of photometric samples.This is the primary source of systematic error and was shown to be the cause of systematic biases in the low-redshift bins.However, these biases persist in the high-redshift bins even when taking advantage of simulation information to correct exactly for photometric galaxy bias, meaning some other source of error is responsible.
Further studies should seek to characterise and mitigate these additional sources of systematic error, by exploring different scales, biasing models, or cross-correlation estimators.Photo-z are limited to z < 1.6 to ensure that the true redshifts of galaxies rarely exceed z > 1.8 in the tenth tomographic bin, since the analysis was limited to the redshift regime where spectroscopic tracers were defined (i.e.z < 1.8).In a future analysis, quasar large-scale structure tracers from BOSS, eBOSS, and DESI should allow for a measurement of the n(z) for high-redshift tomographic bins, though the sparsity of quasars is likely to pose challenges.As simulations of quasar samples are more difficult to implement, since they are highly biased tracers with more complex selection functions, we have not included them in this analysis.Future studies should consider creating such samples so that the biases and uncertainties on these higher-redshift bins can be better determined.
This study is based on idealised assumptions where target and tracer samples suffer no observational complications, such as the spatial incompleteness of spectroscopic samples, tracertarget density correlations with Galactic foregrounds, or systematic depth variations.As such, future studies, and Euclid photo-z mocks in particular, should attempt to model these sources of 3 log 10 (Area) deg 2 systematic error.Furthermore, the photometric catalogues used in this study assume supplementary photometry from a Rubinlike survey; in reality, only the southern sky will be supplemented with Rubin, and the northern sky will use photometry from an array of imaging surveys such as CFHT, Pan-STARRS, and J-PAS.This is likely to result in systematic differences in the quality of photo-z based on positions on the sky.To study these effects, realistic Euclid mock catalogues that attempt to simulate these systematic errors across the full sky are required.

Fig. 2 .
Fig. 2. Survey footprints for BOSS, DESI, and Euclid shown on the sky, with darker greys indicating regions of tracer-target sample overlap.The footprint perimeter for BOSS is indicated in red, for DESI in blue, and for Euclid in black.Light grey indicates regions of the Euclid survey alone, mid-grey indicates regions with Euclid overlapping with either BOSS or DESI, and dark grey indicates regions with Euclid overlapping both BOSS and DESI.For comparison, the on-sky subregion of the Flagship octant for which we have simulated photo-z is shown in orange.The Euclid survey region is defined to avoid both the Ecliptic (dashed pink line) and Galactic (dash-dotted blue line) planes.

Fig. 3 .
Fig. 3. Method for fitting suppressed-GP models to clustering redshift, n(z), measurements.The true n(z) for one tomographic bin is shown with dashed black lines.The measured clustering redshift, n(z), is shown with black markers and error bars.(a) We fit a GP model to the clustering redshift, n(z), measurements.(b) We draw random realisations from the GP.(c) We construct a suppression function, taking as input the GP draw and the smoothed S/N of the clustering redshift measurement.(d) We multiply the random realisations from the GP by the suppression function.This ensures that the suppressed-GP model is always positive and suppresses low-S/N fluctuations in the GP.(e) We construct 68.3% and 95.5% confidence envelopes from samples of the suppressed-GP model.

Fig. 4 .
Fig. 4. Flagship footprint and area rescaling subregions.Left: Bootstrap subregions, indicated with different colours, that are used to calculate errors in YAW.Right: Different subregions of the Flagship footprint, shown with different colours, used to establish the relation between the tracertarget overlap area and the uncertainty on the mean redshifts of tomographic bins.The four subpanels show the Flagship footprint divided into 2 (top left), 4 (top right), 8 (bottom left), and 16 (bottom right) subregions.These are plotted on an orthographic projection of a subset of the sky focused on the Flagship footprint.The RA and Dec grid is shown with dashed grey lines.The values of the grid lines are indicated where they intercept the x-axis for the RA grid and the y-axis for the Dec grid.

Fig. 5 .
Fig. 5. Clustering redshift measurements in comparison to the true n(z) for ten simulated Euclid Flagship tomographic photo-z bins.Measurements from YAW are shown in purple, with error bars indicating 95.5% confidence intervals.The measurements clearly trace the true n(z), albeit with some spurious local fluctuations.These fluctuations probably arise due to an incomplete galaxy bias correction methodology.The bias correction method used in this figure is method 2 (Sect.3.1).

Fig. 6 .
Fig.6.Error on the mean redshift determination z − z truth for ten Euclid Flagship tomographic bins, for each of our four photometric redshift catalogues ('mean Rubin' in dark purple, 'mc Rubin' in purple, 'mean' in dark green, and 'mc' in light green, with dark and light shades indicating 68.3% and 95.5% uncertainties).The grey bands show the target uncertainties for Euclid.Two n(z) fitting methods are shown: the shifted-true model (left, Sect.3.3.1)and the suppressed-GP model(right, Sect.3.3.2),each fit to clustering redshift measurements made with spectroscopic sample bias corrections (i.e.method 2, Sect.3.1).

Fig. 7 .
Fig.7.Error on the mean redshift determination, z − z truth , in ten Euclid tomographic redshift bins, for each of the four galaxy bias correction strategies (Sect.3.1), compared via the shifted-true model(Sect.3.3.1).In dark blue is method 1, where no corrections are applied; in purple is method 2, where the spectroscopic galaxy bias is calibrated by spectroscopic auto-correlations; in magenta is method 3, where the photometric galaxy bias is calibrated by a power-law fit to noisy, photoz-binned photometric auto-correlations; and in light pink is method 4, where the photometric galaxy bias is calibrated using auto-correlations binned by true redshifts (not applicable to real data).Dark and light shades indicate 68.3% and 95.5% confidence intervals.The grey band shows the target uncertainties for Euclid.Method 4 shows that systematic biases in bins 1-6 are caused by incomplete bias corrections, whilst the biases persist for higher-redshift bins, suggesting some other source of systematic error.

Fig. 8 .
Fig.8.Uncertainty on the mean redshift for each Euclid tomographic redshift bin shown as a function of tracer-target overlap area.The red points show the uncertainty on the mean redshift for each subregion, determined by fitting the shifted-true model (Sect.3.3.1)to measured clustering redshifts (bias correction method 2, Sect.3.1), with the largest area points representing constraints from the full 402 deg 2 Flagship footprint.These points are used to fit a power-law relationship between overlap area and mean redshift uncertainty, shown in blue (the line represents the mean fit and the envelope the uncertainty).Extrapolated to the full area overlap of BOSS, DESI, and Euclid (the dotted purple line), the projected uncertainties on the mean are shown to be much smaller than the required uncertainties for Euclid, itself indicated by the dashed black line.

Light grey areas indicate regions of the Euclid survey with no overlap, darker grey indicates regions overlapping with at least one of BOSS or DESI, and the darkest grey indicates regions overlapping with both BOSS and DESI. For comparison we also indicate the footprint of the Flagship galaxy simulation used in this study, which is a subset of the
full Flagship octant.Euclid is projected to overlap with DESI over 9015 deg 2 , and with both BOSS and DESI over 6005 deg 2 .
Fig. 1.Photometric redshift distribution in comparison to reference spectroscopic samples.Top: Redshift ranges for each of the ten tomographic bins.Middle: True redshift distribution of each tomographic bin.Bottom: Redshift distribution of the reference spectroscopic samples: BOSS-