{'fraction_non_alphanumeric': 0.033335768823293026, 'fraction_numerical': 0.015928104336389873, 'mean_word_length': 4.482375325455638, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Mock Quasar-Lyman-{\alpha} Forest Data-sets for the SDSS-III Baryon Oscillation Spectroscopic Survey

We describe mock data-sets generated to simulate the high-redshift quasar sample in Data Release 11 (DR11) of the SDSS-III Baryon Oscillation Spectroscopic Survey (BOSS). The mock spectra contain Ly{\alpha} forest correlations useful for studying the 3D correlation function including Baryon Acoustic Oscillations (BAO). They also include astrophysical effects such as quasar continuum diversity and high-density absorbers, instrumental effects such as noise and spectral resolution, as well as imperfections introduced by the SDSS pipeline treatment of the raw data. The Ly{\alpha} forest BAO analysis of the BOSS collaboration, described in Delubac et al. 2014, has used these mock data-sets to develop and cross-check analysis procedures prior to performing the BAO analysis on real data, and for continued systematic cross checks. Tests presented here show that the simulations reproduce sufficiently well important characteristics of real spectra. These mock data-sets will be made available together with the data at the time of the Data Release 11.


Introduction
The Baryon Oscillation Spectroscopic Survey (BOSS) [1], as part of the Sloan Digital Sky Survey [2], has obtained accurate redshifts of over 1.5 million massive galaxies and spectra of more than 150,000 quasars with Lyα forest coverage in order to study Baryon Acoustic Oscillations (BAO). Measuring large-scale structure with these tracers provides percent-level accuracy in the position of the BAO peak [3], which translates into measurements of the redshift dependent angular diameter distance, D A (z), and Hubble expansion rate, H(z).
BOSS Data Release 9 (DR9) was used to study BAO at high redshift for the first time in the 3D Lyα forest flux distribution [4][5][6][7]. The latest Lyα forest clustering analysis, described in [8], uses three times more data from Data Release 11 (DR11 1 ). This new analysis is an improvement in several ways: new covariance matrix estimates, deeper study of systematic effects and the use of 100 realizations of mock catalogs. It has yielded a new measurement of the expansion rate, H(z = 2.34) = (222 ± 7)(147.4/r d ) km s −1 Mpc −1 , and the angular distance D A (z) = (1662±96)(r d /147.4) Mpc, where r d is the sound horizon at the drag epoch as can be estimated by CMB data [9]. Mock catalogs were essential for testing systematic effects in the analysis. We describe here mock spectra used in that DR11 Lyα analysis. A very similar procedure was followed to generate mocks for the DR9 analysis.
The clustering of the Lyα forest is encoded in the absorption field defined by where q indexes an individual quasar (or more precisely its angular position on the sky) and λ is a wavelength of the quasar spectrum. The flux transmission, F q (λ), and its meanF (λ), is mostly due to neutral hydrogen at redshift z + 1 = λ/121.6 nm. The transmission is the ratio of the measured flux, f q (λ), to the quasar "continuum" C q (λ), i.e. the flux that would be measured in the absence of absorption. The δ q (λ) can be used to estimate the two-point correlation functionξ where i and j refer to pixels defined by q and λ and the sum is over pixel pairs (i, j) such that the separation between the two pixels lies in bin A (generally defined by a transverse separation, r ⊥ and radial separation r ). The w ij are weights that depend on the level of instrumental noise in the pixels and on the intrinsic variance of fluctuations in the forest.
The creation of realistic mocks requires generating realistic quasar continua, mean absorptions and δ q (λ) that have correlations due to large-scale structure and fluctuations due to noise. This is done in two steps. First, we create a realization of the absorption field at every forest pixel, assuming a certain cosmological model. Second, quasar spectra are generated by multiplying the F q (λ) by synthetic quasar continua, C q (λ), and then adding instrumental noise, metal lines, high column density absorbers, and other potential systematics.
Full hydrodynamical simulations [10][11][12][13][14] can give a precise description of the Lyα forest physics under certain assumptions, but they are computationally expensive and do not have the required dynamic range to describe both BAO scales and the small-scale structure responsible for the observed Lyα fluctuations. Furthermore, hundreds of realizations of the survey are desired, which is impractical with these simulations. An alternative method to generate was presented in [15]. This method is fast enough to allow us to generate many realizations of the survey, while at the same time capturing the correct 1-point and 2-point statistics of the absorption field. This method has been used in previous analyses [4][5][6], and we also follow it here.
The second step, the main subject of this article, is the transformation of the flux transmission into data-like spectra that have the essential characteristics of the real BOSS spectra. Absorption lines arising from high column density systems and metal transitions are first added to the Lyα absorption. The absorption field is then applied to random quasar continua and instrumental noise is added. Pipeline imperfections in flux and noise estimation, and sky subtraction are included.
We start by summarizing the method to generate the Lyα absorption field in section 2. In section 3 we describe the transformation this field, the so-called raw mock spectra, into realistic quasar spectra, the so-called expanded mock spectra. In section 4 we compare some basic statistics of the expanded spectra with those of real spectra. In section 5 we compare the three-dimensional correlation function and its covariance matrix of the expanded mocks with those of the data. We conclude in section 6. In appendix A we explain the access and the usage of the mock catalogs. These can be found at the SDSS public webpage https://www.sdss3.org/dr11/algorithms/lya_mocks 2 .

Generation of the absorption field
The main desired properties of the absorption field are that (a) it possesses pre-defined 3D correlations described by a power spectrum P F (k), (b) it has a realistic flux probability distribution function, with transmissions values between 0 and 1 and (c) it follows the geometry of the BOSS Lyα survey, i.e., it contains quasars at the same position and redshift as the real quasars, and has a wavelength resolution better than the BOSS spectrograph pixel size (∼ 0.07 nm). We note that property (b) implies that the statistics of the absorption field will be non-Gaussian.
We warn the user that these mocks are not suited for quasar-Lyα forest cross-correlation measurements (e.g. [16]), since no correlations between quasar positions and the absorption field are included.

Input power spectrum
The target correlation function of the absorption field is defined by the power spectrum where P lin (k) is the linear isotropic matter power spectrum as computed using CAMB 3 code [17] at z = 2.25 with cosmological parameters given in section 1. The amplitude P 0 = −0.14 and redshift-distortion parameter β = 1.4 were chosen to be compatible with measurements of [18] and [4]. The D(k, µ) term accounts for a small scale non-linear correction of the power spectrum (defined by Eq. 21 and Table 1 of [13]), depending on the cosine of the angle between the wavevector and the line of sight, µ = k /k.
The redshift evolution of the power spectrum amplitude P 0 (z) is set by the evolution of the Lyα forest bias b(z) and the growth factor g(z), and we further assume that it evolves according to b(z) g(z) g(z=2.25) = −0.14[(1 + z)/3.25] γ/2 , where γ = 3.8 (following results from [18]). The redshift space distortions parameter β is assumed to be redshift-independent.

Absorption field properties
We use same assumption as in [15]. In order to create an absorption field with a realistic flux probability density function, we build a Gaussian random field δ G over pixels, and then we apply the following non-linear transformation to compute the transmission F q , (2. 2) The two functions, a(z) and b(z) are chosen so that the resulting mean transmissionF and variance of δ q = F q /F − 1 are where γ = 3.8 is set by the evolution of the power spectrum amplitude.
Given this transformation between Gaussian variables and transmission, we proceed as follows: first, we generate a Gaussian field with correlations given by a Gaussian power spectrum P G . Second, we compute transmissions using Eq. 2.2. By choosing the correct P G , the final transmission field should have the correct correlations given by P F (Eq. 2.1). The authors of [15] give a prescription for choosing the power spectrum of the Gaussian field and the parameters of the non-linear transformation in order to match the desired correlation properties of the final absorption field.

The mock-data sample
Our data sample is defined by the automatic object classification and redshift determination performed by the BOSS reduction pipeline [19] and based on the BOSS Data Release 11 (DR11). We selected all objects classified as a quasar and with redshifts in the range 2.15 < z < 3.5, which captures the selection done for the analysis of real data [8]. This sample contains 149,751 line-of-sights and differs from the 137,562-quasar sample in [8], based on the DR11 quasar value-added catalog, mainly due to the rejection of quasars with broad absorption lines (BALs) applied to the latter sample and, to a lesser extent, to stars, galaxies or low-redshift quasars mis-identified as high-redshift quasars by the pipeline. This is not a problem since these extra-spectra can be rejected at the analysis step. On the other hand, 6,808 quasars on the [8] data sample do not have a corresponding mock quasar.
Given the size of the BOSS Lyα forest survey of over 10 5 quasars, these conditions imply generating over 10 7 correlated pixels. A straight-forward algorithm of generating uncorrelated pixels and taking linear combinations of those pixels to give them the desired correlations would involve inverting matrices of dimensions 10 7 × 10 7 , beyond the reach of current computational capabilities.
Fortunately, these difficulties are overcome by a method developed in [15] that makes use of the fact that within a small angular region, quasar lines-of-sight are nearly parallel. We summarize this method here. The desired correlated Gaussian random field, δ G (x , x ⊥ ), is defined as a function of a radial coordinate, x , and a transverse two-dimensional coordinate vector, x ⊥ . This field is expressed in terms of its radial Fourier transform,δ G (k , x ⊥ ). In the approximation of parallel lines-of-sight, theδ G with differing k are uncorrelated and the statistical properties ofδ G of a given k are defined by the power spectrum where P G (k , k ⊥ ) is the power spectrum of the Gaussian field (not to be confused with P F , the desired power for the final flux field).
Correlated values ofδ G (k , x ⊥ ) at the angular position of each quasar can thus be generated for each k by inverting a N qso ×N qso matrix. This is still beyond our computational capacity so we divided the BOSS survey into regions of nearly 8,500 quasars each. The absorption field in each region is generated independently, as further detailed below. Once the amplitudes and phases of the radial modes are fixed, the Gaussian field is reconstructed by Fourier transforming the radial modes for each line of sight.

Implementation
To ease the implementation of the radial Fourier transforms, the absorption fields so produced are sampled in fixed grid of 8192 bins of comoving width 0.5 h −1 Mpc along each line of sight, which covers a comoving distance of 4096 h −1 Mpc. They are then trimmed between the limits of the BOSS spectrograph (λ ∼ 360 nm corresponding to z ∼ 1.96) and the Lyα emission peak of each quasar. We called this trimmed absorption field the "raw mock skewers", which is one of our products. In a later step they are resampled at the center of BOSS wavelength pixels.  The redshift evolution of the absorption field is implemented by following this procedure at four redshift snap-shots: 1.920, 2.409, 2.898, and 3.386 which cover the range of the BOSS Lyα forests. In each snap-shot, the underlying density field is generated with the same seeds. This ensures that the final absorption field will look like an evolved field from snap-shot to snap-shot. We also shifted the positions of the lines-of-sight at each redshift accounting for the fact that they are not parallel. The absorption field at any redshift is obtained by interpolation.
A total of 100 independent realizations were generated using the computational facilities of NERSC 4 .

Effects of sky subdivisions
As discussed above, the computational constraints require that the data sample be split into regions with lower numbers of quasars. The DR11 regions were selected by an iterative optimization code designed to make physically compact regions with approximately the same number of QSOs. These regions are shown in the left panel of figure 1.
Because the regions are treated independently, the procedure generates no correlations between neighboring quasars that happen to fall in different regions. The right panel of Fig. 1 shows the fraction of QSO pairs which come from different regions as a function of the transverse separation of Lyα forest pixels at redshift z = 2.2. For the 3D correlation function, this corresponds to an effective number of pixel pairs in the mocks that is lower than in the data, and this fact needs to be taken into account when comparing mock with data measurements.

Generation of expanded mock spectra
In the previous section we described the process of generating the "raw" mock spectra consisting of the correlated transmitted flux fraction F q (λ) along quasar lines-of-sight as defined by eqn. 1.1. In this section we describe the production of so-called "expanded mock spectra" which superimpose the raw spectra on quasar continua and then add astrophysical features such aa high column density absorbers and metal absorption lines, as well as instrumental features such as noise, spectro-photometric calibration errors and sky subtraction residuals.
The mock data are intended to mimic BOSS coadded spectra, which result from the addition of several successive 20-minute individual exposures of the same object, in a given plate and a single night 5 . Most of our discussion below refers to coadded spectra except for the section on noise properties where a distinction between the noise in each exposure and the noise in the coadds is necessary. (3.1) Dropping the quasar index q for clarity, the parameters on the r.h.s are as follows: F λ is the transmission fraction as defined by eqn. 1.1 except that it is set to 1 outside the Lyα forest; C λ is the PCA-generated quasar continuum;W (R p , R W ) is the Fourier transform of the BOSS resolution and pixelization kernel (eq. 3.2) which is convolved with the product F λ C λ ; N λ is the noise computed from our model (eq. 3.4); M λ is a linear function of log λ (eq. 3.3) used to ensure that each mock spectrum has the same mean flux and spectral index as the corresponding real spectrum; and f sky is the added sky subtraction residuals ( fig. 4).
The procedure for generating the correlated Lyα transmission field yields a mean absorption and variance given by equations 2.3 and 2.4. That transmission field models regions of optically thin neutral hydrogen absorption, ignoring high-density systems and non-Lyα absorbers. In the following two subsections, we describe how we add to F λ these additional absorbers. In the subsequant subsections we describe how we generate the other factors in (3.1) necessary to produce the expanded mock spectra.

High column density (HCD) systems
Dense systems with high neutral hydrogen column density produce wavelength intervals of complete absorption surrounded by damped wings. These structures affect the measured Lyα transmission correlations in two ways. First, they affect the size of the Lyα forest fluctuations directly impacting the variance in the resulting long-range 3D correlations. Second, since these systems are themselves biased differently than the optically thin regions, they will also affect these correlations themselves.
Damped Lyα systems (DLAs) have strong damped wings that allow for their easy identification, but Lyman limit systems (LLS) of lower column density can also affect the correlations even if their damped wings are weak and individually not detectable.
We insert both LLS and DLAs systems with neutral hydrogen column densitiesN HI > 10 17.2 cm −2 , which we collectively designate as high column density systems (HCDs), following the procedure that is described in [20]. In brief, HCDs are distributed only in pixels where the transmission F is lower than a certain threshold F 0 , defined such that the probability to have an optical depth τ larger than τ 0 = − ln(F 0 ) is 1%. The column density of the HCDs are randomly drawn from an analytical model [21] calibrated to match observations [22] from SDSSII-DR7. Voigt profiles are included in these regions assuming a constant Doppler parameter b D = 70 km s −1 .
The effect of HCDs on the Lyα forest correlation function and the measurement errors was studied previously in [20]. In section 4 this effect is measured in our mock catalogs taking into account BOSS spectroscopic characteristics.

Metals
In addition to absorption from hydrogen, metals in the intergalactic medium can also absorb quasar light at discrete wavelengths inside the Lyα forest. Metal absorption lines are individually indistinguishable from Lyα forest absorption (at BOSS resolution and noise levels). These metals add "unwanted" correlations to our Lyα forest data in two ways. First, absorption correlations are imprinted in individual spectra by gas at a given reshift absorbing at more than one wavelength. For example, a gas system with Lyα absorption at wavelength λ will have correlated metal absortption at wavelength λλ Met /121.6nm, where λ Met is the wavelength of any other transition. While this type of correlation is most important within individual spectra, 3D correlations are also generated because neighboring lines of sight sample redshift-correlated gas structures. The second type of correlation results from the fact that all metal species are themselves tracers of large-scale structure [23]. This leads directly to a weak 3D metal autocorrelation superimposed on the dominant Lyα autocorrelation. We focus here on the former effect and will explore the latter in a future publication.
We added metal absorption with a procedure that assumes that all significant metal absorption is associated with strong Lyα absorption. For each mock spectrum, we considered pixels for which the Lyα transmission F (λ) was below 0.4. For these cases, we decrease the flux by δF Met of their corresponding flux bin at wavelength λλ Met /121.6nm for each metal line.
Application of this method requires a list of significant metal transitions and appropriate values for the absorption flux decrement, δF Met . This was done following the procedure of [4] where quasar spectra were stacked after scaling the wavelength of each spectrum so that selected strong absorption is centered at the restframe Lyα transition. The stacked spectra then have, necessarily, strong absorption at the 121.6nm, but also absorption lines at wavelengths separated from this feature by (λ i /λ 0 )121.6nm, where λ 0 is the wavelength of absorption by the species responsible for the strong absorption and λ i is the wavelength of absorption of any other absorber. With these stacks, we identified 21 correlated absorption features, 9 of them corresponding to Lyα -metal correlations and the others to metal-metal correlations (arising from the strong absorber being due to a metal line rather than to Lyα). We designate these metal-metal correlations as "shadows" hereafter [24]. We allowed these flux decrements to vary by performing this procedure for 7 selected bins in simulated Lyα Using the line catalog and the deduced flux decrements, we added metal lines (including shadow lines) to the mock spectra. We did this by reducing the flux at 21 separate wavelengths for every strongly absorbed Lyα forest pixel. The introduction of shadow lines in this way is unphysical but this method is employed in order to reproduce the full set of 1D absorption correlations in the mock spectra as tested by stacking both mock and observed spectra (see section 4.4). Our algorithm for the addition of metal absorption assumes that all metal absorption can be characterized by its association with Lyα forest absorption. The need for these shadow lines indicates that this is not always the case; some strong metal lines occur where little or no Lyman alpha absorption is apparent.
The ascribed metal absorption is fully determined by the mean metal absorption above and so no scatter is added to these flux decrements. This will be refined in a future publication.

Quasar continua C λ
The quasar continuum C λ for each line-of-sight is constructed using eight higher ranked eigenspectra of the Principal Component Analysis (PCA) of low redshift quasar spectra 6 [25]. The final continuum is a sum of a mean shape and a linear combination of these eigenspectra for which amplitudes were randomly sampled following a centered Gaussian distribution with the corresponding standard deviation. These eigenspectra cover restframe wavelengths 102-160 nm spanning from the Lyman-β peak through C IV λ1549. Wavelengths above and below this range are discarded in the mock spectra. Figure 2 shows 5 examples of mock continua with variations in line shapes and the shape of the continuum within the 6 Low redshift quasars have less absorption in the forest, simplifying the continuum estimation.
Lyα forest. The random sampling of the PCA eigenvalue amplitudes occasionally leads to negative continua at some wavelength bins (this happens on 0.5% of the continua), and in this case the continuum is discarded and a new set of random amplitudes is drawn.

The BOSS kernel
BOSS spectrographs cover the wavelength range 361 nm -1014 nm with a resolving power λ/∆λ varying from 1300 in the blue end to 2600 in the red end. Each data spectrum has its own estimate of the wavelength dispersion per pixel. In BOSS coadded data, the pixels are logarithmic in wavelength with steps of ∆ log 10 (λ) = 10 −4 corresponding to 69 km s −1 .
As described in 2, the raw absorption fields were produced over the lines-of-sight using a grid in comoving space with bins of 0.5 h −1 Mpc. To match BOSS spectra binning and resolution, we first compute the mean wavelength dispersion (PSF) R w and mean pixel width R p over the Lyα forest region of the corresponding data spectrum. Each raw field was then convolved using the following kernel (in Fourier space): We then match the binning by taking, for each data pixel, the absorption value of the closest pixel of the smoothed raw field.

Flux normalization M λ
We wish to ensure that each mock quasar has a mean forest flux and spectral index equal to those of the corresponding real quasar. Specifically, we normalize the noise-free mock quasar flux f mock to the data flux f data by fitting for M 0 and M 1 in over the rest-frame wavelength ranges 104.1 < λ < 118.5 nm (inside the Lyα forest) and 127.0 < λ < 150.0 nm (between the Lyα and CIV emission peaks). Then, f mock is multiplied by the factor M λ = M 0 + M 1 log 10 λ. These fits are done using the inverse variance given by the pipeline as fit weights and ignoring all masked pixels. For DR9 mock data-sets, the fit was performed without weighting leading a slightly larger number of bad fits, about 1% of the full sample.
The parameter M 1 effectively corrects for quasar spectral distortions introduced by the SDSS optics that are currently not corrected by the pipeline. The Sloan 2.5-m telescope has a chromatic focal plane and lacks an atmospheric dispersion corrector. As a result, the optimal position for a spectrograph fiber is a wavelength and airmass dependent quantity. Galaxy targets and calibration stars are optimized for 540 nm, while quasar targets are offset both along and across the focal plane to optimize the signal-to-noise at 400 nm for Lyα forest studies. This offset means that the flux calibration vectors derived from the standard stars are not correct for the quasars and result in a flux mis-calibration which depends upon wavelength, airmass, seeing, guiding, and the location on the focal plane [1].

The noise, N λ
The noise, N λ , added to the fluxes of a given mock quasar is a random number taken from a Gaussian distribution of mean zero and with a variance determined by the noise model for the corresponding real quasar. The noise models are most naturally expressed using the total number of photo-electrons p tot in a given pixel (object plus sky), since in an ideal system the variance would be equal to p tot (pure Poisson noise). In practice, our model gives the variance σ 2 phot as a linear function of p tot ': The coefficient N 0 reflects the CCD readout noise and other systematic effects that are independent of the photon flux. The coefficient N 1 would be unity for pure Poisson photon noise in the absence of systematics, but in practice N 1 ≥ 1 owing to sky subtraction and flux calibration errors.
For each mock quasar, the parameters N 0 and N 1 are found by fitting p tot as a function of σ 2 phot for the corresponding real quasar. This requires the use of a effective calibration vector c(λ) to transform observed fluxes into photo-electrons: where σ 2 (λ) is the estimated flux variance of the data. We fit the linear noise model (Eq. 3.4) for each spectrum, using pixels from the blue side of the spectrograph. Fig. 3 shows an example of a fit for N 0 and N 1 for one quasar spectrum in DR11.
In addition to σ(λ), we also need the effective calibration vector c(λ) in Eqs. 3.5 and 3.6. The BOSS data individual exposures include the calibration vector c i (λ) that converts between observed photo-electrons p i (λ) and calibrated flux f i (λ). The coadd is performed as a weighted simultaneous spline fit to the individual exposures and the resulting effective calibration vector is not calculated. We re-derive the effective calibration vector using the approximation that the coadded photo-electrons are the unweighted sum of the individual exposure photo-electrons: p = i p i (λ) = r(λ) i f i (λ)/c i (λ), where r(λ) corrects for the wavelength dependent difference in bin-size between individual exposures and the coadded spectra.
Since the coadded flux is normalized to the same units as the individual exposures (ergs/s/cm 2 /Å), we may factor out f (λ) f i (λ) such that p(λ) = f (λ)r(λ) i c −1 i (λ). Thus the effective calibration vector to convert between coadded photo-electrons and coadded flux is: For this calculation we use only the blue exposures, therefore limiting the wavelength range of mock spectra from 360 to 633 nm.
With the parameters N 0 and N 1 for each quasar, it is simple to add realistic noise to the mock spectra. We compute the mock quasar flux from the product of the transmission F and the generated PCA quasar continuum C, and add the same sky flux f sky that is used in the data. We then compute the mock photons p and noise σ p at each pixel, We add noise using a Gaussian distribution with mean 0 and sigma σ p : We convert back into quasar fluxf QSO : The next step consists in mis-reporting the value of the true variances σ 2 (λ), as we observe in real data. Biased estimates of pixel variances on real data were reported by different studies [26,27]. They find that for individual exposures, the pipeline noise estimates are accurate at the 1-2% level. Coadded spectra have a larger and wavelength dependent error in the estimated noise. For λ < 600 nm (blue spectrographs), the biases are approximately proportional to the square root of the ratio of the coadd to individual spectrum spectral bin sizes. Below (above) ∼475.0 nm, where the coadded bins are smaller (larger) than the original exposures, the pipeline underestimates (overestimates) the noise by 0-10% (0-15%). A flux-dependent bias of the pixel variances was also reported in [27]. We use the observed wavelength dependent errors in the pixel variances to purposefully mis-report the noise in mock spectra.
We also add Gaussian random fluctuations to this noise estimates with standard deviation proportional to the photon variance itself. The final mock photon noise estimateσf is given by σf (λ)r(λ) + N (0, √ 2σ f ).
The model presented here assumes that the noise in different pixels of the same spectrum is uncorrelated. This is likely not realistic because covariance among neighboring pixels is introduced by rebinning. However, other sources of small scale correlations in these mock catalogs are not correctly modeled by the input power spectrum, since the log-normal model was built to fit large-scale correlations. Therefore we ignore any noise correlation between neighboring bins. An alternative noise model [28] uses four per-object parameters (instead of two in our model). This method solves simultaneously for both the noise parameters and the optimal co-added flux. However, this modeling is inappropriate for our current purposes since our goal is to add noise to the mock co-added flux, which follows the pipeline and is not optimal.

Sky mis-subtraction
Figure 4 (left) shows the median residual of BOSS sky spectra after the sky model has been subtracted. While this is only a 1-2% bias in the sky subtraction, it can be large compared to the Lyα forest flux, which is typically faint compared to the sky. Fig. 4 (right) shows the relative flux between noise-free simulated Lyα forest flux and the residual sky. The median is 5.6%, the mean is 9.9%, and there is a tail reaching up to 1.0. Note that this is an additive component to mock spectra, unlike other mis-calibrations that are multiplicative.
Mock spectra add this median sky subtraction residual times a random constant scatter with mean 1.0 and RMS 0.1 so that each spectrum receives a slightly different sky subtraction residual bias.

Comparisons of mock and real spectra
In this section we compare several properties of the mock spectra to those of real spectra: continuum characteristics, noise levels, flux transmission correlations within individual spectra, and absorption by metals. Unless otherwise stated, the standard set of mocks used for the comparisons in this section does not contain metals or high column density systems (HCDs), but includes all instrumental systematics. The effect of metals and HCDs is studied in the end of section 5.1.

Mean continuum, variance and diversity
As a first test, we compare the mean spectra of the data and mocks. This simple test verifies that the product of mean continuum and forest transmission is reasonable. The mean spectra were calculated by first shifting each spectrum to its rest frame and normalizing it such that the average flux in the wavelength interval from 126 nm to 138 nm is unity. We stacked the set of normalized spectra to obtain the mean product of continuum and transmission and its variance as a function of rest-frame wavelength.
The solid lines in figure 5 shows the resulting mean spectra, red for the data and blue for the mocks. The dashed lines show the flux at one standard deviation higher and lower than the mean. The largest differences are in the height of the Lyα emission peak and to a lesser extent in the height of the iron lines in the Lyα forest. Whether these differences are an issue or not depends on the application. For instance, the methods in [4][5][6]8] only use the Lyα forest for the purposes of measuring the 3D correlation function, and the composite spectrum is computed self-consistently (which would automatically account for the shape differences when analyzing mocks or data).
We have also performed a second test of spectral diversity in the region of the forest. For this test, we applied the continuum fitting C2 of [8] and and then fit the observed flux between the upper and lower limits of the forest, λ 0 and λ 1 : where f (λ) is the flux,f (λ) is the quasar-averaged flux, C 0 and C 1 are free positive parameters (to ensure a positive continuum). The upper limit is λ 1 = 120(1 + z qso ) nm and λ 0 is the larger of 360 nm and 104(1 + z qso ) nm. For each forest we define a normalization parameter P 0 = (C 0 + C 1 )/2 and a tilt parameter P 1 = (C 1 − C 0 )/C 0 . The distributions of these two parameters are given in figure 6. There is an excellent agreement in the distributions of P 0 (left panel) in mocks and data. However, the right panel shows that, on average, mocks have a slightly positive tilt while data have a slightly negative tilt. This fact might be due to our PCA components having been derived at much lower redshifts than the typical redshifts of our quasar sample. At any rate, this is not a problem as long as the continuum fit model is flexible enough to compensate for that (as is the model in equation 4.1). The distribution of amplitudes and tilts have similar spreads in mocks and data, demonstrating that our mocks capture the diversity of real data in the region of the Lyα forest, at least regarding the spectral index variability.
The continuum fitting method C2 of [8] provides an estimate of the unabsorbed continuum, C λ . Stacking spectra in observed wavelength then gives the mean transmission as a function of redshift or, equivalently, of observed wavelength. Figure 7 shows this quantity for the data and mocks. Data reduction features are visible in the data stack (dashed red), such as the galactic calcium absorption (393.4 and 396.8 nm) or the Balmer residuals (near 398 nm, 410 nm and 435 nm). Some of those features are also present in the stack of mocks (solid blue) as a result of the addition of the sky residuals from figure 4 but are not otherwise explicitly included.

