The COSMOS2015 Catalog: Exploring the 1

We present the COSMOS2015 catalog which contains precise photometric redshifts and stellar masses for more than half a million objects over the 2deg$^{2}$ COSMOS field. Including new $YJHK_{\rm s}$ images from the UltraVISTA-DR2 survey, $Y$-band from Subaru/Hyper-Suprime-Cam and infrared data from the Spitzer Large Area Survey with the Hyper-Suprime-Cam Spitzer legacy program, this near-infrared-selected catalog is highly optimized for the study of galaxy evolution and environments in the early Universe. To maximise catalog completeness for bluer objects and at higher redshifts, objects have been detected on a $\chi^{2}$ sum of the $YJHK_{\rm s}$ and $z^{++}$ images. The catalog contains $\sim 6\times 10^5$ objects in the 1.5 deg$^{2}$ UltraVISTA-DR2 region, and $\sim 1.5\times 10^5$ objects are detected in the"ultra-deep stripes"(0.62 deg$^{2}$) at $K_{\rm s}\leq 24.7$ (3$\sigma$, 3", AB magnitude). Through a comparison with the zCOSMOS-bright spectroscopic redshifts, we measure a photometric redshift precision of $\sigma_{\Delta z/(1+z_s)}$ = 0.007 and a catastrophic failure fraction of $\eta=0.5$%. At $3<z<6$, using the unique database of spectroscopic redshifts in COSMOS, we find $\sigma_{\Delta z/(1+z_s)}$ = 0.021 and $\eta=13.2\% $. The deepest regions reach a 90\% completeness limit of 10$^{10}M_\odot$ to $z=4$. Detailed comparisons of the color distributions, number counts, and clustering show excellent agreement with the literature in the same mass ranges. COSMOS2015 represents a unique, publicly available, valuable resource with which to investigate the evolution of galaxies within their environment back to the earliest stages of the history of the Universe. The COSMOS2015 catalog is distributed via anonymous ftp (ftp://ftp.iap.fr/pub/from_users/hjmcc/COSMOS2015/) and through the usual astronomical archive systems (CDS, ESO Phase 3, IRSA).


INTRODUCTION
Our understanding of the formation, evolution, and largescale distribution of galaxies has been revolutionized in the past decade by the availability of large, multi-wavelength data sets accurately calibrated with densely sampled spectroscopic training sets. In parallel, the availability of exponentially increasing computing power has led to the development of ab initio cosmological simulations which can now include most of the known baryonic physics processes down to relatively small scales (approximately kiloparsecs or less, e.g., Dubois et al. 2014;Vogelsberger et al. 2014;Khandai et al. 2015;Schaye et al. 2015), raising the possibility of detailed comparison with observational surveys. Such simulations can now reproduce the rich diversity of observed colors, morphologies, and star formation activity though a complex combination of internal and external processes (such as feedback, Recent theoretical works have also predicted that there is a significant connection between the dynamics within the intrinsically anisotropic large-scale structures on the one hand, and the physical properties of the galaxies embedded in them on the other hand. In particular, the vorticity-rich filaments Laigle et al. 2015) are where low-mass galaxies steadily grow in mass via quasi-polar cold gas accretion, while their angular momentum (spin) is aligned with host filaments (Codis et al. 2012. Mergers are responsible for the spin flip along the filaments , so that the flip should, in principle, be traced in the distribution of the galaxy properties (morphology, SFR) along the "cosmic web" (Pogosyan et al. 1996). Correlations have already been found in hydrodynamical simulations between the evolution of the physical properties of galaxies (SFR, stellar mass, colors, metallicity) as a function of the galaxy-spin alignment within the filaments .
Notwithstanding some observational studies (see also, e.g., Scoville et al. 2013;Tempel & Libeskind 2013;Darvish et al. 2014), accurately tracing the cosmic web remains challenging as long as we do not observe a sufficiently large area (at least on the scale of a few typical void sizes) with sufficiently precise galaxy redshifts to trace the structures. Therefore, one of the outstanding challenges for the next generation of deep multi-band surveys over wide fields is to enable environmental studies while at the same time probing different epochs of cosmic evolution to leverage their relative importance in building up galaxies and also to detect the transition between different accretion modes.
A method that could be more robust for constraining galaxy mass assembly would be to investigate the relationship between the integrated stellar properties of galaxies (in particular, stellar mass, star formation rate, and star formation history (SFH)) and their dark matter environment over a range masses and redshifts. The gas accretion mode is expected to be intimately connected to the halo mass and, depending on the dominant scenario, the SFHs of galaxies will be different due to the cooling delay implied by the "hot mode" accretion. In practice, the stellar-to-halo mass relation is derived statistically by comparing the galaxy clustering measurement with predictions from the phenomenological halo model (e.g., Cooray & Sheth 2002). Already extensively studied up toz 2 (e.g., Béthermin et al. 2014;Coupon et al 2015;McCracken et al. 2015), this relationship is worth extending at higher redshift and for lower-mass galaxies, which requires sufficiently large and deep data sets. Moreover, other halo-mass-dependent effects play a non-negligible, if not crucial role in regulating star formation, especially feedback from active galactic nuclei (AGNs), either in a negative sense (e.g., Croton et al 2006;Hopkins et al. 2006) or a positive (e.g., Gaibler et al. 2012;Bieri et al. 2015). This makes it difficult to disentangle all of the different mass-dependent processes that affect star formation, unless robust observations of the AGN population are available in the same field.
Taking these considerations into account, it is clear that new observational studies will require deep, near-infrared (NIR)and infrared (IR)-selected data. This will allow us to extend stellar mass measurements and photometric redshift catalogs to higher redshifts and lower stellar masses over the largest possible redshift ranges. In particular, the challenge is to cover simultaneously in the same data set the low-mass and highredshift ranges of the galaxy population. Especially the redshift turbulence, smooth accretion, dry minor mergers, and mergers) occurring at different scales and times. However, the exact balance between all of these processes and how they affect galaxy evolution and shape galaxy properties is still actively debated.
Observationally, it is now clear that by z ~ 1 most of the mass has already assembled into galaxies. At high redshifts, star formation occurs vigorously in blue, massive galaxies and with the passage of cosmic time the peak of star formation activity shifts to progressively lower-mass objects at lower redshifts (e.g., Cowie et al. 1996;Arnouts et al. 2007;Noeske et al. 2007;Pozzetti et al. 2007). However, despite the success of phenomenological models in reproducing at least some of these observational trends (Peng et al. 2010), the precise physical mechanisms of this "quenching" process remain a topic of debate. Since cold gas is the basic fuel for galaxies to form stars, a better understanding of how gas accretion feeds galaxies and of the effect of possible outflows-which could stop the gas supply in galaxies-are crucial to explain both the peak of star formation at high redshift and its quenching at lower redshifts.
The small dispersion in the galaxy "main sequence" (the observed proportionality between star formation rate (SFR) and stellar mass) found at 02z<< (e.g., Daddi et al. 2007) is reproduced in hydrodynamical simulations and is now shown to exist up to z ~ 6.5 (e.g., Steinhardt et al. 2014;Salmon et al. 2015) and down to logMM ~ 9.4 (Kochiashvili et al. 2015), although the different methods used to compute the stellar mass and SFR, in addition to sample selection effects, are still producing partially inconsistent results at high redshift (Lee et al. 2012). This SFR-stellar mass relation nonetheless clearly suggests that mass assembly should be smooth compared to clumpy accretion driven by mergers. However, the privileged mode of smooth gas accretion remains unclear.
The conventional model relied on the "hot mode" accretion scenario, in which the infalling gas is shock-heated at the virial radius and then radiatively cools starting from the central part and forming centrifugally supported disk (e.g., Rees & Ostriker 1977;White & Rees 1978). However, recent hydrodynamical simulations now suggest that most of the gas is accreted directly from cold dense filaments without being shock-heated (Katz et al. 2003;Kereš et al. 2005;Ocvirk et al. 2008;Dekel et al. 2009), at least for lower-mass haloes at high redshift. In this context, the anisotropic large-scale environment of galaxies is therefore likely to play an important role as it literally drives such cold flow accretion.
Most observational analyses define "environment" as welldefined structures (clusters/groups/pairs and field galaxies, e.g., Lin et al. 2014) or using isotropic galaxy-density estimators (such as nearest neighbors, e.g., Dressler 1980;Elbaz et al. 2007). Galaxies are found to be more massive and much less starforming in high-density regions relative to low-density regions (e.g., Kauffmann et al. 2004), which is consistent with the clustering measurements of ultraviolet-selected galaxies Milliard et al 2007). Using local samples, Peng et al. (2010) have demonstrated that quenching of star formation activity can be separated into environmental (density dependent) and internal (galaxy mass related) effects, suggesting that nature and nurture both act in shaping galaxy properties.
As in previous COSMOS catalog papers, all of the images and noise maps have been resampled to the same tangent point R. A., decl. = (150.1163213, 2.20973097). The entire catalog covers a square of 2 deg 2 centered on this tangent point. When the images were delivered as tiles, all of the data were assembled into a series of 48096×48096 images with an identical pixel scale of 0 15. Figure 1 shows the footprint of all of the observations. Figure 2 shows the transmission curves of all of the filters 25 (filter, atmosphere, and detector). COSMOS NIR data come from several sources: WIRCam data (McCracken et al. 2010), covering the entire field, and UltraVISTA ) data, covering the central 1.5 deg 2 . The UltraVISTA data includes the DR2 "deep" and "ultra-deep" stripes. Note that this implies that the depth and completeness in our final catalog are not the same over the whole COSMOS field because they are derived in part from these data. The COSMOS2015 catalog 26 also offers a match with X-ray, near ultraviolet (NUV), IR, and Far-IR data, coming, respectively, from Chandra, GALEX, MIPS/Spitzer, PACS/Herschel, and SPIRE/Herschel. In this paper, we limit ourselves to the inner, deep part covered by both UltraVISTA-DR2 and the z ++ band (which is flagged accordingly in our catalog). We denote as  UD the part of the field covered by the "ultra-deep stripes" ( = K 24.7 s at 3σ in a 3″ diameter Figure 1. Schematic of the COSMOS field showing all of the optical (dark blue and turquoise) and NIR (green and orange) observations used. The background image corresponds to the χ 2 YKHK s -z ++ detection image (as described in Section 3). For reference, the region covered by the COSMOS-Advanced Camera for Surveys (ACS) HST data (Koekemoer et al. 2007) is shown in cyan.  COSMOS defines the 2 deg 2 COSMOS square (dark blue).  Uvista (orange area) is the region covered by the UltraVISTA-DR2 observations. We define  UD as the light green area, corresponding to the ultra-deep stripes in the UltraVISTA-DR2 observations.  Deep is the difference between  UVista and  UD . In our analysis of the performance of the catalog, we limit ourselves to the intersection between  UD with  COSMOS and  Deep with  COSMOS , after removing the masked objects in the optical bands ( !  OPT , not shown on this figure). The effective areas are given in Table 7. 25 www.astro.caltech.edu/∼capak/filters/index.html 26 ftp://ftp.iap.fr:/pub/from_users/hjmcc/COSMOS2015 range z<<14where galaxies are most actively forming stars. As most spectral features move into the rest-frame optical in these redshift ranges, NIR data is essential for accurate photometric redshift and stellar mass estimates. Covering a large area is also essential to derive robust statistical N-point functions or count in cells, to probe a variety of galaxy environments, to trace accurately the large-scale structure, and to minimize the effect of cosmic variance. In addition, providing large numbers of bright, rare objects is essential for ground-based follow-up spectroscopy.
The COSMOS project has already pioneered the study of galactic structures at intermediate to high redshifts as well as the evolution of the galaxy and AGN populations, thanks to the unique combination of a large area and precise photometric redshifts. However, early COSMOS catalogs were primarily optically selected (Capak et al. 2007; although a subset of the COSMOS bands have been combined with WIRCAM data; McCracken et al. 2010). In Ilbert et al. (2013), the first UltraVISTA data release ) was used to derive an NIR-selected photometric redshift catalog (see also Muzzin et al. 2013). In contrast to this earlier work, we now add the optical z ++ -band data to our object NIR-detection image, which increases the catalog completeness for bluer objects. In addition, this paper uses the deeper UltraVISTA-DR2 data release, a superior method for homogenizing the optical pointspread functions, much deeper IR data from the Spitzer Large Area Survey with Hyper-Suprime-Cam (SPLASH) project, and new optical data from the Hyper-Suprime-Cam.
These improvements to the COSMOS catalog make it possible to create, for the first time, highly complete mass-selected samples to high or very high redshifts subtending an area of 54 2 Mpc h 22 near z ~ 1. In particular, we are able to extend the stellar-mass-halo-mass relationship to high redshifts and to carefully study the connection between galaxies and their largescale environment throughout the transitional epoch of mass accretion. This will be addressed in future works. Finally, this catalog will also be invaluable in the preparation of simulated catalogs for the Euclid satellite mission and for defining what kind of spectroscopic catalogs it will require.
The paper is organized as follows. Section 2 describes the data set and the preparation of the images. Section 3 details the galaxy detection and the photometric measurements. Section 4 describes the computation of the photometric redshift and the extraction of the physical parameters. Section 5 summarizes the main characteristics of the catalog. Section 6 presents our summary and outlines future data sets.
We use a standard ΛCDM cosmology with Hubble constant H 0 = 70 km s −1 Mpc −1 , total matter density m W=0.3, and dark energy density L W=0.7. All magnitudes are expressed in the AB (Oke 1974) system.

