# Euclid preparation. XLVIII. The pre-launch Science Ground Segment simulation framework

S. Serrano, P. Hudelot, G. Seidel, J. E. Pollack, E. Jullo, F. Torradeflot, D.

Benielli, R. Fahed, T. Auphan, J. Carretero, et al.

► To cite this version:

S. Serrano, P. Hudelot, G. Seidel, J. E. Pollack, E. Jullo, et al., Euclid preparation. XLVIII. The pre-launch Science Ground Segment simulation framework. Astronomy & Astrophysics - A&A, 2024, 690, pp.A103. 10.1051/0004-6361/202349128. insu-04726399

HAL Id: insu-04726399

https://insu.hal.science/insu-04726399v1

Submitted on 9 Oct 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Euclid preparation

## XLVIII. The pre-launch Science Ground Segment simulation framework

Euclid Collaboration: S. Serrano<sup>1,2,3,★</sup>, P. Hudelot<sup>4</sup>, G. Seidel<sup>5</sup>, J. E. Pollack<sup>6,7</sup>, E. Jullo<sup>8</sup>●, F. Torradeflot<sup>9,10</sup>●, D. Benielli<sup>11</sup>, R. Fahed<sup>12</sup>, T. Auphan<sup>11</sup>, J. Carretero<sup>13,9</sup>●, H. Aussel<sup>14</sup>, P. Casenove<sup>15</sup>, F. J. Castander<sup>2,1</sup>●, J. E. Davies<sup>5</sup>, N. Fourmanoit<sup>11</sup>, S. Huot<sup>12</sup>, A. Kara<sup>11</sup>, E. Keihänen<sup>16</sup>, S. Kermiche<sup>11</sup>, K. Okumura<sup>6</sup>, J. Zoubian<sup>11</sup>, A. Ealet<sup>17</sup>, A. Boucaud<sup>7</sup>, H. Bretonnière<sup>18</sup>, R. Casas<sup>1,2</sup>, B. Clément<sup>19</sup>, C. A. J. Duncan<sup>20,21</sup>, K. George<sup>22</sup>, K. Kiiveri<sup>16</sup>, H. Kurki-Suonio<sup>23,24</sup>, M. Kümmel<sup>22</sup>, D. Laugier<sup>11</sup>, G. Mainetti<sup>25</sup>, J. J. Mohr<sup>22,26</sup>, A. Montoro<sup>2,1</sup>, C. Neissner<sup>13,9</sup>, C. Rosset<sup>7</sup>, M. Schirmer<sup>5</sup>, P. Tallada-Crespi<sup>10,9</sup>, N. Tonello<sup>13,9</sup>, A. Venhola<sup>27</sup>, A. Verderi<sup>2,1</sup>, A. Zacchei<sup>28,29</sup>, N. Aghanim<sup>30</sup>, B. Altieri<sup>31</sup>, A. Amara<sup>32</sup>, S. Andreon<sup>33</sup>, N. Auricchio<sup>34</sup>, R. Azzollini<sup>35</sup>, C. Baccigalupi<sup>36,29,28,37</sup>, M. Baldi<sup>38,34,39</sup>, S. Bardelli<sup>34</sup>, A. Basset<sup>15</sup>, P. Battaglia<sup>34</sup>, F. Bernardeau<sup>40,4</sup>, C. Bodendorf<sup>26</sup>, D. Bonino<sup>41</sup>, E. Branchini<sup>42,43</sup>, M. Brescia<sup>44,45</sup>, J. Brinchmann<sup>46</sup>, S. Camera<sup>47,48,41</sup>, G. P. Candini<sup>35</sup>, V. Capobianco<sup>41</sup>, C. Carbone<sup>49</sup>, S. Casas<sup>50</sup>, M. Castellano<sup>51</sup>, G. Castignani<sup>52,34</sup>, S. Cavuoti<sup>45,53</sup>, A. Cimatti<sup>54</sup>, R. Cledassou<sup>15,55,†</sup>, C. Colodro-Conde<sup>56</sup>, G. Congedo<sup>57</sup>, C. J. Conselice<sup>21</sup>, L. Conversi<sup>58,31</sup>, Y. Copin<sup>17</sup>, L. Corcione<sup>41</sup>, F. Courbin<sup>19</sup>, H. M. Courtois<sup>59</sup>, M. Crocce<sup>60,2</sup>, M. Cropper<sup>35</sup>, A. Da Silva<sup>61,62</sup>, H. Degaudenzi<sup>63</sup>, G. De Lucia<sup>28</sup>, A. M. Di Giorgio<sup>64</sup>, J. Dinis<sup>62,61</sup>, F. Dubath<sup>63</sup>, X. Dupac<sup>31</sup>, S. Dusini<sup>65</sup>, M. Farina<sup>64</sup>, S. Farrens<sup>14</sup>, S. Ferriol<sup>17</sup>, M. Frailis<sup>28</sup>, E. Franceschi<sup>34</sup>, P. Franzetti<sup>49</sup>, S. Galeotta<sup>28</sup>, B. Garilli<sup>49</sup>, W. Gillard<sup>11</sup>, B. Gillis<sup>57</sup>, C. Giocoli<sup>34,39</sup>, B. R. Granett<sup>33</sup>, A. Grazian<sup>66</sup>, F. Grupp<sup>26,22</sup>, L. Guzzo<sup>67,33,68</sup>, S. V. H. Haugan<sup>69</sup>, J. Hoar<sup>31</sup>, H. Hoekstra<sup>70</sup>, W. Holmes<sup>71</sup>, I. Hook<sup>72</sup>, F. Hormuth<sup>73</sup>, A. Hornstrup<sup>74,75</sup>, K. Jahnke<sup>5</sup>, B. Joachimi<sup>76</sup>, A. Kiessling<sup>71</sup>, T. Kitching<sup>35</sup>, R. Kohley<sup>31</sup>, M. Kunz<sup>77</sup>, Q. Le Boulc'h<sup>25</sup>, P. Liebing<sup>35</sup>, S. Ligori<sup>41</sup>, P. B. Lilje<sup>69</sup>, V. Lindholm<sup>23,24</sup>, I. Lloro<sup>78</sup>, D. Maino<sup>67,49,68</sup>, E. Maiorano<sup>34</sup>, O. Mansutti<sup>28</sup>, S. Marcin<sup>79</sup>, O. Marggraf<sup>80</sup>, K. Markovic<sup>71</sup>, M. Martinelli<sup>51,81</sup>, N. Martinet<sup>8</sup>, F. Marulli<sup>52,34,39</sup>, R. Massey<sup>82</sup>, S. Maurogordato<sup>83</sup>, E. Medinaceli<sup>34</sup>, S. Mei<sup>7</sup>, M. Melchior<sup>79</sup>, Y. Mellier<sup>12,4,6</sup>, M. Meneghetti<sup>34,39</sup>, E. Merlin<sup>51</sup>, G. Meylan<sup>19</sup>, M. Moresco<sup>52,34</sup>, P. Morris<sup>84</sup>, L. Moscardini<sup>52,34,39</sup>, E. Munari<sup>28</sup>, R. Nakajima<sup>80</sup>, S.-M. Niemi<sup>85</sup>, T. Nutma<sup>86,70</sup>, C. Padilla<sup>13</sup>, S. Paltani<sup>63</sup>, F. Pasian<sup>28</sup>, K. Pedersen<sup>87</sup>, W. J. Percival<sup>88,89,90</sup>, V. Pettorino<sup>14</sup>, S. Pires<sup>14</sup>, G. Polenta<sup>91</sup>, M. Poncet<sup>15</sup>, L. A. Popa<sup>92</sup>, L. Pozzetti<sup>34</sup>, F. Raison<sup>26</sup>, R. Rebolo<sup>56,93</sup>, A. Renzi<sup>94,65</sup>, J. Rhodes<sup>71</sup>, G. Riccio<sup>45</sup>, E. Romelli<sup>28</sup>, M. Roncarelli<sup>34</sup>, E. Rossetti<sup>38</sup>, B. Rusholme<sup>95</sup>, R. Saglia<sup>22,26</sup>, Z. Sakr<sup>96,97,98</sup>, A. G. Sánchez<sup>26</sup>, D. Sapone<sup>99</sup>, B. Sartoris<sup>22,28</sup>, M. Sauvage<sup>14</sup>, P. Schneider<sup>80</sup>, T. Schrabback<sup>100</sup>, M. Scodeggio<sup>49</sup>, A. Secroun<sup>11</sup>, C. Sirignano<sup>94,65</sup>, G. Sirri<sup>39</sup>, J. Skottfelt<sup>101</sup>, L. Stanco<sup>65</sup>, J.-L. Starck<sup>14</sup>, J. Steinwagner<sup>26</sup>, A. N Taylor<sup>57</sup>, H. Teplitz<sup>102</sup>, I. Tereno<sup>61,103</sup>, R. Toledo-Moreo<sup>104</sup>, I. Tutusaus<sup>98</sup>, E. A. Valentijn<sup>86</sup>, L. Valenziano<sup>34,105</sup>, T. Vassallo<sup>22,28</sup>, A. Veropalumbo<sup>33</sup>, Y. Wang<sup>102</sup>, J. Weller<sup>22,26</sup>, G. Zamorani<sup>34</sup>, E. Zucca<sup>34</sup>, A. Biviano<sup>28,29</sup>, E. Bozzo<sup>63</sup>, D. Di Ferdinando<sup>39</sup>, R. Farinelli<sup>34</sup>, J. Graciá-Carpio<sup>26</sup>, N. Mauri<sup>54,39</sup>, V. Scottez<sup>12,106</sup>, M. Tenti<sup>105</sup>, Y. Akrami<sup>107,108,109,110,111</sup>, V. Allevato<sup>45,112</sup>, M. Ballardini<sup>113,114,34</sup>, A. Blanchard<sup>98</sup>, S. Borgani<sup>28,115,37,29</sup>, A. S. Borlaff<sup>116,117</sup>, S. Bruton<sup>118</sup>, C. Burigana<sup>119,105</sup>, A. Cappi<sup>34,83</sup>, C. S. Carvalho<sup>103</sup>, T. Castro<sup>28,37,29</sup>, G. Cañas-Herrera<sup>85,120</sup>, K. C. Chambers<sup>121</sup>, A. R. Cooray<sup>122</sup>, J. Coupon<sup>63</sup>, S. Davini<sup>43</sup>, S. de la Torre<sup>8</sup>, S. Desai<sup>123</sup>, G. Desprez<sup>124</sup>, A. Díaz-Sánchez<sup>125</sup>, S. Di Domizio<sup>126</sup>, H. Dole<sup>30</sup>, J. A. Escartin Vigo<sup>26</sup>, S. Escoffier<sup>11</sup>, I. Ferrero<sup>69</sup>, F. Finelli<sup>34,105</sup>, L. Gabarra<sup>94,65</sup>, K. Ganga<sup>7</sup>, J. Garcia-Bellido<sup>107</sup>, E. Gaztanaga<sup>2,1,32</sup>, F. Giacomini<sup>39</sup>, G. Gozalias<sup>23</sup>, A. Gregorio<sup>115,28,37</sup>, H. Hildebrandt<sup>127</sup>, M. Huertas-Company<sup>128,56,129,130</sup>, O. Ilbert<sup>8</sup>, A. Jimenez Muñoz<sup>131</sup>, J. J. E. Kajava<sup>132,133</sup>, V. Kansal<sup>14</sup>, C. C. Kirkpatrick<sup>16</sup>, L. Legrand<sup>77</sup>, A. Loureiro<sup>134,111</sup>, J. Macias-Perez<sup>131</sup>, M. Magliocchetti<sup>64</sup>, R. Maoli<sup>135,51</sup>, C. J. A. P. Martins<sup>136,46</sup>, S. Matthew<sup>57</sup>, L. Maurin<sup>30</sup>, R. B. Metcalf<sup>52</sup>, M. Migliaccio<sup>137,138</sup>, P. Monaco<sup>115,28,37,29</sup>, G. Morgante<sup>34</sup>, S. Nadathur<sup>32</sup>, A. A. Nucita<sup>139,140,141</sup>, M. Pöntinen<sup>23</sup>, V. Popa<sup>92</sup>, C. Porciani<sup>80</sup>, D. Potter<sup>142</sup>, P. Reimberg<sup>12</sup>, A. Schneider<sup>142</sup>, M. Sereno<sup>34,39</sup>, A. Shulevski<sup>70,143,86</sup>, P. Simon<sup>80</sup>, A. Spurio Mancini<sup>35</sup>, J. Stadel<sup>142</sup>, M. Tewes<sup>80</sup>, R. Teyssier<sup>144</sup>, S. Toft<sup>75,145</sup>, M. Tucci<sup>63</sup>, J. Valiviita<sup>23,24</sup>, M. Viel<sup>29,28,36,37</sup>, and I. A. Zinchenko<sup>22</sup>

(Affiliations can be found after the references)

Received 29 December 2023 / Accepted 10 July 2024

<footnote>* Corresponding author; serrano@ieec.cat</footnote>

<footnote>† Deceased.</footnote>
ABSTRACT

*Context.* The European Space Agency's *Euclid* mission is one of a raft of forthcoming large-scale cosmology surveys that will map the large-scale structure in the Universe with unprecedented precision. The mission will collect a vast amount of data that will be processed and analysed by *Euclid's* Science Ground Segment (SGS). The development and validation of the SGS pipeline requires state-of-the-art simulations with a high level of complexity and accuracy that include subtle instrumental features not accounted for previously as well as faster algorithms for the large-scale production of the expected *Euclid* data products.

*Aims.* In this paper, we present the *Euclid* SGS simulation framework as it is applied in a large-scale end-to-end simulation exercise named Science Challenge 8. Our simulation pipeline enables the swift production of detailed image simulations for the construction and validation of the *Euclid* mission during its qualification phase and will serve as a reference throughout operations.

*Methods.* Our end-to-end simulation framework started with the production of a large cosmological N-body simulation that we used to construct a realistic galaxy mock catalogue. We performed a selection of galaxies down to $I_E=26$ and 28 mag, respectively, for a Euclid Wide Survey spanning $165 \text{ deg}^2$ and a $1 \text{ deg}^2$ Euclid Deep Survey. We built realistic stellar density catalogues containing Milky Way-like stars down to $H < 26$ from a combination of a stellar population synthesis model of the Galaxy and real bright stars. Using the latest instrumental models for both the *Euclid* instruments and spacecraft as well as *Euclid*-like observing sequences, we emulated with high fidelity *Euclid* satellite imaging throughout the mission's lifetime.

*Results.* We present the SC8 dataset, consisting of overlapping visible and near-infrared Euclid Wide Survey and Euclid Deep Survey imaging and low-resolution spectroscopy along with ground-based data in five optical bands. This extensive dataset enables end-to-end testing of the entire ground segment data reduction and science analysis pipeline as well as the *Euclid* mission infrastructure, paving the way for future scientific and technical developments and enhancements.

**Key words.** instrumentation: detectors – space vehicles – cosmology: observations

1. Introduction

The accelerated expansion of the Universe is now a well-established fact, corroborated by a large amount of observational evidence. However, the origin of this acceleration is still uncertain. It could either be a cosmological constant in the equation of general relativity, or a mysterious dark energy suggestive of physics beyond the standard model of particle physics (Planck Collaboration VI 2020).

To better understand the origin of the Universe's accelerated expansion, the *Euclid* space mission was proposed and accepted in 2011 by the European Space Agency (ESA) as a medium-class mission. The spacecraft consists of a 1.2m telescope to observe $15\,000 \text{ deg}^2$ of extragalactic sky comprising the Euclid Wide Survey (Euclid Collaboration: 2022b) and a $50 \text{ deg}^2$ Euclid Deep Survey. It is equipped with two instruments to perform single broadband optical imaging with very high resolution in the VISible instrument (VIS), and simultaneous near-infrared (NIR) slitless spectroscopy and imaging with the Near Infrared Spectrometer and Photometer (NISP). These two instruments are part of the innovative design of *Euclid* that will acquire measurements of the shapes of 2 billion galaxies up to a redshift of $z \sim 2.3$ and 30 million spectroscopic redshifts (Laureijs et al. 2011) out to a redshift of $z \sim 2$. These independent measurements will enable us to reconstruct the expansion history of the Universe using probes in the core science areas of weak gravitational lensing (WL) and galaxy clustering (GC). Moreover, cosmological forecasts for *Euclid* predict an increase in the dark energy figure of merit by at least a factor of three when performing a combined analysis using cross-correlations of WL and GC measurements (Euclid Collaboration: 2020).

In order to reach its scientific goals, the following mission level requirements have been proposed (Laureijs et al. 2011): the density of galaxies brighter than $I_E = 24.5$ mag and detected with a $10\sigma$ confidence must be at least 30 galaxy arcmin$^{-2}$. Their corresponding median redshift should be $z > 0.8$ with an error on the mean redshift per bin below 0.002. The density of galaxies with spectroscopic redshift and an $H\alpha$ flux $> 2 \times 10^{-16} \text{ erg cm}^{-2} \text{ s}^{-1}$ is required to be at least 3500 deg$^{-2}$. The control of systematic errors will be one of the most challenging aspects of the mission. For VIS, the point spread function (PSF) ellipticity must be known to an accuracy better than

$2 \times 10^{-3}$, and the stray light should remain less than 20% of the ecliptic zodiacal light.

Moreover, we aim for the contrast ratio of ghost images – images produced by multiple reflections of the optical system – to be below $10^{-4}$ (Croppper et al. 2014). For NIR spectroscopy, we require the purity of the spectroscopic sample ($0.7 < z < 1.8$ and $H\alpha > 2 \times 10^{-16} \text{ erg cm}^{-2} \text{ s}^{-1}$) to be above 80%, the completeness higher than 45%, and the spectroscopic resolution $R \ge 380$ for the red grisms and $R \ge 260$ for the blue grism. Finally, integration of external (EXT) survey data at the pixel level is essential for *Euclid* to reach the required photometric redshift precision per object: $\sigma(z)/(1+z) \le 0.05$. These requirements are particularly important, especially in space experiments such as the *Euclid* mission, due to their elevated cost and the impossibility of performing repairs once the spacecraft is launched.

Given these tight requirements, a forward modelling approach has been adopted by the Science Ground Segment (SGS) as the main method to aid the development of the data-processing and science analysis pipeline (Laureijs et al. 2011). Within SGS, the Organisation Unit for Simulations (OU-SIM) is tasked with designing a simulation pipeline with added flexibility to deliver expeditiously realistic pixel-level images for the *Euclid* mission, following the release of a new instrument model. Our image simulations have two main objectives. The first is to serve as test data for the development of the SGS data-processing pipeline and the computing infrastructure before the arrival of real *Euclid* observations. Second, they are to be used to validate the stringent requirements that the SGS has in terms of performance and data quality. In this respect, several end-to-end Science Performance Verification (SPV) tests have been performed throughout the mission preparation, which allowed for the reproduction of certain instrumental issues to assess their impact and guide decision-making. Pixel-level simulations have been essential in the discovery of alternative solutions to critical problems, such as the non-conformity of one of the three red grisms for the NISP instrument (Euclid Collaboration: 2022b).

The production of simulations is generally planned in advance in orchestrated tests that we call Scientific Challenges (SC; Frailis et al. 2019). These exercises have been essential for the development of the SGS pipeline and the validation of
science and technical requirements. Each challenge has lever-
aged new algorithms and infrastructure as well as improved
instrument models derived during the construction of the space-
craft. Moreover, the outcomes of each SC have proven to be
an effective indicator of the status and readiness of the SGS in
addition to the various ESA reviews.

In this paper, we describe our simulation framework devel-
oped within OU-SIM with a focus on Scientific Challenge 8
(SC8). SC8 included for the first time the complete ground seg-
ment processing chain, enabling a full end-to-end simulation
of the so-called level-1 raw images, level-2 detrended and cal-
ibrated data products, and level-3 core science-ready measure-
ments (e.g. the cosmic shear and the galaxy two-point correlation
function measurements, etc.). A majority of the data-processing
was operated entirely by the SGS System Team without man-
ual intervention from the pipeline development teams. The main
goals of SC8 were (1) to simulate a large area of the Euclid
Wide Survey along with the corresponding ground-based and
calibration data for processing through the entire SGS pipeline;
(2) to assess the capability of the SGS infrastructure to process
a large set of data within a reasonable timescale; (3) to vali-
date SGS operations under nominal conditions; (4) to validate
the applicable requirements for the Ground Segment Implemen-
tation Review (GSIR); and (5) to benchmark the data quality
reference for the third SPV test (SPV03).

All *Euclid* photometric imaging and spectroscopic channels were simulated, as well as seven EXT *Euclid*-supporting pho- tometric imaging surveys spanning the northern and southern hemispheres. This extensive and challenging simulation effort resulted in 31 TB of raw output images for ~165 deg², which were subsequently processed and analysed with the *Euclid* SGS pipeline.

This paper is organised as follows. In Sect. 2, we begin
with an overview of the drivers behind the development of our
framework; namely, the components of the *Euclid* satellite and
the organisation of the SGS. Our description of the OU-SIM
 workflow begins in Sect. 3, in which we explain our methods
of creating synthetic galaxy and stellar catalogues, the inputs
into the simulations. Sect. 4 follows with an introduction to
the mission database, which contains the instrument and survey
parameters, and thus provides the specifications for launching
a coordinated production of simulations for different surveys
(space- and ground-based). In Sect. 5, we describe in detail the
instrumental features simulated in SC8. We outline our workflow
for large-scale simulation productions in Sect. 6.1. The applica-
tion and performance of our end-to-end framework in SC8 are
detailed in Sect. 6. In Sect. 7, we summarise ongoing work and
the latest improvements to the simulation pipeline. Finally, in
Sect. 8, we present our conclusions.

## 2. The satellite and the Science Ground Segment

The *Euclid* satellite is composed of the Service Module (SVM)
and the Payload Module (PLM). The SVM<fnref n="1" /> includes the sun-
shield, the star trackers and gyros, the thrusters, the micro-
motions and slews control systems, hydrazine and cold gas tanks,
the Attitude and Orbital Control System (AOCS), the solar panel
and electric power system, the thermal regulation system, and
the downlink communication system. The AOCS jitter will meet
the high-quality imaging requirements with a pointing dispersion

smaller than 35 mas in each exposure, providing a stable attitude
through the whole integration time.

The PLM (Gaspar Venancio et al. 2014) comprises the tele-
scope, the PLM thermal control system, the Fine Guidance
Sensor (FGS), and the VIS and NISP instruments (see Sect. 2.1
and Sect. 2.2, respectively, for a more detailed description). The
design of the optical system is illustrated in Fig. 8 of Racca
et al. (2016). The telescope follows a Korsch design with a
1.2-m diameter primary mirror providing an optically corrected
and unvignetted field of view of 0.79 × 1.16 deg². The incom-
ing light beam is split with a dichroic plate, reflecting the
bluer part into the optical VIS instrument and transmitting
the NIR light towards the NISP instrument. A more detailed
description of the dichroic optical element is described in
Euclid Collaboration: (2022c). This particular design feature
allows simultaneous observations to be performed with both
instruments.