Noise
The importance of accurately simulating noise is due to the fact that noise accounts for about one half of the variance of individual measurements of the flux transmission, the other half coming from the intrinsic variations due to large-scale structure. In turn, the variance of individual measurements accounts for about one half of the variance of the measured three-dimensional correlation function with the other half due to correlations between measurements of neighboring pixels on individual spectra. Figure 8 compares the distribution of signal-to-noise ratio for individual pixels in the forest in mocks and data. The signal-to-noise is defined, for each individual pixel, as the ratio between the flux and the square-root of the pipeline estimate of the variance (before applying the corrections discussed in section 3.6). Given that in most studies the spectra  are normalized to an unabsorbed continuum estimate, this ratio is the relevant quantity to compare. We find a very good agreement between mocks and data. Figure 9 shows the variance of the individual measurement of the transmission, δ i , as a function of redshift. It has contributions from noise and large-scale-structure fluctuations. The latter contribution can be computed using noiseless mocks, as is shown by the dotted magenta line. It represents roughly 50% of the total variance. The agreement between mock and data variances is good (few percent level) below λ = 440 nm, which corresponds to a redshift of 2.6, including a considerable fraction of analysis pixels [8]. It is degraded by up to 10-15% up above 480 nm (z ∼ 2.95), beyond which there are very few Lyα forest pixels in the BOSS sample.