Overview of Included Data
The COSMOS field ) offers a unique combination of deep (AB ~ 25-26), multi-wavelength data (0.25 m 24mmm) covering a relatively large area of 2 deg 2 . The main improvement compared to previous COSMOS catalog releases is the addition of new, deeper NIR and IR data from the UltraVISTA and SPLASH projects. aperture) and as  UVista the full region covered by UltraVISTA-DR2 ( = K 24.0 s at 3σ in a 3″ diameter aperture).  Deep is the difference between  UVista and  UD . In our analysis, we limit ourselves to the intersection of  UD and  Deep within the 2deg 2 COSMOS area after removing the masked area in the optical. The effective areas corresponding to these intersections are 0.46 deg 2 for  UD and 0.92 deg 2 for  Deep . Details of these flagged regions can be found in Table 7 (Appendix A.1) and in Figure 1. All of the input data are summarized in Table 1. The limiting magnitudes can be observed in Figure 3.

Optical-Ultraviolet Data
The optical-ultraviolet data set used here is similar to those used in previous releases (Capak et al. 2007;Ilbert et al. 2009). It includes near-UV ( m 0.23 m) observations from GALEX (Zamojski et al. 2007), u * -band data from the Canada-France-Hawaii Telescope (CFHT/MegaCam), and the COSMOS-20 survey, which is composed of 6 broad bands (B, V, g, r, i, + z ), 12 medium bands (IA427, IA464, IA484, IA505, IA527, IA574, IA624, IA679, IA709, IA738, IA767, and IA827), and two narrow bands (NB711, NB816), taken with Subaru Suprime-Cam (Taniguchi et al. 2007(Taniguchi et al. , 2015. We have discarded poor seeing (~ 1. 3) g-band data. Finally, the initial COSMOS zband data were replaced by deeper z ++ band data taken with thinned upgraded CCDs and a slightly different filter. At this stage, in each band, image point-spread functions (PSFs) were homogenized to minimize tile-to-tile variations (Capak et al. 2007). At the same time, RMS_MAP and FLAG_MAP images were also generated, and saturated pixels and bad areas were flagged. This release also contains new Y-band data taken with Hyper-Suprime-Cam (HSC) Subaru (Miyazaki et al. 2012). The average exposure time per pixel is 2.1 hr. This data set is described fully in G. Hasinger et al. (2016, in preparation). The addition of the Y-band data is intended to improve our stellar mass and redshift estimates in the important < < z 1 1 . 5range because it is slightly bluer than the Y filter from VIRCAM (see Figure 2), but it is also intended to serve as a "pilot program" to assess the utility of HSC data and to prepare for future COSMOS data sets which will include much more HSC imaging.

NIR Data
The YJHK s -band data used here were taken between 2009 December and 2012 May with the VIRCAM instrument on the VISTA telescope as part of the UltraVISTA survey program and constitute the DR2 UltraVISTA release. 27 The Ultra-VISTA-DR2 processing steps are the same as those in the DR1 release ). Compared to DR1, the exposure time has been increased significantly in the ultra-deep stripes, as shown in yellow in Figure 1; these cover an area of 0.62 deg 2 . An important consequence of this is that the signalto-noise ratio for an object of a given magnitude is not constant across the image. To provide NIR photometry in zones not covered by UltraVISTA, we include H and K WIRCAM data (McCracken et al. 2010) in our photometric catalog. However, this paper does not discuss the performance of photometric redshifts and physical parameters in these WIRCAM-only areas.

Mid-Infrared Data
The m 3.6 m, m 4.5 m, m 5.8 m, and m 8.0 m (respectively, channels 1, 2, 3, and 4) IRAC data used in this paper consist of the first two-thirds of the SPLASH COSMOS data set together with S-COSMOS (Sanders et al. 2007), the Spitzer Extended Mission Deep Survey, the Spitzer-Candels survey data, along with several smaller programs that observed the COSMOS field. The final processing is described in a companion paper (P. Capak et al. 2016, in preparation). The average exposure time per pixel is 3.8 hr, increasing to 50 hr in the central S-CANDELS coverage. Before processing, a median image was created for each AOR (observing block) and subtracted from the frames to remove residual bias in the frames and persistence from previous observations. For the S-CANDELS data, a secondary median was subtracted from the observations taken with repeats to remove the "first frame effect" residual bias. The resulting median-subtracted images have a mean background near zero, and so no overlap correction was applied. The median-subtracted frames were then combined with the MOPEX mosaic pipeline. 28 The outlier and boxoutlier modules were used to reject cosmic rays, transients, and Transmission curves for the photometric bands used. The effect of atmosphere, telescope, camera optics, filter, and detector are included. Note that for clarity the profiles are normalized to a maximum throughput of one; therefore, the relative efficiencies of each telescope and detector system are not shown. Intermediate and narrow bands are not represented, but the region of the spectrum covered by these bands is marked by dashed lines. moving objects. The data were then drizzled onto a  0. 6 pixel scale using a "pixfrac" of 0.65 and combined with an exposure time weighted mean combination. Mean, median, coverage, uncertainty, standard deviation, and color-term mosaics were also created. Obviously, this variation as a function of position can be expected to influence the precision of the photometric redshifts and stellar masses for the very highest-redshift ( > z 4) objects.

Image Homogenization
In this paper, the variation of the PSF across individual images in a given band is neglected. This is reasonable because band-to-band variations are almost always greater than the variation within a single band. The residual impact of the PSF variation across the field is discussed in Appendix A.3. From u to K s , the FWHM of the PSF has a range of values betweeñ  0. 5 and  1. 02 (corresponding to a Moffat fit). Therefore, the fraction of the total flux falling in a fixed aperture is banddependent. One way to address this problem is to "homogenize" the PSF so that it is the same in all of the bands (GALEX and IRAC bands are not homogenized, their photometry are extracted with a source-fitting technique, as detailed in Section 3). In the first step in our homogenization process, SEXTRACTOR (Bertin & Arnouts 1996) is used to extract a catalog of bright objects. Stars are identified by crossmatching with point sources in the COSMOS-Advanced Camera for Surveys (ACS) Hubble Space Telescope (HST) catalog (Koekemoer et al. 2007;Leauthaud et al. 2007). Saturated or faint stars are removed by considering the position of each object in the FWHM versus m AB diagram. For each star, we extract a postage stamp using SEXTRACTOR. The PSF is modeled in pixel space using PSFEX (Bertin 2013) as a linear combination of a limited number of known basis functions: where the c index reflects the dependance of Ψ on the set of coefficients c b . Given a basis, this PSF model can be entirely determined knowing the coefficients c b of the linear combination. The pixel basis is the most "natural" basis but requires as

Notes.
The central wavelength is the median wavelength weighted by transmission and the widths are defined using the half-maximum transmission points. a s 3 depth in m AB computed on PSF-matched images from around 800 apertures at 2 and  3 . b Value given in Zamojski et al. (2007) corresponding to a 3σ depth. c s 3 depth in m AB computed from the rms maps, after masking the area containing an objects based on the segmentation map.  many coefficients as the number of pixels on the image postage stamp. We can then make some assumptions to simplify the basis and to reduce the number of coefficients. The adopted basis is the "polar shapelet" basis (Massey & Refregier 2005), for which the components have useful explicit rotational symmetries. We assume that the PSF is constant over the field.
The global PSF of one band is then expressed as a function of the coefficients c b at each pixel position x i on the postage stamp image, which are derived by minimizing the χ 2 sum over all of the sources: where f s is the total flux of the source s, s i is the variance estimate of pixel i of the source s, ( ) p x s i is the intensity of the pixel i, andc refers to the set of PSF coefficients. Once the global PSF has been determined in each band, we then decide on the "target PSF," corresponding to the desired PSF of all of the bands after homogenization. This is chosen so as to minimize the applied convolutions. We use a Moffat profile to represent the PSF (Moffat 1969); this provides a better description of the inner and outer regions of the profile than a simple Gaussian. The stellar radial light profile is 2 1 , and θ is the FWHM. Our target PSF is defined as a Moffat profile 0 .8 ,2 . 5. The required convolution kernel is calculated in each band by finding the kernel that minimizes the difference between the target PSF and the convolution product of this kernel with the current PSF. The images are then convolved with this kernel.
To estimate the precision of our PSF matching procedure, the photometry of the stars is extracted at 14 fixed apertures of radii r k , logarithmically spaced between  0. 25 and 2 5. In each band, the difference between the magnitude of the stars extracted in the aperture r k and the total magnitude (computed from the 4″ diameter aperture) is plotted in Figure 4 as a function of aperture. For comparison, the difference that would be obtained with the target profile [ ]   0. 8, 2.5 is overplotted as a red dashed line. The agreement is excellent up to a  2 radius on the plot.
The flux obtained with the best-fitting PSF in each band is normalized to the target profile and is also plotted in Figure 4 (left panel), before and after homogenization. For perfect homogenization, this ratio should be one, independent of aperture. For the 3″ diameter aperture, the relative photometric error for point-source objects after homogenization is below 5% (or equivalently a difference of ∼0.05 in magnitude). Unfortunately, despite previous attempts at PSF homogenization inside each field (Capak et al. 2007;McCracken et al. 2012), residual variations remain across the field. These are shown in Figure 5, which shows the distribution of the stellar FWHM and the median FWHM for two representative bands. While the PSF is relatively homogenous across the field for most of the bands (e.g., uband), there is larger scatter for some bands (e.g., IA464). In Appendix A.3, we discuss the effect of these variations on the aperture magnitude.
Concerning the cosmetic quality of the image, the convolution operation produces several undesirable effects. First, it induces a covariance in the background noise which can lead to photometric errors being underestimated. Second, since the homogenization process acts both on the FWHM and the profile slope (α and β parameters), the convolution kernel may contains negative components. In some bands it can lead to artefacts (such as rings) around saturated objects. We mask these saturated objects in the final catalog. We deal with the . Left: best-fitting stellar PSFs for all bands before and after homogenization (left upper and lower panels respectively), normalized to the target PSF  T . The vertical black solid line corresponds to the 3″ diameter aperture used for photometric redshifts. The horizontal dashed lines show the 5% relative error. The color map reflects the increase in seeing before homogenization. Right: Median curves of growth (the difference between the magnitude in the kth aperture r k with the total magnitude for point-like sources, estimated from the 4″ diameter aperture) as a function of aperture after homogenization for each band. The target Moffat profile with (θ, β) = (0.8, 2.5) is shown in red. The vertical dark dashed lines are the apertures provided in the final public catalog (2″ and 3″ diameters). correlation of the background by multiplying in each band the photometric errors derived from SEXTRACTOR by a correction factor (see Section 3.2 for more details).

Optical and NIR Data
Object photometry is carried out using SEXTRACTOR in "dual image" mode. The χ 2 zY JHK s detection image (Szalay et al. 1999) is produced using SWARP (Bertin et al. 2002) starting with the non-homogenized images. Since the main objective of our new catalog is to probe the high-redshift universe and to provide a catalog containing UV-luminous sources at > z 2, we create a detection image by combining NIR images of UltraVISTA (YJHK s ) with the optical z ++ -band data from Subaru. We do not use + i -band data since compact objects in the + i image saturate around i = 21. We extract fluxes from 2″ to 3″ diameter apertures on PSFhomogenized images in each band. The well-known difficulty in source extraction from astronomical images is that objects have ill-defined, potentially overlapping boundaries, making flux measurements challenging. The two main parameters that control extraction are the deblending threshold and the flux threshold. Therefore, a reasonable balance must be found between deblending too much (splitting objects) and not deblending enough (leading to merging). Simliar problems occur with the choice of the detection threshold: a low detection threshold can create too many spurious objects, and one that is too high may miss objects. This can be mitigated in part by a judicious choice of detection threshold and the minimal number of contiguous pixels which constitute an object. The solution we adopt is to set a low deblending and detection threshold while increasing the number of contiguous pixels to reject false detections. We validated this choice through careful inspection of catalogs superimposed on the detection and measurement images, which is feasible in the case of a single-field survey like COSMOS.
The background is estimated locally within a rectangular annulus (30 pixels thick) around the objects, delimited by their isophotal limits. Additionally, object mask flags indicating bad regions in the optical and NIR bands were included and saturated pixels in the optical bands were flagged using the appropriate FLAG_MAPs. Our chosen parameters are given in Table 9.
In the last step, catalogs from each band are merged together into a single FITS table and galactic extinction values are Figure 5. Distribution of the difference local seeing and the median image seeing for the selected stars in the u and IA464 bands as a function of the position. Note that for these seeing estimates, we did not fit each star individually with a Moffat profile, but we used the Gaussian-profile-based FWHM_WORLD parameter from SEXTRACTOR. While the u band is relatively homogenous across the field, IA464 shows large positional variations. This is the most extreme case in our catalog. Note. Logarithmic galaxy number counts are in units of galaxies per 0.5 mag per square degree.
computed at each object position using the Schlegel et al. (1998) values. These reddening values have to be multiplied by a factor computed for each band, derived from the filter response function and integrated against the galactic extinction curve (Bolzonella et al. 2000;Allen 1976). These factors are shown in Table 3.

GALEX Photometry
As in Ilbert et al. (2009), GALEX photometry (Zamojski et al. 2007) for each object was derived by cross-matching our catalog with the publicly available photometric + i -selected catalog described in Capak et al. (2007). 29 GALEX fluxes were measured using a PSF fitting method with the u * -band image used as a prior.

IRAC Photometry
The SPLASH data exceed the confusion limits in IRAC channel 1 and channel 2; better deblending techniques are necessary to estimate fluxes in these crowded, low-resolution images. We use IRACLEAN (Hsieh et al. 2012) to derive the SPLASH photometry. This makes use of the positional and morphological characteristics of objects detected in a highresolution image in a different waveband to deblend objects and derive more accurate fluxes in low-resolution images. Unlike other similar methods assuming that the intrinsic morphology of an object is identical in the two wavebands (i.e., there is no morphological k-correction), IRACLEAN is essentially the same as CLEAN deconvolution in radio imaging with nearly no morphological restrictions, except for the locations where CLEAN can opperate. This scheme minimizes the effect of morphological k-correction when a high-resolution image (i.e., the prior) and its low-resolution counterpart are taken in very different wavebands. However, there is a limitation for this scheme. If the separation of two objects is less than ∼1 FWHM, then the flux of the brighter object can be overestimated while the flux of the fainter one can be underestimated, as discussed in Hsieh et al. (2012). To solve this issue, we improve IRACLEAN by taking the surface brightness information in the prior into account. The new IRACLEAN uses the surface brightness of the prior to weight where CLEAN occurs for each object. The weighting strength is determined by the power of the surface brightness, i.e., (surface brightness of the prior) n , where n is the weighting parameter. If n is zero, then the surface brightness of the prior is ignored, and so the new IRACLEAN behaves like the original IRACLEAN. When n is greater than zero, the higher n is, the more heavily weighted the surface brightness is. If the wavebands of the prior and the target images are very different, then n can be set to a lower value, e.g., 0.1-0.3. If the wavebands of the prior and the target images are very similar, then n can be set to a higher value, e.g., 0.3-0.5. In general, n = 0.3 is sufficiently good for most cases.
In this paper, the UltraVISTA zY JHK s χ 2 image is used as the prior for the SPLASH images in IRACLEAN. To accelerate the process, both the UltraVISTA zY JHK s χ 2 image and the SPLASH images are broken up into the 144 tiles that are used for the COSMOS Subaru/ACS data, making parallel processing easier. The tiles overlap by  14. 4 around the edges to avoid flux underestimation for those objects close to the edges of the tiles. The SPLASH PSFs in each tile are generated using the point sources in that tile. The aperture size used to measure the flux ratios between sources and PSFs for the CLEAN procedure is ´ 1. 8 1. 8 and the weighting parameter n is 0.3. After the CLEAN procedure is completed, a residual map is generated which is used to estimate the flux errors. The flux error of each object is estimated based on the fluctuations in the local area around that object in the residual map. The IRACLEAN procedure is described fully in Hsieh et al. (2012).
Note. s f values have to be subtracted to the apparent magnitudes. 29 The version of the catalog used is available at http://irsa.ipac.caltech.edu/ data/COSMOS/tables/photometry/. This catalog supersedes that of Capak et al. (2007) with improved source detection and photometry.
X band: 3755 of these sources lie inside the UltraVISTA field of view. The Chandra COSMOS-Legacy catalog was matched with the UltraVISTA catalog using the Likelihood Ratio (LR) ratio technique (Sutherland & Saunders 1992). This method provides a much more statistically accurate result than simple positional match, taking into account the following: (i) the separation between the X-ray source and the candidate UltraVISTA counterpart; (ii) the counterpart K-band magnitude with respect to the overall magnitude distribution of sources in the field. Of the 3755 Chandra COSMOS-Legacy sources, 3459 (;92%) have an UltraVISTA counterpart. In the catalog, we also added the match with the X-ray detected sources from XMM-COSMOS Hasinger et al. 2007;Brusa et al. 2010) and the previous Chandra COSMOS catalog (Elvis et al. 2009;Civano et al. 2012).