Launch occurred in June 2023 on a SpaceX Falcon9 launch
vehicle, which departed from Cape Canaveral. The mission will
carry out a nominal survey that is expected to be completed
in six years. The spacecraft will orbit the Second Sun-Earth
Lagrangian point (L2) in a wide halo orbit. In addition to
the 15 000 deg² Euclid Wide Survey, Euclid will also perform
a Euclid Deep Survey with additional observations near both
ecliptic poles for a total area of ~50 deg². The Euclid Wide Sur-
vey will avoid the Galactic and Ecliptic planes, with high dust
extinction and high background, respectively. The VIS instru-
ment will measure extended sources of mAB = 24.5 in the visible
band, I<sub>E</sub>, with a signal-to-noise ratio of at least 10. For the NISP
instrument's NIR bands Y<sub>E</sub>, J<sub>E</sub>, and H<sub>E</sub>, point-like sources will
have a signal-to-noise of 5 or greater at a magnitude mAB = 24.
The Euclid Deep Survey will provide 40–53 times more observa-
tions (depending on the background level at each field location),
reaching 2 magnitudes deeper than the Euclid Wide Survey.
Further details are described in Euclid Collaboration: (2022b).

2.1. The VISible instrument

The VIS instrument is an optical imager featuring a mosaic of 36
(6 × 6), 4096 × 4132 pixel Teledyne e2v CCD detectors, which
have been specially optimised for this mission. It operates in the
single *I*<sub>E</sub> broadband from 550 to 900 nm (equivalent to a com-
bined *r*+*i*+*z* band) shaped by the reflection of the coating on
the optical elements (the dichroic plate and fold mirrors, where
FM1, FM2 have a hybrid metal-dielectric coating, and FM3 is
silver coated) and the quantum efficiency of the CCD detec-
tors (Cropper et al. 2014). The VIS focal plane covers a field
of view of 0.57 deg<sup>2</sup> with a central pixel scale of 0.′1 per pixel,
resulting in an undersampled VIS PSF which limits the maxi-
mum optical resolution of the opto-electrical system. However,
the exquisite image quality and exceptional temporal stability
required of the VIS instrument and the telescope will allow mea-
surements of galaxy shapes with enough accuracy to estimate the
gravitational-lensing effect caused by the large-scale structures
in the Universe on distant background galaxies.

## 2.2. The Near Infrared Spectrometer and Photometer

The NISP instrument was designed to provide broadband pho-
tometry (NISP-P) in three bands as well as low-resolution NIR
spectra (NISP-S) divided into two wavelength ranges (Maciaszek
et al. 2016, 2022). The NISP focal plane contains a mosaic of
16 (4 × 4), 2048 × 2048 pixel infrared detectors from Teledyne,

<footnote n="1">¹ See figure in https://www.euclid-ec.org/?page_id=2686 for
an illustration of the SVM components.</footnote>
<figure><img src="image_2.png" /><figcaption>**Fig. 1.** Total transmission of the VIS ($I_E$) and NISP photometric ($Y_E$, $J_E$, $H_E$), and the NISP Spectroscopic ($BGE$, $RG_E$) bands.</figcaption></figure>

with a field of view of 0.53 deg<fnref n="2" /> and a pixel scale of 0.′3. The NISP-P channel is equipped with three broadband filters (i.e. $Y_E$, $J_E$, and $H_E$) that span the range of 950 to 2021 nm (Euclid Collaboration: 2022c). Figure 1 illustrates the broadband transmissions for these filters along with the VIS photometric band. In combination with the VIS band and ground-based optical photometry, the three NISP broadbands will provide accurate photometric redshifts for billions of galaxies.

The low-resolution spectra acquired by NISP-S are obtained with grisms that disperse all the light without any slit, a technique called slit-less spectroscopy. The advantage of this method is that the design is simpler and more robust than a slit mechanism, requiring no target selection. However, slit-less spectroscopy presents two disadvantages: a higher background that reduces the signal-to-noise ratio and contamination of spectra caused by overlapping sources and intrinsic spatial extent. To optimise NISP-S, the spectroscopic channel contains in total four grisms providing a spectral resolution of $R = 480$ for a 0.′5 diameter source. However, only three of the four grisms will be operational due to the non-conformity of RGS270 (Euclid Collaboration: 2022b). Two grisms (RGS000 and RGS180) cover the redder portions of the spectrum from 1206 to 1892 nm for the Euclid Wide Survey. The third is the “blue” grism (BGS000) with a wavelength range between 926 and 1266 nm, which will only be used during the Euclid Deep Survey. The two red grisms cover the same wavelength range with a rotated dispersion orientation (0° and 180°). In order to facilitate the decontamination of overlapping slit-less spectra, they will operate at their nominal positions as well as at orientations of -4° and 184°, respectively (Maciaszek et al. 2022). With the NISP-S low-resolution spectra, we can obtain spectroscopic redshifts enabling precise measurements of the distribution and clustering of galaxies.

## 2.3. The Euclid Science Ground Segment

The Euclid SGS is one half of the so-called Euclid Ground Segment with the Operations Ground Segment (OGS) comprising the other half (Racca et al. 2016). The SGS and OGS have different functions. The OGS is in charge of operating the spacecraft, analysing the telemetry, and performing the downlink transmissions of the data. As stated previously, the SGS is responsible for carrying out the entire data-processing and will perform key cosmological measurements, ultimately delivering the main scientific results.

There are ten organisation units (OUs) comprising the SGS data-processing pipeline<fnref n="2" />. Each OU is responsible to define, design, and validate a specific analysis of the SGS workflow. Processing the massive data volumes within the Euclid SGS takes place in a distributed system across the nine Science Data Centres (SDC) in nine countries (Finland, France, Germany, Italy, Netherlands, Spain, Switzerland, United Kingdom, and the United States). While most of the SDCs have a High Throughput Computing (HTC) design, the underlying infrastructure varies across each SDC. The Euclid SGS has established common tools and guidelines to ensure homogeneity in terms of development, storage, and computing, independent of location (Frailis et al. 2019). We summarise the main elements of the common infrastructure system under which we develop the OU-SIM pipeline to operate within the SGS: (1) The Euclid Archive System (EAS) is a database containing all data products and metadata processed for the Euclid mission; this includes images, catalogues, processing status, etc. It also manages the transfer of data among the local storage facilities at each SDC<fnref n="3" /> (additional information about the EAS is provided in Williams et al. 2019). (2) A Common Data Model defines the format of the data and associated metadata to ensure that interfaces between pipelines and with the archive are stable. (3) An Infrastructure Abstraction Layer (IAL) orchestrates the data-processing and adds a common layer allowing jobs to run independently of the underlying IT infrastructure. It defines the Pipeline Processing Order (PPO) which describes the elements, configuration, and inputs of a specific processing task. (4) A common Euclid Development Environment (EDEN) establishes the set of libraries and associated versions to be used by any of the Euclid software. This prevents inconsistencies or changes in the functionality of different libraries between development and production. (5) The Collaborative Development Environment (CODEEN) is a continuous integration and continuous delivery (CI/CD) platform that automates the building, unit testing and distribution of all the scientific software in the SGS. Source code is extracted from a Version Control System (i.e. Gitlab) and run through a CI/CD pipeline to be finally deployed on a distributed file system (CernVM-FS) available on all SDCs. This system design allows SGS operations to be performed smoothly and efficiently across the nine SDCs, providing the extra advantage of increased computing power and storage capacity.

## 2.4. The simulation framework

The strict requirements of this mission demand extremely precise simulations with exquisite detail, capturing all known instrumental and environmental models. This is to ensure that all critical data-processing components are tested and validated prior to the launch. Producing image simulations at this high level of quality not only depends on active engagement with the instrument teams, it also requires leveraging our interfaces with all OUs. Each processing function (PF) has its own respective requirements that the simulations must satisfy as well as additional insights and tools to aid the development and validation of our framework. Evidently, liaisons had to be established with the Cosmological Simulations Science Working Group, the main supplier of galaxy catalogues for Euclid's core science program.

<footnote n="2">² A description of each OU is provided in Sect. 7 of Laureijs et al. (2011).</footnote>

<footnote n="3">³ The EAS is accessible solely to SGS members, who are permitted to transfer, download, index, search, and access information of all Euclid data products.</footnote>
<figure><img src="image_3.png" /><figcaption>**Fig. 2.** Overview of the SIM pipeline, coordinated by the SimPlanner. The input catalogues provided by the Science Working Groups are ingested in the Euclid Archive System as well as the output products of SIM. With the models from the Mission Database (described in Sect. 4), the input True Universe catalogues and a simulation request, the SimPlanner produces the corresponding configuration files for each simulator.</figcaption></figure>

The organisation of the SGS simulation pipeline within the scope of the SGS infrastructure is depicted in Fig. 2. The True Universe catalogues contain all input sources and their corresponding parameters, spectra and shape, and are described further in Sect. 3. The instrument models and the reference survey are introduced into the pipeline from the Mission Database, which we explain in Sect. 4. Within the so-called simulation processing function (SIM PF), there are four image simulators, capable of accurately reproducing imaging and spectral data for the VIS, NISP-P, NISP-S, and EXT survey channels, including the instrumental effects of the two Euclid instruments and of the ground-based observations; we present each of the four simulators in Sect. 5. The operation of the simulation framework is orchestrated by the SimPlanner via a simulation request and is detailed in Sect. 6.1.

### 3. The True Universe

The “True Universe” (TU) catalogues<fnref n="4" />, consisting of stars and galaxies, are input data products to the SIM workflow. It is paramount that these catalogues include many realistic features as they serve as the basis for assessing the scientific performance and validating the compliance to the requirements at the different stages of the mission. In the following subsections, we describe, respectively, the four types of galaxy catalogues used in the simulations, the star catalogue built from real and simulated samples, and the common spectra and thumbnail libraries

that allow us to transform galaxy and star parameters into fluxes and images.

#### 3.1. Galaxy catalogues

Several types of galaxy samples were used in the simulation (see Table C.1): galaxies in the redshift range (0 < z < 2.3) referred to as standard Flagship galaxies (Std gals), QSOS, referring to a population of quasi-stellar objects at high redshift (6 < z < 14), High-z gals, denoting a high-redshift population (6 < z < 10) of Lyman break galaxies (LBGs), and SL, representing a catalogue of strong lensing systems.

##### 3.1.1. Euclid Flagship mock galaxy catalogues

The Euclid Flagship v1.0 Simulation (Potter et al. 2017) is one of the largest cosmological N-body simulations of the Universe ever produced, with (12 600)³ particles over a simulation box of 3780 h⁻¹ Mpc, leading to a mass resolution of m_p = 2.4 × 10⁹ h⁻¹ M☉. Such an unprecedented volume and resolution was required to validate the mission performance at full scale. The simulation was run with cosmological parameters<fnref n="5" /> similar to those of the Planck 2015 cosmology (Planck Collaboration XIII 2016). The 2 trillion dark matter particle simulation was run

<footnote n="4">⁴ The usage of the term “true” is due to the treatment of sources as noise-free for the simulation even though they may come from noisy observations. In the simulation, the measurements are altered with physical, environmental and/or instrumental sources of noise.</footnote>

<footnote n="5">⁵ $\Omega_{\text{m}} = 0.319$, $\Omega_{\text{b}} = 0.049$, $\Omega_{\text{CDM}} = 0.270$, $\Omega_{\Lambda} = 0.681$, $w = -1.0$, $h = 0.67$, $\sigma_8 = 0.83$, $n_s = 0.96$. These parameters define the density and condition of the energy-matter content of the Universe in matter, $\Omega_{\text{m}}$, baryons, $\Omega_{\text{b}}$, cold dark matter, $\Omega_{\text{CDM}}$ and dark energy, $\Omega_{\Lambda}$, the equation of state parameter of dark energy, $w$, the reduced Hubble constant, $h$, the amplitude of the (linear) power spectrum on the scale of $8 \, h^{-1} \, \text{Mpc}$, and the slope of primordial spectrum of fluctuations, $n_s$.</footnote>
<figure><img src="image_4.png" /><figcaption>**Fig. 3.** Snapshot of the Flagship galaxy simulation. Top: False colour image showing a slice of $3.800 \ h^{-1} \ \mathrm{Mpc}$ width and $500 \ h^{-1} \ \mathrm{Mpc}$ height (roughly 0.3% of the total volume) of the full light-cone Flagship mock. Central galaxies are coloured in green and satellites in red, where filaments from the large-scale structure are seen in great detail. Bottom left: Zoomed-in section with the local Universe ($z=0$). Bottom right: Zoomed-in fraction of the furthest galaxies ($z=2.3$). The simulation is a 3-dimensional sphere and the dark area at the right of the image corresponds to the end of the simulation where no dark matter particles are simulated.</figcaption></figure>

with PKDGRAV3 (Potter et al. 2017) on the Piz Daint supercomputer at the Swiss National Supercomputer Center (CSCS). An all-sky particle light-cone up to a redshift of $z = 2.3$ was produced in real time. The dark matter halos were identified from the dark matter particle light-cone using the ROCKSTAR halo finder (Behroozi et al. 2013), an adaptive hierarchical refinement of a friends-of-friends method able to track substructures and relations with the parent dark matter halos. Following the approach described in Fosalba et al. (2015), all-sky lensing convergence maps were built, which enable weak lensing effects to be included in the final galaxy catalogue.

The mock galaxy catalogue was built implementing an improved Halo Occupation Distribution technique (Carretero et al. 2015, Castander et al. in preparation) with SciPIC, the Scientific pipeline at Port d'Informació Científica (Carretero et al. 2017), developed to efficiently generate mock galaxy catalogues using as input a dark matter halo population. SciPIC runs on top of the PIC Hadoop cluster using Apache Spark. We present in Fig. 3 an example illustration of the mock galaxy catalogue, where a small region of the light-cone is shown, and one can distinguish by eye the emergence of the large-scale structure of the Universe.

For SC8, we selected galaxies up to an AB magnitude of $I_E = 26$ for the main Euclid Wide Survey, and $I_E = 28$ for the Euclid Deep Survey, which is two magnitudes deeper than the detection requirement. This was essential to maintain the same sources in all instruments (i.e. space and ground) and bands in order to preserve the photometry across the different channels for

photometric redshift consistency even if there are sources below the detection threshold in some channels. Lensing measurements are also affected by very low signal-to-noise sources below the detection threshold (Hoekstra et al. 2017; Euclid Collaboration: 2019b).

Particular care was taken to model the $H\alpha$ emission of the galaxies (following model 3 in Pozzetti et al. 2016), a line that is particularly important for NISP to determine spectroscopic redshifts. For the NISP-S simulations, we included only sources with $H_E \le 23$ or sources with an $H\alpha$ emission brighter than $10^{-16} \ \mathrm{erg} \ s^{-1} \ cm^{-2}$, as the continuum of sources $H_E > 23$ is never detected in the spectroscopic channel. Additionally, the size and shape distributions of the galaxies were updated and improved in SciPIC with respect to previous implementations in the MICE simulation described in Carretero et al. (2015). The morphological parameter distributions from the Cosmic Assembly Near-infrared Deep Extragalactic Legacy Survey (CANDELS) (Grogin et al. 2011), and Hubble Space Telescope (HST) surveys were used to produce highly accurate and realistic galaxy samples (see Sect. 3.4.1).

The final mock galaxy catalogue contains the following information that allows the pipeline to reproduce its flux at the pixel level: (1) ID: A unique source ID that also contains information about the parent dark matter halo. (2) Positional coordinates: The source location in equatorial coordinates (RA, Dec) and the lensed positions due to gravitational deflection. (3) True Universe kind: An identifier of the object kind from the various TU inputs such as Flagship central or satellite galaxy,
QSO, High-z and strong lensing, as different sources are sim-
ulated differently. (4) Redshift: The true and observed redshift
of the galaxy, different due to the peculiar velocity. (5) Refer-
ence magnitude: An absolute, intrinsic and apparent magnitude
of the galaxy at a given band. This was used to scale the spec-
trum at a given brightness. The reference band depends on the
object type as some sources are best modelled in the visible
bands (stars and low redshift galaxies), while other sources are
better characterised in infrared bands (high redshift sources). (6)
SED template: A spectral energy distribution (SED) template
with dust extinction assigned by sampling the COSMOS galaxy
catalogues (Bruzual & Charlot 2003; Polletta et al. 2007), where
galaxies are matched to the observed ones using redshift, abso-
lute magnitude, and colour. An additional parameter describes
the extinction law to be applied. This was used to reconstruct the
spectrum (detailed in Sect. 3.3). (7) Emission line fluxes: The
fluxes of Hα, Hβ, [O II], [O III], [N II] used in spectroscopic red-
shift determination. (8) Morphological parameters: Simulating
the light profile of a galaxy requires the bulge and disc half-
light radius, the ratio of the flux in the bulge component to
the total flux (often written B/T), the Sérsic index of the bulge
profile, the axis ratio defining its intrinsic ellipticity, the incli-
nation angle of the disc, and the position angle with respect to
the north (see Sect. 3.4, which describes how these parameters
are used to reconstruct galaxy shapes). (9) Lensing parameters:
The shear and convergence values, γ₁, γ₂, and κ, were used to
distort galaxy shapes and determine their flux magnification.
These three parameters were derived from the Euclid Flagship
dark matter lensing and convergence maps. (10) MW extinction:
The optical extinction of the Milky Way in the V band. This
was derived from the Planck thermal dust maps at the observed
(lensed) coordinates of the galaxy.

With this list of parameters, we can render all the galaxies
in the catalogue in any of the simulation channels, both pho-
tometric and spectroscopic, with all their complex instrumental
effects. Additionally, we computed the true reference fluxes for
each galaxy in all the passbands of interest for Euclid and the
ground-based EXT surveys, including magnification.

3.1.2. Other extragalactic sources

High-redshift sources. Euclid’s survey area and depth cov-
erage is expected to yield an unprecedented number of new
sources at high redshift, which will be catalogued and analysed
in its legacy science program: the Primaevel Universe. These are
very distant galaxies not contained in the Flagship dark matter
run, as its light cone reaches only a redshift of 2.3. The Pri-
maevel Universe Science Working Group provided a sample of
11 million high-redshift galaxies and 2 million quasars at red-
shifts greater than 6, as is described in Euclid Collaboration:
(2019a). They were added to the TU set as an additional set of
sources to be simulated on the image, with unlensed magnitude
cuts $H_E < 26$ and $H_E < 25$ for galaxies and quasars, respectively.

Strong lensing sources. Euclid is expected to also observe
tens of thousands of strong lensing sources (Collett 2015). For
SC8, the Strong Lensing Science Working Group provided a
template set of 801 sources in the form of high-resolution image
thumnails that were injected to the simulation to train algo-
rithms and classify them more efficiently. Strong lensing sources
were simulated with the GLAMER ray-tracing code (Metcalf &
Petkova 2014), based on the Flagship halo mass properties,
and assuming HST-like morphologies for the lensed background
sources following the recipe provided in Metcalf et al. (2019).

3.2. Stellar catalogue

Observations of stars are an integral part of image processing and analysis. They serve as reference catalogues for all astrometric and photometric calibrations, and are essential for performing the precise PSF modelling required for all lensing measurements. Conversely, they add confusion to the classification of sources and produce numerous complications, such as blending, bleeding, ghost reflections, and scattered light. This is particularly true for the L- and T-type brown dwarf stars, which contaminate high-redshift galaxy and quasar detections. It is critical, then, to have a realistic and accurate distribution of stars at each location of the sky with representative density and stellar types.

3.2.1. Besançon stars

As Euclid aims to observe thousands of square degrees in the
optical and NIR down to a $I_E$ magnitude of 24.5, we require
a synthetic model that accurately represents the distribution of
stars in the Milky Way. We adopted the Besançon model (Robin
& Creze 1986; Robin et al. 2012)<fnref n="6" /> as our main stellar population
synthesis model of the Galaxy. The model provides a realis-
tic representation of populations in the disc and halo down to
M-type stars, as well as photometry in various bands. The scaling
of the SED for the spectra reconstruction is performed with the
2MASS *H* band. The model provides the surface temperature,
gravity, and metallicity for each star, which we used to derive the
stellar template from the Basel 2.2 stellar library (Lastennet et al.
2002). Further details of the library and how we reconstructed
spectra are explained in Sect. 3.3. We ran an all-sky Besançon
model simulation down to *H* < 26, avoiding the Galactic plane
as Euclid will not observe there and it contains too many stars
at those magnitudes. Even though the NISP instrument has a
defined magnitude limit of $H_E$ ~ 24, we simulated a deeper cat-
alogue to include sources below the detection threshold into the
pixel-level images, as these are also relevant in altering the pho-
tometry of other sources of interest, such as the main galaxy
sample. This resulted in a massive final stellar catalogue con-
taining 3 billion stars with the following set of parameters: (1)
ID: A unique TU ID, which is non-identical to the ID used for
galaxy sources. (2) Sky coordinates: The equatorial coordinates
of the star in RA and Dec. (3) Distance: The radial distance of
the source in kpc. This is used to scale brown dwarfs of L- and
T-type for which the reference magnitude is given in absolute
magnitude. (4) Reference magnitude: The apparent magnitude in
the Vega system for the 2MASS *H* band, which we use to scale
the template spectra to its apparent brightness. (5) Extinction:
The Milky Way optical extinction in the *V* band, derived from
3D dust model maps (Schultheis et al. 2014). Like the galaxy
catalogue, true fluxes in all Euclid and EXT bands are also com-
puted for the stellar catalogue. The density map of the Besançon
simulation run can be seen in Fig. 4.

3.2.2. Augmented Tycho2 catalogue

The design of the Euclid Wide Survey was performed using
the reference zodiacal light model and straylight levels from
the brightest stars near the galactic plane. For consistency, the
brightest end of the stellar catalogue had to be replaced with
real stars from an all-sky catalogue. We chose the Tycho2 stellar
catalogue (Høg et al. 2000), as we could use the Pickles pro-
cedure described in Pickles & Depagne (2010) to match stellar

<footnote n="6">⁶ https://model.obs-besancon.fr/</footnote>
<figure><img src="image_5.png" /></figure>

**Fig. 4.** 2D histogram plot of the Besançon simulation in galactic coordinates. It is complete down to $H_E < 26$, yielding a total of 3 billion stars. This simulation excludes ~10 deg² of the much denser galactic plane, even the reference survey described in Euclid Collaboration: (2022b) describes a more complex and restrictive exclusion of the galactic plane.

types for each source in the catalogue and then to our reference Basel 2.2 library (Lastennet et al. 2002). Our catalogue contains 2.5 million of the brightest stars in the sky down to V magnitude of 11.

### 3.2.3. Brown dwarf stars