Correlations within individual forests
Here we compare the correlations of δ within individual forests, described by the correlation function: for which we have used the same estimator (Eq. 1.2) and weighting scheme as in [8] but changed the binning to work in wavelength instead of comoving separation. For this comparison, we used mocks including metal absorption. As shown in figure 10, ξ 1D is a rapidly decreasing function of wavelength separation except near ∆ log λ ∼ 30 × 10 −4 where it has a peak due to SiIII absorption correlated with Lyα absorption.
We first discuss ξ 1D for small separations. Figure 11 compares ξ 1D for mocks and data for the first two non-zero separation bins: ∆ log(λ) = 3 · 10 −4 (left) and ∆ log(λ) = 6 · 10 −4 (right). In these cases, the blue line (standard mocks) and the magenta line (noiseless mocks) closely follow one another. This is because our model assumes that the noise in different mock pixels is uncorrelated (this is not true for real data). The disagreement between mocks and data is at the 15-20% level and could be due either to an inaccurate input correlation function on small scales, or to inaccurate modeling of the instrument. On the clustering side, the small scales of these mocks are not supposed to be accurately modeled (due to resolution limitations), since the main goal is the large scales and BAO measurement. On the instrumental side, we do not simulate the coaddition process of individual exposures, that introduces correlations among nearest neighboring pixels in real data.
The correlations for larger pixels separations are shown in figure 10 for three redshift bins. Outside the SiIII bump at ∆ log λ ≈ 32 × 10 −4 , the mocks clearly have less correlation than the data. On the bump, the mocks appear to have a much stronger redshift dependence of the absorption.
The disagreement between the data and mock ξ 1D means that the covariance matrices of the two will be slightly different (section 5.2). Given the uncertainties in BAO measurements Figure 10: Correlation ξ 1D as a function of ∆ log λ for mocks (blue points) and data (red points) for three bins in redshift: 2.0 < z < 2.3; 2.3 < z < 2.6; 2.6 < z < 2.9 (by order of increasing correlations).  Figure 11: Correlation ξ 1D between a pixel and its nearest neighbor (∆ log 10 λ = 10 −4 , left) and next-to-nearest neighbor (∆ log 10 λ = 2 × 10 −4 ,right). The data are the red dashed lines, the expanded mocks blue solid line, and raw (noiseless) mocks the magenta dotted line.
are dominated by pixel variance and the covariance of neighboring pixels, we will leave these issues to future work.
An alternative way to study correlations within individual spectra is the Fourier transform of ξ 1D , the one-dimensional power spectrum, P 1D , a very powerful probe to constraint cosmological models [18,26]. However, we do not expect that the mocks spectra presented here will give a realistic spectrum for all k, especially at small scales where our treatment is rather crude (see section 2). We have also assumed a constant resolution over the whole mock forests.
We computed the 1D power spectrum following the same procedure as in [26] for a subsample of 16,000 mock spectra having signal-to-noise ratio greater than 2 and mean resolution below 85 km s −1 (same cuts as for real data). The flux fluctuations δ F were obtained by dividing out the mean stacked flux over forests. We used a Fast Fourier Transform to convert the fluctuations to k-space to estimate the power spectrum. The noise contribution to the power was subtracted, assuming it is constant over k. The resolution and pixelization kernel (Eq. 3.2) was also divided out. This measurement was done in four redshift bins equally divided between 2.1 < z < 2.9. We analyzed mock spectra with no noise added (only the continuum multiplied by the absorption field) in order to see effects of binning and resolution on the power.
The analysis on full expanded spectra needs an estimator for the noise mis-estimates. In [26], this estimate was performed using two different procedures, the first uses individual exposures of each spectra, the second uses flat spectral regions redwards of the Lyα emission peak. None of these procedures can be applied on mock spectra since individual exposures are not produced, and no quasar with z < 2.15 is created meaning that no region of mock spectrum redwards of Lyα falls into the blue end of the spectrograph, which would allows us to estimate the true noise. Therefore, the 1D power spectrum measurement on expanded spectra was performed using the true pixel noise, which is constant in k-space. Fig. 12 shows the estimated 1D power spectrum of mock spectra, compared with the measurement performed on DR9 data [26]. The overall shape of power spectra is in good agreement with data. The power spectrum on the lowest redshift bin, z = 2.2, shows the best agreement with data while the higher redshift measurements have up to 20% more power than data on large scales (k < 0.015 s km −1 ). This increase in power at high redshift is related to the increase in pixel variance observed in Fig. 9. On small scales (k > 0.015 s km −1 ), data and mocks show an agreement within 1σ for most points, but this is due mainly to the large errors on data points. As we saw in the ξ 1D , the clustering on small scales is not correctly modeled in our mocks.
We remind that covariance matrix measurements for BAO in data are not derived from mocks, but from the data itself. Therefore, discrepancies seen here in the small scale clustering does not have an important role in the final measurement.