Far-IR Photometry
Photometry at 24 μm was obtained for a total of 42,633 sources using an updated version of the COSMOS MIPSselected band-merged catalog published by Le Floc'h et al. (2009). In this catalog, 90% of the 24 μm-selected sources were securely matched to their K s -band counterpart using the WIRCAM COSMOS map of McCracken et al. (2010), assuming a matching radius of 2″. Counterparts to another 5% of the sample were found using the IRAC-3.6 μm COSMOS catalog of Sanders et al. (2007), while the rest of the 24 μm source population remained unidentified at shorter wavelengths. We thus considered the coordinates of the WIRCAM K-band or IRAC counterparts (or the initial 24 μm coordinates for the unidentified MIPS sources), and crosscorrelated these positions with the VISTA catalog using a matching radius of 1″. VISTA counterparts were found for all of the previously identified 24 μm sources and for an additional set of 117 objects detected by MIPS which had no previous identification.
We also provide Far-IR photometry obtained at 100, 160, 250, 350, and 500 μm using the PACS (Poglitsch et al. 2010) and SPIRE (Griffin et al. 2010) observations of the COSMOS field with the Herschel Space Observatory. The PACS data were obtained as part of the PEP guaranteed time program (Lutz et al. 2011), while the SPIRE observations were carried out by the HERMES consortium (Oliver et al. 2012). For each band observed with Herschel, source extraction was performed by a PSF fitting algorithm using the 24 μm source catalog as priors. Hence, far-IR matches to VISTA were unambiguously obtained from the 24 μm source counterparts described above, leading to a total of 6608 sources with a PACS detection and 17,923 sources detected with SPIRE. Total uncertainties in the SPIRE bands include the contribution from confusion. Flux density measurements with a signal to noise smaller than 3 in the initial SPIRE COSMOS catalog published by Oliver et al. (2012) are not considered in our present work.

