Measuring galaxy abundance and clustering at high redshift from incomplete spectroscopic data: Tests on mock catalogs

The number density and correlation function of galaxies are two key quantities to characterize the distribution of the observed galaxy population. High-$z$ spectroscopic surveys, which usually involve complex target selection and are incomplete in redshift sampling, present both opportunities and challenges to measure these quantities reliably in the high-$z$ Universe. Using realistic mock catalogs we show that target selection and redshift incompleteness can lead to significantly biased results, especially due to the flux limit selection criteria. We develop a new method to correct the flux limit effect, using information provided by the parent photometric data from which the spectroscopic sample is constructed. Our tests using realistic mock samples show that the method is able to reproduce the true stellar mass function and correlation function reliably. Mock catalogs are constructed for the existing zCOSMOS and VIPERS surveys, as well as for the forthcoming PFS galaxy evolution survey. The same set of mock samples are used to quantify the total variance expected for different sample sizes. We find that the total variance decreases very slowly when the survey area reaches about 4 deg$^2$ for the abundance and about 8 deg$^2$ for the clustering, indicating that the cosmic variance is no longer the dominant source of error for PFS-like surveys. We also quantify improvements expected in the PFS-like galaxy survey relative to zCOSMOS and VIPERS surveys.


INTRODUCTION
The two most basic functions that characterize the observed galaxy population in the universe are the luminosity/stellar mass function (e.g.Cole et al. 2001;Bell et al. 2003;Baldry et al. 2008;Li & White 2009) and the spatial two-point correlation function (e.g.Jing et al. 1998;Norberg et al. 2001;Zehavi et al. 2005;Li et al. 2006b;Abbas & Sheth 2006;Zehavi et al. 2011).The former measures the number density of galaxies as a function of their luminosity or stellar mass, while the latter describes how strongly galaxies are clustered in space.In the current cold dark matter paradigm of structure formation (White & Rees 1978;Mo et al. 2010, and references therein), these two functions provide the key to understanding how galaxies form and evolve in the cosmic density field.Indeed, the observed luminosity/stellar mass function and correlation function have been widely used to constrain theoretical models (e.g.Cole et al. 2000;Yang et al. 2003;Zheng et al. 2005;Lu et al. 2011;Artale et al. 2017;Springel et al. 2018;Wechsler & Tinker 2018).
The best way to obtain both the stellar mass function and correlation function is through the use of spectroscopic surveys of galaxies, where distances of individual galaxies can be estimated from spectroscopically-measured redshifts and stellar masses can be estimated from the spectra combined with multi-band photometry (Ilbert et al. 2006;Pozzetti et al. 2007;Boquien et al. 2019).A lot of efforts have been made to measure the two functions using various redshift surveys.For example, in the low-z universe, galaxy stellar mass function has been estimated from 2-degree Field Galaxy Redshift Survey (2dFGRS; Cole et al. 2001), Sloan Digital Sky Survey (SDSS; Li & White 2009) and Galaxy and Mass Assembly survey (GAMA; Baldry et al. 2012), while the two point correlation function has been measured from the Las Campanas Survey (e.g.Jing et al. 1998), 2dF-GRS (e.g.Madgwick et al. 2003), SDSS (e.g.Li et al. 2006b;Zehavi et al. 2011) and GAMA (e.g.Farrow et al. 2015).At higher redshift, galaxy stellar mass function has been measured from DEEP2 Galaxy Redshift Survey (DEEP2; Bundy et al. 2003), zCOSMOS (Pozzetti et al. 2010), VIMOS-VLT Deep Survey (VVDS; Pozzetti et al. 2007), and The VIMOS Public Extragalactic Redshift Survey (VIPERS; Davidzon et al. 2013), while the two-point correlation function has been estimated from DEEP2 (Coil et al. 2006), zCOSMOS (Meneux et al. 2009;de la Torre et al. 2011), VVDS (Pollo et al. 2006) and VIPERS (Mohammad et al. 2018;Marulli et al. 2013).
To facilitate comparisons with model predictions, statistical measurements of the galaxy population, such as the stellar mass function and correlation function, are useful only when the samples used for the measurements are well defined.However, owing to observational limitations, real samples usually contain complex selection effects which make them incomplete in sampling the galaxy population we are interested in.Such incompleteness is particularly important for galaxies at high redshift (Ilbert et al. 2005;Pozzetti et al. 2010) where observational limitations are severer than in the low-z universe.Generally there are three incompleteness effects that have to be carefully taken into account.The first one, referred to as the sampling rate effect in the following, is that only a fraction of galaxy targets selected from the parent photometric sample can be included in the final spectroscopic sample, .This effect is contributed by the incomplete sampling of galaxy targets selected for observations and the imperfect redshift determination of a target galaxy.For example, the overall redshift sampling rate is only about 55% for the zCOSMOS-bright survey (Knobel et al. 2012) and about 50 − 70% for the forthcoming Prime Focus Spectrograph galaxy evolution survey (PFS, Takada et al. 2014), much lower than the sampling rate of nearly 100% for the low-z surveys such as SDSS (York et al. 2000).The sampling rates in general are not uniform across the sky (de la Torre et al. 2011) and may depend on intrinsic properties of galaxies (Zucca et al. 2009).The second is the fiber collision effect (or slit collision effect in slit mask spectroscopy), which prevents a close pair of galaxies from being observed simultaneously, and so can bias measurements of clustering on small scales (Hawkins et al. 2003;Li et al. 2006c).The last effect is caused by flux selection criteria of the galaxy sample, which may bias against low-mass red galaxies because of their low flux in the observing band (Meneux et al. 2008(Meneux et al. , 2009;;Marulli et al. 2013).This effect is referred to as the flux limit effect in the following.Observed samples are thus a biased sampling of the underlying galaxy population whose statistical properties are subjects of our interest.Clearly, effects of such bias need to be corrected.In practice, almost all high-z spectroscopic surveys are based on deep photometric surveys with multi-waveband data (Laigle et al. 2016;Aihara et al. 2018) that can be used not only to obtain photometric redshift but also to estimate color, luminosity and stellar mass of individual galaxies (Muzzin et al. 2013;Laigle et al. 2016).This information can be combined with the spectroscopic data to provide a more faithful representation of the targeted galaxy population.
Another limitation on current high redshift galaxy surveys is that the samples are relatively small so that cosmic variance is a serious concern (Somerville et al. 2004;Driver & Robotham 2010;Moster et al. 2011).To quantify cosmic variance and effects due to sample selection, the best way is to use realistic mock catalogs that follow the observational selection criteria closely.
The goal of this paper is to develop methods that can be used to measure galaxy stellar mass function and correlation function from high-redshift surveys that are significantly incomplete in sampling.Our methods combine spectroscopic galaxies with those in the parent photometric survey to make full use of the information provided by the observational data.In particular, we emphasize that the flux limit effect leads to significant underestimation of the clustering of low-mass red galaxies at high redshift, an effect which has been largely ignored in previous studies.We develop a new method to correct for this effect.We calibrate and test our methods using detailed mock catalogs that mimic real observations with different selection criteria and completeness.These mock catalogs are also used to investigate errors in the galaxy stellar mass function and correlation function expected from samples of different sizes.We apply our method to existing surveys, zCOSMOS and VIPERS, as well as the upcoming PFS galaxy evolution survey (Takada et al. 2014;Greene et al. 2022).The same mock catalogs have been used in Wang et al. (2020) to test a new group finding algorithm, developed specifically for identifying galaxy groups/clusters in high-z galaxy surveys.
The paper is organized as followed.In § 2 we describe the simulation, the galaxy formation model and methods used to construct mock catalogs.In § 3, we describe the flux limit effect caused by the selection criteria in high-z survey on the measurements of correlation function, as well as methods to correct this effect.We then apply our mock catalogs and measuring methods to PFS-like surveys in § 4. We summarize our results in § 5. Throughout the paper, we assume the WMAP5 cosmology (Dunkley et al. 2009;Komatsu et al. 2009) with the density parameter Ω m = 0.258 and the Hubble constant h = 0.72.

SIMULATION, GALAXY MODEL, SURVEYS AND MOCK CATALOGS
In this section, we first introduce numerical simulation and the galaxy formation model we use to construct mock catalogs, and then describe our method for constructing mock catalogs.Specifically, we will construct mock catalogs based on three surveys: the upcoming Subaru/PFS galaxy evolution survey and two existing surveys -zCOSMOS and VIPERS.We emphasize, however, that our method is by no means limited to these surveys, and that the basic methodology should be equally applicable to any surveys with incompleteness produced by color selection and spectroscopic sampling.

The ELUCID simulation
We use the ELUCID simulation carried out by Wang et al. (2016) to construct the mock catalogs.The ELU-CID is a large N -body numerical simulation using 3072 3 dark matter particles in a cubic box of 500 Mpc/h on one side.The mass of a dark matter particle is 3.088×10 8 M ⊙ /h.The simulation assumes the WMAP5 cosmology, which is a flat ΛCDM universe with a matter density parameter of Ω m = 0.258 and a Hubble constant given by h ≡ H 0 /(100 km/s/Mpc) = 0.72.The simulation was run from redshift z = 100 to z = 0, and 100 snapshots were recorded between z = 18.4 and z = 0. Dark matter halos and their substructures containing more than 20 particles are identified with the friends-offriends (FOF) and SUBFIND algorithms (Springel et al. 2005), respectively.A more detailed description of the simulation can be found in Wang et al. (2016).Here we only use halos in the simulation with masses larger than 10 10 M ⊙ /h.However, this mass limit is insufficient to resolve star formation in low-mass halos.As an remedy we adopt the Monte Carlo method of Parkinson et al. (2008) to extend the merger trees to a halo mass limit, 10 9 M ⊙ /h.All halos and sub-halos in the extended trees are populated with galaxies based on the galaxy formation model described in the next sub-section.More details of the merger-tree extension can be found in Chen et al. (2019).

The empirical model of galaxies
We populate dark matter (sub-)halos in the ELUCID simulation with galaxies of different stellar masses and multi-band luminosities.To this end, we first assume that each sub-halo hosts a galaxy and we assign a stellar mass to the galaxy using the galaxy formation model in Lu et al. (2014Lu et al. ( , 2015)).The detail of this process is described in Chen et al. (2019).In short, the model assumes that galaxies form at the center of dark matter halos, and the growth of central galaxies is a function of dark matter halo mass and redshift.A central galaxy becomes a satellite if its host halo is accreted into a more massive halo and becomes a sub-halo.Thereafter the star formation rate of the galaxy (thus its growth) is suppressed due to some environmental quenching processes.The positions and velocities of galaxies are determined by those of their host halos (for centrals) or sub-halos (for satellites).The stellar mass is obtained by integrating the SFR along the branches of the halo merger tree.In what follows these galaxies are referred to as model galaxies.
Figure 1 displays the stellar mass function for model galaxies in the simulation, plotted as solid circles connected by the orange line.For comparison, the stellar mass function estimated by Weaver et al. (2022a) from the COSMOS galaxy sample is plotted as solid squares connected by the green line.Note that this plot is not meant to make a quantitative comparison between our model prediction and observational data.Rather, the qualitative match between the data and the model demonstrates that our model galaxy population provides a realistic sample to construct mock catalogs.

Luminosity assignment for model galaxies
We assign luminosities in different bands to each of the model galaxies.This is done in two steps.First we obtain the luminosity in a given band, represented by the corresponding rest-frame absolute magnitude (M 1 ), according to the relationship between the stellar mass and M 1 calibrated by observations (see below).Second, the luminosities in other bands are determined using the corresponding color indices, M 1 − M 2 , where M 2 is the rest-frame absolute magnitude in another band.In this Figure 3.The y-band luminosity function of galaxies at z ∼ 1.The orange curve is for the model galaxies in the simulation and the blue curve is estimated from the COS-MOS2020 data which we use to calibrate our method to assign the luminosity and colors for our model galaxies.
step we also use the age of a sub-halo when determining the color of the galaxy it hosts, as detailed below.
We use the photometric data in the COSMOS2020 catalog (Weaver et al. 2022b) to calibrate our model for luminosities of model galaxies.The COSMOS field has been observed in 38 bands, covering a wide wavelength range from the ultraviolet to the far-infrared.The data thus enables precise estimates of both photometric redshifts (photo-z) and other galaxy properties, such as stellar mass and multi-band luminosities.We have estimated the galaxy stellar mass function using the COSMOS galaxy sample provided by Weaver et al. (2022b).The result, plotted as the triangles connected by the blue line in Figure 1, is in good agreement with the stellar mass function published in Weaver et al. (2022a).We use the public software CIGALE (Boquien et al. 2019) to fit the spectral energy distribution (SED) of the COSMOS galaxies, and estimate the rest-frame absolute magnitude in a given band by convolving the best-fit rest-frame spectrum with the photometric response curve of the band.We adopt the photometric redshifts provided by Weaver et al. (2022b) during the fitting.
We divide the galaxies in the COSMOS2020 catalog into successive bins of stellar mass M * , each with a fixed width of 0.2 dex.For each M * bin, we fit the distribution of M 1 (absolute magnitude of the chosen band) with a Gaussian function.For a model galaxy falling in the same M * bin, we randomly assign an absolute magni-  tude according to the Gaussian fit. Figure 2 shows the distribution of the COSMOS2020 galaxies in the log M * -M y plane, where M y is the y-band absolute magnitude.
The black contours are based on the observational data, while the red dashed contours are based on the assigned M y .The lower panel shows the M y distributions and the corresponding Gaussian fits in different mass bins.As can be seen, the assigned absolute magnitudes reproduce the mass-luminosity relation very well, in terms of both the average relation and the scatter.Figure 3 compares the y-band luminosity functions at z ∼ 1 estimated from the COSMOS2020 sample using the real data (blue triangles) and the assigned absolute magnitudes (orange circles).Again the two functions agree with each other very well.
We assign absolute magnitudes in bands other than M 1 by applying the sub-halo age distribution matching method (Hearin & Watson 2013;Hearin et al. 2014;Wang et al. 2023).The method assumes that, at fixed stellar mass, the color of a galaxy is a monotonous function of the age of its host halo, usually quantified by z starve , the redshift at which the host halo started to be starved of cold gas supply.In general, z starve is expected to be related to the halo mass assembly history.The following three definitions have been adopted for the same purpose (e.g.Wechsler et al. 2002;Behroozi et al. 2013;Hearin & Watson 2013): 1. z char , the highest redshift at which the halo mass exceeds 10 12 M ⊙ /h; 2. z acc : the redshift at which a halo becomes a subhalo and remains such thereafter; 3. z form : the redshift after which the mass accretion by the halo is negligible.
Following common practice, we define z starve as the maximum of the three redshifts defined above, It is known that galaxies of given mass or luminosity can be divided into two populations in the color space.In each stellar mass interval, we fit the distribution of the color index M 1 − M 2 (M 2 − M 1 if the 2nd band is bluer) of the COSMOS2020 galaxies by a bi-Gaussian function, so as to obtain a mass-dependent color distribution function, n(M 1 −M 2 |M * ).Similarly, for model galaxies, we obtain the mass-dependent distribution function of z starve , n(z starve |M * ).For each model galaxy, we then assign a M 1 − M 2 color by matching the number density of the observed galaxies above a given color threshold to that of the model galaxies above a certain threshold in z starve : (2) By solving this equation we obtain a monotonic relation between z starve and (M 1 − M 2 ), which enables us to assign an (M 1 − M 2 ) color (thus M 2 for the known M 1 ) to each model galaxy according to its z starve .Figure 4 compares the distributions of the (y − J) color of model galaxies in different stellar mass bins (orange curves) to the corresponding distributions obtained from COSMOS2020 (blue curves).The two agree with each other very well, demonstrating that the properties of the galaxy population are well represented by our model galaxies.We choose (M 1 , M 2 ) = (M y , M J ) for the PFSlike survey, (M 1 , M 2 ) = (M I , M B ) for the zCOSMOS survey, and (M 1 , M 2 ) = (M iAB , M B ) for the VIPERS survey.

zCOSMOS, VIPERS and the PFS galaxy evolution survey
The zCOSMOS is a large redshift survey of galaxies in the COSMOS field, carried out with the VIMOS spectrograph on the 8-meter ESO Very Large Telescope (e.g.Lilly et al. 2007).The survey consists of two components.The first is zCOSMOS-bright, a magnitudelimited sample of about 20,000 galaxies with I AB < 22.5 and 0.1 ≲ z ≲ 1.2 that covers the whole 1.7 deg 2 COS-MOS field.The other is zCOSMOS-deep, a sample consisting of about 10,000 galaxies with 1.5 ≲ z ≲ 3 selected through color-selection criteria in the central ∼ 1 deg 2 of the COSMOS field.Both samples are targeted to have a sampling rate of ∼70%, but the actual sampling rate is 56% for zCOSMOS-bright (Knobel et al. 2012) and 55% for zCOSMOS-deep (Diener et al. 2013).For our analysis, we only use the zCOSMOS-bright Sample.
The VIMOS Public Extragalactic Redshift Survey (VIPERS) explores a large cosmic volume in the redshift range 0.5 < z < 1.2 (Garilli et al. 2014;Scodeggio et al. 2018).Targets of the VIPERS were selected from the W1 and W4 fields of the Canada-France-Hawaii Telescope Legacy Survey Wide (CFHTLS-Wide) which covers a total sky area of 23.5 deg 2 , by applying an apparent magnitude limit i AB = 22.5, as well as a color selection on the (r −i) vs. (u−g) plane to remove galaxies at z < 0.5.The selected targets were alaso observed with the VIMOS spectrograph on the ESO Very Large Telescope.The complete sample contains 86,775 galaxies.The average target sampling rate is about 47% and the spectroscopic success rate is about 83% (Scodeggio et al. 2018).The two rates combined give a total sampling rate of ∼40%.
The Prime Focus Spectrograph (PFS) project (Takada et al. 2014) is one of the next-generation multi-object spectroscopic surveys to be accomplished on the Subaru 8.2-meter telescope.The PFS is a massively multiplexed, optical and near-infrared (NIR) fiber-fed spectrometer, equipped with 2394 re-configurable fibers distributed in a wide hexagonal field of view with a diameter of 1.3 degrees.The PFS project will conduct three major survey programs, dedicated to fundamental and important questions in cosmology, galaxy evolution and the origin of the Milky Way, respectively.In this paper we consider only the galaxy evolution survey, for which the science goals, sample selection and survey design are detailed in Greene et al. (2022).In particular, we will consider only the Main sample of the PFS galaxy evolution survey, which aims to obtain spectroscopy for ∼ 230, 000 galaxies down to stellar mass M * ≈ 3 × 10 10 M ⊙ at 0.7 < z < 1.7, with exposure times of 2 hours.Targets of the sample are selected to fall in the expected redshift range using photometric redshifts estimated from the available imaging data, and are limited by the y-band apparent magnitude as y < 22.5.At z > 1, targets fainter than y = 22.5 may also be included if their J-band magnitude J < 22.8.The redshift sampling rate is about 50% for the sample at z < 1, and 70% at z > 1.The sample galaxies are distributed over three separated fields (E-COSMOS, XMM-LSS and DEEP2-3) that have deep imaging in both optical and NIR.The total sky area of these fields is ∼ 12.3 deg 2 , and will be covered by 11 PFS pointings (see Fig. 8 in Greene et al. 2022).Note that the analyses presented here use an ear-lier version of the survey design, which aimed at 13 PFS pointings with a total sky area of ∼ 14.5 deg 2 .Because of this (slight) difference and the fact that the survey design may be further tuned, we will refer the survey as 'PFS-like survey' in what follows.

Constructing mock catalogs
We construct mock catalogs for a given survey following the commonly-used two-step method detailed in Blaizot et al. (2005).First, an observing lightcone covering the same volume and redshift range as the real survey is constructed using simulation snapshots in the same redshift range as the survey.Next, model galaxies are selected in the lightcone to form a mock catalog, and their apparent properties, such as apparent magnitudes in different bands, are computed taking into account selection effects of the real survey.

Constructing lightcones
Due to its limited box size, the simulation box of a given snapshot has to be stacked to achieve a sufficiently large volume, taking advantage of the periodic boundary condition.However, because of the periodic boundary condition the same structure can appear repeatedly if observed along a coordinate axis of the simulation box.Following Blaizot et al. (2005), we apply the technique of random tiling to overcome this problem.By applying this random tilling scheme many times, we can generate a set of different mock catalogs, in which the same (simulated) universe is virtually observed from different directions.
The stacked and randomly transformed snapshots of different redshifts are then used to construct the lightcone.We fill in successive intervals of comoving distance with the corresponding snapshots.Specifically, for an interval of comoving distance, we use model galaxies from the snapshots at redshift z i .For each model galaxy, we calculate a cosmological redshift z cos from its comoving distance.The peculiar velocity along the line of sight, v pec , which is estimated using the velocity of the (sub-)halo which the galaxy live in, is added to the z cos to give a spectroscopic redshift z spec : We also estimate a photometric redshift (photo-z) for each galaxy by including the typical uncertainty of photo-z of the survey.Assuming the photo-z error in ∆z 1+z to be σ, we have where N (0, σ 2 ) is the normal distribution with the mean equal to zero and with the standard deviation equal to σ.
Finally, we finish the construction of the lightcone by excluding model galaxies outside the sky coverage of the survey.As mentioned above, by applying the random tilling many times, we can generate a set of different lightcones to form a set of mock catalogs.As an example, Figure 5 shows one of the lightcones made for one field of the PFS-like survey, projected onto the RA and redshift plane.The red and blue dots represent galaxies with red and blue colors according to (y − J), respectively.

Incorporating observational selection effects
We calculate apparent magnitudes of model galaxies in a given lightcone according to their absolute magnitudes and redshifts, and we construct a mock catalog by applying the same selection effects as the real survey.The apparent magnitude of the i-th band is given by where M i is the absolute magnitude of the i-th band (i = 1, 2), D L is the luminosity distance in units of Mpc, and K is the k-correction.The value of K is not available from our model.We estimate the value of K using the COSMOS2020 galaxy catalog, assuming that galaxies of the same luminosities and colors have a similar spectral energy distribution.For a given model galaxy, we identify a real galaxy from the COSMOS2020 catalog by matching the absolute magnitude, M 1 , and the color index M 1 − M 2 , where the bands for M 1 and M 2 may be different for different surveys (e.g.M y and M J for the PFS galaxy survey).The K value of the real galaxy, which was estimated from the best-fit rest-frame spectrum of the galaxy by spectral fitting (see § 2.2.2), is then assigned to the model galaxy.
The details of the target selection strategy may vary from survey to survey, but in general targets are selected to form a magnitude-limited sample according to the apparent magnitude in a specific band.For instance, the SDSS main sample targeted galaxies with r-band magnitude r ≲ 17.77 (York et al. 2000).For high-z surveys, additional redshift criteria, based on color-color diagrams or photometric redshifts, are used to exclude targets outside the aimed redshift range.The PFS-like survey will observe galaxies with 0.7 < z < 1.7 and y < 22.5 (if at 0.7 < z < 1.7) or J < 22.8 (if at z > 1).The zCOSMOS-bright sample selects galaxies with I < 22.5.The VIPERS uses the magnitude limit of i AB < 22.5.
In most spectroscopic surveys, especially those at high redshift, only a fraction of the targets satisfying the redshift and magnitude limits can be included in the spectroscopic sample, due to the limited number of fibers, finite observing time, imperfect redshift identification and a variety of other limitations (e.g.obscuration by bright stars, bad weather, fiber collisions).In general, these effects combined can be quantified by a sampling rate, defined as the fraction of the targets that are actually observed and included in the final sample.The sampling rate may vary across the survey coverage as well.For the PFS-like survey, the angular sampling is expected to vary across the survey area.The inhomogeneity is mainly caused by the fact that the spectroscopic target sampling becomes increasingly low in the sky where the target density is high, because two fibers cannot be positioned too closely.The fiber assignment strategy of the PFS survey is described in Sunayama et al. (2019) and Shimono et al. (2016), and a software named Exposure Targeting Software (ETS)1 is designed to implement the assignment for a given sample of targets.We apply this software to our mock catalogs, by requiring an average sampling rate of 50% for 0.7 < z < 1 and 70% for 1 < z < 1.7, as planned for the upcoming PFS galaxy survey.
For the zCOSMOS-bright sample, the RA-dependence of the sampling rate due to incomplete targeting was presented in figure 5 of de la Torre et al. ( 2011), while the redshift-dependent sampling due to imperfect redshift identification (redshift success rate) was shown in figure 9 of Lilly et al. (2007).The spatial variation of the target sampling rate and the redshift measurement success rate for the VIPERS survey were described in figure 5 and figure 6 of Scodeggio et al. (2018).In addition, the VIPERS survey has a redshift-dependent sampling rate caused by the color selection used to target galaxies at z > 0.5.The sampling rate as a function of redshift was given in figure 4 of Scodeggio et al. (2018).
By incorporating these selection effects, we have constructed a set of 20 mock catalogs for each of the three surveys.For the zCOSMOS-bright survey and the VIPERS, our mock catalogs respectively contain 15, 611 ± 1, 014 and 77, 927 ± 1, 081 galaxies, in good agreement with the sample sizes of the real surveys: 16,604 for zCOSMOS-bright and 75,765 for VIPERS.As mentioned above, statistics of the galaxy distribution are mainly affected by three incompleteness effects, i.e. sampling rate effect, fiber collision effect and flux limit effect.The former two effects have been discussed and understood in depth in the literature based on studies of previous surveys.In contrast, the flux limit effect, as initially noticed by Meneux et al. (2008Meneux et al. ( , 2009)), has been largely ignored.In this section, we focus on this effect.We propose a new method to correct it and use mock catalogs to test the method.

Effects of flux-limit criteria
The flux limit effect may cause an underestimated measurement of the small-scale galaxy clustering, and the effect is more significant for red galaxies with low stellar mass compared to blue galaxies of similar masses.The reason is that, at fixed mass, red galaxies in general have larger mass-to-light ratios than blue galaxies.Thus, for a sample of galaxies in a given stellar mass range, red galaxies have a higher probability to be excluded by the flux limit.This effect is strong particularly for low-mass red galaxies which are predominately satellite galaxies in massive halos (e.g.Li et al. 2006aLi et al. , 2007;;Lan et al. 2016), and so are more strongly clustered than their blue counterparts (e.g.Li et al. 2006bLi et al. ,a, 2007;;Zehavi et al. 2011).Therefore, the reduction of this population in the sample can lead to an underestimate of the one-halo term of the correlation function on scales comparable to and smaller than the size of dark matter halos.The flux limit effect is expected to be more important at higher z and when the observational band used for target selection corresponds to a bluer rest-frame band.
In order to highlight the flux limit effect, we have constructed a set of "100% complete" mock catalogs that are exactly the same as the PFS-like mock sample except that the sampling rate is set to 100%.As can be seen from Figure 6, the projected two-point correlation function w p (r ⊥ ) of the complete (100%) sample (purple triangles/lines) so obtained is significantly lower than the true w p (r ⊥ ) (green diamonds/lines) at scales smaller than a few Mpc.In the figure we show the comparison only for the lowest mass bin with 10 < log(M * /M ⊙ ) < 10.5 and the relatively high redshift bin with 1.3 < z < 1.6, where we find the effect is the most pronounced.In the figure we also show the same comparison but for red and blue galaxies separately.Clearly, the underestimation of the small-scale clustering seen in the total sample is dominated by red galaxies, as expected.For the mass and redshift bins shown, the smallscale clustering is underestimated by about 0.4 dex for the total sample, and about 0.5 dex and 0.1 dex for the red and blue subsamples, respectively.In the rest of this section we attempt to develop a method to correct for the flux limit effect.

Conventional methods of measuring galaxy clustering
Conventionally, a number of estimators have been used to measure the correlation function (Davis & Peebles 1983;Hamilton 1993;Landy & Szalay 1993).Here we use the Landy-Szalay estimator (Landy & Szalay 1993).For a given galaxy sample D and the corresponding random sample R that is constructed to have the same selection effects as sample D (more details can be found in Li et al. 2006c), the redshift-space correlation function is estimated using which is a function of the pair separations both perpendicular (r ⊥ ) and parallel (π) to the line of sight.Here, N d and N r are the sample sizes of D and R, respectively, and DD, RR and DR are the counts of galaxy-galaxy pairs in the galaxy sample, random-random pairs in the random sample, and galaxy-random cross pairs between the two samples, respectively.The pair counts are also functions of r ⊥ and π.To reduce effects of redshift distortions, we use the projected 2PCF, defined as the integration of ξ(r ⊥ , π) along the line of sight: We choose n = 40 and ∆π i = 1 Mpc/h, so that the summation runs from π 1 = 0.5 Mpc/h up to π 40 = 39.5 Mpc/h with a constant interval of 1 Mpc/h.In general, the incompleteness of sample D may not be fully incorporated in the random sample R, and some weighting scheme is needed to correct for the residual incompleteness.Here we consider two weighting schemes that have been used in the literature.In the first one, effects of sampling rate, redshift success rate and fiber collision are considered separately, and a final weight is given to each galaxy by combining all the effects.To this end, we use the Voronoi tessellation to estimate the sky position-dependent sampling rate, f s (RA, Dec).The tessellation divides the whole survey area into nonoverlapping polygons, so that each polygon contains one (and only one) observed galaxy and that every position within the survey area is covered by one (and only one) polygon.The sampling rate of the J-th polygon is estimated by the inverse of the total number of targets in the parent photometric sample: f s,J = 1/N phot,J .Thus, the sampling rate is a constant within a given polygon, and each galaxy in the observed sample is assigned the sampling rate of the polygon in which it resides: f s,i = f s,J , where i refers to the i-th galaxy and J to the J-th polygon.
The redshift success rate for each galaxy in the spectroscopic sample, f z (z, θ k ), is a function of redshift, z, and a set of properties of the galaxy, θ k .In principle, one could consider n properties, and estimate the suc-cess rate function, f z (z, θ k ), in the (n + 1)-dimensional parameter space using the ratio between the number of successfully-measured redshifts, N succ , and the number of spectroscopic targets, N obs .One can then estimate f z,i for each galaxy in the sample.Once f s,i and f z,i are obtained for the i-th galaxy, we assign to it a weight defined as This weight will be used to correct for the effect of sampling rate and redshift success rate of the survey when we estimate both the number density and clustering of galaxies.
Following Hawkins et al. (2003) and Li et al. (2006b), we correct for the effect of fiber collisions using angular correlation function of the parent photometric sample.We first estimate the angular correlation for both the parent photometric sample (w p (θ)) and the spectroscopic sample (w s (θ)).Note that w s is corrected for the sampling rate and redshift success effect as described above.When computing the galaxy-galaxy pair count DD in Equation 7, we weight each pair by where θ ij is the angular separation of the pair between the i-th galaxy and the j-th galaxy.As demonstrated in Li et al. (2006c), this weighting method works well in correcting the underestimation of the clustering on scales where fiber collision effect is significant.The weighting scheme works as follow: for the pair formed by the i-th and j-th galaxy, we compute their separations perpendicular (r ⊥,ij ) and parallel (π ij ) to the line-ofsight, and the angular separation (θ ij ).We only use θ ij to calculate the weight w fiber,ij for the pair formed by the i-th and j-th galaxy using Equation 10.Then we count the galaxy-galaxy pairs as function of r ⊥ and π.The counts of galaxy-galaxy pairs are computed using DD(r ⊥ , π) = w sky,i w sky,j w fiber,ij , where the sum runs over all the galaxy-galaxy pairs of given separation (r ⊥ , π) in the observed sample.The counts of galaxy-random pairs are computed using DR(r ⊥ , π) = w sky,i , where the sum runs over all galaxy-random pairs of given separation (r ⊥ ,π) between the observed and random samples.
The weighting scheme described above has been widely adopted in previous studies of galaxy clustering, and is labelled as the "conventional method" in what follows.Applying this method to our mock catalogs, we obtain the w p (r ⊥ ) measurements and plot them as orange circles/lines in Figure 6, for the same mass and redshift bins.The black dashed lines represent the results without any corrections where the sampling rate is about 70%.We also plot results with a sampling rate 50% as the gray dash-dot lines.It can be seen that even w p (r ⊥ ) on large scales can be affected by incomplete sampling.As can be seen, the conventional method fails to reproduce the true correlation function, although it successfully reproduces the correlation function of the "100% complete" sample.
We also consider another weighting scheme originally proposed by Bianchi & Percival (2017) and referred to as the pairwise-inverse-probability (PIP) scheme in the following.As shown in Bianchi & Percival (2017) and Bianchi et al. (2018), this weighting scheme is able to correct the sampling rate effect (including redshift success rate) and fiber collision effect simultaneously.In short, for a given spectroscopic galaxy redshift survey and its parent photometric sample, the target selection software that is used for selecting the spectroscopic targets is rerun N times, each with a different random number seed.This gives rise to N realizations of the target selection process, resulting in a set of target samples with sizes equal to the real sample.Suppose that the galaxy-galaxy pair formed by the i-th and j-th galaxy is selected b times during the N realizations, the pair is given a weight of w ij = N/b.If the i-th galaxy is selected c times in total, the galaxy gets a weight of w i = N/c.The PIP weights w ij are then used to weight galaxygalaxy pairs DD, while the individual weights w i are used to weight the galaxy-random cross pairs DR (see equation 13 in Bianchi & Percival 2017).The galaxygalaxy pair count is then given by where DD (p) a (θ) and DD a (θ) represent the angular pair counts of the parent sample and the observed sample, respectively.For the pair formed by the i-th and jth galaxy, the angular separation θ ij is only used to compute DD (p) a (θ) and DD a (θ).The sum runs over all the galaxy-galaxy pairs of given separation (r ⊥ , π) in the observed sample.DD (p) a (θ) is estimated from the parent sample, while DD a (θ) is computed from the observed sample using the weights w ij , i.e.DD a (θ) = w ij .Similarly, the galaxy-random pair count is given by For the pair formed by the i-th galaxy and random point, the angular separation is only used to compute DR (p) a (θ) and DR a (θ).The sum runs over all galaxyrandom pairs of given separation (r ⊥ ,π) between the observed and random samples.DR a (θ) is computed with the weights w i , by DR a (θ) = w i .Bianchi et al. (2018) tested this weighting scheme using mock samples of the DESI survey and found that it can correctly deal with effects of fiber assignment (sampling rate effect and fiber collision effect).We also test it here, by applying the above weights to galaxy-galaxy pairs and galaxy-random pairs in our mock catalogs.The resulting w p (r ⊥ ) are shown in Figure 6 as blue circles.We can see that the PIP method works equally well as the "conventional method" in reproducing the w p (r ⊥ ) of the "100% complete" sample, but both methods cannot reproduce the true correlation function.In other words, the effect of flux limit is not taken into account by either of the two weighting schemes.
Before moving on to the development of a new method, we point out that the conventional methods are still useful in certain cases, e.g., on scales larger than a few Mpc and for samples with relatively high masses or low redshifts.As shown above, when applicable, the "conventional method" and the PIP method are essentially equivalent.Both methods rely on the parent photometric sample.The PIP method has the advantage of correcting all effects (except the flux limit effect) simultaneously, but it is necessary to have the target selection software which is not always publicly available.In this regard, the "conventional method" method may be more applicable, although it assumes that different effects can be modeled separately using independent weights.

A new method to correct for the flux limit effect
Here we propose a new method to correct the bias in the clustering measurements as caused by the flux limit effect.For this purpose we use two photometric samples: one is the parent photometric sample (sample p) that includes all galaxies in the same redshift and mass ranges as the redshift survey sample (sample s), and the other is the subset of galaxies in sample p that meet the flux criteria of the survey sample (sample p ′ ).We estimate the sampling rate caused by the flux limit selection criteria in the space spanned by galaxy properties ⃗ q.Here we use the redshift, stellar mass and rest-frame color of the galaxies, that is, ⃗ q = {z, M * , y − J}.The redshift used here is the photometric redshift, and we assume that the photometric redshift, stellar mass and rest-frame color for galaxies in the photometric parent sample can be estimated from fitting the multi-band SED, e.g. by using data from the HSC imaging survey for the PFS targets.The sampling rate caused by the flux limit selection criteria is estimated directly by where N p ′ and N p are the number of galaxies in sample p ′ and sample p, respectively.For each galaxy in sample s, we assign the weight defined as to it when we count DD and DR in Equation 7. In our new weighting scheme, the counts of galaxy-galaxy pairs are computed using DD = w sky,i w sky,j w fiber,ij w flux,i w flux,j , and the counts of galaxy-random pairs are computed using DR = w sky,i w flux,i .We notice that f flux could be very small or even zero in some regions of the space spanned by ⃗ q.A small f flux will give a very large weight to the galaxy and cause large shot noise in the measured w p (r ⊥ ), while a f flux of zero will lead to an invalid weighting to the galaxy.To avoid this problem, we make a sampling rate cut in sample s, excluding all galaxies from sample s with f flux (⃗ q) < 2%.We make the same cut for model galaxies in the original simulation box in order for a fair comparison of galaxy clustering between the model and mock catalogs.
We apply this method to our mock catalogs and plot the results of w p (r ⊥ ) as solid red lines surround by pink bands in Figure 6, as labelled by "weighting method".It is encouraging that this method reproduces the true w p (r ⊥ ) of the input model on all scales and for both red and blue galaxies.As we will show further in the next section, this method provides an unbiased measurement of the projected 2PCF for all the samples selected by a flux limit criterion as in PFS-like surveys.As demonstrated above, the flux-limit criteria can cause different sampling rates for galaxies of different properties (e.g.color).Our weighing method accounts for this sampling effect as well as the sampling effect caused by fiber assignments.However, the conventional method can only account for the latter.

NUMBER DENSITY AND CLUSTERING OF GALAXIES IN PFS-LIKE SURVEYS
In this section, we measure the abundance and clustering of galaxies in the mock catalogs we construct in § 2.4 for the PFS-like galaxy survey.The purpose of our analysis here is two-fold.First, we use the mock catalogs to test our methods of measuring galaxy number density and clustering, especially the new method to correct for the bias caused by the flux-limited selection criteria.Second, we use the mock catalogs to estimate errors in the measurements for different surveys, and we make comparisons between the PFS-like sample and the zCOSMOS and VIPERS samples.This allows us to predict the improvements expected from the upcoming PFS survey relative to the previous surveys.

Galaxy luminosity functions and stellar mass functions
We use the commonly-adopted V max -weighting method (Schmidt 1968) to estimate the luminosity functions (GLF) and stellar mass functions (GSMF) of galaxies in the mock catalogs of the three surveys.For the i-th galaxy with an absolute magnitude M 1,i in a given survey, we determine a maximum redshift, z max,i , at which M 1,i corresponds to the limiting apparent magnitude that was used to select the sample.Given the survey area, z max,i defines a maximum volume, V max,i , over which galaxy targets with the same absolute magnitude, M 1,i , can be observed in the apparent magnitude-limited sample.The inverse ratio of this volume to the total survey volume (given by the upper boundary of the redshift of the survey), V survey /V max,i , is used to weight the galaxy and to statistically correct for the luminosity-dependent incompleteness of the survey volume.The sample rate effect is corrected by multiplying this weight by the sky position-dependent weight w sky,i given by Equation 9.The total weight for a given galaxy is Each galaxy in a mock catalog is then weighted by the total weight w tot,i when measuring the GLF and GSMF.Due to the limited depth of a survey, both the luminosity and stellar mass functions can only be measured down to a limited luminosity or mass.The limit for the luminosity function measured for galaxies at a given redshift can be determined by the apparent magnitude limit of the survey.For the stellar mass function, however, the determination of the stellar mass limit M * ,min (z) is not straightforward.If the survey uses the apparent magnitude of the jth-band to select the targets, we use the symbol m j to represent the apparent magnitude of the galaxy in this band and m j,lim to denote the magnitude limit of the survey.Following Pozzetti et al. (2010), we first estimate a mass limit, M * ,lim , for each galaxy using Galaxies are divided into successive redshift bins with a fixed width of ∆z = 0.2.For each redshift bin we select the 20% faintest galaxies according to the j-th band apparent magnitude, and obtain the distribution of their M * ,lim .The minimum stellar mass at a given redshift, M * ,min (z), is then defined by the upper envelope of the distribution, which is the value of M * ,lim that encloses 95% of the galaxies in the distribution.The y-band GLF and GSMF obtained this way are shown as blue triangles in Figure 7 and Figure 8, respectively, for the PFS-like survey.Panels from left to right are the results for three different redshift intervals: 0.7 < z < 1, 1 < z < 1.3 and 1.3 < z < 1.6.We take the average of the 20 mock catalogs as our mean measurements and their standard deviation as errors.The true GLF and GSMF measured from the model galaxies in the simulation are plotted for comparison as green symbols and lines.The gray vertical dashed line in each panel indicates the limiting luminosity (M y,lim ) or the limiting mass (M * ,lim ) to which these two functions can be measured with the PFS-like spectroscopic sample.The limit for the GLF at a given redshift is determined by the apparent magnitude limit, which is either y < 22.5 or J < 22.8.For the GSMF, we calculate two M * ,lim for each galaxy using Equation 16one for y lim = 22.5 and the other for J lim = 22.8, and we use the lower one of the two as the actual limit for the galaxy.
As can be seen, above the limiting luminosities and the limiting masses, the measurements obtained using the V max -weighting method can well reproduce the input GLF and GSMF.Below the limiting luminosities/masses, however, the measurements drop dramatically below the input model owing to the incompleteness caused by the flux limit.In order to extend the range of the GLF and GSMF measurements, we use the parent photometric sample to measure the GLF and GSMF directly, making use of the photometric redshift, stellar mass and luminosity of the galaxies in the photometric sample which can be estimated from multi-band SED fitting.The GLF and GSMF measured from the photometric sample are shown as the orange symbols and lines in Figure 7 and Figure 8, which very well reproduce the model GLF and GSMF down to the lowest luminosities/masses and up to the characteristic luminosities/masses.At the high-luminosity and high-mass ends, both GLF and GSMF are significantly overestimated in the photometric sample owing to errors in the luminosity and stellar mass, an effect known as the Eddington bias.Our results suggest that one can obtain unbiased measurements over the full luminosity or mass range by combining the GLF and GSMF measured from the V max -weighting method above the limiting luminosities/masses and those measured from the photometric sample below the limiting luminosities/masses.
Figure 9 shows the fractional variance in the GSMF as estimated from the 20 mock catalogs for the PFSlike survey, as a function of the survey area and for different stellar mass and redshift intervals.The fractional variance is defined as the standard deviation of the GSMF among 20 mocks divided by the mean GSMF of the 20 mocks.The PFS-like survey contains 13 pointings.We use a number of pointings in each mock survey to calculate the corresponding GSMF, and use the variance among the 20 mocks to obtain the corresponding standard deviation.Samples using different number of pointings have different survey areas, and we obtain the fractional variance as the function of the survey area by using increasing number of pointings from 1 to 13.The solid lines and dashed lines represent results obtained from the V max -weighting method and the photometric sample, respectively.For comparison, the results for the zCOSMOS-bright sample and the VIPERS sample, estimated from the corresponding mock catalogs, are plotted as the big hollow and big solid symbols, respectively.Overall, as expected, the total fraction variance in the GSMF decreases rapidly with increasing survey area due to the decreasing of cosmic variance.When compared to the zCOSMOS, the measurement errors are expected to decrease from 10%-20% to 3%-6% for the complete PFSlike survey.At fixed survey area, the errors show weak dependence on mass for the two lower mass bins, but increase dramatically for the highest mass bin.When the survey area exceeds about 5 deg 2 , the errors continue to decrease, but only slowly, as the survey size increases.This indicates that the cosmic variance is no longer a dominating source of error when the survey area is substantially large.

Projected two-point correlation functions
We estimate the projected 2PCF w p (r ⊥ ) for the mock catalogs of the three surveys using the new method proposed in § 3.3.Results for the PFS-like survey are shown in Figure 10 as solid lines and colored bands which represent errors, for three stellar mass intervals and three redshift intervals, as indicated in each panel.The black, red and blue solid lines and bands represent results for the total sample, and the red and blue samples, respectively.Again, the mean measurement of w p (r ⊥ ) is given by the average of the 20 mock samples, while errors are estimated by the standard deviation of the mock samples around the average.For the PFS-like survey, the sampling rate f flux (⃗ q) caused by the flux limit effect is not continuous at z = 1 due to the different sample selection criteria below and above this redshift.Therefore we do not consider the narrow redshift range of 0.95 < z < 1.05 to avoid this problem.For comparison, the true w p (r ⊥ ) for the same mass and redshift bins are obtained from model galaxies in the simulation and are plotted as the diamonds and solid lines.The projected 2PCF w p (r ⊥ ) measured with the "conventional method" are shown as the hollow symbols with error bars.We plot the ratio between our measured w p (r ⊥ ) with our "weighting method" and "conventional method" and true w p (r ⊥ ) in the lower panels.We shift the ratios for red and blue samples by 1 dex to show the results clearly.The ratios with our "weighting method" are around unity in all cases, demonstrating that our weighting method can reproduce the input model, for all the mass bins and redshift ranges, as well as for both red and blue subsamples.On the other hand, the ratios with the "conventional method" for total and red samples in the lowest stellar mass bin are underestimated at r ⊥ < 1 Mpc/h by 0.1-0.2dex.Our tests for the zCOS-MOS and VIPERS surveys are shown in Appendix C.
We use the 20 mock catalogs to estimate errors of w p (r ⊥ ) as functions of the survey area.In Figure 11, we plot the total fractional variance among the 20 mock samples, σ tot , as the solid lines, as a function of the survey area for PFS-like survey in three stellar mass intervals and three redshift intervals, as indicated in the figure.We also show results for the zCOSMOS-bright sample and the VIPERS sample as the big hollow and big solid symbols, respectively.Different colors represent results for different scales.As expected, σ tot decreases as the survey area increases.However, the decrement is not obvious when the survey area exceeds about 8 deg 2 , similar to the situation of the GSMF.This indicates again that cosmic variance is no longer the main source of errors when the survey area is large enough, and thus it is not an efficient way to reduce the error by further increasing the survey area.At large survey area, the errors in the 2PCF measurements should be more dominated by short noise caused by limited sampling rates.The sampling rate for PFS-like sample is 50% at z < 1 and 70% at z > 1, while the VIPERS survey has a comparable survey area, but has an average sampling rate of 30% only.As can be seen from the figure, the errors at z > 1 is systematically smaller than the errors at z < 1 at given survey area, especially for the two massive stellar mass bins, and the errors for the VIPERS sample are also larger than those for the PFSlike sample of the same survey area, especially at small scales.
In summary, the errors in the projected 2PCF for the whole PFS-like sample is about 5-20%, which are a factor of 5 ∼ 10 smaller than that of the zCOSMOS survey and a factor of ∼3 smaller than that of the VIPERS.

SUMMARY
In this paper we studied the abundance and clustering of galaxies at high redshift as function of luminosity, stellar mass and redshift, using realistic mock catalogs constructed from cosmological simulations.We populated the halos and subhalos of dark matter in the simulation with model galaxies of different masses and colors.We calibrate the galaxy model using multi-band deep imaging data from COSMOS2020.We then constructed mock catalogs for spectroscopic surveys based on the model galaxies in the simulation.We considered three multi-object spectroscopic surveys: the existing zCOSMOS and VIPERS, and the PFS-like survey in the future.When constructing mock catalogs, we carefully included the same selection effects as in the real surveys.These include area/redshift boundaries,  the incomplete sampling due to the limited number of fibers/slits and the fiber/slit collision effects, and sample selection by flux criteria.Using the mock catalogs we measured the luminosity function (GLF), stellar mass function (GSMF), and projected two-point correlation function (2PCF) for galaxies of different stellar mass at different redshift, and we quantify the measurement errors using 20 mock samples.We found that incomplete sampling can lead to significantly biased measurements of galaxy stellar mass function (GSMF) and galaxy luminosity function (GLF).We applied a weighting scheme to explicitly account for the sky position-dependent sampling rate, and our test with the mock catalogs showed that the bias caused by the incomplete sampling can be well corrected for the GLF and GSMF measurements at masses above the characteristic luminosity/mass.In addition, we use the parent photometric sample to extend the range of the measured GLF and GSMF down to luminosities/masses well below the limits of the spectroscopic sample.
For galaxy clustering, we found that both the target selection by flux criteria and the incomplete sampling can lead to significantly biased measurements.The effect of incomplete sampling can be fully corrected using our weighting scheme and the correction of fiber/slit collision (Figure 6), but the bias due to the selection criteria of flux-limited samples cannot be corrected in a simple way.The bias caused by the flux limit effect is more significant at lower masses and at higher redshifts, and is mainly contributed by the population of low-mass red galaxies which are more strongly clustered but less well sampled due to their larger mass-to-light ratios in comparison to blue galaxies.We developed a weighting method to correct this bias, with the help of two photometric samples that can be obtained from the parent data to estimate the sampling rate caused by the flux limit.We showed that the bias in the projected w p (r ⊥ ) can be corrected with this method, for all the stellar mass and redshift ranges considered, as well as separately for red and blue samples (Figure 10).
We used the mock catalogs to estimate errors in both the abundance and clustering measurements, and we made comparisons between zCOSMOS, VIPERS and the PFS-like galaxy survey.The fractional variance of the GSMF decreases with survey area, from 10-20% in zCOSMOS-like surveys that have a survey area of ∼ 1 deg 2 down to 3-6% in PFS-like surveys that covers ∼ 14.5 deg 2 (Figure 9).For the projected 2PCF, the fractional variance also decreases with survey area, from > 50% in zCOSMOS-like surveys, 10%-70% in VIPERSlike surveys to 5-20% in PFS-like surveys.We find that, when the survey area is sufficiently large (∼4 deg 2 for GSMF and ∼8 deg 2 for 2PCF), the errors decrease only slowly as survey area increases.This result indicates that the cosmic variance is no longer the dominant source of error when the survey area exceeds those numbers.At such large survey area, our results indicate that the more efficient way to reduce errors is to increase sampling rate rather than survey area.
Our analyses are based on three surveys with quite different sample selections.The fact that our methods work accurately for all of them indicate that the main test results are valid for other redshift surveys.In particular, by using information from the parent photometric survey, one can obtain unbiased measurements for both the luminosity/stellar mass function and the correlation function for different populations of galaxies.With the advent of deep redshift surveys of galaxies, our results provide an important guideline to analyze the observational data.
All the mock catalogs for zCOSMOS, VIPERS and PFS-like surveys constructed in this work are publicly available in Meng et al. (2023) and https://lig.astro.tsinghua.edu.cn/astrodata.This work is supported by the National Key R&D Program of China (grant No. 2018YFA0404502), and the National Science Foundation of China (grant Nos. 11821303, 11733002, 11973030, 11673015, 11733004, 11761131004, 11761141012).Part of our analysis is based on data products from observations made with ESO Telescopes at the La Silla Paranal Observatory under ESO programme ID 179.A-2005 and on data products produced by TERAPIX and the Cambridge Astronomy Survey Unit on behalf of the UltraVISTA consortium.The authors acknowledge the Tsinghua Astrophysics High-Performance Computing platform at Tsinghua University for providing computational and data storage resources that have contributed to the research results reported within this paper.-0.1 < y J < 0.05 0.05 < y J < 0.2 0.2 < y J < 0.35 0.35 < y J < 0.5 total As shown in the main text, the spatial incomplete sampling of galaxy targets in PFS-like galaxy samples can well be corrected using our weighting scheme.This is mainly because the spatial sampling rate depends only on the local surface number density of the galaxy targets, although the sampling may vary from region to region.This is demonstrated clearly in Figure 12, where we plot the sky position-dependent sampling rate, f s (RA, Dec), in the PFSlike mock catalogs, defined in § 3.2, as a function of the surface density Σ.Here, for each galaxy in a mock catalog, we have estimated a local surface density Σ by counting the number of galaxies in the parent photometric sample that are located within 1 arcmin.We show the sampling rate versus Σ for subsamples selected by the stellar mass (left panel) or the y − J color (right panel).All the measurements overlap with each other, and are almost the same as the result of the full sample (the black curve), which is the average of the 20 mock catalogs constructed in § 2.4.
The figure shows that the sampling rate decreases rapidly with Σ, varying from nearly 100% in the lowest density regions down to ∼10% in the highest.As shown in the main text, this variation causes biases in the estimation of the luminosity function, stellar mass function and correlation function.However, our weighting scheme is able to correct these biases for all the statistics even when the sampling rate is very low.

B. THE ERRORS OF THE PROJECT 2PCF AS FUNCTION OF SURVEY AREA AND SAMPLING RATE
In the main text we find that errors in the measurements of the projected 2PCF depend on both the survey area and the sampling rate, but in different ways.Here we present more results of this analysis.We consider the redshift range 0.75 < z < 0.95 and the stellar mass interval 10.5 < log (M * /M ⊙ ) < 11.0 in the PFS-like survey as an example.Figure 13 shows the fractional variance of the measurements from the 20 mock catalogs as functions of survey area (upper panels) and sampling rate (lower panels), We have fixed the sampling rate at 70% for the upper panels and the survey area at 12 deg 2 for the lower panel, respectively, in order to separate effects of the two parameters.Panels from left to right show results for three different r ⊥ scales.Plotted in the blue symbols/lines are the results for the PFS-like survey considered in the main text, where the total survey area is divided into three fields that consist of similar numbers of pointings but are well separated in the sky.The yellow symbols/lines show the case in which the survey has only a single field, but with the same total area and fiber assignment as the PFS-like survey.In addition, the green dashed line and the red dashed-dotted line in each panel show the cases with three separate fields and one single field,

Figure 1 .
Figure1.The galaxy stellar mass function at z ∼ 1.The orange curve is for model galaxies in the simulation and the blue curve is the measurement obtained with the COS-MOS2020 photometric sample, which we used to calibrate the luminosity and color assignment for the model galaxies.The green curve is the measurement fromWeaver et al. (2022a) based on COSMOS2020 catalog.

Figure 2 .
Figure 2. The upper panel shows the contours of the galaxy number density in the plane of stellar mass M * versus y-band absolute magnitude My.The black lines are for the data from COSMOS2020 and the red dash lines are for model galaxies in our simulation.The lower panel shows the histogram of My in different intervals of log M * and the lines are the best-fit Gaussians.The blue dots with error bars in the upper panel show the M * -My relation and the Gaussian FWHM obtained from the fits in the lower panel.

Figure 4 .
Figure 4.The distribution of the rest-frame y − J color for model galaxies (orange curves) and obtained from the COSMOS2020 data (blue curves with error bars).

Figure 5 .
Figure 5.The lightcone of the PFS-like survey in the XMM-LSS field.The range of the declination is −4.9 • ≤ δ ≤ −4.4 • .The color of a point represents the intrinsic (y − J) color of the galaxy.3. EFFECTS OF FLUX LIMIT CRITERIA ON GALAXY CLUSTERING

Figure 6 .
Figure6.Measurements of wp(r ⊥ ) for the total sample (left panels) and subset of red galaxies (middle panels) and blue galaxies (right panels), using the PFS-like mock catalogs with stellar mass limited to 10 < log(M * /M⊙) < 10.5 between redshift 1.3∼1.6.The different lines and symbols represent different methods as indicated in the figure.

Figure 7 .Figure 8 .
Figure 7.The y-band luminosity functions estimated from the mock catalogs of the PFS-like galaxy survey are plotted as blue dots with Vmax-weighting method and orange dots with photometric sample, and are compared to the true luminosity function of model galaxies in the simulation.Results are shown for three different redshift intervals as indicated.The black vertical line in each panel indicates the spectroscopic sample limit.

Figure 9 .
Figure 9.The fractional variance in the GSMF is estimated from the mock catalogs of the PFS-like galaxy survey, as a function of the survey area.Results are show for different redshift intervals in different panels, and in each panel the different symbols/colors are for different stellar masses as indicated.The solid lines represent the results with Vmax-weighting method from spectroscopic sample and the dashed lines represent the results from photometric sample.The large hollow symbols are the fractional variance estimated for the zCOSMOS-bright survey, and the large solid symbols are the results for VIPERS survey.

Figure 10 .
Figure10.The projected 2PCF wp(r ⊥ ) measured from the mock catalogs of the PFS-like galaxy survey, for different redshift intervals and different stellar mass ranges, as indicated.The solid lines represent the wp(r ⊥ ) measured with our "weighting method".The dashed lines represent the true wp(r ⊥ ) for model galaxies.The hollow symbols represent the wp(r ⊥ ) measured with "conventional method".The black and gray lines/symbols represent the results of the total sample.Red and blue dots and lines represent the results for the subset of red and blue sample.To show the results clearly, we multiply the mean value of red sample and blue sample by 2 and 0.5, and the ratios of red sample and blue sample by 10 and 0.1, respectively.

Figure 11 .
Figure 11.The fractional variance in the projected 2PCF is estimated from the mock catalogs of the PFS-like galaxy survey, as a function of the survey area.Results are show for different redshift intervals and different stellar mass intervals in different panels, and in each panel the different symbols/colors are for different r ⊥ as indicated.The large hollow symbols are the fractional variance estimated for the zCOSMOS-bright survey, and the large solid symbols are the results for VIPERS survey.

Figure 12 .
Figure12.The local sampling rate as a function of the local surface number density of galaxy targets.Color lines represent results for different stellar mass ranges, while the black line is the result for galaxies as a whole.