Metals
Metal absorption correlated with Lyα absorption was included in mock forests following prescription described in section 3.2. In order to test our method of introducing metal absorption, we stacked Lyα absorption in our mock forests following a modified method from [29]. In Fig. 13 the resulting stack for Lyα transmission values in the range 0.05 < F < 0.15 is shown as a function of rest-frame wavelength, in comparison with the stack using real data. Errors were computed by bootstrap. The agreement for most of the lines is at the sub-percent level, in particular for the stronger ones. Similar agreement is also observed in stacks of absorbers with different transmission values (F < 0.05 and 0.15 < F < 0.4). This validates our implementation, constructed with the purpose of investigating systematic effects of metals on the BAO measurement. The effect of these metals on the correlation function is discussed in section 5.1.

Three-dimensional statistical properties of the mock and real spectra
In this section we compare the 3D correlation function of the mock and real spectra and their covariances. We do this first for the mock spectra without high-column-density and metallic absorbers. We then study the effects of of these two absorbers on the measured correlation function.

Three dimensional correlation function
The correlation function is measured using eqn. 1.2 as a function of the transverse separation (r ⊥ ) and the parallel separation (r ) between pixels. We organize these data in bins or r ≡ r 2 ⊥ + r 2 and µ ≡ r /r = cos θ (where θ is the angle between the pixel-separation vector and the line of sight). We finally consider three "wedges" in µ: 0 < µ < 0.5, 0.5 < µ < 0. and 0.8 < µ < 1 and compute the average of the correlation function in each wedge as a function of r to obtain ξ ⊥ , ξ int and ξ respectively. The three panels in figure 14 show the results. The gray lines correspond to individual mock realizations and illustrate the spread. The blue lines show the mean (solid) and the 1σ limits (dashed) for the sample of mocks. The red points with error bars are the results from the data [8].
The agreement between the mocks and data is good. The most noticeable difference is a mismatch in the position of the BAO peak in ξ . This difference is characterized in [8] as a ≈ 1.5σ discrepancy between the predicted position of the BAO peak by the fiducial cosmology of the mocks and that measured from data.