Computation of Photometric Errors and Upper Limits
Precise photometric error measurements are essential for accurate photometric redshifts. For each Subaru band, we use effective gain values (Capak et al. 2007) for the non-convolved data to compute the magnitude errors. This is particularly important for the Subaru bands because of the long exposure times used for each individual exposure. However, because SEXTRACTOR errors are underestimated in data with correlated noise, we multiply the magnitude and flux errors with a correction factor computed for each band from empty apertures (based on the segmentation map, apertures that contain an object have been discarded). Following Bielby et al. (2012), this factor is computed in each band for the 2″ and 3″ apertures and taken at the ratio between the standard deviation of the flux extracted in empty apertures on the field and the median of the SEXTRACTOR errors. For UltraVISTA, we compute separate values for the Ultra-deep ( UD ) and deep ( Deep ) regions. The corrections are given in Table 3.
In some bands, a source may be below the measurement threshold while at the same time be detected in the combined zY JHK s χ 2 image. In this case, in the measurement band, SEXTRACTOR may not report consistent magnitudes or magnitude errors, and we report upper limits on the source magnitudes in each band where they are too faint to be detected. To compute the magnitude limits, we run SEXTRAC-TOR on each individual image using the same detection parameters. All of the pixels belonging to objects are flagged. Fluxes are measured from PSF-homogenized images in empty apertures of 2″ and 3″, discarding all of the apertures containing an object. The magnitude limit is then computed from the standard deviation of fluxes in each aperture.
This method is not always appropriate since the values of the upper limits may vary over the field, as shown in Figure 6. This is why we use a local estimate for the upper limits in the six broad bands of optical data (u, B, V, r, + i , z ++ ). In these bands, upper limits are calculated for each object from the variance map and are defined as being the square root of the variance per pixel integrated over the aperture. The magnitude of the object is set to the 3σ magnitude limit if the flux is below the 3σ flux limit, or if the flux is below the flux error. The averaged values of these upper limits are consistent with the value computed with the first method and are displayed in Table 1. The upper limits in these bands are important because young, star-forming objects at high redshift will have apparent magnitudes in the optical bands of the order of the limiting magnitude. The computation of the photometric redshift uses fluxes and so does not use the upper limits which are only applied to the magnitudes, but it may be useful when working with magnitudes to know whether or not the object is within the upper limit.