One of the challenges in identifying very distant quasars is differentiating them from the point-like brown dwarf stars that have a red spectrum of similar NIR colours. To enable the testing of algorithms designed to perform more complex QSO identification, we supplemented our stellar catalogue with MLT type stars. While M-type stars were already included in the Besançon sample, the redder LT stars were not, so we added new templates to the Basel 2.2 library and included the brown dwarfs following recipes described in Euclid Collaboration: (2019a). Figure 5 shows the resulting colour-colour diagram of our sample of LT stars in addition to the various stellar types described previously.

### 3.2.4. Gaia realisation

The first prototypes of the SGS pipeline used the True Stellar catalogue as the astrometric reference for the calibration algorithms. However, this idealised catalogue will not be applied in the astrometric calibration of real observations; instead, Gaia will be the reference catalogue used. With the astrometric and photometric performance described in the Gaia DR2 (Gaia Collaboration 2018), we could replicate a realisation of a Gaia catalogue in our TU sample, using realistic astrometric and photometric errors based on the magnitude and stellar type. Proper motions are not included in this simulation. For each star in the catalogue, we note the position and magnitudes in G, BP, and RP bands<fnref n="7" /> down to $G \sim 21$, together with their respective errors. This method yields a more realistic Gaia-like astrometric reference catalogue, which is then provided to the respective calibration pipelines for processing VIS, NIR, and EXT data.

<figure><img src="image_6.png" /></figure>

**Fig. 5.** $M_H[AB]$ versus $J-H[AB]$ diagram of a simulated star catalogue. The colour-coded sample combines real Tycho2 stars with $M_H \le 10$, and a simulated Besançon catalogues. LT-dwarfs (black) are simulated as well; however, M-dwarfs (magenta) are not as they are already contained in the Besançon catalogues.

### 3.3. Spectral energy distribution library

As we shall explain in Sect. 5, the VIS, NISP-P, NISP-S, and EXT pixel simulators are implemented as separate independent codes. However, developing different types of software that implement common routines poses some risks that could result in bugs and incompatible results. To minimise possible sources of error in the simulations, we constructed a common spectra reconstruction library tool called *SimSpectra* that reconstructs observed spectra from the parameters in the catalogue and the corresponding template library. The VIS, NISP-P, and NISP-S pixel simulators reconstruct the incident spectra every time a given source needs to be rendered. This allows the full chromatic information to be used precisely when simulating instrumental effects such as a wavelength-dependent PSF or quantum efficiency. Although it is computationally inefficient to reprocess the spectra for each source in the different dithers and channels, it provides greater practicalities than storing and transferring large catalogues of spectra. Reconstructing the spectra is a quick process (when optimised) that enables low-memory jobs to perform the processing in parallel under distributed architectures. Reconstructed spectra are only stored as a temporary validation product for NISP-S simulations.

In contrast to the *Euclid* simulators, simulations for the EXT imaging surveys (described in detail in Sect. 5.3) as well as Gaia (G, BP, RP) are less complex and use pre-computed band fluxes; this is to avoid using spectra in the process of simulating pixels. Indeed, due to their large fields of view, ground-based survey simulators usually have to include more galaxies than the *Euclid* simulators. Computing spectra for each EXT survey would be computationally expensive and impractical. Instead, we computed the exact values in a matrix, sampling various points in the parameter space, and performed a multi-dimensional interpolation to obtain the integrated fluxes in all bands. This faster interpolation method has an accuracy of 0.005 mag root-mean-square (RMS) error in comparison to the full spectra reconstruction algorithm, which is sufficient for all SGS validation applications (Carretero et al. 2015).

<footnote n="7">⁷ G, BP, and RP bands cover the wavelength range 400 nm < $\lambda$ < 1 µm (Gaia Collaboration 2023).</footnote>
<figure><img src="image_7.png" /><figcaption>**Fig. 6.** Reference template SEDs, used in combination with extra extinction and emission line prescriptions in order to reconstruct complete spectra.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>**Fig. 7.** Complete reconstructed spectrum based on the SEDs of Fig. 6 and parameter information from the True Universe catalogue (extinction, emission lines, redshift, lensing magnification)</figcaption></figure>

### 3.3.1. Galaxy spectra reconstruction

Our base galaxy template library is composed of the COSMOS SED templates used in Ilbert et al. (2009) that comprise Bruzual & Charlot (2003) and Polletta et al. (2007). The SEDs and the intrinsic dust extinction laws were selected from Prevot et al. (1984) and Calzetti et al. (2000). We used the luminosity, $g - r$ rest frame colour, and the redshift of each galaxy in the Flagship catalogue to assign the SED and dust extinction of the closest COSMOS galaxy in the Ilbert et al. (2009) catalogue in the luminosity-colour-redshift space. In order to avoid discrete distributions in the observed photometric properties, we applied scatter to the assigned closest COSMOS template, generating a random realisation of the value of the SED. The closest SED was identified as an optimised<fnref n="8" /> function based on colour, luminosity, and redshift. We assigned the two SEDs closest to the resulting realisation value, weighted by their distance. Each galaxy SED was then constructed as a linear combination of these two SED templates (see Appendix B). The galaxy template set used for these simulations is shown in Fig. 6.

We then assigned a star formation rate (SFR) to each galaxy from its unextinguished rest-frame UV luminosity (computed from its SED). These relations have been derived at low redshift. Most of them depend on physical processes that are not expected to depend on redshift, and therefore have been extrapolated to higher redshifts. We used the Kennicutt 1998 relation (Kennicutt 1998) to assign an $H\alpha$ luminosity from the SFR with some scatter. We finally corrected the $H\alpha$ luminosity to make the global $H\alpha$ luminosity distribution resemble the Pozzetti et al. (2016) models. We assigned the luminosities of the other most prominent lines from their SFR and $H\alpha$ luminosities using observed correlations. An example of a reconstructed spectrum (including the continuum SED and the emission lines) from the catalogue parameters is shown in Fig. 7.

### 3.3.2. Stellar spectra reconstruction

As is stated in Sect. 3.2, our stellar library was generated from the Basel 2.2 (Lastennet et al. 2002) template set. We assigned an SED from both the Besançon model simulation and the Tycho2 catalogue to a particular stellar template. Reconstruction of the stellar spectra is much simpler than for galaxies, since there is no redshift, K correction, or lensing magnification in the reconstruction process. There are only two steps to calibrate the template to the incident calibrated spectrum for each star. First, we needed to scale the flux to our reference $H$ 2MASS band. Second, we corrected for the Galactic extinction. The Tycho2 stars were not corrected for extinction because their flux is observed, and therefore already contains the extinction factor. In contrast, as Besançon stars are simulated, we computed an accurate reddening with the radial distance information provided by the model and the 3D dust model from Schultheis et al. (2014). A detailed description of our implementation of stellar spectra reconstruction is given in Appendix B.2. Finally, the stellar library also contains 365 LT star templates that enable the additional brown dwarf stars to be assigned an SED, as the Basel 2.2 library does not contain this class of stars.

## 3.4. Galaxy profile generators

For our suite of instrument simulators, we built a package called SimThumbnails that transforms galaxy morphological parameters to pixelised galaxy light profiles. In addition, it performs the rendering of the light profiles at the exact pixel scale for each instrument using the 'World Coordinate System' (WCS) information of the target image. The core of the library is based on GalSim 2.3.3 (Rowe et al. 2015), which allows plenty of flexibility to simulate different profile configurations. Similar to the SimSpectra library, the SimThumnails library implies rendering the same galaxies for every pixel simulator, which is inefficient computationally. However, it is a trade-off between pre-computing and storing images for all objects. In addition, every simulator can tune the library parameters to the instrument pixel or sub-pixel scale (see, e.g. Sect. 5.2.2).

### 3.4.1. Bulge and disc model

For the standard Flagship galaxies, we adopted two Sérsic profiles to trace the bulge and disc components. First, we defined the bulge as a Sérsic profile:

$$I_{\text{bulge}}(r) \propto \exp(-b_n(r/r_c)^{1/n}), \quad (1)$$

<footnote n="8">⁸ In order to assign the SED, we define a weighted distance between galaxies in the mock catalogue and galaxies in the COSMOS field using redshift, absolute magnitude, and colour, $dist_{weighted} = w_{col}|(g - r)_{cosmos} - (g - r)_{cat}| + w_{Mr}|Mr_{cosmos} - Mr_{cat}| + w_z|z_{cosmos} - z_{cat}|$ where $(g - r)$, $Mr$ and $z$ are the $g - r$ colour, the $r$-band absolute magnitude and redshift, respectively, and the subindex indicates whether it is a COSMOS galaxy (cosmos) or a mock catalogue galaxy (cat). We arbitrarily assign the weights $(w_{col}, w_{Mr}$ and $w_z$) taking into account the typical values of the quantities and their errors. We choose the SED of the COSMOS galaxy that has the closest weighted distance ($dist_{weighted}$) to the galaxy in the catalogue. To avoid galaxies having the same template, we add scatter to the index and extinction values of the closest template.</footnote>
<figure><img src="image_9.png" /><figcaption>Fig. 8. Sample of three spiral galaxies at different inclination angles (0°, 60°, and 90° from left to right). The inclined exponential model better represents the three-dimensional shape of the disc, with a more realistic thickness than a Sérsic profile with index n = 1.</figcaption></figure>

where $r_e$ is the half-light radius and n is the Sérsic index given in the Flagship catalogue. The $b_n$ parameter was calculated to give the correct half-light radius given n. The Sérsic index was determined from an empirical fit to the HST-CANDELS data (Grogin et al. 2011; Koekemoer et al. 2011; Dimauro et al. 2018), HST-GOODS-South data (Welikala & Kneib 2012), and HST-COSMOS data (Laigle et al. 2016). The bulge model, $I_{\text{bulge}}(r)$, was then sheared to obtain the bulge minor-to-major axis ratio due to its intrinsic ellipticity as given in the catalogue.

Next, we initialised the disc component with an exponential thick disc inclined model (van der Kruit & Searle 1982; Bizyaev 2007). The exponential inclined model is a particular Sérsic profile of index n = 1 characterised by three parameters: the inclination angle (where 0° refers to a face-on galaxy and 90° would indicate it is positioned edge-on), the half-light radius, and the scale height of the disc. We chose a fixed height-to-radius ratio, $h_{s/r} = 0.1$, that reproduces observations well. The relation between the inclination angle and the apparent disc axis ratio, $b/a$, is

$$ \theta_{\text{inclination}} = \arcsin \sqrt{\frac{1 - \left(\frac{b}{a}\right)^2}{1 - h_{s/r}^2}}. \qquad (2) $$

The advantage of this profile is that it accurately replicates the thickness of the disc, which the Sérsic profile does not properly represent when the galaxy is edge-on. Then, we adjusted the flux of the disc relative to the bulge components with the bulge-to-disc ratio parameter given in the Flagship catalogues. The distribution of this parameter reproduces the ratio measured in the data detailed above (Cardamone et al. 2010; Grogin et al. 2011). Finally, the bulge and disc models were summed together and rotated to a position angle on the sky (with a convention of north up, increasing towards the east) given in the catalogues. Figure 8 shows an example of this bulge and disc model for various inclination angles.

### 3.4.2. Gravitational lensing and optical distortions

We used GalSim to apply the gravitational lensing effect to every galaxy (i.e. the summed bulge and disc components) based on the shear, $\gamma_1$, $\gamma_2$, and convergence, $\kappa$, parameters given in the Flagship catalogues. GalSim requires the following derived parameters: the reduced shear parameters, $g_1$ and $g_2$, responsible for the distortion effect, as well as the magnification factor, $\mu$,

defined, respectively, as

$$ g_i = \frac{\gamma_i}{1 - \kappa} \qquad (3) $$

and

$$ \mu = \frac{1}{(1 - \kappa)^2 - (\gamma_1^2 + \gamma_2^2)}. \qquad (4) $$

While GalSim can only compute a reduced shear for which $g_1^2 + g_2^2 < 1$, this is not a limitation as we are mostly interested in the weak lensing regime which falls well below this limit. As was stated above, lensing magnification alters the size of a galaxy. As True Universe fluxes already include magnification, we have to apply the inverse of the magnification factor on its incident spectrum (as is explained in Sect. 3.3), so that its total integrated flux matches that given in the catalogues.

The final shape of the galaxy is critical for estimating the weak lensing signal. Instrumental distortions add up to the lensing distortions described above. We accounted for optical distortions of the field as defined by the plate WCS. At every particular position in the focal plane, we associated with each GalSim galaxy object a WCS 2 × 2 local Jacobian matrix that was subsequently used during the simulation of the galaxy on the image.

### 3.4.3. Flux scaling and truncation

In theory, analytic expressions for the bulge and disc profiles extend to infinity. However, in practice, only limited size stamps can be pasted on the image. This size is automatically computed by GalSim, such that the flux lost outside the stamp is equal to the ‘folding threshold’ parameter, described in Rowe et al. (2015). The pixel values are then increased to match the desired flux. In our pipeline, we set the folding threshold to 0.5%, the default GalSim value. In most cases, where the Sérsic index is high, the stamp contains almost all the flux as it is concentrated in the centre. For low-n Sérsic profiles where the light decays slowly, the flux loss can be closer to 0.5%; however, in such extended profiles it will be very difficult to recover the total light with photometric measurements.

### 3.4.4. Point spread function convolution

The convolution of the galaxy profile by the PSF was performed in Fourier space with the FFT method. In GalSim, the profile is
centred in the middle of the central pixel by default. Yet, the true
position of the object may lie in a slightly shifted fraction of it.
The offset to the central pixel was computed and provided for an
accurate positioning of the source.

Depending on the instrument, the simulator pipeline allows
for a polychromatic PSF model that varies in wavelength, such
as in the VIS instrument. Due to limited information in the
Flagship galaxy mock catalogue, the galaxy profile is rendered
without colour gradients. Therefore, the polychromatic PSF was
convolved only once with the galaxy stamp, and collapsed
along the wavelength direction. This provides very accurate PSF
convolution based on the spectra of the source.

3.4.5. Optimisation

The computing time of our simulations was driven by the pro-
cessing of the galaxy stamp and PSF convolution. Therefore,
optimising these two steps allowed us to perform larger and
more complex simulations. We found three ways to speed up this
process: first, we enabled a mode whereby only the size of the
stamp was provided without requiring any complex calculation;
this permitted us to quickly discard sources that did not overlap
with the detector pixel array (from the radial search of the cat-
alogue to the rectangular shape of the pixel array). As a second
step, we rounded the variable Sérsic index in the galaxy bulges
to the first decimal digit, as the computation of the 2D Sérsic
profile is computationally expensive. With this approximation,
many galaxies share the exact same profile and a look-up table
in GalSim, allowing us to reuse the internal 2D profiles to speed
up the rendering process, together with the specific shear and
PSF model. The impact on the simulated profile is below the
required precision on the flux. And finally, faint galaxies entering
in the undetected background sample ($I_{\text{E}}^{\text{limit}} < I_{\text{E}} < I_{\text{E}}^{\text{limit}} + 2$) were
replaced by single component models that require less computa-
tion. These changes have almost no effect on the quality or the
image analysis, reducing the computation time by several orders
of magnitude.

When profiles deliver a very large galaxy stamp (larger than
a few thousand of pixels in diameter), the memory necessary
to perform the convolution exceeds the limit established by the
environment and raises an exception. To handle such cases, we
implemented a down-up sampling iterative process. When the
memory limit is reached, we down-sample the actual stamp by a
factor of 2, providing an equivalent WCS with a scale multiplied
by that same factor. Every time the memory limit is reached,
we further down-sample the stamp (although most issues have
been resolved during the first iteration). Once the stamp is suc-
cessfully imaged, we up-sample the image with a bi-quadratic
interpolation. We minimise the residuals for these types of pro-
files using this approach. Even though some degradation can
occur during the down-up sampling process, this event is rare
and happens only for very large Flagship galaxies (above 10"
effective radius) with a high Sérsic index. It is not a concern as
these sources are not among the list of targets for the main sci-
ence goals of *Euclid*. We present an example of the performance
of the down-up sampling process in Fig. 9.

High-z galaxies are drawn with a single Sérsic profile compo-
nent of index *n* = 1.5. QSO sources are expected to be point-like
and we render them using a PSF profile. Finally, strongly lensed
galaxies require extra complexity in rendering that is imple-
mented via the generation of stamps at 0.′05 resolution with the
GLAMER code (see Sect. 3.1.2). The stamps are then resampled
at the instrument resolution by each simulator using the default
'Quintic' interpolant in GalSim.

<figure><img src="image_10.png" /></figure>

**Fig. 9.** Down-up sampling iterative process used to allow the simulation of very large galaxies. **Top left:** Original high-resolution sample. **Top right:** Downsampled version. **Bottom left:** Upscaled version from bi-quadratic interpolation. **Bottom right:** Residual image between original and upscaled version. In this example, we show a smaller sample of 120 pixels in width for visualisation purposes, but the galaxy stamps that require to be resampled with this process are typically above one thousand pixels wide. Shown is the result of downsampling by a factor of 4; the bi-quadratic 2D interpolation results in a very similar profile in comparison to the original and it minimizes the residual compared to other interpolation methods.

4. Mission database

In such a complex mission, having a robust data and configura-
tion management system is essential. The instrumental models,
reference sky maps, telescope parameters, survey plan, etc., will
all evolve through the different phases and maturity of the mis-
sion. The *Euclid* mission Database (MDB) is a single reference
repository designed for the *Euclid* mission system; it provides
a temporal record of the official representation of the system
consistent with the set of reference models. As such, the MDB
provides a centralised version control and distribution system of
parameters, which is required by all SGS components.

The MDB has the following set of configurations which we
select from and assign to the model that we want to simulate: (1)
as required: This specifies the worst-case values still within the
related requirements. These derive from the top-level require-
ments that ensure *Euclid* can achieve its scientific goals. (2) as
designed: This provides the expected performance of a given
model with the current design. The model must perform better
than the required limit. (3) as built: At this level, the model has
been measured in built parts, ideally around the design value. (4)
current best estimate (CBE): This replaces the ‘as built’ model
with newer or more accurate measurements that contain our best
knowledge of the model. Ideally, the simulation will be done
with all CBE models, which best represent the status of the
system. It is foreseen that after commissioning and in-flight cal-
ibrations, CBE will be updated with more accurate instrument
models. (5) as simulated: This is a particular configuration used
for testing, where the model is defined with a given value, which
may be unrelated to a particular measurement or design. How-
ever, we generally avoid implementing unproven, hypothetical
models.
When preparing a production of simulations for the various instruments, we define a Mission Configuration (MC), which gathers a subset of models from the MDB with a unique status on each parameter. The MC is stored in the EAS along with the simulation data products to provide users knowledge of the true models used as input.

## 4.1. Models and parameters

The MDB models and parameters allow us to emulate *Euclid* (and EXT surveys) operations during sky observations. As explained previously, the models in the MDB continually evolve with the construction and testing of the instruments and telescope. At the time of pre-launch, we had a sufficiently accurate model of system performance derived from ground tests. Therefore, we prioritised the models labelled with ‘current best estimate’ (CBE), as these would provide the closest representation of the spacecraft during operations.

The MDB is organised in sections, each covering a specific component of the mission. The *Environment* section contains physical constants, ensuring all calculations use the exact same reference values for consistency. Other *Environment* models assumed in the definition of the survey include the zodiacal light scattered from interplanetary dust in the Solar System, all sky out-of-field straylight maps induced by stellar light, intergalactic dust extinction maps, and the cosmic ray energy distribution.

The *Space Segment* section contains all known models for the PLM, SVM, VIS, and NISP instruments. The SVM subsection lists models associated with the spacecraft such as the dither steps or slew duration. The PLM subsection stores all telescope related information like wavefront errors, collecting surface areas, or plate scales, as examples. The NISP and VIS instrument sections provide all parameters and models describing the instruments such as detector layout, quantum efficiency, read noise, Charge Transfer Inefficiency (CTI) models, wavelength dispersion and distortions, etc.

The *Survey* section defines the Euclid Wide Survey, the Euclid Deep Survey, and the calibration surveys, as well as the calibration source SEDs for objects such as Vega, a white dwarf, and a planetary nebula. We describe briefly in the following section the reference survey which we use to emulate realistic *Euclid* observing sequences.

## 4.2. The reference survey

The *Euclid* reference survey (Euclid Collaboration: 2022b) was defined to detail the set of fields to be observed within the entire *Euclid* wide footprint, the dither steps within each field, time of observation of each pointing as well as the various calibration fields and the deep fields during the six-year mission campaign. With this information, OU-SIM can reproduce a realistic sequence of observations covering the area to be simulated. Figure 10 shows an image of the fields in the reference survey that cover the Euclid Wide Survey footprint. We outline in red the region denoting the SC8 footprint.

### Fields and calibration frames.
*Euclid* has defined four dithers inside each field, where each pointing results in $I_E$, $Y_E$, $J_E$, and $H_E$ images, and one spectral exposure. The NISP-S dithers alternate different grisms at different dispersion angles that enable spectral decontamination. We show the reference observing sequence (ROS) we implemented for SC8 in Fig. 11. We note, however, that the ROS shown is not the definitive one; for example, the true ROS is scheduled to have a second short VIS exposure. Nevertheless, simulating the ROS provides a

<figure><img src="image_11.png" /><figcaption>**Fig. 10.** Reference Euclid Wide Survey at SC8 (Euclid Collaboration: 2022b) covering 15 000 deg² of the sky in Ecliptic coordinates, avoiding the Galactic and Ecliptic planes due to the high stellar density and high zodiacal light, respectively. The colour code indicates the observation time where *Euclid* is planning to point at each of the fields. The polygon in red shows the original SC8 main area (~ 600 deg²). More recent surveys have been released with further improvements and the updated launch date.</figcaption></figure>

realistic representation for spatially varying instrumental effects. Moreover, multiple exposures allow us to cover the detector gaps, reach the desired depth, and correct for transitory effects such as cosmic rays. We implemented the dither slews following the pointing accuracy model of the spacecraft with minimal step jumps plus the associated pointing uncertainty of 11''. The current dithering model (Markovič et al. 2017) follows an S shape and implements the following minimal slews:

- Dither step 1: $\Delta X_{sc} = 50'', \Delta Y_{sc} = 100''$;

- Dither step 2: $\Delta X_{sc} = 0'', \Delta Y_{sc} = 100''$;

- Dither step 3: $\Delta X_{sc} = 50'', \Delta Y_{sc} = 100''$;

plus a random error of 11'' at $3\sigma$ after the minimal step. The coordinates $X_{sc}$ and $Y_{sc}$ correspond to the X and Y axis in the spacecraft reference frame.

## 4.3. External surveys

The MDB also contains survey, instrumentation, and bandpass information for each EXT survey (i.e. DES, Rubin, CFIS, JEDIS, Pan-STARRS, and WISHES, which will supplement the *Euclid* mission; see Sect. 5.3 for more information). In detail, a survey table containing a list of selected pointings along with additional survey parameters (such as magnitude zeropoints, sky brightness, position angle, seeing FWHM for constant PSFs or PSF model files for variable PSFs) for each EXT survey are stored in the MDB. The instrument file describes the detector layout in the focal plane for each camera, as well as characteristics of the CCDs such as the pixel size, read noise, well capacity, and the gain per CCD amplifier. Finally, for each respective EXT survey, the MDB keeps a record of the total throughput curves per filter including the atmospheric transmission.