Covariance.
The covariance matrix of the 3D correlation function bins can be estimated directly from the data using the subsampling technique developed in [8]. This internally estimated covariance for a given mock can be compared with the variability among the 100 mock realizations Figure 15: Histogram of the ratio of the variance of ξ A calculated from the fluctuations in the 100 mock and using the sub-sampling method. Each histogram entry corresponds to a bin in separation. characterized by its variance: where N mocks is the number of mocks (100) ξ A is the 3D correlation function measured at a separation bin A andξ A is the average correlation function in the mocks sample. Since non-diagonal correlations are too small to estimate with only 100 mocks, we only compare the variances. Figure 15 shows a histogram of the ratio of variances estimated using equation 5.1 and that obtained using the subsampling method from [8]. The agreement between both calculations of the variance is excellent. This validates our methods to compute the covariance matrix, showing the importance of this set of mock catalogs for the measurement on real data.
Next we compare the variances in mocks and data. Since the number of quasars in the mocks is not exactly the same as in real data, we compare the product of the variance and the number of pairs for each bin in separation. Figure 16 shows the product of the variance and the number of pairs as a function of transverse separation for data (in red) and mocks (in blue). This figure shows that the mocks have 30% less variance than the data. This difference may come from the differences in the one-dimensional correlation function (see figure 9).
We also compared non-diagonal terms of the covariance matrix. Following [8], we assume that this matrix is a function of ∆r = r − r and ∆r ⊥ = r ⊥ − r ⊥ , and thus compute of the average of all correlation coefficients (covariance normalized by the geometric mean of variances) with same ∆r and ∆r ⊥ . In figure 17, we plot these averaged correlations as a function of ∆r for the three first transverse bins, ∆r ⊥ = 0, 4 and 8 h −1 Mpc. In the first transverse bin, where the covariance matrix is determined by the line-of-sight correlation function, we clearly see a peak at r ∼ 25 h −1 Mpc corresponding to Lyα-SiIII correlations. This peak is, as expected, absent from the covariance matrix of metal-less mocks. As before, Red empty circles show data, blue filled circles (resp. green squares) show a single mock realization measurement without (resp. with) Lyman Limit Systems. Remark that the error bars of mock containing LLS correspond to a more biased correlation function (Fig. 18).
data shows slightly more correlation on small scales. The covariance falls quickly to zero as ∆r ⊥ increases. For these bins, data and mock non-diagonal terms of the covariance matrix generally agree in shape but data shows smaller correlation coefficients likely due to the differences in the one-dimensional correlation function.