Number Counts
In Figure 7, we plot the number of galaxies per square degree per magnitude as a function of K s magnitude for objects in both the  Deep and  UD regions (details of the star-galaxy separations can be found in Section 4.5). The corresponding values are presented in Table 2.
Our counts are in excellent agreement with the literature. We reach more than one magnitude deeper compared to the previous UltraVISTA-DR1 ). In addition, our counts are in good agreement with the much deeper Hawk-I survey (Fontana et al. 2014) up to at leastK 24.5 s .

X-Ray Photometry
The Chandra COSMOS-Legacy Survey Marchesi et al. 2016) contains 4016 X-ray sources down to a flux limit of f 2 × 10 −16 erg s −1 cm −2 in the 0.5-2 keV At the s 3 limit in K s , we detect almost twice as many objects per square degree in  UD than in  Deep . Furthermore, our catalog contains~1.5 10 5 objects with < K 24.7 s in  UD compared to~0.8 10 5 found with UltraVista-DR1  in the same region at the detection limit in K s . In  Deep , the difference is less significant since the depths are comparable, with~0.9 10 5 objects compared tõ0 .7 10 5 found in UltraVista-DR1. Compared with the previous publicly available photometric + i -selected catalog (described in footnote 4) at the detection limit < + i 26.1 (limiting magnitude at 5σ in a 3″ diameter aperture from Capak et al. 2007), we find that 16.1% of sources are not present in COSMOS2015, as shown on Figure 8. Many of these missing sources are blue, faint ( < < + i 25.5 26.1), low-mass, star-forming galaxies. This difference is to be expected, since an NIR-only selection and a pure + i -selection are not expected to sample the same galaxy populations.
However, we have mitigated this difference by including the z ++ band in our detection image; this percentage is smaller than in Ilbert et al. (2013) where the detection image was shallower and did not include any optical bands. Furthermore, the previous + i -selected catalog also contained spurious objects near the detection limit, and therefore the fraction of missed genuine objects can be expected to be lower.