In the following section, we shall present the various detector, atmosphere, and optical models used for producing realistic pixel images for each of our survey channels: VIS, NISP-P, NISP-S, and EXT. In Appendix A, we mention briefly the methods and resources for acquiring each of the respective transmission curves. More details on the construction of SC8 EXT survey table are shown in Appendix C.4.

# 5. Instrument simulators

In this section, we describe the implementation of all four simulator codes in the OU-SIM pipeline: ELViS (*Euclid* VIS),
<figure><img src="image_12.png" /><figcaption>**Fig. 11.** Simplified schema of the reference observing sequence (ROS) in the four dithers for the VIS and NISP channels. At the beginning of each dither VIS and NISP-S observe simultaneously after the Filter Wheel Assembly (FWA) movement and few seconds to allow the telescope to stabilise. After the exposure, the Grism Wheel Assembly (GWA) movement lets the light pass for the filter observations of $J_E$, $H_E$, and $Y_E$, denoted as JHY in red in the figure. In the meantime, the VIS instrument will perform the readout and processing of the acquired mosaic image. The first dither includes an additional short VIS exposure while the last dither ends with a brief flat field frame.</figcaption></figure>

Imagem (Euclid NISP-P), TIPS (Euclid NISP-S), and SIM-EXT (EXT ground-based surveys). These image simulators were originally built for various purposes, in particular, to provide the first evaluations of the mission performance. However, they have significantly evolved to become the main pixel simulators of the SGS. All simulators integrate the TU star and galaxy catalogues, the common SimSpectra<fnref n="9" />, and SimThumbnails libraries, the reference survey, and the various models in the MDB.

## 5.1. VIS simulator

ELViS is the Euclid VIS simulator capable of accurately reproducing the data that will be obtained by the VIS instrument during the Euclid mission operations, including the required calibration frames; for example, bias, flats, and self-calibration sequences. However, the biggest challenge for this simulator is emulating the optical response of the system and the instrument with the precision required. Euclid plans to measure with unprecedented precision the weak lensing signal of billions of galaxies. To achieve such a task, the VIS instrument needs to deliver extraordinarily good and stable image quality. The VIS simulator is required to deliver images with sufficient precision, such that simulation or model limitations do not drive the quality of the image. Moreover, it is the instrument performance as well as the shear measurement algorithms which define how well we can estimate the shape of the galaxies.

**Input sources.** ELViS includes all TU stars, comprising the real Tycho2 bright stars, the model Besançon stars, and the MLT type brown dwarfs. Similarly, it renders the TU galaxies from the Flagship simulation, high-z quasars and galaxies as well as strongly lensed galaxies. Recently, we included Solar System Objects (SSO), asteroids that due to their fast and nearby motion appear as traces in the VIS focal plane. Finally, the simulator includes cosmic rays (CR) during integration and readout, which leave substantially different traces. CRs are critical in this

simulation due to their high density resulting from the higher levels of radiation in space and to the CTI (explained later in the Detectors subsection). They have a significant effect on image quality, and therefore, impact the ability to measure lensing parameters with high precision. Cosmic rays are simulated in the VIS channel as single pixel thin straight tracks generated from samplings of the posterior probability distributions (PDFs) of the track length and energy deposit. These PDFs are computed using a complex Monte Carlo cosmic rays simulator code STARDUST (Rolland et al. 2007) developed at The National Centre for Space Studies (CNES). The STARDUST code input data are the geometrical and physical description of the detector structure, the environment particle spectra, and an aluminum equivalent thickness table describing the shield around the detector. Full scale images are generated out of which the PDFs are evaluated.

**Background models.** There are five main contributions to the background in the VIS channel. (1) Zodiacal light, a diffuse background from sunlight scattered off interplanetary dust. This is based on an MDB model that provides the intensity as a function of ecliptic latitude and its average spectrum. (2) Thermal irradiance, a background signal due to radiation from the heat of the various elements of the telescope and instruments. (3) Diffuse scattered light, unwanted reflections at the telescope and optical path from the stellar sources in the field that illuminate the focal plane resulting in an increase of the background. The intensity of this signal is related to the density of bright stars in the field of view and thus increases at lower Galactic latitude. (4) In-field straylight, while similar to diffuse scattered light, contributes to an increase in the localised background due to very bright stars following a specific path in the optical system. (5) Optical reflections, also known as ghosts, an out-of-focus image of an on-sky source inside or in the immediate vicinity of the instrument field of view. It mainly depends on the light path through the dichroic and telescope baffling and the position and brightness of the sources. While the first three components are constant across the focal plane and increase in value depending on the telescope's thermal state or its pointing in the sky, the last two create abrupt changes in the background which complicate the calibration and photometry.

<footnote n="9">⁹ SIM-EXT does not integrate SimSpectra as all effects are monochromatic within each band. However, the fluxes imported by SIM-EXT are produced with the SimSpectra library ensuring that all simulated channels have consistent fluxes.</footnote>
<figure><img src="image_13.png" /><figcaption>**Fig. 12.** Single monochromatic VIS PSF sample out of the 460 000 models that cover the entire focal plane at 250 × 250 positions at eight wavelengths spanning the VIS passband. Each PSF has a resolution of 300 × 300 pixels sampled every 4 µm (a third of a VIS pixel).</figcaption></figure>

**PSF.** As was mentioned, VIS simulations require great care in the reconstruction of the PSF, as it distorts the true shape of the galaxies. This needs to be simulated accurately to estimate the weak lensing signal with the precision required. In the VIS channel, we have four main contributions that affect the final PSF. First, we have the optical PSF, which varies as a function of position in the focal plane and wavelength. The model for the PSF is composed of an array of 240 × 240 positions in the focal plane, each at eight wavelength positions, comprising a total of 460 800 PSFs of 300 × 300 pixels. Figure 12 shows an example of a single model at one wavelength. These were constructed using SHE_PSFToolkit, a software developed by the Organisation Unit for Shear Data (OU-SHE), which performs forward-modelling and generation of a broadband PSF using exit pupil wavefronts. The inputs into SHE_PSFToolkit were derived from the Zemax<fnref n="10" /> optical model of the telescope (neglecting, however, polishing errors, the effect of the dichroic and the high-frequency components on the surface). Such large and detailed PSF datasets were built to meet the accuracy requirements necessary to measure weak lensing at the target precision.

The VIS PSF model cannot be interpolated spatially due to its complex shape variation (at small and large scales). Therefore, when we draw a particular star or galaxy, we take the closest PSF to its focal plane position. Each PSF is generated from the Zemax model at eight wavelength values within the VIS passband, and the sampling is increased by interpolating up to 1 nm. With the reconstructed spectra from the source, we convolve the light profile with the PSF at each interpolated wavelength position, resulting in a chromatic PSF that varies as a function of the colour for each object. Secondly, we have the AOCS described earlier in Sect. 2. This complex system performs tiny corrections to keep the spacecraft attitude stable during an exposure, which slightly increases the width of the final PSF. The jitter of the AOCS can be replicated as a time series that mimics how the correction behaves. However, we model its final effect on the VIS PSF by convolving with a Gaussian of 0.025 RMS. The detector degrades the PSF by diffusing the charges in each pixel into its adjacent pixels. This effect can be described in the Pixel Response Function, which gives the distribution of fluxes around each pixel. Due to variations in the CCD thickness, charge diffusion is not constant across the field of view.

**Optics and system.** The combined optical system of the PLM and the VIS instrument is accurately reproduced in ELViS. First, we have the response of the optical system which comprises the reflection of the mirrors and the transmission of the dichroic element. The PLM not only affects the transmission but its geometry distorts the incoming light beam, modifying the plate scale as a function of focal plane position. This results in objects being displaced from their nominal position and a non-uniform illumination of the VIS array. Geometric distortions also affect the shape of the galaxies which then require an adjustment during the drawing process with SimThumbnails.

Furthermore, we emulate the detector array mount on the focal plane, with accurate gaps, misalignments and rotations as measured in ground tests. This adds further realism and complexity in the astrometric solutions derived from the calibration process. Additionally, we include a calibration unit (VI-CU) with its highly non-flat illumination to replicate flat field calibration images (VIS has up to 6 different LEDs available). Other subtle effects are also included such as the effect of variable illumination and readout trails. The former is caused by the opening and closing of the shutter and the latter effect is caused by the open shutter during the readout process: light coming from astronomical objects create photo-electrons in the opposite direction of the readout.

**Detectors.** The 36 Teledyne e2v VIS back-illuminated, red-enhanced CCD detectors will provide a great dynamic range with high precision spatial resolution at 12 µm square. While these are state-of-the-art detectors, there are numerous effects that degrade the image and need to be accurately simulated. The response of the pixels is not uniform due to variations in the gain and in the construction process, intrinsic to the material. This is known as Photon Response Non Uniformity or PRNU. We can obtain realistic PRNU maps from the ground calibration campaigns. Additional cosmetic defects from the process of construction and dust are also included. Furthermore, each pixel does not respond uniformly across its square area, that is the centre of the pixel is more responsive than the corners. This is an effect we call intra-pixel quantum efficiency. When the number of electrons exceed the full well capacity (the limit of electrons that a pixel can collect), charges overflow in the read-out direction into the neighbouring pixels, causing the effect of bleeding. The effect of Dark Current is also included with a dependence on the VIS focal plane temperature. The final detector effect included is CTI, which creates streaks in the readout direction by electrons that remain in the previous pixel. This effect increases as the radiation from space damages the detectors with time creating charge traps in the silicon chips; it becomes significantly worse towards the end of the mission (and the most relevant degradation that limits the lifetime of the VIS instrument). Our implementation of CTI is based on the model described in Massey et al. (2014).

**Electronics.** As is typical with any optical CCD detector, a bias voltage is applied before the Analog-to-Digital Converter (ADC) to increase the signal from the 0 value. This requires models for the electronic bias, the ADC gain conversion, and proper simulation of the prescan and overscan sections. An additional complication is that the amplifier does not respond equally at all flux intensities; an effect that is about 1% in the lower regime and 5% when getting closer to the ADC saturation. The ADC has a limited number of bits to sample the charges in each pixel, causing the discretisation of the signal and setting the highest value at which the converter saturates. In the case of the

<footnote n="10">¹⁰ https://www.zemax.com</footnote>
<figure><img src="image_14.png" /><figcaption>**Fig. 13.** Simulated VIS exposure. The left image shows the entire 6 × 6 mosaic of detectors and the right image contains a zoomed in fraction of a quadrant, where the multiple effects can be seen such as bright stars, galaxies, cosmic rays, a complex PSF model, a ghost from a nearby star, saturation bleeding, and the trails of the Charge Transfer Inefficiency (CTI) increasingly visible in the readout direction. In this image, the end-of-life model for the CTI was adopted. A linear scale around the median with only 30 ADUs of range was used to visualise the subtle instrumental effects present in the simulation.</figcaption></figure>

electronics for Euclid with 16 bits per pixel, it is set to $2^{16}-1$ or 65535 ADU. In the process of reading the sensor, the electronics add scatter in the measured values, which vary from detector to detector, typically around $5e^{-}$ RMS. As all 36 detectors are being read at the same time, the induction of the current from the wires that transport the signal can produce reflected images on neighbouring amplifiers or detectors (known as electronic crosstalk).

In Fig. 13, we provide an example exposure produced by the VIS simulator. The mosaic of the VIS detectors is seen on the left. On the right, we show a small region of the exposure which exhibits distinctly the various simulated effects described above such as cosmic rays, CTI, ghosts, and saturation.

## 5.2. NISP simulators

We use two separate simulation softwares, Imagem and TIPS, for the photometric and spectroscopic channels of the NISP instrument, respectively. They share much of the optical path as well as the detector and data-processing units; they also have significant overlap in the models implemented, which we outline in the following before describing the channel specific implementations in Sects. 5.2.2 and 5.2.3.

### 5.2.1. Common models

Both the NISP-P and NISP-S simulators implement the same type of astronomical sources and share some common background, PSF, optics, detector, and electronics models, which we explain below. Consistency across the two NISP channels is particularly important as the spectroscopic analysis relies on measurements from the imaging channel.

**Sources.** In addition to the sources already included in the VIS simulator discussed in Sect. 5.1, we simulate additional sources required in the calibration of NISP images. In particular, we simulate two spectrophotometric standard stars which are used to perform accurate photometric calibrations. For the spectroscopic channel only, we produce simulations of a planetary

nebula, which enable wavelength calibration due to its strong and well characterised emission lines. Additionally, we simulate standard stars which provide a photometric calibration reference. The planetary nebulae and the standard stars are simulated in separate specific observations, in addition to the TU sources, at five locations in each detector, providing calibration points through the whole NISP focal plane. Both NISP simulators use a CREME96 model (Tylka et al. 1997) using a representative in-orbit proton energy distribution to simulate cosmic ray tracks as these particles, arriving from a random direction, traverse a 7 µm thick HgCdTe layer in the Teledyne H2RG detectors.

**Background.** The main common components of the background are zodiacal light, thermal irradiance, and out-of-field diffuse straylight. Even though these have already been explained in the VIS section (see Sect. 5.1), it is worth noting that due to its redder spectrum, zodiacal light is a significantly more intense source of background for NISP than for VIS.

**Point spread function.** The NISP PSF contains the same types of effects as explained for the VIS instrument, although it can be simplified thanks to the less stringent requirements on the instrumental PSF. For SC8, a single model at the centre of each detector was used to represent spatial variations, taking into account the telescope and NISP instrument optical models.

**Optics or focal plane array.** Both simulators implement with their corresponding filter/grism transmission and geometric distortion models the PLM transmission (see Fig. 1) and the focal plane array (FPA) metrology that depends on the exact position and tilt of each detector in the focal plane.

**Calibration.** Dark and flat simulations are also provided for both NISP channels for the usual data reduction process. Similar to the calibration unit of VIS, the NISP Calibration Unit (NI-CU) can also illuminate its focal plane with a set of light emitting diodes (LED) at five different SEDs in the infrared. They are additionally set at different intensities to produce flat fields, which are also simulated.
<figure><img src="image_15.png" /><figcaption>Fig. 14. Example of an up-the-ramp readout for MACC(3,8,4) with 3 groups, 8 reads, and 4 drops, with true flux indicated in black, readout values in red and estimated flux in green. The flux error in this illustration largely stems from a comparatively high readout noise of 12 e⁻ relative to a flux of 3 e⁻/frame. Group average charges Gᵢ are here indicated by horizontal lines for each group as well as on the right y-axis. The actual NISP-P readout mode is MACC(4,16,4) while for NISP-S it is MACC(15,16,11) and the nominal frame rate is 1.45s.</figcaption></figure>

**Detectors.** The 4 × 4 set of Teledyne H2RG infrared detectors are simulated with measured quantum efficiency, dark current, and readout noise maps provided from ground tests (Waczynski et al. 2016; Secroun et al. 2016, 2018; Barbier et al. 2018) and the Poisson distributed shot noise from the incident sources and background is accounted for. While a 4-pixel boundary corresponding to the reference pixels is included in the NISP simulation, it is currently set to zero ignoring baseline shifts. For SC8, we did not simulate the effect of NISP persistence; however, we advise the reader to consult Sect. 7 for a description of our implementation of persistence in our post-SC8 simulations.

**Electronics.** The readout of the H2RG detectors follows the procedure described in Kubik et al. (2016) called multiple accumulated sampling (MACC), where the incoming signal is sampled multiple times during the exposure in an up-the-ramp readout process. In this configuration, we can estimate the ramp of the signal in each pixel, as well as the quality of the fit to the ramp. This allows us to identify pixels which do not follow a stable rate (like cosmic rays that will produce a sudden jump in the accumulated flux). While NISP photometry and spectroscopy use different MACC readout modes, owing to their different exposure times, each uses an evenly spaced number of groups that are composed of a fixed number of frames read and are separated from the next group by a fixed number of frames that are dropped (see Fig. 14).

For a time $t_f$ separating one readout frame from the next and a MACC readout with $n_g$ groups, $n_r$ reads in each group, and $n_d$ drops between groups, the integration time is

$$t_{\text{int}} = (n_g - 1)(n_r + n_d)t_f. \qquad (5)$$

In the following we describe the steps to compute a charge estimate $Q$ that, when divided by the integration time $t_{\text{int}}$, directly results in a flux estimate, including the signal but also backgrounds and dark currents. In any given exposure, let $F_{\text{pix}}(x, y, i, k)$ be the single frame charge in ADU capturing the accumulated signal and the instrumental effects at frame $k$ in

group $i$ for the pixel $(x, y)$, $\sigma_r$ the single frame readout noise in ADU and $g$ the gain in ADU/e⁻.

First, we combine the single frame charges in each group $i$ into group averages

$$G_i = \frac{1}{n_r} \sum_{k=1}^{n_r} F_{\text{pix}}(x, y, i, k). \qquad (6)$$

With these, the overall charge estimate $Q$ in ADU is set as

$$Q = (n_g - 1) \times \left[ \frac{g(1 + \alpha)}{2} \left( \sqrt{1 + \frac{4 \sum_{i=2}^{n_g} (G_i - G_{i-1} + \beta)^2}{g^2(n_g - 1)(1 + \alpha)^2}} - 1 \right) - \beta \right] \qquad (7)$$

where

$$\alpha = \frac{1 - n_r^2}{3n_r(n_r + n_d)} \quad \text{and} \qquad (8)$$

$$\beta = \frac{2\sigma_r^2}{gn_r(\alpha + 1)}. \qquad (9)$$

The charge estimate's quality factor QF in ADU for the same readout ramp is computed as

$$\text{QF} = \frac{2}{(1 + \alpha)(n_g - 2)} \left[ (n_g - 1)K - (G_{n_g} - G_1) \right] \qquad (10)$$

with

$$K = \sqrt{\frac{\sum_{i=2}^{n_g} (G_i - G_{i-1} + \beta)^2}{n_g - 1}} - \beta. \qquad (11)$$

This quality factor QF has approximately a $\chi^2$ distribution with $(n_g - 2)$ degrees of freedom; that is, 2 and 13 degrees of freedom for NISP-P and NISP-S, respectively. The QF is later used to mask pixels that do not follow a linear accumulation of counts, such as those affected by cosmic rays.

### 5.2.2. NISP-P simulator

The NISP-P channel is simulated with *Imagem*, which reproduces NIR imaging in the three broadbands of the instrument: $Y_E$, $J_E$, and $H_E$. Being the primary source of information for the photometric redshifts in the infrared bands, it is important to accurately simulate the flux of the sources and any possible instrumental effects that could bias the photometric intensity and colour measurements. Below, we highlight the main features included in the NISP-P simulator.

**Sources.** In addition to the common sources, the NISP-P simulator adds the specific standard stars with a particularly smooth spectrum, ideal for photometric calibrations where synthetic photometry can be estimated accurately. We used the spectrum of Vega and a white dwarf, scaled to AB magnitude 17.5 in the $Y_E$ band, which delivers a good signal-to-noise below the range of the saturation limit or the non-linear regime of the detectors, respectively.

**Background.** In addition to the common backgrounds detailed above, we include localised in-field straylight in the form of faint circular symmetric halos with detailed shapes dependent on the source SEDs.
<figure><img src="image_16.png" /><figcaption>**Fig. 15.** Simulated NISP-P exposure in the $H_E$ band. The left image shows the entire 4 × 4 mosaic of infrared detectors and the right image contains a zoomed in fraction where the most relevant elements of the simulation can be seen.</figcaption></figure>

**Point spread function.** We use a chromatic PSF with three wavelength-dependent PSFs for each of the three photometric filters that are integrated with the incident spectra of each TU source and a wavelength-dependent quantum efficiency. NISP-P PSF pixels are sampled at one-sixth of the size of detector pixels in both dimensions. This is to allow us to emulate differences in the projected PSF depending on whether a source is centred; for example, on a pixel centre, edge or corner. First, we convolve sources with the optical PSF on these sub-pixel scales. After the resulting high resolution stamps are projected onto detector pixels, we apply an additional convolution with a 3 × 3 matrix on the detector pixels to simulate the effect of inter-pixel capacitance (IPC).

**Optics.** Along with the common optical effects like filter and PLM transmission, FPA metrology, and geometric distortions, we also implement the effect of filter wheel tilt variations; in other words, the inaccuracy of the filter wheel to be positioned always at the same exact position, resulting in small angular deviations with a RMS error of 6'. These additional tilts impact the final distortions which are partly affected by the optical power of the filter element.

**Detector.** For each pixel in a source, electron fluxes are integrated using measured quantum efficiencies for 40 wavelengths from 0.6 to 2.55 µm for every detector pixel, the source SED and the PSF chromaticity. We simulate each source three times for every exposure to account for the three wavelength-dependent PSFs per filter. Using distinct wavelength dependencies of the quantum efficiency for each pixel can therefore lead to varying pixel sensitivities depending on the source spectrum as well as varying effective PSF shapes according to the source position on the detector. The photometric flat fields, in addition to the calibration unit LEDs spectra, also use the wavelength-dependent quantum efficiency maps.

**Electronics.** Imagem simulates the readout process as detailed above in Sect. 5.2.1, accounting for each intermediate frame in the specific MACC readout mode used of 4 groups, 16 reads and 4 drops for the three photometric bands. This provides an accurate reproduction of the image and the associated onboard flagging based on the charge estimate's quality factor QF, where flagged pixels are transmitted as an additional 1-bit image layer. The resulting image is further modified by pixel dependent non-linearity and a single gain value.

Figure 15 shows an example raw exposure in the $H_E$ band produced by Imagem. The mosaic image for the 4 × 4 detector array for the NISP instrument is displayed on the left. The right image shows in finer detail a selected area of one of the detectors.

### 5.2.3. NISP-S simulator

The NISP spectroscopic simulator is implemented in TIPS (Zoubian et al. 2014), a program built to simulate the slitless spectroscopy images from the NISP instrument. It is based on the slitless simulation package aXeSIM<fnref n="11" /> (Kümmel et al. 2009) developed by the Space Telescope Science Institute, which performs the core spectra dispersion and convolution with a chromatic PSF of ten wavelength positions, sampled at one-sixth of the native NISP resolution. As stated above, most sources and instrumental effects are shared with the NISP-P channel simulator. The performance of the spectroscopic channel is expected to be dominated by the effects that are currently implemented which we shall describe below.

**Spectral distortions.** The simulation of the slitless spectra requires a complete characterisation of the trace dispersion, with sensitivity, diffraction coefficients, and PSFs at each dispersion order (expressed as a Taylor series expansion). The dispersion order of interest is the first order, where the main spectrum can be recovered. However, an additional zeroth and second order of dispersion need to be simulated as well, as they provide reference points (for the zeroth order) and contamination in the image. While the average dispersion is 700, 13.4, and 6.7 Å pixel⁻¹ for the 0th, 1st, and 2nd orders of dispersion, respectively, the wavelength steps $\Delta\lambda$ are not constant across the field of view. Thus in the simulation of spectral distortions we included a spatially varying $\Delta\lambda$. This significantly complicates the extraction of the spectra, which needs to be calibrated precisely to enable the determination of accurate spectroscopic redshifts.