Effect of Lyman-limit systems.
Thus far, the comparison has been performed using mock catalogs with no high-column density absorbers even though they are present in data. In this section we see the effect of adding Lyman-limit systems (LLS) to the spectra. Since DLAs can be identified in the data and treated separately, we excluded from our analyses all forests containing DLAs (N HI > 10 20.3 cm 2 ), while conserving forests with LLS (10 17 < N HI < 10 20.3 cm 2 ). In Fig. 18 the stacked 3D correlation function of mocks containing LLS is compared with the stack of realizations without them. As already observed by [20], the inclusion of high column density systems increases the bias of the correlation function. This is now shown also taking into account the BOSS spectrograph properties and using the standard BAO Lyα analysis. This effect comes from the increased absorption from LLS that reduces the mean transmissionF and also increases the intrinsic variance σ 2 LSS of the absorption field. The increase in bias of the correlation function depends on two factors. First it depends on the number density of these systems and the dependence of this number with redshift. Second, it depends on how these systems are related to the underlying density field. On real data, the distribution of Lyman limit systems is not known to high precision [30], therefore the used input mock LLS distribution might not be accurate. Furthermore, due to our method of including LLS on forests (see section 3.1), the redshift distortion parameter for LLS, β LLS , is the same as for the Lyα forest, β = 1.4, which is also an approximation (we expect that β LSS < β). Therefore quantitative results of their effects on the correlation function are not reliable, even though their qualitative effect is correct. It is important to remark in Fig. 18 that these systems do not change the position of the BAO peak or its width. However, measuring bias or redshift  space distortions need to carefully take into account the additional clustering coming from Lyman limit systems.