Astrometric Accuracy
We compared the astrometric positions of bright, nonsaturated objects in COSMOS2015 with those in the COSMOS reference catalog from Leauthaud et al. (2007) and the publicly available + i -selected photometric catalog (footnote 4) described in Capak et al. (2007). This is illustrated in Figure 9. There is good agreement between COSMOS2015 and the Leauthaud et al. (2007) catalog. The shift between the + i -selected catalog and Leauthaud et al. (2007) is no longer present in   COSMOS2015. This shift occurs below a pixel size of 0 15. These comparisons show that our astrometry is accurate to at least one pixel.
We note that the COSMOS astrometric reference catalog used in McCracken et al. (2010McCracken et al. ( , 2012 and this paper is based on a reference catalog extracted from a Megacam i-band (data taken in 2004) image covering the full COSMOS field. The astrometric zero point of this catalog was set using radio interferometric observations (Schinnerer et al. 2004). At scales smaller than the size of the resampled pixels, it has been challenging to test the astrometric accuracy for our catalog given the lack of availability of sufficiently dense astrometric catalogs. However, we have compared the positions between our catalog and the catalogs extracted from the independently reduced Hyper Suprime-Cam images described here, and this has confirmed that our astrometric solutions are good at the level of one pixel. For future data releases, we intend to improve our overall astrometric precision by using densely sampled catalogs based on either Hyper Suprime-Cam or Pann-Starrs data, which are tied to 2MASS.

Input Catalog
We use fluxes rather than magnitudes for our photometric measurements to deal robustly with faint or non-detected objects. Faint objects may have a physically meaningful flux measurement, whereas their magnitudes and magnitude errors may be undetermined (for example, if the flux is negative). Consequently, when using magnitudes, we must set an upper limit: for flux measurements with correct flux errors, this is no longer necessary. There is no loss of information when using flux measurements. This leads to a better determination of the photometric redshift and a lower number of catastrophic failures at > z 2. Photometric redshifts are computed using 3″ aperture fluxes. The fixed-aperture magnitude estimate is expected to be less noisy for faint sources than the pseudo-total Kron (Kron 1980) magnitudes MAG_AUTO. This is because MAG_AUTOʼs variable aperture is derived from the detection image, which means that fainter objects can potentially have noisier colors (Hildebrandt et al. 2012, Moutard et al. 2016. This magnitude measurement is also susceptible to blended sources. We find that the 3″ aperture photometry gives slightly better photometric redshifts than the 2″ aperture at low redshift (below  z 1) and we adopt this aperture over the entire redshift range of our survey. We suspect that the photometric redshift precision is lower in the 2″ apertures due to small-scale residual astrometric errors. This is being investigated for the upcoming DR3 UltraVISTA release.
Photometric redshift computations use colors, and consequently, should not be sensitive to a systematic magnitude calibration offset. However, in contrast to optical and NIR data, GALEX and IRAC data provide total magnitudes or fluxes, which require an estimate of the total flux from the corrected  3 aperture fluxes to be consistent over the full wavelength range. This is also needed to derive stellar masses. For each object, we compute a single offset o (the same for all the bands) which allows for the the conversion from aperture to total magnitude. The offset is computed following Moutard et al. (2016, submitted): where we have: This leads to the assumption that the PSF profile is the same in all of the bands. As it is averaged over all of the broad bands, i.e., u, B, V, r, + i , z ++ , Y, J, H, and K s , this offset is more robust than the one which would have been computed by band. These offsets are given in the final catalog.

Method
To compute the photometric redshifts, we use LEPHARE (Arnouts et al. 2002;Ilbert et al. 2006) with the same method as used in Ilbert et al. (2013). Our aim is to compute precise photometric redshifts over a wide redshift range for many object types with minimum bias. Obviously, a single set of recipes will not perform as well as several configurations, with each one tuned to optimize the fit at different redshifts. That is why we use a set of 31 templates including spiral and elliptical galaxies from Polletta et al. (2007) and a set of 12 templates of young blue star-forming galaxies using Bruzual & Charlot (2003) models (BC03). Extinction is added as a free parameter ( ( ) -< E B V 0.5) and several extinction laws are considered: those of Calzetti et al. (2000), Prevot et al. (1984), and a modified version of the Calzetti laws including a "bump" at 2175 Å (Fitzpatrick & Massa 1986). Using a spectroscopic sample of quiescent galaxies, Onodera et al. (2012) showed that the estimate of the photometric redshift for the quiescent galaxies in Ilbert et al. (2009) were underestimated at . Astrometric comparison for bright objects between our catalog, the catalog from Leauthaud et al. (2007), and the publicly available COSMOS + i -selected catalog (Capak et al. 2007). Black arrows show the shift between Capak et al. and COSMOS2015, red arrows between Leauthaud et al. (2007) and COSMOS2015. Finally, green arrows show the shift between the two previous catalogs. All of these shifts occur below one pixel.
< < z 1.5 2. Following Ilbert et al. (2013), we improved the photometric redshift for this specific population by adding two new BC03 templates assuming an exponentially declining SFR with a short timescale t = 0.3 Gyr and extinction-free templates.
Finally, we compute the predicted fluxes in every band for each template and follow a redshift grid with a step of 0.01 and a maximum redshift of 6. The computation of the fluxes also takes into account the contribution of emission lines using an empirical relation between the UV light and the emission line fluxes as described in Ilbert et al. (2009).
The code performs the c 2 analysis between the fluxes predicted by the templates and the observed fluxes of each galaxy. At each redshift, z step , and for each template of the library, the c 2 is computed as is the flux predicted for a template T at z step and α is the normalization factor. Then, the c 2 is converted to a probability of = c p exp 2 2 . All of the probability values are summed up at each redshift z step to produce the probability distribution function (PDF). We then determine the photometric redshift solution from the median of this distribution. The 1σ uncertainties given in the catalog are derived directly from the PDF and enclose 68% of the area around the median.
An important aspect of the method is the computation of systematic offsets which are applied to match the predicted magnitudes and the observed ones (Ilbert et al. 2006). We measure these offsets using the spectroscopic sample. For each object, we search for the template which minimizes the c 2 at fixed redshift. Then, we measure the systematic offset that minimizes the difference between the predicted and observed magnitudes. This procedure iterates until convergence.
The photometric redshift distribution for the + i -and K s -selected samples is given in Figure 10. Magnitudes are measured in corrected 3″ aperture magnitudes with the derived systematic offset applied. Several interesting trends are apparent. In general, the median redshift of our K s sample is higher than our + i -selected samples. Also, the fraction of sources at higher redshifts is greater for the NIR-selected samples. These effects are largely due to the well-known positive evolutionary corrections and k-corrections for NIRselected samples. Optically selected samples at higher redshifts move progressively to shorter rest-frame UV wavelengths, which are strongly attenuated by dust and the intergalactic medium. We compare these distributions with a simple three-component galaxy population model generated with the PEGASE.2 code (Fioc & Rocca-Volmerange 1997. Each population starts forming at z = 8 via the infall of pristine gas on a specific timescale and gas is converted into stars at a specific rate. The corresponding star formation histories peak at z 4, 2, and 0, and the z = 0 predicted optical-NIR colors correspond to those of local Sa, Sbc, and Sd galaxies, respectively. The total baryonic mass (gas, stars, and hot halo-gas) of each galaxy is assumed to be constant, and the mass function of each population is tuned so that the sum of the three populations matches simultaneously the local luminosity function in the B band, the deep galaxy counts in the B, V, I, and K s bands, as well as the cosmic star formation rate density and the stellar mass density observed at =z 0 6. The agreement between the data and this simple three-component model is quite good. This success lies in the differential contributions of the three galaxy populations to the counts. Indeed, our modeled counts at = K 24 s are the sums of the almost equal contributions of Sd progenitors at z ∼ 0.7, Sb progenitors atz 1.2s, and Sab progenitors at z ∼ 2. In contrast, a simpler modeling of the galaxy populations  (Fioc & Rocca-Volmerange 1997. Plotted errorbars are uncertainties estimated from jacknife errors, splitting the field into 25 sub-fields. using a single scenario with an SFH proportional to SFRD(z) (star formation rate density) and a unique mass function leads to very good agreement between the integrated counts in the + i and K s bands, as well as a good match between SFRD(z) and ( ) * r z , but it completely overshoots the mean redshift of theK 24 s or+ i 24.5 sources (z ∼ 2, whereas the COSMOS data shows it is peaked at z1). Other choices of modeling that we explored also lead to a high level of tension in the SFRD(z), ( ) * r z , or in the counts in the + i , K s , or B bands.

Photometric Redshift Accuracy Measured using Spectroscopic Samples
The COSMOS field is unique in its unparalleled spectroscopic data set. These spectroscopic samples, derived from many hundreds of hours of telescope time in many different observing programs, are a key ingredient in allowing us to characterize the precision of our photometric redshifts.
From the COSMOS spectroscopic master catalog (M. Salvato et al. 2016, in preparation), we retain only the highly reliable 97% confidence-level spectroscopic redshifts (Lilly et al. 2007). We estimate the precision of the photometric redshift using the normalized median absolute deviation (Hoaglin et al. 1983 Table 4, we compare the photometric redshift precision in COSMOS2015 with that of the catalog of Ilbert et al. (2013) by cross-matching the two catalogs and considering the same sources in both cases. Compared to Ilbert et al. (2013), the number of catastrophic failures are reduced and the photometric redshift precision is either increased or is unchanged. It should be recalled, however, that the main gain of COSMOS2015 is the considerable increase in catalog size compared to Ilbert et al. (2013).
The left and right panels of Figure 11 show thw photometric redshift precision as a function of the i-band magnitude for starforming and quiescent galaxies, respectively (classified using the NUV − r/r − J diagram, Figure 16). Very bright, lowredshift, star-forming galaxies have the most precise photometric redshifts (s = 0.007, h = 0.5% for < < + i 16 21). Moreover, even at > z 3, the accuracy is still very good (0.021), with only 13.2% of catastrophic failures.
We now describe the photometric redshift precision and outlier fraction for each spectroscopic sample. In all of the cases, the numbers correspond to the fraction of secure spectroscopic redshifts not falling in masked regions in our Table 4 Performance of the Catalog as A Function of Magnitude and Galaxy Types for Galaxies Detected Both in COSMOS2015 and Ilbert et al. (2013)   Note. Only the most secure spectroscopic redshifts are considered (those with a flag between 3 and 4). The redshift range, median redshift, and apparent magnitude in the + i band are provided for each selected sample.
survey. These results are also summarized in Table 5 and plotted in Figure 12. zCosmos bright at < z 1.2 (Lilly et al. 2007). This sample from the zCOSMOS-bright survey includes 8608 galaxies selected with  + i 22.5 AB (3σ, 3″) observed with VIMOS at the VLT. We find s = 0.007 and h = 0.51%.
FORS2 sample at < z 3.7 (Comparat et al. 2015). This color-selected sample includes 788 objects and targets emission lines galaxies with 20 minute integration times with FORS2 at the VLT. We find s = 0.009 and h = 2.03%.
The Keck follow-up reachingz 6 (Kartaltepe et al. 2010, P. Capak et al. 2016, in preparation).This sample comprises spectroscopic redshifts of 2022 objects, some of which are > z 4 sub-populations selected in IR, and measured with DEIMOS at Keck II. We find s = 0.014 and h = 7.96%.
FMOS sample of IR luminous galaxies at < < z 0.8 1.5 (Roseboom et al. 2012). We compare our results with 26 Herschel SPIRE and Spitzer MIPS-selected galaxies observed with FMOS at Subaru. We find s = 0.009 and h = 7.69%.
A faint sample of quiescent galaxies at < < z 1.2 2.1 (Onodera et al. 2012). This sample contains 10 faint, quiescent galaxies at < z 2 obtained with MOIRCS at Subaru. We find s = 0.017, with no catastrophic failures.   Table 5. the 68% of the expected value. This is confirmed when we split the spectroscopic sample per magnitude and redshift bin. It appears that our errors on photometric redshift are underestimated by a factor which depends on the magnitude. We consequently chose to correct these errors by applying the following magnitude-dependent correction: errors are multiplied by a factor of 1.2 for bright objects ( < + i 20) and by a factor of ( ) -  . Of the spectroscopic redshifts 58% have their photometric redshift within the 1σ error; this implies that photometric errors are slightly underestimated. This plot is made with the high-confidence spectroscopic redshift catalog. FMOS-COSMOS survey at 1.4 z<<1.8 (Silverman et al. 2015). These 178 FMOS at Subaru spectroscopic redshifts were selected from the Ilbert et al. (2009) catalog, which implies that the fraction of catastrophic failures (1.12%) will be underestimated. We find s = 0.022 and h = 1.12%.
A faint sample of quiescent galaxies at 1.9 z<<2.5 Krogager et al. (2014). This sample contains 11 faint quiescent galaxies obtained with the WFC3-grism observations from the 3D-HST survey. We find s = 0.069, with no catastrophic failures.
zCosmos faint sample at 1.5 z<<2.5 (S. Lilly et al. 2016, in preparation). This sample includes 767 galaxies colorselected to lie in the range 1.5 z2.5 observed with VIMOS at theVLT. This redshift range is the least constrained in photometric redshift and the median magnitude i + AB is as faint as 23.8 (3σ,3″). Nevertheless, we find s = 0.032 and h = 7.95%.
A sample of galaxies obtained with X-Shooter at VLT (M. Stockmann et al. 2016, in preparation, Zabl 2015. This sample contains eight massive quenched galaxies around z ~ 2 (M. . The VIMOS Ultra-Deep Survey targeted z > 2.4 galaxies using color-color and photometric redshift selections. The VUDS sample includes extremely faint galaxies with a median magnitude of i + AB ~ 24.6 (3σ,3″) with a total exposure times of 40 hr per spectra. This sample contains a larger number of catastrophic failures, mostly because of the misidentification between the Lyman and Balmer break features. This is because some of the objects do not have associated NIR data. Such data are extremely important at z > 1.5.We find s = 0.028 and h = 13.13%.
Note that the X-ray detected sources from XMM-COSMOS Hasinger et al. 2007;Brusa et al. 2010) and Chandra COSMOS (Elvis et al. 2009;Civano et al. 2012) are flagged and are not used here. For those sources, the photometric redshift are computed with a specific tuning and are presented in Salvato et al. (2011).

Photometric Redshift Accuracy Based on the Probability Distribution Function
We also assess the photometric redshift accuracy using the 1σ uncertainty derived from the photometric redshift prob-ability distribution function (PDFz). The advantage of this method is that we can investigate the photometric redshift accuracy in any redshift-magnitude range. However, it requires an accurate estimate of the PDFz.
In Figure 13, we show the cumulative distribution of the ratio |zz ps | 1s. The 1s error given by LEPHARE is defined as the value enclosing 68% of the probability distribution function of the photometric redshift. Assuming that z s is the true redshift, 68% of the time it should fall within the 1s error. This comparison shows that the 1s uncertainties enclose less than redshift catalogs derived with LEPHARE, and we have not been able to determine why photometric redshift errors are underestimated; one reason could be the lack of representativity of our set of templates, while another reason could be that we do not include the intrinsic template uncertainties. Another reason might be that the flux uncertainties in the photometric catalog are still underestimated. With this magnitude-dependent correction, there is no consequence on the computation of the physical parameters. However, the PDFz remains systematically too peaky around the median values. Figure 14 shows the 1σ negative and positive uncertainties as a function of redshift for different bins of apparent magnitude. The magnitude-dependent correction described above has been applied to this plot. Several clear conclusions emerge: first, the photometric precision is lower for galaxies with fainter apparent magnitudes at all redshifts; second, the photometric redshifts have significantly lower uncertainties at  z 1.4. This is easy to understand because here the Balmer break is redshifted within the wavelength range covered by the medium bands. At   z 1.4 2.5, the redshift uncertainty increases by a factor of two. Such a trend is to be expected: the accuracy of the photometric redshift is mainly driven by accurate knowledge of the Balmer break position. Specifically, at > z 1.5, the Balmer break moves outside the medium bands into the NIR range. Moreover, the absolute photometric precision is lower for a given signal-to-noise object in the near-infrared bands than in the optical. Additionally, the position of the Balmer break is less precisely determined using broadband rather than medium-band photometry. This is reflected in the redshift uncertainty which rises at > z 1.5. For the same reason, we observe a difference in the redshift uncertainties which are lower in  UD regions compared to  Deep regions, which is not the case at < z 1.4: the photometric accuracy is higher in  UD regions. Atz 2.5, the Lymanbreak enters the optical bands and consequently the photometric redshift precision increases. In general, at bright magnitudes and lower redshifts, the dominant sources of error are probably related to photometric calibrations and spectral energy distribution (SED) fitting.

Star/Galaxy Classification
We use LEPHARE with both galaxy and stellar templates. We compare the best-fitting c 2 for the galaxy templates c gal 2 and those derived for the stellar templates c stars 2 to determine the star-galaxy classification. We flag as stars all those objects for which c c ->0 . Figure 15 shows a BzK color-color diagram for all of the sources including stars and galaxies. Symbols are colored according to their photometric redshifts. As expected, -B dropouts occur predominately at > z 4, and galaxies with bluer -++ z K color are at lower redshifts. Stars selected using the above classification are shown in black. In the  UVISTA region, 24,074 objects are classified as stars. A cross-match with the ACS stellar catalog Leauthaud et al. 2007 shows that 77% of the stars with < + i 24 from ACS are classified as stars with this method. However, 15% are misclassified as galaxies but are in masked areas. Finally, 0.6% of the extended sources are misclassified as stars.

Absolute Magnitudes and Stellar Masses
An estimate of the k-correction term (Oke & Sandage 1968) relies on the best-fitting template. This component is one of the main sources of systematic error in the absolute magnitude and rest-frame color estimate. To estimate these quantities, we follow the method outlined in Appendix A of Ilbert et al. (2005). In order to minimize the k-correction-induced uncertainties, the rest-frame luminosity at a given wavelength λ is derived from the apparent magnitude m obs observed at the  nearest filter to ( ) l + z 1 . Using this procedure, the absolute magnitudes are less dependent on the best-fit SED, but are more dependent on any observational problem affecting m obs . Therefore, we constrain the code to consider only the broad bands for m obs and those bands with a systematic offset lower than 0.1 mag derived for the photometric redshift.
We derive the stellar mass using LEPHARE following exactly the same method as in Ilbert et al. (2015). We derive the galaxy stellar masses using a library of synthetic spectra generated using the Stellar Population Synthesis model of Bruzual & Charlot (2003). We assume a Chabrier (2003) initial mass function. We combine the exponentially declining SFH and delayed SFH (t t -te t 2 ). Two metallicities (solar and halfsolar) are considered. Emission lines are added following Ilbert et al. (2009). We include two attenuation curves: the starburst curve of Calzetti et al. (2000) and a curve with a slope of l 0.9 (Appendix A of Arnouts et al. 2013). The ( ) -E B V values are allowed to take values as high as 0.7. We assign the mass using the median of the marginalized probability distribution function (PDF). Given the uncertainties on the SFR based on template fitting (Ilbert et al. 2015;Lee et al. 2015), we do not include the SFRs estimated from template fitting in our distributed catalogs.

Galaxy Classification
Quiescent galaxies can be identified using the locations of galaxies in the color-color plane NUV-r/r-J (Williams et al. 2009 . This technique is described in more detail in Ilbert et al. (2013); in particular, this technique avoids mixing the red dusty galaxies and quiescent galaxies. In our catalog, galaxies with a flag of 0 are quiescent galaxies and the others are star-forming galaxies. The redshiftdependent evolution of this distribution is presented in Figure 16. The rapid build-up of quiescent galaxies at low  (right) regions for the full catalog (top) and for the quiescent sample (bottom). Orange lines shows the mass limit for the full catalog and red lines for the quiescent ones. These values are reported in Table 6. The solid green line is the mass limit in COSMOS as given in Ilbert et al. (2013). redshift inside the box is evident, as is the relative decrease in bright, star-forming galaxies outside the box.

Stellar Mass Completeness
We empirically estimate the stellar mass completeness (Pozzetti et al. 2010;Davidzon et al 2013;Ilbert et al. 2013;Moustakas et al. 2013). We first determine the magnitude limit K s lim . For each galaxy, we then determine the mass it would need to have to be observed, at that redshift, at the magnitude limit: Next, in each redshift bin, we estimate the stellar mass completeness M lim within which 90% of the galaxies lie. We independently estimate the mass limits on  Deep and  UD . We compute these mass limits using the 3σ limiting magnitude, which is 24.0 for  Deep and 24.7 for  UD . These mass limits are given in Table 6 and are shown in Figure 17. In  UD , the mass limits reach a factor of two lower compared Ilbert et al. 2013. As expected, the mass limit is lower in  UD compared to  Deep because  UD reaches 0.7 magnitudes fainter in the K s band. This estimate is robust toz 4 because the observed K s magnitude correlates well with stellar mass in this redshift range. However, these estimates should be treated cautiously at > z 4. Above this redshift, the rest-frame K s band lies below the Balmer break and the K s flux does not correspond precisely to the stellar mass. It is then better traced by mid-IR bands. We will estimate the mass limit at high redshift for an IRACselected sample in future work (I. Davidzon et al. 2016, in preparation).

Galaxy Clustering Measurements
We estimate the projected galaxy clustering in our sample by computing the angular two-point auto-correlation function ( ) q w . The angular correlation function ( ) q w measures the excess probability of finding two objects separated by an angle θ compared to a random distribution in a series of angular bins. This measurement is an excellent test of the uniformity of our photometric catalog as w is very sensitive to large-scale photometric systematic errors. Adding cuts in stellar mass and photometric redshift allows for an independent check of our photometric redshift procedures. We use w to compute this using ATHENA, 30 which uses the usual Landy & Szalay (1993) estimator: where N r and N d are the numbers of points in the random and galaxy samples, and RR, RD, and DD are the numbers of pairs in the random catalog, between the random and galaxy catalog, and in the galaxy catalog. Our random catalog contains Figure 18. Angular correlation function w as a function of angular scale θ in degrees at < < z 0.5 1 for several bins in stellar mass. The solid line shows the analytic predictions of Coupon et al (2015). 30 www.cosmostat.org/software/athena/ 500,000 objects. Our measurements are corrected for the "integral constraint" (Groth & Peebles 1977), a systematic effect arising from using a clustered sample to estimate the mean background density in a finite area. Figure 18 shows w in < < z 0.5 1 in six mass bins compared to the best-fitting occupation distribution (HOD) model derived by Coupon et al (2015) in the MIRACLES/ CFHTLS field. Our measurements are in excellent agreement with the predictions of Coupon et al.ʼs best-fitting HOD model, computed from a larger 25 deg 2 field. This suggests that, at these redshift ranges and masses, cosmic variance is not an important issue in the COSMOS field. Only at high stellar masses and small scales is there a systematic offset from the models, which may indicate the limitations of the halo model in this mass regime.
Finally, we note that, in contrast to this result, some works have noted that there is a clear excess in the number of galaxies in COSMOS compared to other fields (see, e.g., Figure 33 in Molino et al. 2014) due to the presence of large structures at z 1 and below, which could influence our correlation function measurements (McCracken et al. 2007). The measurements presented above cover quite a large redshift range and consequently probe a lare volume, and are therefore less susceptible to the effects of cosmic variance. In smaller redshift slices and at higher redshifts, the effect of cosmic variance becomes more pronounced, especially when these redshift ranges overlap with several of the large structures known to exist in the COSMOS field, for example, at < < z 1 1 . 3 (see also the discussion in McCracken et al. 2015).

CONCLUSION
Using the unique combination of deep multi-wavelength data and spectroscopic redshifts on the COSMOS field, we have computed a new catalog containing precise photometric redshifts and 30-band photometry. COSMOS2015 contains more than half a million secure objects over two square degrees. Including new YJHK s images from the UltraVISTA-DR2 survey, Y-band images from Hyper Suprime-Cam, and IR data from the SPLASH Spitzer legacy program, this NIRselected catalog is highly optimized for the study of galaxy evolution and environment in the early universe. To maximize catalog completeness to the highest redshifts, objects have been detected and selected using an ultra-deep χ 2 sum of the YJHK s and z ++ images.
The main improvements of the catalog compared with previous versions are as follows.
1. A greater number of sources thanks to the combination of deeper data (UltraVISTA-DR2) and an improved extraction image. This image now contains the bluer z ++ band in addition to the redder NIR bands. There are now6 10 5 objects in the 1.5 deg 2 UltraVISTA-DR2 area and~1.5 10 5 in the "ultra-deep stripes" sub-region at the limiting magnitude in K s . This represents more than twice as many objects per square degree compared to Ilbert et al. (2013).  , . The black and white contours represent the regions which enclose 68% and 95% of the β-θ stellar distribution for two representative bands: u (Left), which is relatively homogenous across the field, and IA464, which is not. Figure 20. Magnitude difference for a point-like object (green), an elliptical galaxy (red), and a spiral galaxy (blue) convolved with a PSF [ ]  q, 2.5 as a function of the seeing θ and for two different effective radii, 0 5 (solid line) and 0 8 (dashed line), when the extraction is performed in 3″ diameter apertures.
where i is the object identifier and f the filter identifier. A similar procedure should be followed for the flux measurements. Magnitudes should also be corrected for foreground galactic extinction using reddenning values EBV given in the catalog and the extinction factors (F f ) mentioned in Table 3 according to

A.3. Effect of Seeing on the Aperture Magnitude
As discussed in Section 2.2, there is a variation of the PSF within the field which is not taken into account in our homogenization. For this reason, it is important to estimate the magnitude differences arising from this variation. To achieve this, we present here a toy model to estimate the effect of the seeing variation on the aperture magnitude for point-like objects. We denote D stars (θ, β, r) as the difference of the aperture magnitudes for a PSF represented by a Moffat profile [ ]  q b , and with a PSF [ ]   0. 8, 2.5 . D stars is a function of θ and β, the two parameters which define the Moffat profile, and r, which is the aperture diameter. We present in Figure 19 D stars (θ, β, 3″) in the two-dimensional (2D) parameter , . We overplotted on this 2D distribution the contours which enclose 68% and 95% of the [θ, β] distribution for the two bands u and IA464. For the purpose of this figure, each star seeing is individually computed from a fit with a Moffat profile on the PSF-homogenized star profiles (reconstructed from the flux extracted at 14 fixed apertures, logarithmically spaced between 0 25 and 2 5). Note that since the Moffat Profile is fitted on individual stars from 14 discrete apertures and not on all of the point sources at the same time, the precision of the fit is limited. However, this immediately provides a qualitative insight as to the bias generated by internal PSF variation when extracting the star photometry within a 3″ aperture. For the worst band, IA464, this bias is expected to remain below 0.1 mag. We also estimate that the median of the magnitude difference is below 0.05 mag, which is in agreement with Figure 4. We then estimate this bias in the photometry for extended objects. We chose two different galaxy luminosity profiles, namely, a de Vaucouleurs profile (1948,1959), to model a typical elliptical galaxy profile, and an exponential profile to model a spiral galaxy profile, Here, R e is the effective radius such that half of the total flux is within R e . We then convolved the luminosity profiles with the Moffat profile, and integrate them in a circular aperture of 3″. For this exercise, we keep β constant and equal to 2.5 and we allow θ to vary. In Figure 20, we present the difference D spiral (θ, 2.5, 1 5) and D elliptical (θ, 2.5, 1 5) for two effective radii ( = R e 0.5 and 0 8). We note that for FWHM differences below 0 1, the induced magnitude discrepancies are always lower than 0.05, regardless of the galaxy profile.

A.1. Catalog Description
The details of the regions flagged in the catalog are presented in Table 7. We perform COSMOS2015 quality checks only in the inner part of the field covered by UltraVISTA-DR2. On the part of the field not covered by UltraVISTA, source extraction is performed only on the z ++ -band data and using the same parameters. This part of the field has a higher fraction of spurious sources and must be exploited carefully, particularly when selecting a mass-selected sample. The area referred to as Deep above is the region covered by  UVISTA not contain-ing  UD .
The parameters for the extraction of the photometry in dual mode with SEXTRACTOR are presented in Table 9.
Each column in the catalog is fully described by a README file distributed with the catalog. We summarize the main content of our data products in Table 8.

A.2. From Aperture Magnitudes to Total Magnitudes
Finally, we emphasize that to compute the total magnitudes, one should use 3″ diameter apertures corrected for the photometric offsets (o i , cf. Equation (4)) and systematic offsets (s f , cf.