**Point spread function.** The plan initially was to use ZEMAX-issued models for each dispersion order of each grism, in a similar fashion to the NISP-P simulations. However, this was later discarded because of the challenges it could have presented at that the time for the SGS pipeline, notably at localising with fine precision the zeroth order spectra, an important

<footnote n="11">¹¹ http://axe-info.stsci.edu/axesim/</footnote>
<figure><img src="image_17.png" /><figcaption>**Fig. 16.** Simulated NISP-S exposure. The left image shows the entire 4 × 4 mosaic of infrared detectors and the right image contains a zoomed in fraction of a single detector, showing a typical slit-less spectroscopy of the NISP-S with 0th, 1st, and 2nd order dispersed spectra.</figcaption></figure>

requirement for the data-processing of spectroscopic data. This is
expected to be calibrated and validated in later processing of the
NISP-S pipeline. Instead, we used a double Gaussian PSF to fit
the ground-based characterisation data acquired from thermal-
vacuum balance tests in order to match the experimental radius
encircled energies EE50/EE80 measurements (Maciaszek et al.
2022). This provided smoother non-chromatic pixel PSFs. No
IPC was not taken into account in NISP-S simulations.

**Grism tilt.** Like the filter wheel tilt effect described for the photometric channel, the grism wheel also has a limited positioning accuracy with an error of 0.1° RMS. In this case, the positioning error translates into slightly tilted dispersed spectra with respect to their dispersion direction at nominal angle. To enable an efficient decontamination of overlapping slitless spectra without the RGS270 grism, the instrument implemented a tilt of +4° and -4° in dithers 2 and 3 (as shown in Fig. 11) in a sequence of 0°, 184°, -4°, and 180° orientation of the dispersion direction.

**Vignetting.** Turning the grating wheel by ±4° moves the nominal aperture of the grating creating vignetting on the focal plane. This effect is simulated using a basic and conservative model derived from ground calibrations assuming 10% of vignetting at +0.385 field angle, which diminishes to 0% at a field angle of +0.17. We apply vignetting only to the sources to take into account the flux loss; we neglect the effect to the background.

**Electronics.** As indicated above in Sect. 5.2.1, TIPS simulates the readout process for each intermediate frame of the MACC mode in spectroscopy with 15 groups of 16 frames separated by 11 drops. The signal slope and the quality factor of each pixel is then derived following Kubik et al. (2016), as it is implemented in the onboard payload data-processing. Non-linearity is applied afterwards on the slope by using the inverse function of the non-linearity correction model, but its impact on the quality factor is ignored. The slope, in ADU, is encoded on 16 bits and the quality factor on 8 bit.

We show in Fig. 16 an example image produced by TIPS for the NISP instrument when emulating readout for the spectroscopic channel. Like the photometric channel, we have the same 4 × 4 detector mosaic on the left. For closer inspection, a small region of a detector is shown on the right containing the characteristic features of slitless spectroscopy.

5.3. EXT ground-based survey simulator

Lastly, the ground-based simulator SIM-EXT is a generic simulation software package to produce accurate pixel data for various ground telescope and instrument systems. *Euclid* will rely on external optical photometry complementing its own infrared bands in order to obtain accurate photometric redshifts. The necessary photometry in the northern hemisphere will be provided by the Ultraviolet Near Infrared Optical Northern Survey<fnref n="12" /> (UNIONS), a joint effort between the Canada-France Imaging Survey (CFIS; Ibata et al. 2017) for the *u* and *r* bands, the Javalambre-*Euclid* Deep Imaging Survey (JEDIS) in the *g* band, the Panoramic Survey Telescope and Rapid Response System (Pan-STARRS; Chambers et al. 2016) in the *i* band, and the Wide Imaging with Subaru Hyper Suprime Camera (HSC; Miyazaki et al. 2017) of the *Euclid* Sky survey (WISHES) for the *z* band. For the southern sky, it is anticipated that the Dark Energy Survey (DES; The Dark Energy Survey Collaboration 2005) and the *Rubin* Observatory Legacy Survey of Space and Time<fnref n="13" /> will provide all *ugriz* photometry (LSST Science Collaboration 2009; Ivezić et al. 2019).

The function of SIM-EXT differs from that of the other *Euclid*
instrument simulators. Rather than producing extremely detailed
simulations for each EXT survey (a notably costly effort), its pur-
pose is to provide realistic imaging data that can flow inside the
ground segment pipeline with the same TU inputs as the other
*Euclid* channels. The output data products of SIM-EXT vary per
EXT survey in accordance with the SGS strategies designated
for each one. For example, data-processing of raw DES data
will be performed within the *Euclid* SGS whereas the detrended
and/or calibrated data products produced by the other respec-
tive experiments and synergies (e.g. UNIONS and LSST) will be
received by the *Euclid* SGS when available. Therefore, for DES
we produce outputs consisting of raw images and master cali-
bration frames. For LSST, only raw images are produced with a
choice of units: e⁻ or ADU. Moreover, the FITS format for LSST
images produced by SIM-EXT version 2.14.2 is similar to the
e-image format defined by the Dark Energy Science Collabora-
tion (DESC) image simulator *imSim* version 0.1.0¹⁴ described in

<footnote n="12">¹² https://www.skysurvey.cc</footnote>

<footnote n="13">¹³ Hereafter, we use Rubin or LSST interchangeably when referring to Rubin-specific software, hardware and data products.</footnote>

<footnote n="14">¹⁴ https://github.com/LSSTDESC/imSim/tree/0.1.0</footnote>
Sánchez et al. (2020). This output format is required for SIM-EXT LSST frames to be processed using the Rubin Observatory LSST Science Pipelines release 16.0<sup>15</sup> (LSST Dark Energy Science Collaboration 2012; Jurić et al. 2017; Bosch et al. 2018; Ivezić et al. 2019). This allows the SGS to emulate ingesting official Rubin Observatory calibrated data products for joint pixel processing with the Euclid data products. For the Northern Surveys, a software package called EXT_NS SIM_AFTERBURNER developed by the Organisation Unit for External Surveys (OU-EXT) is used in conjunction with SIM-EXT to provide level-2 processed data products consisting of detrended frames, source catalogues, and PSF models.

**Sources.** The EXT ground-survey simulator performs the generation of all TU sources such as real and model stars, Flagship, primaeval Universe galaxies, high-z, and strongly lensed sources. Using the same SimThumnails as the Euclid simulators, it renders the exact same light profiles including weak lensing distortions. As the PSF is assumed to be monochromatic, it does not require the input spectra and uses precomputed band fluxes, thus accelerating the computation of these simulations.

**Background and transmission.** As most of the EXT surveys have already started their observations, we have realistic background magnitudes and zeropoints from their respective reduced image analysis. We use the measurements taken from actual observations contained with the MDB Survey Tables as inputs to the simulation, which provide a very realistic distribution of sky brightness and atmospheric extinction. For the EXT surveys, such as Rubin, that have not started their observations, we can model realistic distributions from the available models of the sky brightness (Yoachim et al. 2016) and passbands (Kahn et al. 2010; Claver et al. 2014; Connolly et al. 2014).

**Point spread function.** The PSF is significantly simpler in most EXT simulations, and it is modelled as either a simple Gaussian or a Moffat profile. From a realistic distribution of seeing FWHM, we can replicate the average optical quality for each survey. In the case of DES, we obtained a large sample of PSF models extracted from real data analysis using PSFEx (Bertin 2011). We randomly select a model, enabling variable and complex PSF simulations across the focal plane for the ground-based photometry.

**Optics and detectors.** The design of SIM-EXT takes advantage of the common characteristics of the ground-based instruments to perform simulations of various surveys. These surveys are configurable through the MDB instrument file providing a description of the optics, detector layout and electronics. Figure 17 shows the focal plane layouts for the DES Dark Energy Camera (DECam), Rubin's LSST Camera (LSSTCam), CFIS Mega Camera (MegaCam), JEDIS (JPCam), Pan-STARRS PS1, and WISHES HSC, respectively. In detail, the camera detector layout for DECam was derived from Flaugher et al. (2015). The detector focal plane layout for the LSST camera (LSSTCam) was defined with the information provided in Ivezić et al. (2019). For simplicity, our camera model is an approximation to LSSTCam, as all 189 detectors in our focal plane are models of either LSSTCam's e2V sensor or LSSTCam's ITL sensor, not a combination of both as will be used during operations. The detector layout for MegaCam, JPCam, Pan-STARRS PS1, and

<figure><img src="image_18.png" /><figcaption>**Fig. 17.** Six ground-based EXT surveys simulated by SIM-EXT. From Top Left to Bottom Right, the detector layout for DECam (2°/2/570 Mpix), LSSTCam (3°/5/3.2 Gpix), MegaCam (1°/380 Mpix), JPCam (3°, 1.2 Gpix), Pan-STARRS PS 1 (3°/1.2 Gpix), and HSC (1°/5/870 Mpix).</figcaption></figure>

HSC were each inferred, respectively, from a set of real exposures provided courtesy of the CFIS, JEDIS, Pan-STARRS, and WISHES teams. For a majority of the surveys, we deliver a perfectly calibrated WCS by writing the true WCS in the header of the output images. For DES, we reproduced a certain degree of 'un-calibration' by writing a slightly different WCS in the output headers. The input WCS are obtained with the astrometry tool SCAMP (Bertin 2006) applied on actual data. If real data are not available, we apply a simpler estimation of the WCS (without distortions). Additionally, we use master bias and master flats from the actual observations to include realistic pixel-to-pixel variations and faithful readout patterns. With the same model, we can create individual flat field and bias calibration images that have their own noise realisation.

A sample image of the SIM-EXT simulator configured to produce a DES exposure can be seen in Fig. 18. On the left, we show the 62 detector mosaic and on the right a close-up image of one of the CCDs. In addition to the features discussed above, we have the additional detector effect of tree rings acquired from sampling from real DES flat data; these are circular patterns due to variations of the silicon dopant concentration in the CCD chip.

With all four instrument simulators presented in this section, we can produce complex and detailed simulations for a large variety of channels and configurations for the same Universe, environment, and common models. In the following section, we present our procedure for launching a large-scale production over segments of the Euclid Wide Survey using our suite of simulation codes.

# 6. SC8 simulation processing and results

In this section, we present the application of our SIM pipeline framework for SC8 and the corresponding results. We first begin with an in-depth description of our simulation production workflow as developed for SC8.

## 6.1. Simulation planning and orchestration

The previously defined elements (i.e. TU catalogues, simulators, etc.) enable the generation of mock observation sets of data to be processed and analysed. However, for the production of large datasets in a distributed and controlled manner these simulation elements need to be connected and coordinated. Here

<footnote n="15">15 https://pipelines.lsst.io/releases/v16_0.html</footnote>
<figure><img src="image_19.png" /><figcaption>**Fig. 18.** Simulated DES exposure in the *r* band. The left image shows the entire 62 detector mosaic covering a 2°2 diameter field of view. The right image shows a detailed 10' wide section of a single detector.</figcaption></figure>

we describe the additional components of our software framework which fulfill this objective: the simulation request, the *SimPlanner*, and the SIM pipeline.

The simulation request is one of the inputs of the SIM pipeline together with a mission configuration and the catalogues. One can specify some aspects of the simulations such as (i) channel: VIS, NISP-P, NISP-S, EXT-LSST, EXT-DES, (ii) image type: Science, Deep, Flat, Bias. (iii) pointings or area to simulate, and (iv) instrumental effects to be enabled/disabled.

The simulation request is handled by the *SimPlanner*, a program that constitutes the entry point of the SIM pipeline and allows us to orchestrate large sets of simulations. It parses the information in the simulation request and the survey files and configures the corresponding simulator with the appropriate parameters. The *SimPlanner* contains additional features such as the generation of particular dithering patterns, in-pointing sequence, enabling complex parameter exploration, configuration of flat field sequences, and other high-level tasks that can be done at this point.

The SIM Pipeline framework allows multilevel splitting and parallelisation of the processing, which is critical to producing large sets of simulations in a reasonable time frame. The processing of the SC8 main production, as well as the other productions in the scope of SC8 (e.g. deep field) was carried out on the *Euclid* SGS infrastructure.

## 6.2. Pilot phase

SC8 began with a small test production of simulations in preparation for the main run, called the pilot phase. This production had two primary goals: (1) ensure the validity of the simulations and subsequent data products produced during image processing by each OU in the SGS pipeline; (2) measure the amount of resources, such as number of cores, peak RAM, and maximum wall time, needed for each of the OU-SIM tasks, (3) perform the necessary optimisations to guarantee feasibility of the larger-scale SC8 main run with the available resources.

The pilot phase contained four Science Wide observations covering the so-called *Euclid* tile (Kümmel et al. 2022) (79171) with an area measuring ~0.5 deg². *Euclid* tiles are non-overlapping ecliptic latitude-longitude rectangles (approximately the size of the *Euclid* field of view) and oriented along the meridians. With no gaps between adjacent tiles, they are essentially the unit of processing for high level OUs to ensure complete coverage of the survey area when constructing the object catalogues

for WL and GC analysis. Even for an area this small, the multiple feedback iterations with the other OUs resulted in a total production of 1866 raw images for all simulation channels. In addition, all the calibration frames required to carry out image processing (such as detrending, astrometric, and photometric calibrations) for the *Euclid* instruments were also produced during this phase and later reused for the data reduction during the main run. The set of VIS calibration products consisted of a sequence of 60 bias images and 60 short-exposure flat-fields using the VIS calibration unit (VIS-CU). Since the shutter will remain open during flat acquisition, there will be objects entering into the field of view of the telescope, and we have simulated the most luminous objects yielding a flux above the photon noise.

For the NISP instrument, we produced a sequence of 600 dark frames and 750 flat-field images with the respective LED intensities and exposure times for the photometric and spectroscopic channels. We also simulated observations of spectrophotometric standard stars and planetary nebulae to enable the performance of NISP photometric and spectroscopic wavelength calibrations. Finally, we also delivered a self-calibration sequence over a dense stellar field consisting of multiple dithered overlapping images that were to be used to improve the flat-fielding and the astrometric calibration.

In Table C.2, we list the number of files and the total size for each image data product produced during the pilot phase. We show in Fig. 19 raw science images produced by the simulators for the VIS, NISP-P ($Y_E$ band), NIS (RGS0), and three EXT ground surveys in the *z* band: WISHES (HSC), DES, and LSST over the same area of sky in *Euclid* tile 79171 for one of the four *Euclid* observations (Observation ID 18539). The simulated *Euclid* images show considerably more prominent features (e.g. ghosts, diffraction spikes, and CTI) in comparison to the simplified images produced by the simulator for the EXT ground-based surveys which are known or expected to experience similar effects.

## 6.3. Main run

The original plan of the SC8 main run was to conduct a full end-to-end test of the SGS pipeline using a large and complex simulation of 1286 observations from the Euclid Wide Survey, covering a contiguous area of ~600 deg² with different sky conditions. All known instrumental effects were to be included in the pixel data to enable performance and quality assessments
<figure><img src="image_20.png" /><figcaption>**Fig. 19.** Simulated raw single visit images for each *Euclid* imager: VIS, NISP-P (*Y*<sub>E</sub>band), NISP-S (NIS-RGS0) with the raw outputs from three of the ground-based survey instruments in the *z* band: WISHES (HSC-*z*), DES (DES-*z*), and *Rubin* (LSST-*z*) over the same area of sky in *Euclid* tile 79171 (Observation ID 18539) of the pilot phase. The slight misalignment of the DES-*z* image corresponds to the additional pointing error effect included only in the raw DES image simulation, due to a more realistic reference set of actual observations.</figcaption></figure>

of the level-2 calibration pipelines. Furthermore, the large area would enable the first integration test of the final processing elements of the *Euclid* SGS pipeline (i.e. the level-3 cosmological measurements) with enough area to measure the baryon acoustic peak in the galaxy two-point correlation function.

However, as explained in the previous section, the results of the pilot phase indicated that this would present a major challenge as producing and processing large catalogues and realistic images carries a high computational cost. The SC8 main run could not have been achieved in a reasonable time frame with the resources available for the challenge. Therefore we have reverted to simulate a subset of 331 observations grouped in 11 non-contiguous patches preserving the variety of conditions: mostly stellar density and zodiacal light as shown in Fig. C.1. The final simulated area measuring ~165 deg² was still sufficient to perform the integration test of the processing elements of both the WL and GC experiments, the topmost priority.

Figure 20 shows the 11 patches and the position of each *Euclid* observation contained within each of them. The colour of each patch represents the SDC tasked with processing the set of SC8 observations. The assignment of a region to a SDC was according to their expected contribution and the resources available. Moreover, the strategy of having non-contiguous patches processed at the different SDCs was implemented to avoid data transfers between processing centres. Each patch is composed of a set of *Euclid* tiles. There are 1039 *Euclid* tiles overlapping with the SC8 observations.

Over the selected *Euclid* targets in the sky, we simulated all three *Euclid* channels: VIS, NISP-P, and NISP-S, respectively. The main run also included simulations of the EXT ground-based surveys in the northern and southern hemispheres. The target area was partitioned into three non-overlapping patches. All Northern Surveys - CFIS, JEDIS, Pan-STARRS PS1, and WISHES - covered the same region above 30° in declination. We partitioned the lower rectangular region along the diagonal

into two sections: *Rubin* observations spanned the area above the diagonal and DES covered the opposing field below it. We refer the reader to Appendix C.4, which describes with more detail the selections of the pointings for each EXT survey and provides figures illustrating the EXT survey footprints in each band.

In Table 1, we report the number of data products and the amount of storage required per survey channel participating in the SC8 main run. We produced a total of 342 368 data products amounting to 31.7 TB for the 165 deg² Euclid Wide Survey.

Notably, even with shallower data than the actual *Rubin* experiment, the unprecedented enormity of the three billion pixel *Rubin* camera with its 3°.5 (9.6 deg²) field of view, combined with imaging capability in five optical bands,<fnref n="16" /> yielded the largest dataset. These results provide insight on the volume of actual EXT ground-based data that has to be processed for the *Euclid* mission. EXT data may require as much storage and computing time (or more) as the *Euclid* data themselves, especially if performing pixel-level processing of purely raw data products. Finally, the total wall time to produce the entire main SC8 dataset was 16 730 days. The VIS simulations, which remained full-featured, dominated the processing time with 5200 days followed by NISP-S at 4700 days.

## 6.4. Deep run

For the SC8 Euclid deep survey, we simulated a small area measuring ~1 deg² of the *Euclid* deep field around the north ecliptic pole. Figure 21 shows the SC8 deep field footprint and the number of layers to reach the desired depth. We produced sets of full-featured simulations for VIS, NISP-P, and NISP-S with ten times more exposures totalling 840 amounting to ~1.4 TB (as

<footnote n="16">¹⁶ We do not simulate the sixth *Rubin* broadband filter: *Y*, ranging from 948 nm to 1060 nm.</footnote>
<figure><img src="image_21.png" /><figcaption>**Fig. 20.** Distribution of the processing for the SC8 main production among the SDCs. The labels in the image indicate the patch identifier and the corresponding SDC responsible of processing the entire patch containing all *Euclid* pointings and the overlapping EXT surveys. The black dots denote each of the 331 observations of the Euclid Wide Survey and the squares represent the 1036 Euclid processing tiles.</figcaption></figure>

reported in Table 2) and reaching a flux limit 2 mag fainter than the nominal wide field. For NISP-S, we also ran simulations of the blue grism (BGS00) in addition to the three other spectroscopic channels. We did not produce simulations of any northern EXT ground-based surveys for which no current strategies have been defined at these fainter magnitude depths. Nevertheless, the SC8 deep field run was designed to be used for testing by the level-2 SGS processing chains, which perform image and spectra calibration, photometry, and coaddition for VIS and NISP, as well as PSF modelling and the generation of optical distortion maps.

## 6.5. Outcomes of SC8

Here, we provide a brief summary of the SGS end-to-end performance in SC8 as a more in-depth discussion goes beyond the scope of this work. Our total production of simulations for the SC8 main and deep surveys yielded 33 TB of data. The entire SC8 dataset was transferred to the EAS and queried by the level-2 OUs to initiate the data reduction pipelines, signaling the start of the end-to-end integration test.

Data-processing by the full SGS pipeline proceeded gradually with data quality inspection by the respective OUs and

<figure><img src="image_22.png" /><figcaption>**Fig. 21.** Footprint of the SC8 deep field, including 30 observations (denoted by the red circles), i.e. 120 images, near the ecliptic north pole.</figcaption></figure>

<table><caption>**Table 1.** Data products in main SC8 simulation.</caption><thead><tr><th>SC8 main channel</th><th>Number of products</th><th>Storage (TB)</th><th>Processing time (days)</th></tr></thead><tbody><tr><td>VIS</td><td>1324</td><td>8.7</td><td>5200</td></tr><tr><td>NISP-P</td><td>3948</td><td>1.5</td><td>1500</td></tr><tr><td>NISP-S</td><td>1324</td><td>5.1</td><td>4700</td></tr><tr><td>DES</td><td>2370</td><td>2.4</td><td>600</td></tr><tr><td>LSST</td><td>154 980</td><td>9.2</td><td>3700</td></tr><tr><td>CFIS</td><td>55 440</td><td>0.7</td><td>150</td></tr><tr><td>JEDIS</td><td>12 096</td><td>1.7</td><td>210</td></tr><tr><td>Pan-STARRS</td><td>63 300</td><td>1.9</td><td>570</td></tr><tr><td>WISHES</td><td>47 586</td><td>0.5</td><td>100</td></tr><tr><td>Total</td><td>342 368</td><td>31.7</td><td>16 730</td></tr></tbody></table>

**Notes.** The datasets for VIS, NISP-P, NISP-S, and DES are stored as exposures, whereas for LSST, CFIS, JEDIS, Pan-STARRS, and WISHES each individual data file corresponds to a detector frame. The processing time corresponds to the sum of all single-thread sub-jobs wall time, as indicated in table C.3

<table><caption>**Table 2.** Data products in SC8 deep field simulation.</caption><thead><tr><th>SC8 deep channel</th><th>Number of products</th><th>Storage (GB)</th></tr></thead><tbody><tr><td>VIS</td><td>120</td><td>809</td></tr><tr><td>NISP-P</td><td>360</td><td>140</td></tr><tr><td>NISP-S</td><td>120</td><td>469</td></tr><tr><td>Total</td><td>840</td><td>1418</td></tr></tbody></table>

updates to various software packages. Nearly all level-3 processing elements<fnref n="17" /> were successfully integrated. The full integration test also served as an aid to identify and resolve performance