Effect of metals.
In addition to Lyman limit systems, real forests also contain metal absorption that cannot be identified due to the low signal-to-noise of spectra or confusion between source transitions. We included metal absorption in mock spectra (see section 3.2) and we found that their effect on the correlation function and its errors is smaller than the effect of LLS. The main effect of metal absorption is seen on correlations of pixels with separations nearly aligned to the lineof-sight (µ ∼ 1.0), on bins with small transverse separation (r ⊥ ∼ 0). Figure 19 shows the difference between correlations of metal and metal-less mocks (blue points) compared with mean correlation function (red points), computed using 10 mock realizations. In addition to the Lyα-SiIII line (see Fig. 13), the effect of the SiII-SiIII shadow line is also visible on the 3D correlation for r ⊥ ∼ 0 and r ∼ 175 h −1 Mpc. Since bins for which r ⊥ ∼ 0 contain small number of pairs compared to bins at larger transverse separations, the presence of metal Figure 18: Effect of Lyman Limit Systems (LLS) on the 3D correlation function represented by three wedges 0 < µ < 0.5 (left), 0.5 < µ < 0.8 (center) and 0.8 < µ < 1.0 (right panel). These are averages over 100 (resp. 10) realizations containing (resp. without) LLS. Colored shaded regions show the 1σ scatter around the mean.
correlations on large scales do not bias BAO fitting procedures (Fig. 12 of [8]).

