{'fraction_non_alphanumeric': 0.03148124107490588, 'fraction_numerical': 0.018200701025574452, 'mean_word_length': 4.589652419998549, 'pattern_counts': {'":': 0, '<': 72, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Galaxy and Mass Assembly (GAMA): Colour and luminosity dependent clustering from calibrated photometric redshifts

We measure the two-point angular correlation function of a sample of 4,289,223 galaxies with r<19.4 mag from the Sloan Digital Sky Survey as a function of photometric redshift, absolute magnitude and colour down to M_r - 5log h = -14 mag. Photometric redshifts are estimated from ugriz model magnitudes and two Petrosian radii using the artificial neural network package ANNz, taking advantage of the Galaxy and Mass Assembly (GAMA) spectroscopic sample as our training set. The photometric redshifts are then used to determine absolute magnitudes and colours. For all our samples, we estimate the underlying redshift and absolute magnitude distributions using Monte-Carlo resampling. These redshift distributions are used in Limber's equation to obtain spatial correlation function parameters from power law fits to the angular correlation function. We confirm an increase in clustering strength for sub-L* red galaxies compared with ~L* red galaxies at small scales in all redshift bins, whereas for the blue population the correlation length is almost independent of luminosity for ~L* galaxies and fainter. A linear relation between relative bias and log luminosity is found to hold down to luminosities L~0.03L*. We find that the redshift dependence of the bias of the L* population can be described by the passive evolution model of Tegmark&Peebles (1998). A visual inspection of a random sample of our r<19.4 sample of SDSS galaxies reveals that about 10 per cent are spurious, with a higher contamination rate towards very faint absolute magnitudes due to over-deblended nearby galaxies. We correct for this contamination in our clustering analysis.

lar correlation function. We confirm an increase in clustering strength for sub-L * red galaxies compared with ∼ L * red galaxies at small scales in all redshift bins, whereas for the blue population the correlation length is almost independent of luminosity for ∼ L * galaxies and fainter. A linear relation between relative bias and log luminosity is found to hold down to luminosities L ∼ 0.03L * . We find that the redshift dependence of the bias of the L * population can be described by the passive evolution model of Tegmark & Peebles (1998). A visual inspection of a random sample of our r < 19.4 sample of SDSS galaxies reveals that about 10 per cent are spurious, with a higher contamination rate towards very faint absolute magnitudes due to over-deblended nearby galaxies. We correct for this contamination in our clustering analysis.

INTRODUCTION
Measurement of galaxy clustering is an important cosmological tool in understanding the formation and evolution of galaxies at different epochs. The dependence of galaxy clustering on properties such as morphology, colour, luminosity or spectral type has been established over many decades. Elliptical galaxies or galaxies with red colours, which both trace an old stellar population, are known to be more clustered than spiral galaxies (e.g. Davis & Geller 1976;Dressler 1980;Postman & Geller 1984;Loveday et al. 1995;Guzzo et al. 1997;Goto et al. 2003). Recent large galaxy surveys have allowed the investigation of galaxy clustering as a function of both colour and luminosity (Norberg et al. 2002;Budavári et al. 2003;Zehavi et al. 2005;Wang et al. 2007;McCracken et al. 2008;Zehavi et al. 2011). Among the red population, a strong luminosity dependence has been observed whereby luminous galaxies are more clustered, because they reside in denser environments.
The galaxy luminosity function shows an increasing faint-end density to at least as faint as Mr − 5 log h = −12 mag (Blanton et al. 2005a;Loveday et al. 2012), thus intrinsically faint galaxies represent the majority of the galaxies in the universe. These galaxies with luminosity L ≪ L * have low stellar mass and are mostly dwarf galaxies with ongoing star formation. However, because most wide-field spectroscopic surveys can only probe luminous galaxies over large volumes, this population is often under-represented. Previous clustering analyses have revealed that intrinsically faint galaxies have different properties to luminous ones. A striking difference appears between galaxy colours in this regime: while faint blue galaxies seem to cluster on a scale almost independent of luminosity, the faint red population is shown to be very sensitive to luminosity (Norberg et al. 2001(Norberg et al. , 2002Zehavi et al. 2002;Hogg et al. 2003;Zehavi et al. 2005;Swanson et al. 2008a;Zehavi et al. 2011;Ross et al. 2011b). As found by Zehavi et al. (2005), this trend is naturally explained by the halo occupation distribution framework. In this picture, the faint red population corresponds to red satellite galaxies, which are located in high mass halos with red central galaxies and are therefore strongly clustered. Recently, Ross et al. (2011b) compiled from the literature bias measurements for red galaxies over a wide range of luminosities for both spectroscopic and photometric data. They showed that the bias measurements of the faint red population are strongly affected by non-linear effects and thus on the physical scales over which they are measured. They conclude that red galaxies with Mr > −19 mag are similarly or less biased than red galaxies of intermediate luminosity.
In this work, we make use of photometric redshifts to probe the regime of intrinsically faint galaxies. Our sample is composed of SDSS galaxies with r-band Petrosian magnitude rpetro < 19.4. As we have an ideal training set for this sample, thanks to the GAMA survey (Driver et al. 2011), we use the artificial neural network package ANNz (Collister & Lahav 2004) to predict photometric redshifts. We then calculate the angular two-point correlation function as a function of absolute magnitude and colour. The correlation length of each sample is computed through the inversion of Limber's equation, using Monte-Carlo resampling for modelling the underlying redshift distribution. Recently, Zehavi et al. (2011) presented the clustering properties of the DR7 spectroscopic sample of SDSS. They extracted a sample of ∼ 700,000 galaxies with redshifts to r 17.6 mag, covering an area of 8000 deg 2 . Their study of the luminosity and colour dependence uses power law fits to the projected correlation function. Our study is complementary to theirs, since we are using calibrated photo-zs of fainter galaxies from the same SDSS imaging catalogue. We use similar luminosity bins to Zehavi et al., with the addition of a fainter luminosity bin −17 < Mr − 5 log h < −14.
Small-scale (r < 0.1h −1 Mpc) galaxy clustering provides additional tests of the fundamental problem of how galaxies trace dark matter. Previous studies have used SDSS data and the projected correlation function to study the clustering of galaxies at the smallest scales possible (Masjedi et al. 2006), using extensive modeling to account for the fibre constraint in SDSS spectroscopic data. The interpretation of these results offers unique tests about how galaxies trace dark matter and the inner structure of dark matter halos (Watson et al. 2011). Motivated by these studies we present measurements of the angular correlation function down to scales of θ ≈ 0.005 degrees. We work solely with the angular correlation function and we pay particular attention to systematics errors and the quality of the data.
On the other hand, on sufficiently large scales (r > 60 h −1 Mpc), it is expected that the galaxy density field evolves linearly following the evolution of the dark matter density field (Tegmark et al. 2006). However, it is less clear if this assumption holds on smaller scales, where complicated physics of galaxy formation and evolution dominate. In the absence of sufficient spectroscopic data to comprehensively study the evolution of clustering, Ross et al. (2010) used SDSS photometric redshifts to extract a volume-limited sample with Mr < −21.2 and z phot < 0.4. Their analysis revealed significant deviations from the passive evolution model of Tegmark & Peebles (1998). Here we perform a similar analysis, again using photometric redshifts, for the L * population.
This paper is organised as follows. In Section 2, we introduce the statistical quantities to calculate the clustering of galaxies, with an emphasis on the angular correlation function. In Section 3 we present our data for this study and the method for estimating the clustering errors. In Section 4 we describe the procedure that we followed in order to obtain the photometric redshifts. We then investigate the clustering of our photometric sample, containing a large number of intrinsically faint galaxies, in Section 5. In Section 6 we present bias measurements as functions of colour, luminosity and redshift. Our findings are summarised in Section 7. In Appendix A we show how we extracted our initial catalogue from the SDSS DR7 database and finally in Appendix B we describe in some detail the tests performed to assess systematic errors.

Definition
The simplest way to measure galaxy clustering on the sky is via the two-point correlation function, w(θ), which gives the excess probability of finding two galaxies at an angular separation θ compared to a random Poisson distribution (Peebles 1980, § 31): where dP is the joint probability of finding galaxies in solid angles dΩ1 and dΩ2 separated by θ, andn is the mean number of objects per solid angle. If w(θ) = 0, then the galaxies are unclustered and randomly distributed at this separation. We consider various estimators for w(θ) in Section 2.3.

Power law approximation
Over small angular separations, the two-point correlation function can be approximated by a power law: where Aw is the amplitude. The amplitude of the correlation function of a galaxy population is reduced as we go to higher redshifts, because equal angular separations trace larger spatial separations for more distant objects. By contrast, the slope 1 − γ, of the correlation function is observed to vary little from sample to sample, with γ ≈ 1.8. It is mostly sensitive to galaxy colours (see Section 5).

Estimator
In practice, the calculation of w(θ) is done through the normalised counts of galaxy-galaxy pairs DD(θ) from the data, random-random pairs RR(θ) from an unclustered random catalogue which follows the survey angular selection function, and galaxy-random pairs DR(θ). Various expressions have been used to calculate w(θ). In this work we adopt the estimator introduced by Landy & Szalay (1993), which is widely used in the literature: (3) Landy & Szalay (1993) showed that this estimator has a small variance, close to Poisson, and allows one to measure correlation functions with minimal uncertainty and bias. The counts DD(θ), DR(θ) and RR(θ) have to be normalised to allow for different total numbers of galaxies ng and random points nr: We use approximately ten times as many random points as galaxies in order that the results do not depend on a particular realization of random distribution. We also tried an alternative estimator proposed by Hamilton (1993) which revealed no significant changes in the correlation function measurements.
Estimates of the angular correlation function are affected by an integral constraint of the form where the integral is over all pairs of elements of solid angle Ω, within the survey area. The constraint requires that w(θ) goes negative at large separations, to balance the positive clustering signal at smaller separations. However, for wide-field surveys like SDSS the integral constraint has a negligible effect on w(θ), even on large scales. We find that the additive correction for the integral constraint is at least two order of magnitude smaller than the value of w(θ) at θ = 9.4 degrees. Thus the integral constraint does not bias our clustering measurements.

Spatial correlation function
We are interested in the spatial clustering and the physical separations at which galaxies are clustered, in order to compare data against theory. To this end, we need to calculate the spatial correlation function from our angular correlation function, which is simply its projection on the sky. The spatial correlation function, ξ(r), can be also expressed as a power law where r0 is the correlation length. It corresponds to the proper separation at which the probability of finding two galaxies is twice that of a random distribution, ξ(r0) = 1. Limber (1953) demonstrated that the power law approximation for ξ(r) in equation 5 leads to the power law defined in equation 2 with the index γ being the same in both cases. Phillipps et al. (1978) expressed the amplitude of the correlation function, Aw, as a function of the proper correlation length, r0, and of the selection function of the survey, whereas later studies propose similar equations where the selection function is implicitly included in the redshift distribution. Now, writing the angular correlation function as w(θ) = Awθ 1−γ , Limber's equation becomes (Peebles 1980, § 52, 56): where dN/dz is the redshift distribution 1 , which is zero everywhere outside the limits zmin and zmax and with Γ the gamma function. The quantity g(z) is defined as where F (x) is related to the curvature factor k in the Robertson-Walker metric by: We assume zero curvature, and so F (x) ≡ 1. When using equation 6, we need to determine the redshift distribution of the sample with precision. We address this issue in Section 4.3. Another subtle complication which arises from the use of equation 6 is that galaxy clustering is assumed to be independent of galaxy properties such as colour and luminosity (Peebles 1980, § 51). Therefore it is particularly important to use samples with fixed colour and luminosity, instead of mixed populations for studying galaxy clustering using Limber's approximation. We address this issue in Section 4.2 where we define the colour and luminosity bins for the clustering analysis.

DATA
To carry out this analysis, we take advantage of the Galaxy and Mass Assembly (GAMA) survey (Driver et al. 2011). This spectroscopic sample, at low to intermediate redshifts, forms an ideal training set for predicting photometric redshifts of faint galaxies. The galaxies considered for the calculation of the correlation functions are drawn from the seventh data release of the Sloan Digital Sky Survey photometric sample (SDSS DR7; Abazajian et al. 2009). We briefly outline the properties of these samples below.

SDSS DR7 photometric sample
At the time of writing, the Sloan Digital Sky Survey (SDSS) is the largest local galaxy survey ever undertaken. The completed SDSS maps almost one quarter of the sky, with optical photometry in u, g, r, i and z bands and spectra for ∼ 10 6 galaxies. The main goal of the survey is to provide data for large-scale structure studies of the local universe. A series of papers describe the survey: technical information about the data products and the pipeline can be found in York et al. (2000) and in Stoughton et al. (2002). Details about the photometric system can be found in Fukugita et al. (1996).
The SDSS imaging survey is completed with the seventh data release (Abazajian et al. 2009), that we use in this paper. The main program of SDSS is concentrated in the Northern Galactic cap with three 2.5 • stripes in the Southern Galactic cap. SDSS DR7 contains about 5.5 × 10 6 galaxies with rpetro < 19.4 over 7,646 deg 2 of sky.
The images are obtained with a 2.5-meter telescope, located at Apache Point Observatory, New Mexico. Various flux measures are available for galaxies in the SDSS database (Stoughton et al. 2002), including Petrosian fluxes, model fluxes (corresponding to whichever of a de Vaucouleurs or exponential profile provides a better fit to the observed galaxy profile), and aperture fluxes. In this paper we use model magnitudes to calculate galaxy colours and Petrosian magnitudes to split galaxies in absolute magnitude ranges. After Schlegel et al. (1998), we correct the magnitudes with dust attenuation corrections provided for each object and each filter in the SDSS database.
The star-galaxy classification adopted by the SDSS photometric pipeline is based on the difference between an object's PSF magnitude (calculated assuming a point spread function profile, as for a stellar source) and its model magnitude. An object is then classified as a galaxy if it satisfies the criterion (Stoughton et al. 2002) m psf,tot − m model,tot > 0.145, where m psf,tot and m model,tot magnitudes are obtained from the sum of the fluxes over ugriz photometric bands. This cut works at the 95 per cent confidence level for galaxies with r < 21. In Section 3.2 we discuss a different star-galaxy classification, following the GAMA survey, which is the one we adopt for this work (see also Appendix A). A photometric redshift study can be vulnerable to contamination not only due to stars misclassified as galaxies, but also to contamination due to over-deblended sources (Scranton et al. 2002), usually coming from local spiral galaxies. This imposes limits on the angular scale over we can probe the correlation function. In order to test for this systematic in our sample, in Appendix B4 we visually inspect random samples of the data and then we model the contamination as a function of angular separation.

GAMA sample
The Galaxy and Mass Assembly (GAMA) project 2 is a combination of several ground and space-based surveys with the aim of improving our understanding of galaxy formation and evolution (Driver et al. 2011). GAMA uses the AAOmega spectrograph of the Anglo-Australian Telescope (AAT) for spectroscopy (Saunders et al. 2004;Sharp et al. 2006). Its targets are selected from the SDSS photometric sample. Target selection is described in detail by Baldry et al. (2010). The main restriction is that the source is detected as an extended object: r psf −r model > 0.25. As shown in Appendix A, this criterion is also adopted for our sample extraction from SDSS. This criterion is more restrictive, in the sense that fewer stars will be mis-classified as galaxies, than the star-galaxy classification adopted by the SDSS photometric pipeline (previous Section), but similar to that used for the SDSS main galaxy spectroscopic sample (Strauss et al. 2002).
For a consistent training of ANNz it is necessary to match all the GAMA objects with SDSS DR7übercal photometry (Padmanabhan et al. 2008) and perform identical colour cuts. Once we apply the colour cuts (Section 3.3) necessary for the optimization of ANNz performance, and low and high redshifts cuts (0.002 < z < 0.5), 93,584 redshifts remain. They are used to train our photometric redshift neural net algorithm as described in Section 4.

Colour cuts
Before we build our final sample from ANNz, we remove galaxies with outlier u − g, g − r, r − i, i − z colours both in the SDSS imaging sample and in the training set, because photometric redshift estimates are based primarily on these colours. The complete colour and magnitude cuts are given in Table 1. Less than 1 per cent of the galaxies are affected by the colour cuts. These colour cuts in principle could affect the mask that we use for correlation function calculations. To estimate the extent of this effect we study the distribution on the sky of the colour outliers as well as their angular correlation function. This exercise reveals that colour outliers have a spurious correlation an order of magnitude larger on all angular scales than the correlation function of our final sample. However, since the number of these objects is almost three orders of magnitude less than the total, they would have a negligible effect on w(θ) measurements if included.

Final sample
Our aim is to obtain a galaxy sample with photometric properties as close as possible to our training set. To this end, we have selected galaxies from the SDSS DR7 photometric sample with the query used to select GAMA targets (Ap -Table 1. Colour and apparent magnitude cuts for the optimization of ANNz. All magnitudes are SDSS model magnitudes. pendix A). We select galaxies which have "clean" photometry according to the instructions given on the SDSS website 3 . Our sample is hence limited by rpetro < 19.4 and satisfies the criterion for star-galaxy separation r psf − r model > 0.25. In our analysis, we choose to calculate the correlation function for galaxies located in the SDSS northern cap, corresponding to 92 per cent of SDSS DR7 galaxies. As such, the geometry of the survey is simplified to a contiguous area. Our final sample, after the colour cuts given in Table 1 comprises 4,890,965 galaxies.
To evaluate the number of data-random and randomrandom pairs in equation 3, we need to build a mask for our sample. The mask precisely defines the sky coverage of the sample. We use the file lss_combmask.dr72.ply in the NYU Value Added Catalogue 4 (Blanton et al. 2005b), mapping SDSS stripes, as our mask. This file contains the coordinates of the fields observed by SDSS expressed in spherical polygons, excluding areas around bright stars because galaxies in these regions can be affected by photometric errors. It is also suitably formatted for use with the mangle software (Hamilton 1993;Hamilton & Tegmark 2004;Swanson et al. 2008b), a tool for manipulating survey masks and obtaining random points with the exact geometry of the mask. Once masking is applied, 4,511,011 galaxies remain in our sample.
The upper panel of Fig. 1 shows the boundaries of the final mask for SDSS DR7 that we use for creating random catalogues. Our random catalogues consist of ∼ 10 7 objects, approximately ten times larger than the number of galaxies in each luminosity and colour bin. Consistency checks have shown that our clustering results are not sensitive to any particular realization of the random catalogue. In Appendix B1 we check the accuracy of the survey mask, as well as the photometric uniformity of the sample, by studying the angular clustering of our sample as a function of r-band apparent magnitude.

Pixelisation scheme and jackknife resampling
In order to speed up the computation of the correlation function, we pixelise our data according to the SDSSPix 5 scheme. The basic concept consists of assigning galaxies located in a portion of the sky to a pixel. After this step, we only need to take into account galaxies in the same pixel and in the neighbouring pixels to calculate the correlation function up to the scale of a pixel. SDSSPix divides the sky along SDSS η and λ spherical coordinates (as defined in Section 3.2.2 of Stoughton et al. 2002) in equal spherical areas. Different resolutions are available according to the angular scale of interest. We choose the resolution called basic resolution (resolution = 1). This divides the sky in 468 pixels of size ∼ 9.4×9.4 deg. Then, for galaxies in a given pixel, that pixel and its 8 direct neighbouring pixels include all neighbouring galaxies with separations up to 9.4 degrees, the largest angular separation we consider (see Section 5).
We also use this pixelisation scheme to define the Jackknife (JK) regions for the error analysis. In order to minimize the variation in the number of objects in each JK region, some neighbouring pixels that contain the survey boundary are merged in order that they contain a more nearly equal number of random points. This modification of the SDSSPix pixelisation yields 80 JK regions, as shown in the upper panel of Fig. 1. The lower panel of Fig. 1 presents the relative variation in area of each region, as measured by the relative number of randoms each one contains. Hereafter, errors on w(θ) are determined from 80 JK resamplings, by calculating w(θ) omitting each region in turn. We have checked that our results are not significantly affected by using either 104 or 40 Jackknife regions. The elements of the covariance matrix, C, are given by: where w k i is the angular correlation function of the k th JK resampling on scale θi,wi the mean angular correlation function and N the total number of JK resamplings. In practice, wi is identical with the angular correlation function measurement from the whole survey area. The N − 1 factor in the numerator of equation 8 accounts for correlations inherent in the jackknife procedure (Miller 1974).

SDSS Photoz2
Figure 2. Density/scatter plot of redshift error (spectroscopic minus photometric redshift) against predicted photo-z from this work (top panel) and SDSS (middle and bottom panels). The colour coding is such that the densest area (black contour) is 5 times denser than the white contour. Points are drawn whenever the density of points is less than 10 per-cent of the maximum (black contour). The red squares and error bars represent the mean redshift errors and their standard deviations in photo-z bins of width ∆z phot = 0.05. Horizontal red lines show the zero error benchmark. The improvement in photometric redshift estimates in this work, due primarily to use of the representative GAMA training set, is clear.
Jackknife is a method of calculating uncertainties on a quantity that that we measure from the data itself. In wide-field galaxy surveys, more often than not, large superstructures appear to significantly influence clustering measurements. The best known example is the SDSS Great Wall (Gott et al. 2005). The presence of such structures makes it tempting to present the results with and without the JK region that encloses them, as done in the clustering studies of Zehavi et al. (2005Zehavi et al. ( , 2011. Better still, Norberg et al. (2011) devise a more objective method to consistently remove outlier JK regions, from the distribution of all JK measurements that one has at hand. We follow that method in the present analysis, and find that for all samples considered, the number of JK regions that are outliers, and therefore removed, is mostly two or three and no more than five.

PHOTOMETRIC REDSHIFTS
For the clustering measurements presented in this paper, all distance information comes from photometric redshifts (photo-z). Photo-zs are the basis for estimating the redshift distributions to be used in equation 6 and in estimating distance moduli to calculate absolute magnitudes and colours. For this study we have a truly representative subset of SDSS galaxies down to r < 19.4 and we therefore use the artificial neural network package ANNz developed by Collister & Lahav (2004) to obtain photo-z estimates.
It is important that the training set and the final galaxy sample from SDSS are built using the same selection criteria. The input parameters are the following:übercalibrated, extinction-corrected model magnitudes in ugriz bands, the radii enclosing 50 per cent and 90 per cent of the Petrosian r-band flux of the galaxy, and their respective uncertainties. The architecture of the network is 7:11:11:1, with seven input parameters described above, two hidden layers with 11 nodes each and a single output, the photo-z. We use a committee of 5 networks to predict the photo-zs and their uncertainties (see Section 4.1).

Photometric redshift errors
Before we proceed with the photo-z derived quantities that we use in this study, we investigate the possible biases and errors that ANNz introduces, using the known redshifts from GAMA. Following standard practice we split our data into three distinct sets: the training set, the validation set and the test set. Half of the objects constitute the test set and the other two quarters the training and validation sets. This investigation is insensitive to the exact numbers in these three sets. The training and validation sets are used for training the network, whereas the test set is treated as unknown.
Given predicted photo-zs z phot , we can quantify the redshift error for each galaxy in the test set as the primary quantity of interest as far as true redshift errors are concerned. It can depend on apparent magnitude, colour, the output z phot , the intrinsic scatter zerr of ANNz committees, as well as the position of an object on the sky if the survey suffers from any photometric non-uniformity. We investigate some of these potential sources of error below. The dispersion σz, of δz is given by the equation and is found to be σz = 0.039. The standard deviation for the redshift range 0 < z phot < 0.4, within which we choose to work, is σz = 0.035. In Fig. 2 we compare our photo-z estimates with the publicly available photo-z from the SDSS website (Oyaizu et al. 2008, tables photoz1 and photoz2). For this comparison we plot the redshift error as a function of photoz. We then calculate the mean and the standard deviation of δz for photo-z bins of width ∆z phot = 0.05. The number of catastrophic outliers (galaxies with |z phot − zspec| > 3σz) for the GAMA calibrated photo-z is 1 percent or less for all photo-z bins. We work in fixed photo-z bins, because all our derived quantities are based on the photo-z estimates. This way, any biases with estimated photo-z are readily apparent. Our results based on the GAMA training set outperform the SDSS results -for the redshift range 0.01 < z phot < 0.4, we obtain essentially unbiased redshift estimates, given the observed scatter. The scatter, in turn, increases with redshift. We note, however, that the photoz2 catalogue from SDSS DR7 has been improved with the addition of p(z) estimates which are designed to perform much better in recovering the total redshift probability distribution function of all galaxies (Cunha et al. 2009). Since it is still not clear how to directly relate a redshift pdf to absolute magnitude and colour for a given galaxy, our approach for the study of luminosity-and colour-dependent clustering is easier to interpret. In Appendix B2, we quantify the photo-z error and possible contamination between redshift bins by crosscorrelating photo-z bins which are more than 2σz apart. We find, as expected, that the residual cross-correlation of the different photo-z bins is negligible compared to their auto-correlation.
The distribution of photo-z errors is in general non-Gaussian, albeit less pronounced in the case of a complete training set. Photo-z errors also propagate asymmetrically in absolute magnitude: for a given redshift error, the error induced in absolute magnitude is larger at low-z and smaller at high-z, and thus a photo-z analysis is more tolerant to redshift errors for objects at high-z. For that reason, it is common practice to scale the redshift error by the quantity 1/(1 + z phot ). Taking into account this redshift stretch, σ0 can be defined as giving σ0 = 0.032. We exclude from our analysis galaxies with z phot < 0.002 or z phot > 0.4. ANNz provides a photo-z error calculated from the photometric errors. Using our test set, we find that this error underestimates the true photo-z error (given from equation 9). We therefore apply a cut on the output parameter zerr of ANNz at zerr < 0.05. These cuts eliminate ∼ 4 per cent of the galaxies. Cross-checks show that the correlation function measurements do not change if we use a less strict cut, but the chosen cut does improve the N (z) estimates. The final number of galaxies after this cut is 4,289,223. We summarize the changes in the number of galaxies in our sample in Table 2. We use Petrosian magnitudes to divide galaxies by luminosity and model magnitudes to calculate galaxy colours.
The photo-z work presented here is similar, but not identical, to that of Parkinson (2012). The latter is appropriate for even fainter SDSS magnitudes as it uses, in its training and validation, all GAMA galaxies with rpetro < 19.8 and fainter zCOSMOS galaxies (Lilly et al. 2007) matched to SDSS DR7 imaging. Minor differences in the two photo-z pipelines, such as the inclusion of different light profile measurements, do not significantly affect the estimated photoz, which present a similar scatter around the underlying spectroscopic distribution. Our photo-z agree with those of Parkinson (2012) within the estimated errors.  the passive evolution parameter Q = 1.62 of Blanton et al. (2003). In this simple model, the evolution-corrected absolute magnitude is given by  . Redshift error against photo-z for our luminosity and colour-selected GAMA subsamples. The mean redshift error and standard deviation in bins of photo-z are shown by the coloured squares and error bars, while the root mean square standard deviation, σrms, is listed in each panel. The faint red sample has been omitted due to the small number of galaxies that it contains.
SDSS model magnitudes, are referred to as 0.1 (g − r), while absolute magnitude are derived using the r-band Petrosian magnitude (to match the GAMA redshift survey selection). Fig. 3 shows that the r-band absolute magnitude extends to Mr − 5 log h = −16 mag with a few galaxies reaching as faint as Mr − 5 log h = −14 mag.
We split our galaxy sample in photo-z as well as luminosity bins. Our samples are shown in Fig 3. Initially we define four photo-z bins in the redshift range 0 < z phot < 0.4 and then we further split each photo-z-defined sample into six absolute magnitude bins in the range −24 < Mr − 5 log h < −14. Thus our photo-z catalogue offers the opportunity for a clustering analysis over the luminosity range 0.03L * L 8L * , spanning almost three orders of magnitude in L/L * .
In Fig 3 some of these redshift-magnitude bins extending beyond the survey flux limit are only partially occupied by galaxies in terms of photometric redshifts and photo-z derived absolute magnitudes. The true redshift and absolute magnitude distributions for each bin are recovered by Monte-Carlo resampling, as discussed in Section 4.3. Fig. 4 shows colour-magnitude diagrams for our sample split in photo-z bins. The colour bimodality is evident at 0.1 (g − r) ≃ 0.8 for all photo-z bins. We have adopted the tilted colour cuts defined by Loveday et al. (2012), which is a slightly modified version of the colour cut used by Zehavi et al. (2011), also shown in Fig. 4. In Fig. 5 we plot the photo-z error against photo-z for galaxies subdivided into subsamples, where we again have used photometric redshifts to estimate galaxy luminosities and colours. There are no obvious systematic biases of zspec− z phot for any of the subsamples, although we do note that the most luminous (faintest) bin contains very few blue (red) galaxies.
The relatively good photo-zs notwithstanding, our analysis does not eliminate completely the main systematic error of neural network derived photo-z, which is the overestimation of low redshifts and the underestimation of high redshifts (see e.g. Fig. 7 of Collister et al. 2007). As a result, a number of faint galaxies have their redshift overestimated and hence appear brighter in our sample. We note that there is a discrepancy between the fraction of faint red objects in the luminosity bin −19 < Mr − 5 log h < −17 between this work and Zehavi et al. (2011), which is most probably caused by this systematic shift (see Table 3). It is possible to cure this by Monte-Carlo resampling the photo-zs with their respective errors and then rederive the absolute magnitudes and colours, but we do not pursue this here.

Photometric redshift distribution(s)
Despite the fact that ANNz gives fairly accurate and unbiased photo-zs for calculations in broad absolute magnitude bins or photo-z bins, in order to translate the two dimensional clustering signal to the three dimensional one using equation 6, the underlying true dN/dz is needed. In this work we loosely follow the approach given in Parkinson (2012), (see also Driver et al. 2011). The GAMA spectroscopic sample is highly representative and it allows us to calculate the true redshift errors as a function of photo-z for all objects in GAMA with rpetro < 19.4. Then, under the assumption of a Gaussian photometric error distribution in each photo-z bin, we perform a Monte-Carlo resampling of the ANNz predictions for photo-zs. This is equivalent to replacing each photo-z derived from ANNz with the quantity zMC drawn from a Gaussian distribution, using a photo-z dependent standard deviation, σ(z Note that convolving the imprecise photo-z with additional scatter improves the N (z) redshift distribution: in other words the photo-z process deconvolves the N (z) and makes it artificially narrow.  Figure 7. The r-band absolute magnitude distribution for GAMA galaxies with rpetro < 19.4 split into photo-z and photo-zderived absolute magnitude slices. Magnitude distributions shown by dashed lines are derived from the raw photo-z, by thin lines from the underlying spectroscopic redshifts and by thick lines from the Monte-Carlo derived magnitudes. The latter reproduces the true underlying spec-z inferred magnitude distribution rather well; however for a few samples there is a discrepancy between the spec-z-derived and the Monte-Carlo-derived distributions. All MC absolute magnitude estimates are K-corrected and passively evolved following the procedure described in Section 4.2.
All our sample selections in Fig. 6 have been made using the photo-z derived absolute magnitude Mr − 5logh. We then use the accurate spectroscopic information from GAMA to assess how well Monte-Carlo resampling compares to the underlying true dN/dz. Since the GAMA area is much smaller than the SDSS area, we do not wish to recover the exact spectroscopic redshift distribution, merely to match a smoothed version thereof. Our test shows that MC resampling performs rather well in recovering the true dN/dz. This method performs even better with a larger number of objects, which indicates that we are still dominated by statistical errors and therefore there is room for improvement in future when larger spectroscopic training sets will be available. Nevertheless, as an incorrect redshift distribution can cause a systematic error in r0, in Appendix B3 we test the sensitivity of our results to the assumed dN/dz, and compare results using the Monte-Carlo recovered dN/dz with those from the weighting method proposed by Cunha et al. (2009). Fig. 7 shows, for all samples split by photo-z and photoz-derived absolute magnitude, the photo-z-derived, the true underlying and the Monte-Carlo inferred absolute magnitude distributions (as dashed, thin and thick solid lines respectively). We note that the photo-z derived absolute magnitude estimates in Fig. 7 are obtained from the resampled redshifts and not by resampling the absolute magnitudes per se. We then k +e-correct every Monte-Carlo absolute magnitude realization using the procedure described in Section 4.2. As expected, the true underlying distribution extends well beyond the photo-z inferred luminosity bins, but is yet again rather well described by the Monte-Carlo inferred distribution.
It is crucial that we have a good understanding of the true underlying absolute magnitude for all our samples. For galaxy clustering studies with spectroscopic redshifts it is desirable to work with volume-limited samples. Using photometric redshifts, however, one can form only approximately volume-limited samples, since photo-z uncertainties will propagate into absolute magnitude estimates. Essentially, any tophat absolute magnitude distribution, as selected using photo-z, corresponds to a wider true absolute magnitude distribution, as shown in Fig. 7. This is rather similar to selecting galaxies from a photometric redshift bin and then convolving the initial tophat distribution with the photo-z error distribution in order to obtain the true N (z). However, using the w(θ) statistic and an accurate dN/dz for that particular galaxy sample we can extract its respective spatial clustering signal, which would then correspond to the zMC derived absolute magnitude. Direct comparisons with other studies can then be made, modulo the extent of the overlap between the two absolute magnitude distributions.

Luminosity and redshift dependence
We first calculate the angular correlation function w(θ) for our samples selected on absolute magnitude and photometric redshift over angular scales from 0.005 to 9.4 degrees, in 15 equally spaced bins in log(θ) 6 . In a flux-limited survey like SDSS, intrinsically bright galaxies dominate at high redshifts and intrinsically faint objects dominate at low redshifts (see Fig. 4). For that reason, we calculate w(θ) for the 17 well-populated samples given in Table 3. Errors are estimated using the jackknife technique, with the covariance matrix given by equation 8. Even if the validity of a given error method based on data alone is still widely debated, it is commonly accepted that the jackknife method is adequate for angular clustering studies (see e.g. Cabré et al. 2007), while for 3-D clustering measurements, Norberg et al. (2009) have shown that the jackknife method suffers from some limitations, in particular on small scales. Our angular correlation function measurements are broad and probe both highly non-linear and quasi-linear scales. Fig. 8 presents galaxy angular correlation functions for six photo-z selected absolute magnitude bins. We show the angular scale (lower x-axis), used for the correlation function estimation, and the corresponding comoving scale estimated at the mean redshift of the sample (upper x-axis).
Over the range of angular scales fitted, chosen to correspond to approximately 0.1-20 h −1 Mpc comoving separation according to the mean redshift of each sample, the angular correlation function can be reasonably well approximated by a power law, equation 2. We perform power law fits, both with the full covariance matrix and with the diagonal elements only. The power law fits for our L * sample are shown in Fig. 8. Dotted lines in Fig. 8 show the extension of the power laws beyond the scales over which they were fitted. The resulting correlation lengths, r0, slopes, γ, and quality of the fits as given by the reduced χ 2 , χ 2 ν , for all samples are listed in Table 3.
The luminosity dependence of galaxy clustering is present in all photo-z shells: the shape and the amplitude of the angular correlation function differ for galaxies with different luminosity. The amplitude of the angular correlation function decreases as we go from bright to faint galaxies for all photo-z bins. The slope of the correlation function also decreases with decreasing luminosity, very much in line with the change in the fraction of red and blue galaxies. As observed in Section 5.2, red (blue) galaxies dominate the brightest (faintest) luminosity bins, with red galaxies preferentially having a steeper correlation function slope than blue galaxies.
For each sample, we estimate the correlation length r0 via equation 6 using the Monte-Carlo inferred redshift distribution described in Section 4.3. The redshift distribution dN/dz is calculated separately for each sample, as shown in Fig 6. In Appendix B3 we investigate the effects of the assumed dN/dz on the recovered correlation length r0, and show that the adopted dN/dz recovery method compares favourably with the true underlying dN/dz, as obtained from the smoothed dN/dzspec.
For our luminosity bins in the redshift range 0 < z < 0.1, the correlation length is found to decrease as we go to fainter absolute magnitudes, from 8.21 ± 2.32 h −1 Mpc (−22 < Mr − 5 log h < −21) to 4.28 ± 1.56h −1 Mpc (−19 < Mr − 5 log h < −17). This is very much in line with the recent results of Zehavi et al. (2011). Moreover, we do not observe strong evolution with redshift for samples of fixed luminosity. All r0 and γ measurements are shown in Fig. 9.
There are two main sources of error in the r0 estimates: (a) the correlated uncertainties on the power law parameters γ and Aw which propagate through equation 6 to r0; (b) statistical and systematic uncertainties in the modelling of the underlying redshift distribution. The w(θ) uncertainties and the induced error on r0 and γ are obtained using the standard deviation from the distribution of JK resampling estimates (Section 3.5). As in the case of the covariance matrix, these uncertainties are multiplied by a factor of N − 1 (Norberg et al. 2009). The dN/dz uncertainties are investigated in great detail in Appendix B3, where we show that the Monte-Carlo inferred dN/dz performs best, while still returning a residual systematic uncertainty of ±0.2h −1 Mpc on r0 that depends on the sample considered. We find that both sources of uncertainty have a comparable contribution to the errors. In Table 3 we quote the total error on the correlation length after adding the two (independent) errors in quadrature.

Luminosity, redshift and colour dependence
We repeat the clustering analysis splitting the samples into red and blue colour using equation 12. For each new sample we re-estimate the underlying redshift distribution used in the inversion of Limbers equation. The corresponding 50 th , 16 th and 84 th percentiles of the underlying absolute magnitude distributions are given in Tables 4 and 5. We also repeat the procedure outlined in Section 5.2 for the error estimation.
In Fig. 10 Table  3. Table 3. Clustering properties of luminosity-selected samples. Col. 1 lists the photo-z based absolute magnitude ranges, col. 2 the median absolute magnitude and the associated 16 th and 84 th percentiles from the Monte-Carlo resampling (Fig. 7) and col. 3 the number of galaxies in each sample. Cols. 4, 5 and 6 list respectively the slope, γ, the correlation length, r 0 , and the reduced χ 2 , χ 2 ν , of the power law fit as defined in Section 2.4. Cols. 7, 8 and 9 show the same information but for power law fits using only the diagonal elements of the covariance matrix. All power law fits are approximately over the comoving scales 0.1 < r < 20 h −1 Mpc. Finally col. 10 presents the relative bias at 5 h −1 Mpc measured using equation 14.

Sample
Magnitude  in each luminosity and photo-z bin, for red and blue galaxies. The power law fits over approximately fixed comoving scales, their corresponding errors as well as the quality of the fits and the correlation length are estimated as in Section 5.1 and summarized in Tables 4 and 5. As noted earlier, the power law fits describe the clustering measurements quite well in a qualitative sense, although certainly not well enough in a quantitative sense, with most samples presenting a typically too large reduced χ 2 (see Tables 4 and 5).
For all absolute magnitude ranges, the red population displays a steeper correlation function slope than the blue one. Blue galaxies have a much shallower slope which gradually decreases with luminosity until a sudden increase in the slope for the faintest luminosity range probed ( Table 5).
The correlation length of red galaxies for all redshift bins presents a minimum value around M * , with increasing values both faintwards and brightwards (Table 4). We note however, that this result comes with large uncertainties. For red galaxies the correlation lengths of the brightest and faintest bin are comparable and faint red objects are more strongly clustered than red objects with intermediate luminosities. For the blue population r0 behaves more regularly (like the overall population), gradually decreasing with luminosity and redshift. Blue galaxies generally have smaller uncertainties as well. Our measurement of the correlation length for the faintest luminosity bin (r0 = 4.17 ± 1.41h −1 Mpc) indicates that these galaxies are similarly clustered to blue galaxies of intermediate luminosity. The robustness of this result and some caveats are discussed in Section 5.3.
Due to the complicated way that the slope and the correlation length, as well as their respective uncertainties, change between colour selected samples, we chose to study more quantitatively the clustering of these samples using Table 4. Clustering properties of luminosity-selected red galaxies. Columns are the same as in Table 3.  Table 5. Clustering properties of luminosity-selected blue galaxies. Columns are the same as in Table 3.
ν the relative bias, i.e. their clustering with respect to the L * sample. Our relative bias results for all samples, selected by photometric redshift, absolute luminosity and colour, are presented in Section 6.1.

Clustering of faint blue galaxies
One of the aims of this paper is to study the clustering of intrinsically faint galaxies for which only photometric redshifts are available in sufficient numbers to reliably calculate w(θ). The GAMA depth and the extensive SDSS sky coverage allow us to measure the auto-correlation function of the faintest optically selected galaxies, i.e. with photo-z esti-mated absolute magnitudes in the −17 < Mr −5 log h < −14 range and z phot < 0.08. This faint sample contains a total of 14,659 galaxies, which are mostly star-forming (as evident by their colours). From the subset with spectroscopic redshifts, the 68-central percentile of the actual absolute magnitude distribution covers the range −18 < Mr − 5 log h < −12.7. However, as shown in Appendix B4, this sample suffers from an overall 50 per cent contamination, with most spurious objects arising from local, over-deblended spiral galaxies.
The upper panel of Fig. 11 shows the correlation functions of all galaxies in our sample with z phot < 0.08 split into finer luminosity bins than used previously. There exists a seemingly artificial steepening of w(θ) on scales θ < 0.1 •  Figure 11. Angular correlation functions for the low redshift galaxies in our sample split in luminosity bins. The finer luminosity binning allows one to track the scales where contamination effects (studied and quantified in Appendix B4) are significant. Error bars have been omitted for clarity.
for galaxies with Mr − 5 log h > −17. In the bottom panel of Fig. 11, we further split the −17.9 < Mr − 5 log h < −14 range into two finer luminosity bins, and again we find that for fainter samples, source contamination affects larger angular scales. We study this contamination and quantify it as a function of scale in Appendix B4.
Having established the angular scales over which we trust our w(θ) measurements, we proceed to the clustering analysis. Using only the diagonal elements of the covariance matrix 7 , we note that a power law describes the clustering signal rather well, even though there is a hint of an increase in the clustering strength at ∼ 1 h −1 Mpc. It is possible that this increase is due to blue galaxies that are satellites in small dark matter halos. These halos should not be dense enough to stop star formation and thus we observe only blue galaxies in this luminosity range (Eminian 2008). A recent detailed study of the star formation history of Hα -selected faint blue galaxies in GAMA can be found in Brough et al. (2011).
In conclusion, the angular clustering for the faintest sample has a spurious amplitude at small angular scales, unless one takes into account the sample contamination. We do this in Appendix B4 where we visually inspect ∼ 10 per cent of the objects in this sample and find that a significant fraction of them are spurious, mainly due to poorly deblended sources. We quantify the effect of this contamination in Appendix B4 for all luminosity bins. This investigation reveals that the angular clustering results on scales 0.1 degrees are not trustworthy enough to be considered reliable. We note that the power law fits are performed on larger scales, which we show are unaffected by this contamination. However, much more detailed investigation of the data is required to robustly confirm the observed increase in the slope of the correlation function. Finally, we note that we have repeated the analysis presented in this Section for objects selected from the most recent SDSS release, DR8 (Aihara et al. 2011), and we observe no differences in the results. The contamination from over-deblended spiral galaxies is still present in DR8 for the low luminosity bin.

Quality of fits and the HOD formalism
The power law fits presented in Table 3 are not all satisfactory in a quantitative sense. The angular correlation function is only to first order well-described by a power law. The rather high reduced χ 2 for some samples are either due to underestimated errors or due to the power law model being inadequate in describing the angular correlation function over a large range of scales. From the test of Section 3.5, we conclude that the JK method gives consistent errors irrespective of the way we define the jackknife regions, and therefore it is most likely that the large reduced χ 2 values are more due to a limitation in the power law model rather than in the error estimates themselves. A more sophisticated model, like the halo occupation distribution (HOD) model (for a review see Cooray & Sheth 2002), would provide a more physically motivated description of the full correlation function shape, both as a function of colour and luminosity (Zehavi et al. 2004;Zheng et al. 2005;Zehavi et al. 2005Zehavi et al. , 2011. The HOD framework, as shown by Zehavi et al. (2005), explains the increase of clustering in the faint red population. Bright red galaxies are central galaxies in massive halos, whereas faint red galaxies are satellite galaxies in massive halos. Our measurements suggest that both bright and faint red galaxies are more strongly clustered than red galaxies with intermediate luminosity. We also observe a bump in the angular correlation function of red galaxies at separations ∼ 1 h −1 Mpc which signals the transition (change in slope) between the one-halo and two-halo term in the correlation function. On the contrary, such a change in slope is not evident for the blue population, hence they have a smaller χ 2 ν . This is also in agreement with HOD predictions, which predict a simple power law for blue galaxies with luminosities Mr − 5 log h < −21 (Zehavi et al. 2005). A complete HOD modelling of these angular clustering results with photometric redshifts is beyond the scope of the present work, as this would require photo-z dedicated HOD tools to be developed as the standard threshold samples cannot be defined.

Relative bias and comparison with previous studies
In this paper we parametrize the real space correlation function with a power law, and infer ξ(r) from angular clustering measurements via a Limber inversion. To ease comparison with samples using similar, but not identical, se-lection, we follow Norberg et al. (2002) and define the relative bias of a class of galaxies i with respect to our L * (−21 < Mr − 5 log h < −20) sample as Equation 14 preserves any scale dependence for samples with different slopes and we choose here to estimate the relative bias at r = 5 h −1 Mpc. The advantage of using this definition of relative bias instead of the raw correlation length to compare with other studies is twofold. First, the former uses the slope as well as the correlation length, which as we know from equation 6 are strongly correlated. Second, if the sample selections are just slightly different, the relative bias is a much more robust way of comparing them as it measures deviations from a series of appropriate reference samples. In this study this is particularly important, as photo-z inferred properties are not straightforwardly related to the underlying ones, as shown in Section 4.3. Our results are shown in Fig. 12. Previous studies from both 2dFGRS (Norberg et al. 2001(Norberg et al. , 2002 and SDSS (Zehavi et al. 2002(Zehavi et al. , 2005(Zehavi et al. , 2011 have established that the relative bias, b/b * , as a function of relative luminosity, L/L * , is well described by an affine relation. We compare our results with these studies in Fig. 12. For all luminosity bins given in Table 3 we fit the equation where a0 and a1 are free parameters. Our best fit values for samples selected on luminosity, colour and photo-z, using the corresponding L * for each sample, are given in Table 6. The high redshift bin only provides three data points and thus we do not include it in this exercise (black squares in Fig. 12). In this Table we also compare with the bias relation of Norberg et al. (2001) who found (a0, a1) = (0.85, 0.15). The ∆χ 2 between our best fit and that of Norberg et al. is 1.2 to 2.3, which makes the fits statistically compatible, as the 68% confidence interval for 2 degrees of freedom corresponds to ∆χ 2 = 2.31 (Press et al. 1992). Zehavi et al. (2011) measured the bias relative to dark matter, and in Fig. 12 we rescale their relation with respect to L * . They also observed a steeper rise in relative bias at high luminosities. Including a power of (L/L * ) in our fit, we also obtain a steeper slope whilst χ 2 remains unchanged, despite the additional degree of freedom. For samples selected by colour as well as luminosity, it is more difficult to fit equation 15 in each redshift bin. For most photo-z bins we have four or fewer data points. Moreover, using finer luminosity bins would worsen the statistical errors on N (z) and N (Mr) and thus make any fit more difficult to interpret. Fig. 13 shows that the blue population follows a similar trend to the full sample but the relative bias changes more smoothly as a function of luminosity. Table 6 gives the values of a0 and a1 for the colour selected samples. We fit the same linear relation for red galaxies as well, despite the fact that a quadratic function would seem more appropriate. χ 2 values for the linear fit are also shown in Tabel 6 and from a purely statistical point of view, a linear relation between b/b * and L/L * is still acceptable. Fig. 13 shows that the statistical uncertainty for the two faint red samples is quite large. This is due to the small number of objects in the −19 < Mr − 5 log h < −17 sample and due  Table 6. Fitted values of a 0 and a 1 in the bias-luminosity relation (equation 15) in three photo-z ranges. Column 1 lists the redshift bin limits, columns 2, 3 and 4 the fitted values and the quality of fit (reduced χ 2 ) and column 5 lists ∆χ 2 between our best fit values and the fit by Norberg et al. (2001).
6.2 The evolution of absolute bias for L * galaxies In Section 6.1 we calculated the relative galaxy bias using the L * sample (−21 < Mr − 5 log h < −20) as our reference sample. In this Section we calculate the absolute bias of the L * population defined as the mean ratio of the observed galaxy correlation function, parametrized with a power law, over the non-linear dark matter theoretical correlation func- where 5 h −1 Mpc < r < 20 h −1 Mpc. The theoretical power spectrum P (k), was obtained using CAMB (Lewis et al. 2000) and the halo correction recipe of Smith et al. (2003). We then Fourier transform the non-linear P (k) to obtain the real space ξDM (r) using the FFTLog package provided by Hamilton (2000).
Since we have correlation function measurements of the L * population for a range of redshifts we can answer the question of whether the evolution of the bias can be described by the passive evolution model introduced by Tegmark & Peebles (1998): where D is the growth of structure (Peebles 1980) which we calculate accurately using the growl package by Hamilton (2001), which includes corrections to D(z) due to the presence of the cosmological constant. The model described by equation 17 assumes that the galaxy density field linearly traces the dark matter density field and all clustering evolution comes from the growth of structure in the linear regime, i.e. no merging. It is believed that L * galaxies have undergone very little merging since z ≈ 1 (Conselice et al. 2009;Lotz et al. 2011).
In the upper panel of Fig. 14 we plot the correlation length as a function of redshift. r0 is observed to change very little since z ≈ 0.32. The lowest redshift point has larger errors due to the limited volume sampled. For comparisons with theory, it is more lucid to use the bias instead of the correlation length. In the lower panel of Fig. 14 we plot the evolution of the absolute bias, as defined in equation 16, along with the theoretical prediction of Tegmark & Peebles (1998) for passive clustering evolution (dashed line). In practice, we fix the high-z value of b(z) and then solve equation 17 over the redshift range 0.07 < z < 0.32. We find that the evolution of clustering of L * galaxies is consistent with the model of Tegmark & Peebles (1998).
This agreement between the clustering of L * galaxies and the passive evolution model was not observed by Ross et al. (2010) who used SDSS photo-z's. The sample selection and the modeling of w(θ) and bias between this study and the one by Ross et al. (2010) are very different, as we use GAMA calibrated photo-z and model the correlation function with a power law, whereas they used SDSS calibrated photo-z down to r < 21 and use halo modelling for the correlation function. Ideally one would expect that the two studies should give consistent results, but it might be that the aforementioned differences in the theoretical modelling and the sample selection influence the results significantly.

DISCUSSION AND CONCLUSIONS
Despite their inherent limitations, photometric redshifts offer the opportunity to study the clustering of various galaxy populations using large numbers of objects over a wide range of angular scales with improved statistics, with the caveat that their systematic uncertainties are significantly more complex to deal with. In this section we summarize and discuss the main implications of our results.
Using GAMA spectroscopic redshifts as a training set, we have compiled a photometric redshift catalogue for the SDSS DR7 imaging catalogue with rpetro < 19.4. We carried out extensive tests to check the robustness of the photo-z estimates and use them for calculating r-band absolute luminosities. We split our sample of 4,289,223 galaxies into samples selected on photometric redshift, colour and luminosity and estimate their two point angular correlation functions.
Redshift distributions for the Limber inversion are calculated using Monte-Carlo resampling, which we show are very reliable.
Our clustering results are in agreement with other clustering studies such as Norberg et al. (2002) and Zehavi et al. (2011) who used spectroscopic redshifts. We extend the analysis to faint galaxies where photo-zs allow us to obtain representative numbers for clustering statistics. We find that the correlation length decreases almost monotonically toward fainter absolute magnitudes and that the linear relation between b/b * and L/L * holds down to luminosities L ∼ 0.03L * . For the L * population we observe a bias evolution consistent with the passive evolution model proposed by Tegmark & Peebles (1998).
As shown by others (Norberg et al. 2002;Hogg et al. 2003;Zehavi et al. 2005;Swanson et al. 2008a;Zehavi et al. 2011) and confirmed here, the colour dependence is more intriguing because faint red galaxies exhibit a larger correlation length than red galaxies at intermediate luminosities. This trend is explained by HOD models, as shown by Zehavi et al. (2005). Clustering for blue galaxies depends much more weakly on luminosity. We find that at faint magnitudes the SDSS imaging catalogue is badly contaminated by shreds of over-deblended spiral galaxies, which makes the interpretation of the clustering measurements difficult. We determine an angular scale beyond which our results are not affected by this contamination, and test this by modelling the scale-dependance of the contamination as well as studying its luminosity dependence.
The use of photometric redshifts is likely to dominate galaxy clustering studies in the future. A number of assumptions made in this work might need to be reviewed when we have even better imaging data and training sets. In particular, for cosmology, the non-Gaussianity of photo-z and robust reconstruction of redshift distributions will become a very pressing issue. For galaxy evolution studies, it is essential to study the mapping between a photo-z derived luminosity range and the true underlying one, as HOD modelling of the galaxy two point correlation function relies heavily on the luminosity range considered. In this paper, we report only qualitative agreement and leave any HOD study using these photometric redshift inferred clustering results to future work.  Table B1.

APPENDIX B: TESTS FOR SYSTEMATICS
Clustering studies using photometric redshifts are subject to systematic errors which become more pressing as the statistical errors are significantly decreased. In this Appendix we study the most relevant sources of systematic errors that might affect our results. A similar study, for a brighter sample of galaxies at higher redshifts (0.4 < z < 0.7) was recently presented by Ross et al. (2011a).
Here we present tests that we believe are more likely to affect the results shown in this paper. We start in Appendix B1 with a scaling test, which mostly tests the reliability of the whole sample for clustering studies. In Appendix B2 we quantify the possible systematics in the clustering signal due to spurious cross-correlations of different photometric redshift bins. In Appendix B3 we test for possible systematics in the spatial correlation function introduced by the redshift distributions used in Limber's equation. Lastly, in Appendix B4, we examine the robustness of the correlation function of the faintest luminosity bin.

B1 Scaling test
With a photometric sample of this size it is prudent to perform a scaling test in order to uncover any dependence of clustering on apparent magnitude. In order to do this we Table B1. Clustering properties in apparent magnitude bins defined by r-band Petrosian magnitude. Column 1 lists magnitude range, column 2 the number of galaxies, columns 3 and 4 give the values of γ and r 0 , defined in equation 5. Column 5 lists the quality of the power law fits. Errors were calculated using the full covariance matrix, but we don't include the N (z) uncertainty. split our sample in apparent magnitude bins and then calculate the angular correlation function. The apparent magnitude ranges are given in Table B1. The angular correlation functions are shown in Fig. B1. For all apparent magnitude bins the slope is approximately equal, but the amplitude varies as expected, shifting from high to low values as we go fainter. We then use equation 6 to calculate the correlation length for each magnitude range. We fit over scales of 0.01 < θ < 2 degrees (0.02 < θ < 1.2 degrees for the 12 < r < 16 sample). The correlation length for each magnitude bin is found to be equal within the error bars and in agreement with the earlier study of Budavári et al. (2003). Thus, for all well populated apparent magnitude bins we recover the fiducial power law (Peebles 1980) (B1)

B2 Cross correlation of photometric redshift cells
A crucial consistency check, necessary for the validation of our results, is the study of the induced cross correlations between redshift shells defined by photo-zs from our sample.
Since we have established that σz ≈ 0.04 we start from z photo = 0 and use five continuous slices with ∆z = 0.08, in order to allow all galaxies with photo-z error of 2σ to be included in the correct redshift bin. We then cross-correlate slices which are more than one ∆z apart. If a Gaussian with σ = 0.04 provides good approximation of the error σz, then we can estimate what fraction of galaxies should lie outside the width of each photo-z slice. A galaxy which is outside its redshift slice with width ∆z = 0.08 will have an error greater than 2σ. For a Gaussian distribution ∼ 5 per cent of all galaxies should lie outside their redshift boundaries. Therefore their residual contribution to the cross correlation should be ∼ 10 per cent of their auto-correlation 8 . In Fig. B2 we present three autocorrelation functions and their respective cross-correlations. The cross-correlation functions from Fig. B2 are not entirely consistent with zero, but on all scales the residual signal is of the expected order of magnitude. Fig. B2 demonstrates that ANNz does not produce spurious correlations between physically disjoint galaxies.  Figure B2. Auto-correlation (diamonds and circles) and cross-correlation (squares) functions for photo-z bins. The cross-correlation signals have negligible magnitude compared with the auto-correlations, and for angular separations 0.01 degrees are consistent with zero. The errors are calculated using JK resampling as explained in Section 3.5.

B3 Testing dN/dz
Here we test the accuracy of our recovered dN/dz distribution by studying angular clustering in the GAMA area.
Since we have precise knowledge of the spectroscopic redshift distributions in the GAMA area, we use these angular clustering measurements to test the robustness of our spatial clustering results using different methods of recovering dN/dz. The methods that we test against the given GAMA spectroscopic redshift distributions are (i) Monte-Carlo resampling of the photo-z distributions, assuming Gaussian errors (equation 13), which has been used for all the results in this paper, and (ii) the weighting method of Cunha et al. (2009) (also known as nearest neighbour method).
The latter method can be summed up in three distinct steps. First, one estimates the distance in apparent magnitude space to the 200th nearest neighbour of each object in the spectroscopic set, using a Euclidean metric. The exact ordinal number of the neighbouring object should not change the result significantly. For the GAMA number density, N = 200 is the best trade-off between smoothing out the large scale structure while at the same time preserving the locality of the photometric information. Second, one calculates the number of objects in the photometric set that are within the hypervolume defined by this distance and then one calculates the weight of each object in the spectroscopic set at point mi according to the equation where N (mi)spec = 200. In the third step, the already known spectroscopic distribution is weighted to match the distribution of the photometric sample. The weighting is done by summing the weights wi of each object in the spectroscopic sample for all redshift ranges: Cunha et al. (2009) show that this method is superior in recovering the true dN/dz to other methods using photo-zs, but they do not include the Monte-Carlo resampling in their comparisons.
The comparison of the different methods is depicted in Fig. B3, where all the clustering measurements are confined to the GAMA area. The errors for the angular clustering measurements are assumed to be Poisson, which is just a lower bound, and the errors on the redshift distributions are obtained from the scatter of Monte-Carlo simulations. This test is performed for the same luminosity bins as in Section 4.2, apart from the brightest and faintest bins which have a very small number of galaxies and hence large statistical errors on w(θ).
The (a priori required) agreement between the r0 measurements from the different methods of recovering dN/dz is not perfect. The r0 measurements are not significantly affected by the differences between the redshift distributions of Fig. 6. In conclusion, Fig. B3, for the three intermediate and well populated luminosity bins, implies that the reconstruction of the underlying redshift distribution is not introducing any systematic errors in the r0 measurements.
This comparison does have its limitations. Samples with small numbers of objects are sensitive to number variations due to the different selections of the two surveys (mainly the more conservative star-galaxy separation that we use in this paper). Moreover, it is very difficult to get realistic error bars for samples with a small number of galaxies and for which the survey's angular extent is comparable with the angular scales used for the w(θ) measurements. The difficulty in getting the exact angular clustering signal is shown in the upper panel of Fig. B3 which shows the residuals of the measured slopes for the GAMA and SDSS samples. In spite of these, Monte-Carlo resampling seems to recover the true r0 slightly better than the weighting method.  Figure B3. Upper panel: Slope residual of the correlation function measurements in the GAMA area, using the measurement of the GAMA sample with spectroscopic redshifts as a reference (∆γ = γ(SDSS) − γ(GAMA)). Lower panel: Comparison of the effect of the various redshift distributions (as shown in Fig. 6) on r 0 measurements again using the GAMA sample as a reference (∆r 0 = r 0 (i) − r 0 (GAMA)). Following the discussion in Sec. 5.1, the error bars show the combined effect of the power law fit uncertainties (assumed to be Poisson), which are independent of the underlying dN/dz, and the scatter in r 0 due to 100 Monte-Carlo resamplings of each dN/dz (only (dN/dz)spec is known precisely). scales (Fig. B4). This increase in the clustering signal is not hinted at in the −19 < Mr − 5 log h < −17 luminosity bin, and so we here investigate whether there is some sort of contamination in the faintest sample.
We randomly select ∼ 10 per cent of the objects in the faintest luminosity bin and we visually inspect them to see if they are genuine galaxies. The fraction of spurious objects is shown in the left panel of Fig. B5 and we observe that it is significant at the very faint end, where the actual number of galaxies is low (red line in the same figure), and ∼ 40 per cent at the bright end of that luminosity bin. From our visual inspection, most spurious objects are local, over-deblended spiral galaxies, the remainder are merging systems or just sky noise. Evidently as we go fainter, the contamination level is increasing and this presents a serious drawback for clustering studies and a serious limitation for large surveys.
The right panel of Fig. B5 shows the fraction of spurious objects in the other five absolute magnitude bins. We visually inspected ∼ 100 objects from each of those bins and we found that the contamination level is much lower, with a slight increase toward the bright and faint ends. Our detailed study of the correlation function of the faintest bin shows that it is not affected by contamination on the scales of primary interest (θ 0.1 • ), something which we expect to hold true for all other luminosity bins, which have a significantly smaller fraction of spurious objects.
The contamination in the −17 < Mr − 5 log h < −14 luminosity bin affects the two point correlation function dif- . Black circles show the total correlation function, blue squares show the correlation function of the ∼ 10 per cent subset of objects visually inspected, green stars show the correlation function of the "clean" part of the inspected subset, red diamonds show the total correlation function corrected to account for the spurious pairs on scales 0.1 degrees and finally, cyan triangles show the w(θ) measurement using only GAMA spectroscopic data. Errors bars for the total sample are calculated using the JK method. Open symbols represent angular scales at which the signal is significantly contaminated and so cannot be trusted.
ferently at different angular scales. We address this issue by counting the number of pairs of genuine galaxies in the visually inspected subset. The results are shown in Fig. B4, where we also include the angular correlation function from the corresponding sample from GAMA. 9 Due to the fact that the subset has a weakened signal at very small scales we can only draw conclusions for angular scales > 0.1 degrees. From Fig. B4 we see that at these scales the contamination does not significantly affect the correlation function and its fit parameters γ and r0. For this reason, we present our results limited to angular scales θ 0.1 • .
We also repeated our analysis after masking out areas of sky covered by RC3 galaxies (de Vaucouleurs et al. 1991;Corwin et al. 1994) to test whether we could decrease the contamination level. We did not observe any qualitative differences in the power law parameters estimated, and more importantly, the amplitude of w(θ) at small scales did not reduce, indicating that the RC3 catalogue does not capture all over-deblended galaxies in the SDSS galaxy catalogue.
Finally, it is important to note (and caution) that the source contamination due to over-deblending only became apparent when interpreting the bottom right panels of Figs. 8 and 10). Had we completely trusted the results of the scaling test (Appendix B1) or used only the data point near 9 GAMA objects have been visually inspected and are therefore more reliable than objects in the SDSS imaging catalogue. On the other hand, GAMA has a smaller area, which increases the statistical errors. For this sample, considering Poisson errors only, the statistical errors on w(θ) would be at least three times larger than the ones obtained from the SDSS sample. L * in Fig. B5 (since that population dominates), we would have significantly underestimated the number of spurious objects.