<footnote n="17">¹⁷ The codes to compute the photometric visibility mask and the covariance matrices for the galaxy two-point correlation and power spectrum (high priority processing functions) were not fully integrated.</footnote>
<figure><img src="image_23.png" /><figcaption>**Fig. 22.** VIS and NIR imaging of a region in the SC8 deep field (Euclid tile 306182, Observation ID 1914) resulting from the different stages of the SGS processing flow. The two panels on the left show the simulated raw science frames for the VIS $I_E$ band (top-left), and NISP-P $Y_E$ band (bottom-left). The right panels show the background-subtracted mosaic images (see text for details) of the same field for the VIS $I_E$ band (top-right) and NISP-P $Y_E$ band (bottom-right), produced, respectively, during level-2 data-processing by the Organization Unit for Merging (OU-MER) pipeline.</figcaption></figure>

issues concerning infrastructure, bugs, and bottlenecks in software. It also provided an impetus to further improve communications between interfacing OUs in order to maximise SGS capabilities as we approach operational readiness.

We conclude this section by highlighting the work enabled by the SC8 simulations such as the testing of detection algorithms for strong lenses, galaxies high-z quasars and galaxy emission-lines with *Euclid*. As detailed in Appendix C, along with the standard galaxy and standard stars, the object catalogues also contained a variety of additional sources such as QSOs, high-z galaxies, strong lenses, and LT stars (brown dwarfs). From the sample of 801 strong lenses, 285 sources were inserted into 216 *Euclid* tiles covering the SC8 main field. The strong lensing sample The catalogues containing these sources were provided as inputs to the various simulator codes for the VIS, NISP-P, and EXT instruments (i.e. ELViS, Imagem, TiPS, and SIM-EXT), which introduced instrumental and environmental effects in each band to produce raw images that were then processed by the SGS pipelines. In detail, VIS and the NISP-P calibrated frames were produced by the respective OU level-2 pipelines for VIS and NIR image reduction.

The VIS and NIR data products along with their corresponding flag maps (e.g. cosmics) then proceeded through the SGS data-processing chain as inputs to the OU-MER level-2 pipeline, where they were stacked. The MER pipeline then performed the background removal and used the flags to produce fully detrended and background subtracted MER mosaics.

Figure 22 presents an example of raw (level-1) and processed (level-2) data products on a zoom-in of *Euclid* tile 306182 in the SC8 deep field. On the left, we show the raw simulated science exposures for VIS (top-left) and NISP-P (bottom-left; for $Y_E$ band only) with the characteristic features of these two instruments (described in Sects. 5.1 and 5.2.2, respectively). The two right-most panels show the corresponding calibrated, stacked, and background subtracted mosaic images produced by OU-MER after processing the data products generated by OU-VIS and OU-NIR, respectively.

These MER mosaic images and the source catalogues generated from them were used, respectively, by the Strong Lensing

and Primaeval Universe Science Working Groups to perform tests of their corresponding detection algorithms in development.

Figure 23 shows a zoom-in cut-out of the strong lens 200026 in the VIS and NIR deep simulations. The Einstein ring can be seen with fine detail by the VIS instrument, whereas it is indiscernible in the *Euclid* NIR bands. Another of the Strong Lensing Science Working Group detections was a strong lens system (200094) in the SC8 main run (Euclid tile 74088) in both MER processed *Euclid* and *Rubin* mosaic data. Cutout images of the system are shown in Fig. 24; from left-to-right, we show a set of images of the Einstein ring as seen in the VIS $I_E$ band, combined Rubin $g+r+i$ bands, and combined VIS and NISP-P ($I_E+Y_E+H_E$) bands. These images demonstrate the resolving power of both *Euclid* and LSST, two forthcoming contemporary and pivotal science programs. They also, however, exemplify the exceptional image quality anticipated with the VIS camera alone with its superb capability to deblend compact systems.

In Fig. 25, we show an example of a successfully calibrated, decontaminated, stacked, and modelled galaxy emission-line spectra produced from the raw pixel data of the NISP-S grism simulations in SC8 processed by the Organisation Unit for Near Infrared Slitless Spectroscopy (OU-SIR) and Organisation for Spectral Measurement (OU-SPE), respectively. The results in the figure show a clearly identifying the redshifted $H\alpha$ emission line by the OU-SPE spectroscopic emission line detection algorithm. The identified emission-lines were then used by OU-SPE to estimate spectroscopic redshifts.

## 7. Future perspective

Following SC8, new features and improvements have been added to our simulation framework. For example, to produce more realistic profiles, we implement deep generative models, a machine learning framework presented in Euclid Collaboration (2022a) that can generate complex galaxy stamps learned from a training set of real *Hubble* Space Telescope observations. These galaxy thumbnails include spiral arms and other features that cannot be represented with analytical profiles as the ones we currently use. The advantage of this approach is that it can draw
<figure><img src="image_24.png" /><figcaption>Fig. 23. Simulated strong lens in the SC8 deep field (Euclid tile 306182). Strong Lens 200026 was identified in the VIS $I_E$ band, NISP-P $Y_E$, $J_E$, and $H_E$ bands by the strong lens detection algorithm developed by the Strong Lensing Science Working Group using the MER background-subtracted mosaic data.</figcaption></figure>

<figure><img src="image_25.png" /><figcaption>Fig. 24. Imaging of a simulated strong lens in the VIS $I_E$ band, Rubin ($g+r+i$) bands and combined VIS and NISP-P ($I_E+Y_E+H_E$) bands of the SC8 main run. Strong Lens 200094 was identified in Euclid tile 74088 by the detection algorithms of the Strong Lensing Science Working Group.</figcaption></figure>

complex stamps just from parameterised information such as the one available in the TU galaxy catalogue without complex morphological models in the Flagship galaxy mock. These realistic stamps will enable the development of other complex algorithms to measure shear and to deblend larger objects. The colour gradient and its impact on shear measurements have already been studied (Welikala & Kneib 2012) and an implementation in the SIM pipeline is currently in progress.

For the NISP simulators, we introduced an additional background component caused by persistence: trapped charges from one exposure are released on later image acquisitions. In early ground-based calibrations, a persistence signal was detected more than two hours after the initial exposure for bright sources. Among other dependencies, the charge reached during an exposure, exposure time and history of successive illuminations all affect the release of charges trapped in a pixel. A preliminary model only takes into account the single preceding exposure. For the persistence signal $I_{persistence}$ that is added to the current signal, we use the following model:

$$I_{persistence} = (p_0 + 10^{-5} p_1 I_{-1})(1 - e^{-I_{-1}/p_2}), \quad (12)$$

where $I_{-1}$ is the previous image and $p_i$ are a set of measured persistence parameters. Distinct $p_i$ values are used for each pixel, previous exposure time and the elapsed time between exposures in the survey. Additionally, we have released within the Euclid Consortium newer versions of SIM-EXT (2.17+), which feature

spatially varying PSFs for CFIS and WISHES. These are produced using PSFEx models for CFIS $u$ and $r$ bands and WISHES z-band data provided to us courtesy of the CFIS and WISHES teams. Our Rubin simulations now include nominal rotation of the camera per pointing acquired from the OpSim v2.0¹⁸ survey simulations (Jones et al. 2020). Furthermore, these simulations currently implement the FITS format (described in Lim 2019) as well as the camera layout and WCS description of DESC imSim version 0.6.2¹⁹ (Abolfathi et al. 2021). The file formatting and WCS changes fulfill the requisites of the latest generation LSST Science Pipelines software to perform processing of LSST simulations. Finally, SIM-EXT 2.17+ now provides simulated data products in the $g$ band for the Waterloo-Hawaii-IfA G-band Survey (WHIGS) using the Subaru telescope.

The complete set of calibration exposures for the Euclid instrument will encompass a large variety of image types. In addition to the standard calibration exposures: bias, dark, flats, we also produce calibration unit exposures, out-of-focus exposures for phase diversity, different readout modes for NISP, injection line frames, trap pumping for VIS CTI calibration, NISP persistence model validation, bleeding and blooming calibration exposures. For the PLM/instrument calibration exposures, we produce straylight checks and dense stellar fields. Finally,

<footnote n="18">¹⁸ https://epyc.astro.washington.edu/~lynnej/opsim_downloads/fbs_2.0/</footnote>

<footnote n="19">¹⁹ https://github.com/LSSTDESC/imSim/tree/v0.6.2</footnote>
<figure><img src="image_26.png" /><figcaption>**Fig. 25.** Stacked and processed spectra from simulated SC8 NISP-S images. The colours in the plot are identified as the following: blue line corresponds to the measured spectrum, brown line corresponds to continuum, orange line corresponds to model and green line corresponds to estimated noise. This galaxy was successfully identified at z = 1.29.</figcaption></figure>

for precise astrometric calibration, we generate white dwarf and planetary nebulae observations.

Upon completion of PVPR, the *Euclid* Ground Segment will commence its third SPV (SPV3) phase. The focus of this campaign will be on assessing the scientific performance of the *Euclid* mission. In detail, we plan to produce nominal science exposures for the wide and deep areas spanning a few tens of degrees to yield mock WL and GC measurements (e.g. $C_ℓ$ and power spectrum multipoles) to enable testing of the Euclid Consortium Science Working Groups analysis pipelines.

## 8. Summary and outlook

OU-SIM is responsible for providing detailed simulations to facilitate the development of the SGS data-processing pipeline as well as end-to-end performance tests. In this work, we have introduced our simulation framework for providing a full pixel simulation pipeline for the entire *Euclid* mission and presented its application to SC8, the eighth testing campaign of the *Euclid* Ground Segment and its first end-to-end test. The SC8 dataset was generated from galaxy mocks built from the Flagship v1.0 simulation, the largest cosmological N-body simulation at the time it was developed. Additional sources were added to complement this massive simulation, such as high-redshift QSOs and strongly lensed galaxies. Our stellar catalogue was constructed from a combination of a very large and deep Besançon model

and real all-sky stellar catalogues. From these catalogues, we produced and delivered simulated images for a simplified Euclid Wide Survey of 165 deg² and a full-featured 1 deg² Euclid Deep Survey.

The framework we adopted for SC8 follows a highly modular design from the onset, consisting of individual components for the TU catalogue inputs, pixel-level simulators for space- and ground-based instruments, a set of common tools for generating spectra and galaxy shapes, and a software API for orchestrating large sets of simulations at any of the international *Euclid* SGS data centres. Furthermore, all instrument models and reference surveys used in SC8 as well as all past or future challenges and production cycles are stored in the MDB repository. We also devised a validation program consisting of suites of tests for our simulation pipeline to ensure the accuracy of the released data products as well as adherence to scientific and technical requirements.

We shall continue to upgrade our simulation framework to enable large-scale testing and improvements to the ground segment pipeline. We plan to provide data products to aid the validation of very complex algorithms (e.g. VIS PSF estimation) and to use in conducting mission performance evaluations throughout this active development phase. Our longer-term goals during *Euclid* operations are to produce simulations to calibrate all possible systematics in the data (e.g. shear measurement biases and selection biases) and to interpret discrepancies or surprises found in the in-flight data.
Acknowledgements. We thank the OU-VIS, -NIR, -SIR, -EXT, and -MER teams for their assistance with validation and providing valuable feedback on the simulations. We are grateful to the System Team for the technical help and continuous support. We thank the Cosmological Simulations Working Group and the Flagship team for the outstanding galaxy mocks and support on their integration into OU-SIM. We thank both VIS and NISP instrument teams for providing instrument models and detailed explanations. We thank OU-SHE for their support with generating the VIS PSF dataset. We would like to thank Benjamin Clément from the Strong Lensing Science Working Group, who produced the images of the strong lenses detected in the SC8 main and deep fields which were presented in Figures 23 and 24. We thank Vincent Le Brun from the Organisation Unit for Spectral Measurement (OU-SPE) for producing Figure 25. We also express our gratitude to Dominique Boutigny, Jim Chiang, and Phillippe Gris of the Dark Energy Science Collaboration as well as Jim Bosch, Tim Jenness, Lynne Jones, Kian-Tat Lim, and the other members from Rubin Observatory Data Management and Survey Strategy teams for providing support, useful insight and sample datasets to aid us with upgrading the SGS Rubin simulations and ensuring compliance with the LSST Science Pipelines. We would also like to thank Jesus Varela and JEDIS, WISHES, Pan-STARRS and WHIGS teams for assisting us with information, data and the models needed to produce the respective image simulations for the Northern Surveys. We acknowledge all Science Data Centres (SDC-CH: University of Geneva, SDC-DE: Max Planck Computing and Data Facility, SDC-ES: Port d'Informació Científica, SDC-FI: CSC - IT Center for Science, SDC-FR: Centre de calcul de l'IN2P3, SDC-IT: INAF Astronomical Observatory of Trieste/ALTEC S.p.A. in Turin, SDC-NL: University of Groningen, SDC-UK: Institute for Astronomy, University of Edinburgh, and SDC-US: Caltech/IPAC) that contributed to the production of simulations for SC8. A portion of this work also used the resources available at CosmoHub. CosmoHub has been developed by the Port d'Informació Científica, maintained through a collaboration of the Institut de Física d'Altes Energies and the Centro de Investigaciones Energéticas, Medioambientales y Tecnológicas and the Institute of Space Sciences, and was partially funded by the “Plan Estatal de Investigación Científica y Técnica y de Innovación” program of the Spanish government. The author acknowledges support from the Spanish Research Project PID2021-123012NA-C44 [MICINNFEDER]. This work has been financed by MCINN/AEI and the EU NextGeneration/PRTR project EQC2021-007479-P. This study was supported by MICIIN with funding from European Union NextGenerationEU(PRTR-C17.11) and by Generalitat de Catalunya. The authors acknowledge the Euclid Collaboration, the European Space Agency, and a number of agencies and institutes that have supported the development of Euclid, in particular the Academy of Finland, the Agenzia Spaziale Italiana, the Belgian Science Policy, the Canadian Euclid Consortium, the French Centre National d'Etudes Spatiales, the Deutsches Zentrum für Luft- und Raumfahrt, the Danish Space Research Institute, the Fundação para a Ciência e a Tecnologia, the Ministerio de Ciencia e Innovación, the National Aeronautics and Space Administration, the National Astronomical Observatory of Japan, the Netherlands Onderzoeksschool Voor Astronomie, the Norwegian Space Agency, the Romanian Space Agency, the State Secretariat for Education, Research and Innovation (SERI) at the Swiss Space Office (SSO), and the United Kingdom Space Agency. A complete and detailed list is available on the Euclid web site (http://www.euclid-ec.org).

## References

Abbott, T. M. C., Abdalla, F. B., Allam, S., et al. 2018, ApJS, 239, 18

Abolfathi, B., Alonso, D., Armstrong, R., et al. 2021, Ap&SS, 253, 31

Barbier, R., Buton, C., Clemens, J.-C., et al. 2018, in High Energy, Optical, and Infrared Detectors for Astronomy VIII, 10709, eds. A. D. Holland, & J. Beletic, International Society for Optics and Photonics (SPIE), 107090S

Behroozi, P. S., Wechsler, R. H., & Wu, H.-Y. 2013, ApJ, 762, 109

Bertin, E. 2006, in Astronomical Society of the Pacific Conference Series, 351, Astronomical Data Analysis Software and Systems XV, eds. C. Gabriel, C. Arviset, D. Ponz, & S. Enrique, 112

Bertin, E. 2011, in Astronomical Data Analysis Software and Systems XX, eds. I. N. Evans, A. Accomazzi, D. J. Mink, & A. H. Rot, Astronomical Society of the Pacific Conference Series, 442, 435

Bizyaev, D. 2007, in American Astronomical Society Meeting Abstracts, 211, 13.23

Bosch, J., Armstrong, R., Bickerton, S., et al. 2018, PASJ, 70, S5

Bruzual, G., & Charlot, S. 2003, MNRAS, 344, 1000

Calzetti, D., Armus, L., Bohlin, R. C., et al. 2000, ApJ, 533, 682

Cardamone, C. N., van Dokkum, P. G., Urry, C. M., et al. 2010, ApJS, 189, 270

Carretero, J., Castander, F. J., Gaztañaga, E., Crocce, M., & Fosalba, P. 2015, MNRAS, 447, 646

Carretero, J., Tallada, P., Casals, J., et al. 2017, in Proceedings of the European Physical Society Conference on High Energy Physics, 5–12 July, 488

Chambers, K. C., Magnier, E. A., Metcalfe, N., et al. 2016, arXiv e-prints [arXiv:1612.05560]

Claver, C. F., Selvy, B. M., Angeli, G., et al. 2014, SPIE Conf. Ser., 9150, 91500M

Collett, T. E. 2015, ApJ, 811, 20

Connolly, A. J., Angeli, G. Z., Chandrasekharan, S., et al. 2014, SPIE Conf. Ser., 9150, 915014

Cropper, M., Pottinger, S., Niemi, S. M., et al. 2014, SPIE Conf. Ser., 9143, 91430J

Delgado, F., & Reuter, M. A. 2016, in Observatory Operations: Strategies, Processes, and Systems VI, 9910, eds. A. B. Peck, R. L. Seaman, & C. R. Benn, International Society for Optics and Photonics (SPIE), 991013

Dimauro, P., Huertas-Company, M., Daddi, E., et al. 2018, MNRAS, 478, 5410

Drimmel, R., Cabrera-Lavers, A., & López-Corredoira, M. 2003, A&A, 409, 205

Euclid Collaboration (Barnett, R., et al.) 2019a, A&A, 631, A85

Euclid Collaboration (Martinet, N., et al.) 2019b, A&A, 627, A59

Euclid Collaboration (Blanchard, A., et al.) 2020, A&A, 642, A191

Euclid Collaboration (Bretonnière, H., et al.) 2022a, A&A, 657, A90

Euclid Collaboration (Scaramella, R., et al.) 2022b, A&A, 662, A112

Euclid Collaboration (Schirmer, M., et al.) 2022c, A&A, 662, A92

Faber, S. M., & Jackson, R. E. 1976, ApJ, 204, 668

Flaugher, B., Diehl, H. T., Honscheid, K., et al. 2015, AJ, 150, 150

Fosalba, P., Gaztañaga, E., Castander, F. J., & Crocce, M. 2015, MNRAS, 447, 1319

Frailis, M., Belikov, A., Benson, K., et al. 2019, in Astronomical Data Analysis Software and Systems XXVI, eds. M. Molinaro, K. Shortridge, & F. Pasian, Astronomical Society of the Pacific Conference Series, 521, 612

Gaia Collaboration (Brown, A. G. A., et al.) 2018, A&A, 616, A1

Gaia Collaboration (Montegriffo, P., et al.) 2023, A&A, 674, A33

Gaspar Venancio, L. M., Laureijs, R., Lorenzo, J., et al. 2014, SPIE Conf. Ser., 9143, 91430I

Grogin, N. A., Kocevski, D. D., Faber, S. M., et al. 2011, ApJS, 197, 35

Hoekstra, H., Viola, M., & Herbonnet, R. 2017, MNRAS, 468, 3295

Hog, E., Fabricius, C., Makarov, V. V., et al. 2000, A&A, 355, A27

Ibata, R. A., McConnellie, A., Cuillandre, J.-C., et al. 2017, ApJ, 848, 128

Ilbert, O., Capak, P., Salvato, M., et al. 2009, ApJ, 690, 1236

Ivezić, Ž., Kahn, S. M., Tyson, J. A., et al. 2019, ApJ, 873, 111

Jones, R. L., Yoachim, P., Ivezic, Z., Neilsen, E. H., & Ribeiro, T. 2020, Survey Strategy and Cadence Choices for the Vera C. Rubin Observatory Legacy Survey of Space and Time (LSST)

Jurić, M., Kantor, J., Lim, K. T., et al. 2017, in Astronomical Data Analysis Software and Systems XXV, eds. N. P. F. Lorente, K. Shortridge, & R. Wayth, Astronomical Society of the Pacific Conference Series, 512, 279

Kahn, S. M., Kurita, N., Gilmore, K., et al. 2010, in Ground-based and Airborne Instrumentation for Astronomy III, 7735, eds. I. S. McLean, S. K. Ramsay, & H. Takami, International Society for Optics and Photonics (SPIE), 77350J

Kennicutt, Robert C., J. 1998, ARA&A, 36, 189

Koekemoer, A. M., Faber, S. M., Ferguson, H. C., et al. 2011, ApJS, 197, 36

Kubik, B., Barbier, R., Chabanat, E., et al. 2016, PASP, 128, 104504

Kümmel, M., Walsh, J. R., Pirzkal, N., Kuntschner, H., & Pasquali, A. 2009, PASP, 121, 59

Kümmel, M., Vassallo, T., Dabin, C., & Gracia Carpio, J. 2022, in Astronomical Society of the Pacific Conference Series, 532, eds. J. E. Ruiz, F. Pierfedereci, & P. Teuben, 329

Laigle, C., McCracken, H. J., Ilbert, O., et al. 2016, ApJS, 224, 24

Lastennet, E., Lejeune, T., Oblak, E., Westera, P., & Buser, R. 2002, Ap&SS, 280, 83

Laureijs, R., Amiaux, J., Arduini, S., et al. 2011, arXiv e-prints [arXiv:1110.3193]

Lim, K.-T. 2019, Large Synoptic Survey Telescope (LSST) Header Service Interface between the COS and EFD

LSST Science Collaboration, Abell, P. A., Allison, J., et al. 2009, arXiv, 0912.0201

LSST Dark Energy Science Collaboration 2012, arXiv eprints [arXiv:1211.0310]

Maciaszek, T., Ealet, A., Gillard, W., et al. 2022, SPIE Conf. Ser., 12180, 121801K

Maciaszek, T., Ealet, A., Jahnke, K., et al. 2016, in Space Telescopes and Instrumentation 2016: Optical, Infrared, and Millimeter Wave, 9904, eds. H. A. MacEwen, G. G. Fazio, M. Lystrup, et al., International Society for Optics and Photonics (SPIE), 99040T

Marković, K., Percival, W. J., Scodeggio, M., et al. 2017, MNRAS, 461, 3677

Massey, R., Schrabback, T., Cordes, O., et al. 2014, MNRAS, 439, 887

Metcalf, R. B., & Petkova, M. 2014, MNRAS, 445, 1942

Metcalf, R. B., Meneghetti, M., Avestruz, C., et al. 2019, A&A, 625, A119

Miyazaki, S., Komiyama, Y., Kawanomoto, S., et al. 2017, PASJ, 70, s1

Naghib, E., Yoachim, P., Vanderbei, R. J., Connolly, A. J., & Jones, R. L. 2019, AJ, 157, 151
O'Donnell, J. E. 1994, ApJ, 422, 158

Pickles, A., & Depagne, É. 2010, PASP, 122, 1437

Planck Collaboration XI. 2014, A&A, 571, A11

Planck Collaboration XIII. 2016, A&A, 594, A13

Planck Collaboration VI. 2020, A&A, 641, A6

Polletta, M., Tajer, M., Maraschi, L., et al. 2007, ApJ, 663, 81

Potter, D., Stadel, J., & Teyssier, R. 2017, Computat. Astrophys. Cosmol., 4, 2