Discussion & Conclusions
In this paper, we have presented the mock Lyα forest catalogs for the Data-Release 11 of the SDSS-III. The analysis of the mocks presented in Section 5 shows that they reproduce well the observed correlation function of the transmission fluctuations as measured in [8]. The measured covariance matrix of the mock correlation function is comparable to that of the real data but does show systematic deviations for both the variance and the off-diagonal elements. As long as the errors are used in a consistent manner, these differences do not prevent the mock spectra from being useful to verify that the analysis returns reasonable values for the statistical errors and to show that there are no obvious biases in the measured position of the BAO peak.
The deviations between mock and data covariances matrices reflect the statistical properties of individual mock spectra which, as shown in Section 4, differ from the real spectra. The differences are due to the necessarily approximate treatment of the input power spectrum at small scales. We have not simulated all the imperfections in the BOSS pipeline, in  Figure 19: The effect of metals on the stacked measurement correlation function of 10 mock sets. The difference between metal and metal-less mock correlation function averaged over 0.8 < µ < 1.0 (blue points) compared with the measurement itself (red points). The light red and blue lines show the results for individual mock sets. Error bars are the standard deviation of the 10 estimates.
particular the presence of Balmer artifacts. We can anticipate, however, that these artifacts will be removed with future improvements in the pipeline.
Of more fundamental concern is the uncertain nature of the correct way of introducing high column density systems and metallic absorbers. Improvements in these aspects of the simulations will require further study.
• Raw Mock Directory: the folder containing the raw format files • Data Directory: the folder containing the data spectra, containing individual exposures, in spec 8 format.
• Output Directory: the folder were the MockExpander will write the output mock files.
• Initial(Final) Realization : the user might want to expand a sub-set of the available realizations, these keywords allow the user to choose them, using their position in the file (1 to NMOCKS).
• ACTION: This option allows the user to choose between start the expansion again ("Rewrite") overwriting previous files, or continue ("Continue") from the last mock produced.
• COOKING: Set if the expansion will include high column density systems and/or metal absorption.
• COLS: the user can choose the output columns of the expanded mock data-sets. They are fully described in Table 1.
Once options are chosen, the user executes the Run.sh script to start the expansion.

A.3 Expanded mocks data format
The final output is a per-object FITS file in the same format as real BOSS data. The guiding principle is that if an analysis code can use the real data, it should also be able to use the mock data without requiring any changes other than the input file names.
Mock files also contain additional information used in their construction. Table 1 describes the content of HDU1. HDUs 0 (observing headers) and 2 (metadata) are simply copies of the corresponding HDUs from the real data files. Mock files do not receive HDU 3 from real data (emission line fits and individual exposures). Instead, HDU 3 contains the location of the high column density systems (it is a copy of corresponding raw format HDU).
The MockExpander will automatically organize output files in a per-realization and a per-plate folder scheme as for real data. True inverse variance used to add noise mock contpca the PCA-based continuum model noise miscalib amount by which reported noise is wrong. < 1 means noise is underestimated. mock miscalib amount by which the flux is purposefully miscalibrated mock missky amount of extra sky added to simulated sky mis-subtraction Table 1: Available columns for the HDU 1 of the mock spectra files. The MockExpander allows the user to choose which columns the output mock files will contain, by the COLS keyword in the Run.sh script. We describe how we compute each of these columns in § 3.