Pozzetti, L., Hirata, C. M., Geach, J. E., et al. 2016, A&A, 590, A3

Prevot, M. L., Lequeux, J., Maurice, E., Prevot, L., & Rocca-Volmerange, B. 1984, A&A, 132, 389

Racca, G. D., Laureijs, R., Stagnaro, L., et al. 2016, SPIE Conf. Ser., 9904, 990400

Robin, A., & Creze, M. 1986, A&A, 157, 71

Robin, A. C., Luri, X., Reylé, C., et al. 2012, A&A, 543, A100

Rolland, G., Pinheiro da Silva, L., Inguimbert, C., et al. 2007, in 2007 9th European Conference on Radiation and Its Effects on Components and Systems, 1

Rowe, B. T. P., Jarvis, M., Mandelbaum, R., et al. 2015, Astron. Comput., 10, 121

Schultheis, M., Chen, B. Q., Jiang, B. W., et al. 2014, A&A, 566, A120

Secroun, A., Serra, B., Clémens, J. C., et al. 2016, in High Energy, Optical, and Infrared Detectors for Astronomy VII, 9915, eds. A. D. Holland, & J. Beletic, International Society for Optics and Photonics (SPIE), 99151Y

Secroun, A., Barbier, R., Buton, C., et al. 2018, in High Energy, Optical, and Infrared Detectors for Astronomy VIII, 10709, eds. A. D. Holland, & J. Beletic, International Society for Optics and Photonics (SPIE), 1070921

Sánchez, J., Walter, C. W., Awan, H., et al. 2020, MNRAS, 497, 210

Tallada, P., Carretero, J., Casals, J., et al. 2020, Astron. Comput., 32, 100391

The Dark Energy Survey Collaboration 2005, arXiv eprints [astro-ph/0510346]

Tully, R. B., de Marseille, O., & Fisher, J. R. 1975, in BAAS, 7, 426

Tylka, A., Adams, J., Boberg, P., et al. 1997, IEEE Trans. Nucl. Sci., 44, 2150

van der Kruit, P. C., & Searle, L. 1982, A&A, 110, 61

Waczynski, A., Barbier, R., Cagiano, S., et al. 2016, in High Energy, Optical, and Infrared Detectors for Astronomy VII, 9915, eds. A. D. Holland, & J. Beletic, International Society for Optics and Photonics (SPIE), 991511

Welikala, N., & Kneib, J.-P. 2012, arXiv eprints [arXiv:1202.0494]

Williams, O. R., Begeman, K., Boxhoorn, D., et al. 2019, in Astronomical Data Analysis Software and Systems XXVI, eds. M. Molinaro, & K. Shortridge, & F. Pasian, Astronomical Society of the Pacific Conference Series, 521, 120

Yoachim, P., Coughlin, M., Angeli, G. Z., et al. 2016, Proc. SPIE, 9910, 99101A

Zoubian, J., Kümmel, M., Kermiche, S., et al. 2014, in Astronomical Data Analysis Software and Systems XXIII, eds. N. Manset & P. Forshay, Astronomical Society of the Pacific Conference Series, 485, 509

15 Centre National d'Etudes Spatiales - Centre spatial de Toulouse, 18 avenue Edouard Belin, 31401 Toulouse Cedex 9, France

16 Department of Physics and Helsinki Institute of Physics, Gustaf Hällströmin katu 2, 00014 University of Helsinki, Finland

17 Université Claude Bernard Lyon 1, CNRS/IN2P3, IP2I Lyon, UMR 5822, Villeurbanne, 69100, France

18 Department of Astronomy and Astrophysics, University of California, Santa Cruz, 1156 High Street, Santa Cruz, CA 95064, USA

19 Institute of Physics, Laboratory of Astrophysics, Ecole Polytechnique Fédérale de Lausanne (EPFL), Observatoire de Sauverny, 1290 Versoix, Switzerland

20 Department of Physics, Oxford University, Keble Road, Oxford OX1 3RH, UK

21 Jodrell Bank Centre for Astrophysics, Department of Physics and Astronomy, University of Manchester, Oxford Road, Manchester M13 9PL, UK

22 Universitäts-Sternwarte München, Fakultät für Physik, Ludwig-Maximilians-Universität München, Scheinerstrasse 1, 81679 München, Germany

23 Department of Physics, PO Box 64, 00014 University of Helsinki, Finland

24 Helsinki Institute of Physics, Gustaf Hällströmin katu 2, University of Helsinki, Helsinki, Finland

25 Centre de Calcul de l'IN2P3/CNRS, 21 avenue Pierre de Coubertin 69627 Villeurbanne Cedex, France

26 Max Planck Institute for Extraterrestrial Physics, Giessenbachstr. 1, 85748 Garching, Germany

27 Space physics and astronomy research unit, University of Oulu, Pentti Kaiteran katu 1, 90014 Oulu, Finland

28 INAF-Osservatorio Astronomico di Trieste, Via G. B. Tiepolo 11, 34143 Trieste, Italy

29 IFPU, Institute for Fundamental Physics of the Universe, via Beirut 2, 34151 Trieste, Italy

30 Université Paris-Saclay, CNRS, Institut d'astrophysique spatiale, 91405 Orsay, France

31 ESAC/ESA, Camino Bajo del Castillo, s/n., Urb. Villafranca del Castillo, 28692 Villanueva de la Cañada, Madrid, Spain

32 Institute of Cosmology and Gravitation, University of Portsmouth, Portsmouth PO1 3FX, UK

33 INAF-Osservatorio Astronomico di Brera, Via Brera 28, 20122 Milano, Italy

34 INAF-Osservatorio di Astrofisica e Scienza dello Spazio di Bologna, Via Piero Gobetti 93/3, 40129 Bologna, Italy

35 Mullard Space Science Laboratory, University College London, Holmbury St Mary, Dorking, Surrey RH5 6NT, UK

36 SISSA, International School for Advanced Studies, Via Bonomea 265, 34136 Trieste TS, Italy

37 INFN, Sezione di Trieste, Via Valerio 2, 34127 Trieste TS, Italy

38 Dipartimento di Fisica e Astronomia, Università di Bologna, Via Gobetti 93/2, 40129 Bologna, Italy

39 INFN-Sezione di Bologna, Viale Berti Pichat 6/2, 40127 Bologna, Italy

40 Institut de Physique Théorique, CEA, CNRS, Université Paris-Saclay 91191 Gif-sur-Yvette Cedex, France

41 INAF-Osservatorio Astrofisico di Torino, Via Osservatorio 20, 10025 Pino Torinese (TO), Italy

42 Dipartimento di Fisica, Università di Genova, Via Dodecaneso 33, 16146, Genova, Italy

43 INFN-Sezione di Genova, Via Dodecaneso 33, 16146 Genova, Italy

44 Department of Physics "E. Pancini", University Federico II, Via Cinthia 6, 80126, Napoli, Italy

45 INAF-Osservatorio Astronomico di Capodimonte, Via Moiariello 16, 80131 Napoli, Italy

46 Instituto de Astrofísica e Ciências do Espaço, Universidade do Porto, CAUP, Rua das Estrelas, 4150-762 Porto, Portugal

47 Dipartimento di Fisica, Università degli Studi di Torino, Via P. Giuria 1, 10125 Torino, Italy

48 INFN-Sezione di Torino, Via P. Giuria 1, 10125 Torino, Italy

49 INAF-IASF Milano, Via Alfonso Corti 12, 20133 Milano, Italy

<footnote n="1">1 Institut d'Estudis Espacials de Catalunya (IEEC), Edifici RDIT, Campus UPC, 08860 Castelldefels, Barcelona, Spain</footnote>

<footnote n="2">2 Institute of Space Sciences (ICE, CSIC), Campus UAB, Carrer de Can Magrans s/n, 08193 Barcelona, Spain</footnote>

<footnote n="3">3 Satlantis, University Science Park, Sede Bld 48940, Leioa-Bilbao, Spain</footnote>

<footnote n="4">4 Institut d'Astrophysique de Paris, UMR 7095, CNRS, and Sorbonne Université, 98 bis boulevard Arago, 75014 Paris, France</footnote>

<footnote n="5">5 Max-Planck-Institut für Astronomie, Königstuhl 17, 69117 Heidelberg, Germany</footnote>

<footnote n="6">6 CEA Saclay, DFR/IRFU, Service d'Astrophysique, Bat. 709, 91191 Gif-sur-Yvette, France</footnote>

<footnote n="7">7 Université Paris Cité, CNRS, Astroparticule et Cosmologie, 75013 Paris, France</footnote>

<footnote n="8">8 Aix-Marseille Université, CNRS, CNES, LAM, Marseille, France</footnote>

<footnote n="9">9 Port d'Informació Científica, Campus UAB, C. Albareda s/n, 08193 Bellaterra (Barcelona), Spain</footnote>

<footnote n="10">10 Centro de Investigaciones Energéticas, Medioambientales y Tecnológicas (CIEMAT), Avenida Complutense 40, 28040 Madrid, Spain</footnote>

<footnote n="11">11 Aix-Marseille Université, CNRS/IN2P3, CPPM, Marseille, France</footnote>

<footnote n="12">12 Institut d'Astrophysique de Paris, 98bis Boulevard Arago, 75014, Paris, France</footnote>

<footnote n="13">13 Institut de Física d'Altes Energies (IFAE), The Barcelona Institute of Science and Technology, Campus UAB, 08193 Bellaterra (Barcelona), Spain</footnote>

<footnote n="14">14 Université Paris-Saclay, Université Paris Cité, CEA, CNRS, AIM, 91191 Gif-sur-Yvette, France</footnote>
50 Institute for Theoretical Particle Physics and Cosmology (TTK), RWTH Aachen University, 52056 Aachen, Germany

51 INAF-Osservatorio Astronomico di Roma, Via Frascati 33, 00078 Monteporzio Catone, Italy

52 Dipartimento di Fisica e Astronomia "Augusto Righi" - Alma Mater Studiorum Università di Bologna, via Piero Gobetti 93/2, 40129 Bologna, Italy

53 INFN section of Naples, Via Cinthia 6, 80126, Napoli, Italy

54 Dipartimento di Fisica e Astronomia "Augusto Righi" - Alma Mater Studiorum Università di Bologna, Viale Berti Pichat 6/2, 40127 Bologna, Italy

55 Institut national de physique nucléaire et de physique des particules, 3 rue Michel-Ange, 75794 Paris Cedex 16, France

56 Instituto de Astrofísica de Canarias, Calle Vía Láctea s/n, 38204, San Cristóbal de La Laguna, Tenerife, Spain

57 Institute for Astronomy, University of Edinburgh, Royal Observatory, Blackford Hill, Edinburgh EH9 3HJ, UK

58 European Space Agency/ESRIN, Largo Galileo Galilei 1, 00044 Frascati, Roma, Italy

59 UCB Lyon 1, CNRS/IN2P3, IUF, IP2I Lyon, 4 rue Enrico Fermi, 69622 Villeurbanne, France

60 Institut de Ciencies de l'Espai (IEEC-CSIC), Campus UAB, Carrer de Can Magrans, s/n Cerdanyola del Vallés, 08193 Barcelona, Spain

61 Departamento de Física, Faculdade de Ciências, Universidade de Lisboa, Edifício C8, Campo Grande, 1749-016 Lisboa, Portugal

62 Instituto de Astrofísica e Ciências do Espaço, Faculdade de Ciências, Universidade de Lisboa, Campo Grande, 1749-016 Lisboa, Portugal

63 Department of Astronomy, University of Geneva, ch. d'Ecogia 16, 1290 Versoix, Switzerland

64 INAF-Istituto di Astrofisica e Planetologia Spaziali, via del Fosso del Cavaliere, 100, 00100 Roma, Italy

65 INFN-Padova, Via Marzolo 8, 35131 Padova, Italy

66 INAF-Osservatorio Astronomico di Padova, Via dell'Osservatorio 5, 35122 Padova, Italy

67 Dipartimento di Fisica "Aldo Pontremoli", Università degli Studi di Milano, Via Celoria 16, 20133 Milano, Italy

68 INFN-Sezione di Milano, Via Celoria 16, 20133 Milano, Italy

69 Institute of Theoretical Astrophysics, University of Oslo, PO Box 1029 Blindern, 0315 Oslo, Norway

70 Leiden Observatory, Leiden University, Einsteinweg 55, 2333 CC Leiden, The Netherlands

71 Jet Propulsion Laboratory, California Institute of Technology, 4800 Oak Grove Drive, Pasadena, CA 91109, USA

72 Department of Physics, Lancaster University, Lancaster LA1 4YB, UK

73 von Hoerner & Sulger GmbH, Schlossplatz 8, 68723 Schwetzingen, Germany

74 Technical University of Denmark, Elektrovej 327, 2800 Kgs. Lyngby, Denmark

75 Cosmic Dawn Center (DAWN), Denmark

76 Department of Physics and Astronomy, University College London, Gower Street, London WC1E 6BT, UK

77 Université de Genève, Département de Physique Théorique and Centre for Astroparticle Physics, 24 quai Ernest-Ansermet, 1211 Genève 4, Switzerland

78 NOVA optical infrared instrumentation group at ASTRON, Oude Hoogeveensedijk 4, 7991PD Dwingeloo, The Netherlands

79 University of Applied Sciences and Arts of Northwestern Switzerland, School of Engineering, 5210 Windisch, Switzerland

80 Universität Bonn, Argelander-Institut für Astronomie, Auf dem Hügel 71, 53121 Bonn, Germany

81 INFN-Sezione di Roma, Piazzale Aldo Moro 2, c/o Dipartimento di Fisica, Edificio G. Marconi, 00185 Roma, Italy

82 Department of Physics, Institute for Computational Cosmology, Durham University, South Road DH1 3LE, UK

83 Université Côte d'Azur, Observatoire de la Côte d'Azur, CNRS, Laboratoire Lagrange, Bd de l'Observatoire, CS 34229, 06304 Nice Cedex 4, France

84 California institute of Technology, 1200 E California Blvd, Pasadena, CA 91125, USA

85 European Space Agency/ESTEC, Keplerlaan 1, 2201 AZ Noordwijk, The Netherlands

86 Kapteyn Astronomical Institute, University of Groningen, PO Box 800, 9700 AV Groningen, The Netherlands

87 Department of Physics and Astronomy, University of Aarhus, Ny Munkegade 120, 8000 Aarhus C, Denmark

88 Waterloo Centre for Astrophysics, University of Waterloo, Waterloo, Ontario N2L 3G1, Canada

89 Department of Physics and Astronomy, University of Waterloo, Waterloo, Ontario N2L 3G1, Canada

90 Perimeter Institute for Theoretical Physics, Waterloo, Ontario N2L 2Y5, Canada

91 Space Science Data Center, Italian Space Agency, via del Politecnico snc, 00133 Roma, Italy

92 Institute of Space Science, Str. Atomistilor, nr. 409 Măgurele, Ilfov, 077125, Romania

93 Departamento de Astrofísica, Universidad de La Laguna, 38206, La Laguna, Tenerife, Spain

94 Dipartimento di Fisica e Astronomia "G. Galilei", Università di Padova, Via Marzolo 8, 35131 Padova, Italy

95 Caltech/IPAC, 1200 E. California Blvd., Pasadena, CA 91125, USA

96 Institut für Theoretische Physik, University of Heidelberg, Philosophenweg 16, 69120 Heidelberg, Germany

97 Université St Joseph, Faculty of Sciences, Beirut, Lebanon

98 Institut de Recherche en Astrophysique et Planétologie (IRAP), Université de Toulouse, CNRS, UPS, CNES, 14 Av. Edouard Belin, 31400 Toulouse, France

99 Departamento de Física, FCFM, Universidad de Chile, Blanco Encalada 2008, Santiago, Chile

100 Universität Innsbruck, Institut für Astro- und Teilchenphysik, Technikerstr. 25/8, 6020 Innsbruck, Austria

101 Centre for Electronic Imaging, Open University, Walton Hall, Milton Keynes, MK7 6AA, UK

102 Infrared Processing and Analysis Center, California Institute of Technology, Pasadena, CA 91125, USA

103 Instituto de Astrofísica e Ciências do Espaço, Faculdade de Ciências, Universidade de Lisboa, Tapada da Ajuda, 1349-018 Lisboa, Portugal

104 Universidad Politécnica de Cartagena, Departamento de Electrónica y Tecnología de Computadoras, Plaza del Hospital 1, 30202 Cartagena, Spain

105 INFN-Bologna, Via Irnerio 46, 40126 Bologna, Italy

106 Junia, EPA department, 41 Bd Vauban, 59800 Lille, France

107 Instituto de Física Teórica UAM-CSIC, Campus de Cantoblanco, 28049 Madrid, Spain

108 CERCA/ISO, Department of Physics, Case Western Reserve University, 10900 Euclid Avenue, Cleveland, OH 44106, USA

109 Laboratoire de Physique de l'École Normale Supérieure, ENS, Université PSL, CNRS, Sorbonne Université, 75005 Paris, France

110 Observatoire de Paris, Université PSL, Sorbonne Université, LERMA, 750 Paris, France

111 Astrophysics Group, Blackett Laboratory, Imperial College London, London SW7 2AZ, UK

112 Scuola Normale Superiore, Piazza dei Cavalieri 7, 56126 Pisa, Italy

113 Dipartimento di Fisica e Scienze della Terra, Università degli Studi di Ferrara, Via Giuseppe Saragat 1, 44122 Ferrara, Italy

114 Istituto Nazionale di Fisica Nucleare, Sezione di Ferrara, Via Giuseppe Saragat 1, 44122 Ferrara, Italy

115 Dipartimento di Fisica – Sezione di Astronomia, Università di Trieste, Via Tiepolo 11, 34131 Trieste, Italy

116 NASA Ames Research Center, Moffett Field, CA 94035, USA

117 Kavli Institute for Particle Astrophysics & Cosmology (KIPAC), Stanford University, Stanford, CA 94305, USA

118 Minnesota Institute for Astrophysics, University of Minnesota, 116 Church St SE, Minneapolis, MN 55455, USA

119 INAF, Istituto di Radioastronomia, Via Piero Gobetti 101, 40129 Bologna, Italy
120 Institute Lorentz, Leiden University, Niels Bohrweg 2, 2333 CA Leiden, The Netherlands

121 Institute for Astronomy, University of Hawaii, 2680 Woodlawn Drive, Honolulu, HI 96822, USA

122 Department of Physics & Astronomy, University of California Irvine, Irvine CA 92697, USA

123 Dept. of Physics, IIT Hyderabad, Kandi, Telangana 502285, India

124 Department of Astronomy & Physics and Institute for Computational Astrophysics, Saint Mary's University, 923 Robie Street, Halifax, Nova Scotia, B3H 3C3, Canada

125 Departamento Física Aplicada, Universidad Politécnica de Cartagena, Campus Muralla del Mar, 30202 Cartagena, Murcia, Spain

126 Dipartimento di Fisica, Università degli studi di Genova, and INFN-Sezione di Genova, via Dodecaneso 33, 16146, Genova, Italy

127 Ruhr University Bochum, Faculty of Physics and Astronomy, Astronomical Institute (AIRUB), German Centre for Cosmological Lensing (GCCL), 44780 Bochum, Germany

128 Instituto de Astrofísica de Canarias (IAC); Departamento de Astrofísica, Universidad de La Laguna (ULL), 38200 La Laguna, Tenerife, Spain

129 Université Paris-Cité, 5 Rue Thomas Mann, 75013 Paris, France

130 Université PSL, Observatoire de Paris, Sorbonne Université, CNRS, LERMA, 75014 Paris, France

131 Univ. Grenoble Alpes, CNRS, Grenoble INP, LPSC-IN2P3, 53, Avenue des Martyrs, 38000, Grenoble, France

132 Department of Physics and Astronomy, Vesiilinnantie 5, 20014 University of Turku, Finland

133 Serco for European Space Agency (ESA), Camino bajo del Castillo, s/n, Urbanizacion Villafranca del Castillo, Villanueva de la Cañada, 28692 Madrid, Spain

134 Oskar Klein Centre for Cosmoparticle Physics, Department of Physics, Stockholm University, Stockholm 106 91, Sweden

135 Dipartimento di Fisica, Sapienza Università di Roma, Piazzale Aldo Moro 2, 00185 Roma, Italy

136 Centro de Astrofísica da Universidade do Porto, Rua das Estrelas, 4150-762 Porto, Portugal

137 Dipartimento di Fisica, Università di Roma Tor Vergata, Via della Ricerca Scientifica 1, Roma, Italy

138 INFN, Sezione di Roma 2, Via della Ricerca Scientifica 1, Roma, Italy

139 Department of Mathematics and Physics E. De Giorgi, University of Salento, Via per Arnesano CP-193, 73100 Lecce, Italy

140 INAF-Sezione di Lecce, c/o Dipartimento Matematica e Fisica, Via per Arnesano, 73100, Lecce, Italy

141 INFN, Sezione di Lecce, Via per Arnesano CP-193, 73100 Lecce, Italy

142 Department of Astrophysics, University of Zurich, Winterthur-erstrasse 190, 8057 Zurich, Switzerland

143 ASTRON, the Netherlands Institute for Radio Astronomy, Postbus 2, 7990 AA Dwingeloo, The Netherlands

144 Department of Astrophysical Sciences, Peyton Hall, Princeton University, Princeton, NJ 08544, USA

145 Niels Bohr Institute, University of Copenhagen, Jagtvej 128, 2200 Copenhagen, Denmark
# Appendix A: Throughputs

Spectra and band fluxes were computed using the total transmission curves estimates for VIS (I_E), NISP-P (Y_E, J_E, H_E), NISP-S (Red and Blue Grisms), and each EXT survey (e.g. Gaia, DES, LSST, and UNIONs) provided by each of the respective instrument teams. We describe below the generation and/or acquisition of the passbands for each instrument and their status for SC8 where applicable:

- **VIS** The VIS total transmission was computed using the product of the MDB parameters: the VIS quantum efficiency and the PLM VIS transmission curves provided by the VIS Instrument team and Airbus Space and Defense, respectively.

- **NISP** We used the current best estimates of the NISP photometric passbands (Y_E, J_E, H_E) and the transmission curves for the red and blue grisms produced by the NISP Instrument Development Team and validated and crossed-checked by the SGS. The datasets used for SC8 are stored in the MDB, and the latest current best estimates are described in Euclid Collaboration: (2022c).

- **Gaia** As stated in Sect. 3.2.4, Gaia band fluxes were derived from the DR2 release (Gaia Collaboration 2018)<fnref n="20" />.

- **DES** We used the DR1 griz passbands (Abbott et al. 2018)<fnref n="21" />.

- **LSST** The baseline total throughput curves (CCDs+Filter+Optics+Atmosphere) at airmass=1.2 (Kahn et al. 2010; Claver et al. 2014; Connolly et al. 2014) were computed by the LSST system engineering team. For SC8, we used the earlier release-1.4 total throughputs for ugriz<fnref n="22" />.

- **CFIS** The bandpasses for u and r filters, respectively, were generated with the information for the MegaCam filter set<fnref n="23" />.

- **JEDIS** The JEDIS team provided full efficiency curves (CCD+Filter+Optics+Atmosphere) in the g band for 14 CCDs measured in a grid of 12 × 13 points, which we used to compute an average throughput.

- **Pan-STARRS PS1** The bandpass model for the i band<fnref n="24" />.

- **WISHES** The bandpass data for the z band<fnref n="25" />.

# Appendix B: Spectra and fluxes

## Appendix B.1. Galaxy spectra reconstruction

Here we describe the process for reconstructing the observed spectra of the galaxies from the parametrised information in the catalogue.

We begin by homogenising all wavelength-dependent elements into a common uniform sampling to enable direct operation between models that were sampled at different wavelength ranges and resolutions. To ensure the spectra cover the wavelength range of interest and with enough resolution, we set a

range between 600 Å and 24,000 Å, in steps of 1 Å. With a spectral resolution of R = 480 in NISP-S, we are able to sample properly the dispersed spectra.

Our reconstruction algorithm commences with the initialisation of a spectrum. The SimSpectra library allows for the linear combination of two galaxy templates, enabling a wider variety of colours and shapes, which gives more realism to the simulation. We compute the combined template as follows:

$$f_{\text{combined}}(\lambda) = (1 - i_{\text{frac}})f_{\text{template}}(\lambda)[i] + i_{\text{frac}}f_{\text{template}}(\lambda)[i-1], \quad (\text{B.1})$$

where $i_{frac}$ is the fractional contribution of template with index i in the combined template. Templates are ordered from early to late type galaxy in the SED library. High-z galaxies and QSOs use only one template. Next, we apply one out of 5 dust extinction laws taken from Prevot et al. (1984); Calzetti et al. (2000) and presented in Ilbert et al. (2009). The dust extinction curve $k(\lambda)$ is scaled by the galaxy colour excess $E(B-V)$ and applied to the combined template, such that

$$f_{\text{ext}}(\lambda) = f_{\text{combined}}(\lambda) 10^{-0.4E(B-V)k(\lambda)}, \quad (\text{B.2})$$

where the extinction curve $k(\lambda)$ is

$$k(\lambda) = -2.5 \log_{10} \left( \frac{E_j(\lambda)}{E_0(\lambda)} \right) E(B-V)_{0.2}^{-1}. \quad (\text{B.3})$$

where $E_j(\lambda)$ corresponds to the extinction law used (Prevot et al. 1984; Calzetti et al. 2000; Ilbert et al. 2009), with $j = 0$ corresponding to no extinction, $j = 1$ to the Prevot extinction law, $j = 2$ to the Calzetti extinction law with no 2175Å bump and $j = 3$ and $j = 4$ to the Calzetti extinction law with different strengths of the 2175Å bump (see Ilbert et al. 2009 for details). For computational ease, we compute all the extinctions in the filter passbands for a value of $E(B-V) = 0.2$ and then re-scale the value to the actual $E(B-V)$ in Eq. B.2.

The next step is to shift the spectrum to the observed redshift (including peculiar velocities), $z_{obs}$. This operation is performed by scaling the wavelength array elements by $(1 + z_{obs})$ and dividing the fluxes by the same factor $(1 + z_{obs})$. With the redshifted spectrum, we can measure the flux in the reference filter, and scale it to the reference apparent AB magnitude. For standard and strongly lensed galaxies, the reference filter is the SDSS r passband redshifted to $z = 0.1$. For high-redshift galaxies and QSOs, the template is scaled according to the apparent magnitude at 1500 (1 + $z_{obs}$) Å and 1450 (1 + $z_{obs}$) Å respectively.

For standard and strongly lensed galaxies, the reference magnitude to scale the spectrum is determined from the absolute magnitude in the SDSS r band, $M_r$. The $M_r$ magnitude is a product of the semi-analytic recipe in the simulation, and is given in h-normalised units. The conversion from absolute to apparent magnitude requires computing the luminosity distance $D_L$ and the $K_{Corr}$ correction.

We compute the luminosity distance with a Flat LCDM cosmology, setting the Hubble constant to $H_0 = 100 \text{ km s}^{-1} \text{ Mpc}^{-1}$, and the non-relativistic matter density parameter to the value used in the Flagship simulation $\Omega_m = 0.319$.

As our reference flux is not bolometric but computed within a particular passband, we need the $K_{Corr}$ correction term to transform from observed to restframe flux to account for the

<footnote n="20">²⁰ https://www.cosmos.esa.int/documents/29201/1645651/GaiaDR2_Revised_Passbands/ZeroPoints.zip/54db454f-69cb-ea0c-15be-f1b1f597f191</footnote>

<footnote n="21">²¹ https://noirlab.edu/science/programs/ctio/filters/Dark-Energy-Camera</footnote>

<footnote n="22">²² https://github.com/lsst/throughputs/tree/1.4/baseline</footnote>

<footnote n="23">²³ https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/en/megapipe/docs/filt.html</footnote>

<footnote n="24">²⁴ http://ipp.ifa.hawaii.edu/ps1.filters/</footnote>

<footnote n="25">²⁵ https://hsc-release.mtk.nao.ac.jp/doc/index.php/survey-2/</footnote>
galaxy redshift. This correction term, expressed in magnitudes, is defined as

$$K_{\text{Corr}} = 2.5 \log_{10} \frac{f_{\text{restframe}}}{f_{\text{observed}}}; \qquad (\text{B.4})$$

where we obtain both the rest-frame, $f_{\text{restframe}}$, and the redshifted $f_{\text{observed}}$ fluxes integrated in the reference passband using the following formula

$$f_v = \frac{\int f_{\lambda} R(\lambda) \frac{d}{c} d\lambda}{\int R(\lambda) d\lambda / \lambda}, \qquad (\text{B.5})$$

where $R(\lambda)$ is the system response of the reference magnitude passband in photon counts, resampled at 1 Å resolution. With the $K_{\text{Corr}}$ correction and the luminosity distance $d_L$ in parsec, we compute the apparent magnitude,

$$m_r = M_r + 5[\log_{10}(d_L) - 1] + K_{\text{Corr}}. \qquad (\text{B.6})$$

We note that the absolute magnitude and the luminosity distance are computed for the same value of the Hubble constant and therefore its dependence can be disregarded in the equation making the apparent magnitude independent of its value.

The scaled observed flux in erg cm$^{-2}$ s$^{-1}$ Hz$^{-1}$ at the reference passband from the AB definition is then

$$f_{v,r} = 10^{-0.4m_r+48.6}, \qquad (\text{B.7})$$

and the scaled continuum spectrum is therefore

$$f_{\text{continuum}}(\lambda) = f_{\text{ext}}(\lambda) \frac{f_{v,r}}{f_{v,\text{observed}}}. \qquad (\text{B.8})$$

At this stage, we add the emission lines to the scaled template. As emission lines are already scaled and modelled with extinction, we compute them after applying the dust to the scaled continuum. The central frequency of each line is taken from vacuum or air, depending on whether the channel we simulate is ground or space-based. In Table B.1, we list the set of emission lines and their corresponding central wavelength used for both air and vacuum in the simulation.<fnref n="26" />

<table><caption>**Table B.1.** Emission lines used in the simulated spectra of galaxies.</caption><thead><tr><th>Line</th><th>Vacuum (Å)</th><th>Air (Å)</th><th>ratio to primary</th></tr></thead><tbody><tr><td>Hα</td><td>6564.614</td><td>6562.801</td><td></td></tr><tr><td>Hβ</td><td>4862.721</td><td>4861.363</td><td></td></tr><tr><td>O II</td><td>3727.090</td><td>3726.030</td><td></td></tr><tr><td>O II*</td><td>3729.880</td><td>3728.820</td><td>1:1</td></tr><tr><td>O III</td><td>5008.239</td><td>5006.843</td><td></td></tr><tr><td>O III*</td><td>4960.295</td><td>4958.911</td><td>1:3</td></tr><tr><td>N II</td><td>6585.270</td><td>6583.450</td><td></td></tr><tr><td>N II*</td><td>6549.860</td><td>6548.050</td><td>1:3</td></tr><tr><td>S II</td><td>6718.290</td><td>6716.440</td><td></td></tr><tr><td>S II*</td><td>6732.680</td><td>6730.820</td><td>1:1</td></tr></tbody></table>

**Notes.** Secondary lines are indicated with * and the corresponding flux ratio to the primary is indicated, as no secondary fluxes are explicitly indicated in the True Universe catalogue.

We estimate the width of the emission line, $\sigma_{\text{el}}$, in km s$^{-1}$ following a luminosity-velocity dispersion relation (e.g. Faber-Jackson Faber & Jackson 1976 and Tully-Fisher relation Tully et al. 1975) as shown below:

$$\log_{10}(\sigma_{\text{el}}) = (-0.10 + 0.01z_{\text{obs}})(M_r - 3.0) - 0.05z_{\text{obs}}. \qquad (\text{B.9})$$

High-redshift galaxies and QSO templates already include emission lines. We limit the approximation to a minimum velocity of 50 km s$^{-1}$ to avoid too narrow lines. We generate all 10 emission lines as Gaussian profiles with the integrated flux as defined in the catalogue at the corresponding central wavelength with a width equal to $\sigma_{\text{el}}$. As was done for continuum spectra, the set of reconstructed emission lines are shifted in wavelength by the factor $(1 + z_{\text{obs}})$.

The velocity dispersion is converted to wavelength and scaled to the observed frame as

$$\sigma_{\text{el},\lambda} = \sigma_{\text{el}} \frac{\mu_i}{c} (1 + z_{\text{obs}}). \qquad (\text{B.10})$$

Then, we compute the spectrum containing only the emission line contribution, $f_{\text{el}}(\lambda)$, as

$$f_{\text{el}}(\lambda) = \sum_{i}^{10} \frac{[f_{\text{el}}]_{i}}{\sigma_{\text{el},\lambda} \sqrt{2\pi}} \exp\left(-\frac{(\lambda - \mu_{i})^{2}}{2\sigma_{\text{el},\lambda}^{2}} \frac{1}{1 + z_{\text{obs}}}\right), \qquad (\text{B.11})$$

where $\mu_i$ and $[f_{\text{el}}]_i$ are the central wavelengths and TU line fluxes, respectively, for the ten emission lines in the corresponding medium.

The resulting line profiles can now be added to the calibrated continuum component of the spectra with the following expression

$$f_{\text{galaxy}}(\lambda) = f_{\text{continuum}}(\lambda) + f_{\text{el}}(\lambda). \qquad (\text{B.12})$$

With all the elements from the source galaxy, we introduce the effect of lensing magnification with

$$f_{\text{magnified}}(\lambda) = f_{\text{galaxy}}(\lambda) \mu, \qquad (\text{B.13})$$

where $\mu$ is the magnification factor as defined in Eq. 4.

The final remaining step is to apply the Milky Way extinction to the magnified galaxy spectra at the specific location in the sky. From the Planck dust maps (Planck Collaboration XI 2014), we obtain a precise colour excess $E(B-V)$, and following an O'Donnell (1994) extinction law with the ratio of absolute to differential extinction $R_V = 3.1$, we apply the MW extinction to obtain the final incident spectra:

$$f_{\text{incident}}(\lambda) = f_{\text{magnified}}(\lambda) 10^{-0.4 A(\lambda)}, \qquad (\text{B.14})$$

where the extinction law $A(\lambda)$ is the product of the extinction terms $A(\lambda) = E(B-V)R_V$.

## Appendix B.2. Stellar spectra reconstruction

With the already available apparent magnitude in the H band we can simply compute the template flux $f_{v,\text{template}}$ in the observed band as defined in Eq. B.5 and the 2MASS H-band flux $f_{v,H}$ as Eq. B.7 and scale the star spectrum:

$$f_{\text{star}}(\lambda) = f_{\text{template}}(\lambda) \frac{f_{v,H}}{f_{v,\text{template}}}. \qquad (\text{B.15})$$

<footnote n="26">²⁶ https://physics.nist.gov/PhysRefData/ASD/lines_form.html</footnote>
The only remaining step is to correct the Galactic extinction. The Tycho2 stars are not extinction corrected and therefore we do not apply further correction. For the additional stars with BaSeL and LT spectra, we apply a procedure similarly to the galaxy spectra as

$$f_{\text{star}}(\lambda)_{\text{ext}} = f_{\text{star}}(\lambda) 10^{-0.4 A(\lambda)}, \qquad (\text{B.16})$$

with the O'Donnell (1994) law, $R_V = 3.1$, and the absorption coefficient $A_V$ determined assuming the Drimmel et al. (2003) 3D Galactic extinction model.

Even though the wavelength range of the stellar templates cover the whole spectrum of interest, the reddest part from 12 000 Å onwards has a reduced sampling in the Basel 2.2 library with 50 Å intervals. The wavelength calibration in NISP-S has to be accurate to better than half a pixel, which translates to approximately 6 Å. Therefore, we would need stellar spectra sampled at 2 Å to 3 Å intervals. For this reason we replaced the feature-less low sampled redder part of the spectrum with real high resolution measurements following the continuum as defined in the template.

With support from OU-SIR, we did a fit for the spectral continuum for each BaSEL spectrum, using functions provided by our redshift and spectra measurements package EZ,<fnref n="27" /> resampled the smooth continuum to a higher resolution, and added the continuum-subtracted spectrum of a star taken from the NASA Infrared Telescope Facility IRTF Spectral Library<fnref n="28" /> to the high-resolution continuum.

From the full IRTF library we have taken ten stars at random for each spectral class (F, G, K, M – earlier classes O, B, and A are not covered by the library), primarily of luminosity class III (giants stars) and V (main sequence stars), but with at least one star of class either I (supergiants) or IV (subgiants).

The choice of which IRTF continuum-subtracted spectrum to add to the BaSEL continuum-only spectrum was based on broad-band colour: the IRTF template with the Y-H colour closer to the one stored in the original catalog was chosen as the match. There was no attempt to include also the luminosity or other properties in the match. So a very red star was assigned an M type spectrum, without considering if the star luminosity was compatible with an M-type object or not.

In this way we do not alter the colours of the spectra but we allow accurate wavelength calibrations in the simulated NISP-S channel.

## Appendix B.3. Synthetic photometry

We need to generate synthetic photometry from the high resolution spectra to reproduce the passband fluxes that each instrument will measure. This information is provided in the catalogue for the EXT surveys simulations, and for validation purpose only for the Euclid instruments simulators, because these later make use of the true spectra to take into account all chromatic instrumental models.

Starting from the high resolution spectra, we compute the integrated flux density of the source $f_v$ in erg cm$^{-2}$ s$^{-1}$ Hz$^{-1}$ for a specific passband $R(\lambda)$ using Eq. (B.5). Then, the synthetic magnitudes in the AB system are obtained with the following transformation:

$$m_{\text{syn}} = -2.5 \log_{10}(f_v) - 48.6. \qquad (\text{B.17})$$

<figure><img src="image_27.png" /><figcaption>Fig. C.1. Density of objects (number of stars per deg$^2$) in each standard star catalogues file covering SC8 main production area, superimposed with the Euclid observations and simulated EXT survey area.</figcaption></figure>

# Appendix C: SC8 preparation

## Appendix C.1. Input catalogues

Galaxy and stellar catalogues containing the variety of sources described in Sect. 3 were produced for both the SC8 main (wide) and deep fields and ingested into the EAS. In particular, for the SC8 main run, the spatial extent of the galaxy and stellar catalogues exceeds ~600 deg$^2$, the original wide area survey planned for SC8. We added an additional margin to ensure complete coverage for the EXT ground-based survey simulations. Figure C.2 shows the footprint of the standard galaxy catalogues and we refer the reader to Figure C.1 in Sect. 3.2 which shows the footprint of the star catalogues used for the SC8 main run.

Standard galaxies, high-redshift galaxies, and QSOs are directly stored in CosmoHub<fnref n="29" /> (Tallada et al. 2020) just after being produced by SciPIC. Taking advantage of the interactive data exploration and fast distribution capabilities of SciPIC, a dedicated team has validated the catalogues. These three catalogues, plus the one containing the strongly lensed galaxies, are then stored as distinct FITS files in a format defined in the Euclid data model. The catalogues are further divided into different files covering non-overlapping sky areas for each type of object. Each catalogue file covers a HEALPix pixel of $N_{SIDE} = 2^5$ (corresponding to an area of about 3.35 deg$^2$), except for strong lensing galaxies which are all included in a single file. All the FITS files along with their associated metadata are subsequently ingested in the EAS.

Stellar catalogues were stored on a set of non-overlapping FITS files for each kind of object, covering the original SC8 footprint with an area ~600 deg$^2$. The catalogues are arranged on a grid with different cell sizes depending on the stellar density of the area. As shown in Fig. C.1, there is an inverse relation between the area covered by a catalogue file and the density of objects.

In Table C.1, we report the number of objects per galaxy/star type for both wide and deep areas. For the SC8 main run, we

<footnote n="27">²⁷ http://pandora.lambrate.inaf.it/EZ/</footnote>

<footnote n="28">²⁸ http://irtfweb.ifa.hawaii.edu/~spex/IRTF_Spectral_Library/</footnote>

<footnote n="29">²⁹ https://cosmohub.pic.es/</footnote>
<figure><img src="image_28.png" /><figcaption>**Fig. C.2.** Number of objects in each standard galaxy catalogues file covering SC8 Main production area, superimposed with the Euclid observations and EXT simulated area.</figcaption></figure>

<table><caption>**Table C.1.** Galaxy and stellar catalogues used in SC8.</caption><thead><tr><th>Area</th><th>Object Type</th><th>Release</th><th>Num obj</th><th>Size [GB]</th><th>Num files</th></tr></thead><tbody><tr><td rowspan="6">SC8 Main</td><td>Std gals</td><td>1.10.18</td><td>922M</td><td>224</td><td>747</td></tr><tr><td>QSOs</td><td>1.10.15</td><td>2M</td><td>0.5</td><td>562</td></tr><tr><td>High-z</td><td>1.10.19</td><td>11M</td><td>2.5</td><td>562</td></tr><tr><td>SL gals</td><td>SL_SC8</td><td>801</td><td>0.1</td><td>1</td></tr><tr><td>Std stars</td><td>v15</td><td>77M</td><td>15</td><td>532</td></tr><tr><td>LT stars</td><td>v4_MLT</td><td>1.8M</td><td>0.4</td><td>532</td></tr><tr><td rowspan="6">SC8 Deep</td><td>Std gals</td><td>1.10.22</td><td>43M</td><td>11</td><td>50</td></tr><tr><td>QSOs</td><td>1.10.20</td><td>91K</td><td>0.02</td><td>36</td></tr><tr><td>High-z</td><td>1.10.21</td><td>477K</td><td>0.1</td><td>36</td></tr><tr><td>SL gals</td><td>SL_DEEP</td><td>201</td><td>0</td><td>1</td></tr><tr><td>Std stars</td><td>v16</td><td>1.7M</td><td>0.5</td><td>10</td></tr><tr><td>LT stars</td><td>v6_MLT</td><td>150K</td><td>0.03</td><td>10</td></tr></tbody></table>

produced a total of > 1 billion objects of which 922M were standard Flagship galaxies (described in Sect. 3.1). The catalogues are divided among 3078 files for a total 254 GB of disc space.

## Appendix C.2. Feasibility analysis and validation

During the pilot phase, we ran profiling tests of each simulator code and instrument channel for the six EXT surveys. Scaling up the total processing time of the pilot phase to the SC8 main run, we estimated a total simulation time in excess of four million CPU hours to generate full-featured simulations over the SC8 main run target area. We assessed the cost of each feature identifying those effects for which the computational expense was high, and yet, had minimal impact on image quality and mission performance. This would enable us to introduce simplifications to carry out the main run production within the appropriated computing budget. Finding the balance between feature complexity and resource usage required several iterations, which thus prolonged the time and effort to validate each resulting product. The validation of the pilot phase data products and specific features contained therein for each simulation channel (i.e. VIS, NISP-P, NISP-S, and EXT) was performed by different teams using independent approaches, which we describe further below.

For VIS, short-loop validation of the simulated pilot phase data products were performed by the level-2 OUs and reported any issues identified. We, in turn, worked to resolve the errors reported, delivering new VIS images to be analysed until no further problems were raised.

For the NISP-P channel, validation of the simulation products was performed by the NISP-P validators in SDC Finland. We performed a separate evaluation of the technical requirements during the pilot phase, which revealed the high computing cost for the NISP-P simulator Imagem would exceed the CPU time constraints for the SC8 main run. Therefore, we decided to reduce the intra-pixel sampling to speed up the processing by a factor of 4. We verified the astrometric accuracy of all sources to be generated below one milli-arcsecond RMS for both the relative (between images) and absolute astrometry (with respect to the TU catalogue). This ensured that a lower resolution intra-pixel response simulation would not affect the positioning accuracy. The photometry error was less than 0.02 mag with respect to the TU reference magnitude in both aperture and PSF photometry, which also suggested a minimal dependence to lower intra-pixel sampling.

In our validation of the spectroscopic channel for NISP, we verified the $\chi^2$ distribution quality map was consistent with the expected performance of the H2RG detector. Our validation tests confirmed the extracted flux for stellar sources reproduced sufficiently accurately the expected TU flux, with occasional outliers overestimating the flux due to contamination from other sources. This was expected as the validation analysis was not optimised to perform accurate decontamination of nearby spectra. The polychromatic PSF was simplified by implementing a stacked monochromatic version; improving the computational time by a factor of 7.

We validated the SIM-EXT science data products for astrometry, photometry, background and PSFs for each EXT survey. We used the SourceExtractor software to identify sources and measure fluxes and compared the derived positions and fluxes with the reference TU catalogue values. The results of our validation tests showed that the generated EXT data products were accurate and consistent with the reference input values.<fnref n="30" /> Finally, to help reduce computational costs, we decided to simplify the galaxy simulation across all simulation channels; rendering very small galaxies below 0.01 with a simpler exponential profile, instead of the more complex inclined Sérsic profile.

## Appendix C.3. Pilot phase processing

The main objective of the pilot phase was to profile and validate the OU-SIM pipeline in preparation for the SC8 main run. Extrapolations of the pilot phase computing costs revealed the resources available for SC8 would not be sufficient to generate full-featured simulations for a Euclid Wide Survey of 600 deg² within the appropriated time frame. While strategies were being implemented to lower computing costs such as the reduction to a smaller area of 165 deg² and the simplification of certain features for the NISP instruments (e.g. intrapixel sampling and monochromatic stacked PSFs), as many as 19 new features and data products (e.g. a cosmic ray map, a ghost map, stars-only image, etc.) were requested to be simulated for VIS to test and

<footnote n="30">³⁰ It was later discovered during the analysis of the SC8 main data, that the input sky background values received for the Northern Surveys were incorrect, leading to shallower depths than expected. The following simulation production cycle, which came after SC8, included the appropriate sky brightness values.</footnote>