1 Enfin, ce logo réaffirme clairement notre mission. Il rappelle la richesse de nos Weak Gravitational Lensing TD Martin Kilbinger CEA Saclay, ...

Author:
Suzanna Rice

2 downloads 51 Views 1MB Size

Euclid Summer School, Fr´ejus June/July 2017 [email protected] www.cosmostat.org/kilbinger Slides: http://www.cosmostat.org/ecole17 COMMUNIQUE INTERNE

Le 31 mai 2012

@energie sombre TÉLÉCHARGEZ LE LOGO DU CEA

Le nouveau logo du CEA et sa charte graphique sont téléchargeables sur l’intranet de la Direction de la communication : http://www-dcom.intra.cea.fr/ Énergie, cohésion et innovation

Présenté le 20 mars dernier à l’ensemble des salariés, le logo est le signe de la dynamique collective qui anime le CEA. La typographie des lettres CEA est unique : elle a été spécialement dessinée pour conférer à notre sigle modernité, mouvement et caractère. Le rouge, puissant, a été choisi pour exprimer l’énergie dans son sens le plus large, celui de la dynamique et de l’engagement collectif. Le rectangle et les lettres liées traduisent notre cohésion et la solidité de notre organisme. Enfin, ce logo réaffirme clairement notre mission. Il rappelle la richesse de nos

#EuclidFrejus2017

Exercises

Coding Limber equation (cycle 1) Data analysis Compute the shear two-point correlation function (2PCF) (cycle 1+2) Calculations Effect of convergence and shear (cycle 1) Convergence and shear power spectra (cycle 1) Galaxy-galaxy lensing (cycle 2)

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

2 / 30

Coding

Limber equation (cycle 1)

Code up Limber equation in python I Getting the 3D power spectrum Run CLASS to get 3D power spectrum at various redshifts: > mkdir output > / path / to / class lcdm . ini This creates files output/test z

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

3 / 30

Coding

Limber equation (cycle 1)

Code up Limber equation in python II Here is the code snippet: from astropy . io import ascii p_delta = [] for iz in range ( nz ): p_delta_name = ’ {0} z {1} _pk_nl . dat ’. format ( root , iz +1) print ( p_delta_name ) dat = ascii . read ( p_delta_name ) if iz == 0: k = dat [ ’ col1 ’] pk = dat [ ’ col2 ’] this_p_delta = \ interpolate . I n t e r p o l a t e d U n i v a r i a t e S p l i n e (k , pk ) p_delta . append ( this_p_delta )

If astropy is not installed, use instead: dat = np . loadtxt ( p_delta_name ) k = dat [: ,0] pk = dat [: ,1]

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

4 / 30

Coding

Limber equation (cycle 1)

Code up Limber equation in python III Writing down Limber equation for a simple case Now, let’s look at the Limber equation, as shown in the lecture before: Z ` 2 Pκ (`) = dχ G (χ)Pδ k = χ 2 Z χlim 3 H0 χ0 − χ Ωm G(χ) = dχ0 p(χ0 ) 2 c a(χ) χ χ0 First, to simplify, let’s assume all galaxies are at a single redshift z0 , or comoving distance χ0 . The pdf becomes a Dirac delta function, p(χ0 ) = δD (χ0 − χ0 ). Solve the integral in G.

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

5 / 30

Coding

Limber equation (cycle 1)

Code up Limber equation in python IV

Next, since CLASS outputs Pδ as function of redshift and not comoving distance, we have to change variables from χ to z. Start with the FLRW metric and the equation for geodesics, ds = 0 (see TD by M. Kunz): ds2 = 0 = c2 dt2 − a2 dχ2 and write dχ as function of dz. You will need the Hubble expansion rate H(z). Assume a flat ΛCDM model. Finally, write down Pκ as integral over z over the density power spectrum. Check the units of the involved quantities.

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

6 / 30

Coding

Limber equation (cycle 1)

Code up Limber equation in python V Numerical integration of the Limber equation Discretise the above integral. In python, write a function that performs this discrete sum, evaluating Pδ at the redshifts that are output by CLASS. To get the comoving distance as function of redshift, use the code from the general cosmolgy TD, or a package such as astropy: def chi (z , Omega_m , h ): """ Return c o m o v i n g d i s t a n c e in units of Mpc / h """ from astropy import cosmology cosmo = cosmology . FlatLambdaCDM ( H0 =100* h , Om0 = Omega_m ) # M u l t i p l y with h to go from Mpc to Mpc / h chi = cosmo . c o m o v i n g _ d i s t a n c e ( z ). value * h return chi

(Note that CLASS output units are k [h/Mpc] and Pδ (k) [(Mpc/h)3 ], so for consistency we want to deal with χ in units of [Mpc/h].)

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

7 / 30

Coding

Limber equation (cycle 1)

Code up Limber equation in python VI Plot and compare Make a plot of Pκ , using the function in limber.py or writing your own. Compare with Fig. 8 from (Alsing et al. 2016). They measured Pκ on CFHTLenS from the two redshift bins from (Benjamin et al. 2013), with mean redshifts 0.7 and 1.05, respectively. Use one of those values as the single redshift z0 .

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

8 / 30

Coding

Limber equation (cycle 1)

Code up Limber equation in python VII

A. Heavens, A. Ja↵e

Figure 8 from (Alsing et al. 2016), E-mode power spectra from CFHTLenS.

Bonus: Use CLASS to produce the Pκ using the exact (non-Limber) expression, or other codes (e.g. nicaea, CLASS, CosmoSIS). Compare.

osteriors for the E- and B-mode tomographic power spectra from CFHTLenS, summarised by 68% (orange) intervals. The best-fit (maximum posterior) ⇤CDM model is shown in red (obtained from the map-cosmology d to the CFHTLenS data, c.f., §6.4). Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

9 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field I This exercise will show you how to estimate second-order shear statistics (2PCF, aperture-mass dispersion, band-power spectrum) and their errors, and how to compare these estimates with theoretical predictions. 1. Download shear catalogue Note: The catalogue size is 158 Mb, so this might take a while. So do this step well before the start of the TD, or use the downloaded catalogue on the common disk. Go to http://cfhtlens.org → Fellow astronomers → Quick link: Access the CFHTLenS Shear and Photometric Redshift catalogues. This brings you to the catalogue query page on CADC http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/en/community/ CFHTLens/query.html. We will download the shear data from the W1 field (but feel free to use another field — check the coordinates in (Erben et al. 2013)). The following steps are advised (for some of these you have to edit the string in the query field): Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

10 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field II • Un-select id

• Select ALPHA J2000, DELTA J2000, e1, e2, weight. These are the x-

and y-coordinates, the two ellipticity components, and the galaxy weight.

• Choose the ranges ALPHA J2000≥ 25, ALPHA J2000≤ 45,

DELTA J2000≥ −20, and DELTA J2000≤ 0. This selects coordinates in the W1 field (you can double-check in (Erben et al. 2013)).

• Choose weight> 0, the code athena that computes the 2PCF does not

like objects with zero weight.

• Choose the range ≥ 0.0 and ≤ 0.0, but do not select fitclass. This flag is

zero for galaxies, one for stars, and negative for other detections. We only want galaxies, but do not need this flag in our catalogue.

• If you like you can do a test by clicking on ”submit query” to see the first

10 objects. If you are happy with the result, choose “Asynchronous” as submission method, ”Tab Separated Values”, and delete “top 10” from the query field (we don’t only want 10 objects)

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

11 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field III The text in the query field should now look something like the following: SELECT ALPHA J2000, DELTA J2000, e1, -1*e2, weight FROM cfht.clens WHERE ALPHA J2000>=25 AND ALPHA J2000<=45 AND DELTA J2000>=-20 AND DELTA J2000<=0 AND fitclass>=0.0 AND fitclass<=0.0 AND weight>0 I recommend to flip the ε2 -coordinate, by placing a minus sign in front of e2 in the second line. The original coordinates have North and East defined such that (x, y) have a left-handed orientation. The ε2 flip accounts for that (why?).

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

12 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field IV • Submit query and wait. The processing of the query can take a few

minutes up to several hours! After it is done the web page will show a link, from where you can download the catalogue.

Once the catalogue is downloaded, check whether it contains five columns that make sense. You can for example make a scatter plot of α and δ to see whether the selected galaxy coordinates are as desired. Before proceeding, remove the first (header) line. 2. Use athena to get the 2PCF ξ+ and ξ− . If athena is not installed, download version 1.7 from www.cosmostat/athena.html, and compile. First, create a config file. The easiest is to copy the example file from /path/to/athena/test/test xi/config tree and modify it to set the following entries: • GALCAT1 to the name of the catalogue you downloaded, GALCAT2

either the same or “-”.

• SCOORD INPUT to “deg” Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

13 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field V • THMIN, THMAX to whatever you like; Note that the shear correlation

function is very noisy on scales smaller than 0.1 arcmin due to a very small number of galaxy pairs at such small distances; on scales larger than a few degrees it is more or less consistent with zero for the survey area in consideration.

• RADEC to 1

• OATH: the smaller, the more precise but also the slower the calculation.

For testing you can put it to 0.2; for serious calculations it should be 0.05 or smaller.

We will perform two runs: (A) to compute and plot the 2PCF in a few coarse bins; (B) to compute the 2PCF in many narrow bins that then will be integrated to get aperture-mass and band-power spectrum. The settings in the config file for the two cases: NTH BINTYPE Martin Kilbinger

(CEA)

A ∼ 20 LOG

B ∼ 1000 or more LIN (recommended) or LOG

Weak Gravitational Lensing

TD

14 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field VI Run athena with the correct config file for case A or B. You can make sure that the output from another case is not overwritten by running them in different subdirectories, or by using specific suffixes with option (--out suf). > / path / to / athena / bin / athena -c config_tree_A -- out_suf _A

The run will take around 10-20 minutes. athena implements the pairwise galaxy sum estimator of the 2PCF, see Part I: P ij wi wj (εt,i εt,j ± ε×,i ε×,j ) P ξˆ± (θ) = ij wi wj with a tree code algorithm.

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

15 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field VII open angle

[The official Euclid OU-LE3 PF WL-2PCF software is the C++ version of athena (written by Bertrand Morin, Florent Sureau).] 3. From run (A) plot ξ+ , ξ− . The file xi

(CEA)

Weak Gravitational Lensing

TD

16 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field VIII 4. Use pallas.py to get derived second-order statistics: aperture-mass dispersion and band-power spectrum > / path / to / athena / bin / pallas . py -i xi < suffix >

The resulting important output files are: • output map2 poly.txt, columns: smoothing scale/circle radius θ, 2 2 hMap i(θ), hM× i(θ), hMap M× i(θ).

• output pkappa band.txt, columns: 2D Fourier mode bin center `, PκE (`),

PκB (`), PκEB (`), lower bin limit `lo , upper bin limit `hi .

Plot E-, B-, and mixed EB-modes of both quantities in separate plots. Note: If you find B-mode amplitudes comparible to the E-mode, you might have done the ε2 -flip incorrecly.

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

17 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field IX 5. Use the Limber code from cycle I, or nicaea, or CLASS to create theoretical prediction of the power spectrum. Use z¯ = 0.75 (Kilbinger et al. 2013) for the mean redshift. Add the resulting convergence power spectrum Pκ to the previous plot, by plotting on the y-axis `(` + 1)/(2π)Pκ (`). Note that the shear catalogue is not calibrated. The calibration for the multiplicative shear bias m is around 6% on average, that makes around 12% in amplitude for the 2PCF. Additional bonus exercises 1. Download the catalogue again with additional fields. Note that if you want to re-run athena, you have to create a copy of the catalogue without those additional fields, since for ascii catalogues only 5 input columns are accepted. Extra catalogue on USB sticks.

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

18 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field X • Redshift distribution. Select Z B, photometric redshift. From this, create a

histogram that you can use as redshift distribution n(z) for the theoretical prediction, instead of placing all galaxies at one single redshift. Extra-bonus if you make a weighted histogram using the weights w. Special extra bonus if you download the full pdf information, PZ full, and create the n(z) from the sum of weighted pdf’s. • Shear calibration. Select SNratio, signal-to-noise ratio, and scalelength for galaxy size.

• Additive shear bias c: The correction for c can be done for each galaxy. Use eq. (19) of (Heymans et al. 2012) for c2 ; note that scalelength is in pixels, with one pixel being 0.187 arc seconds. On average, c2 should be of order 0.002. The 1-component of the additive bias, c1 , was measured to be consistent with zero, and no calibration is required. Subtract c2 from ε2 for each galaxy. This should be done before the ε2 flip. Note that a constant additive bias shows up in the 2PCF, but not the aperture-mass dispersion. (Why?)

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

19 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field XI • Multiplicative shear bias m: Correction for m should not be done on individual galaxies. This might introduce correlations between their weights w and m, and could up-weigh badly measured galaxies if they have a large |m|. Instead, we need to compute a total calibration correction for the entire galaxy sample. For the 2PCF, this is the expression (16) in (Miller et al. 2013), or (14) in (Kilbinger et al. 2013),

The 2PCF is then globally calibrated by cal ξ± (ϑ) =

ξ± (ϑ) . 1 + K(ϑ)

We can use athena to compute the two-point correlation function of m, 1 + K(ϑ). Since m is a scalar and not a spin-2 quantity like ellipticity, we can to the following trick: In the original shear catalogue, we replace ε1 with 1 + m, and ε2 with 0. The output ξ+ = hε1 ε1 i + hε2 ε2 i of athena then results in h(1 + m)(1 + m)i, which corresponds to 1 + K. (ξ− will not be a meaningful output.) Use (17) of (Heymans et al. 2012) to compute m for each galaxy. In this equation, log = log10 , and α is in inverse pixel. Do the replacement in the catalogue as descibed above. The modified catalogue should now contain Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

20 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field XII the 5 columns ALPHA J2000, DELTA J2000, 1 + m, 0, w. and run athena with the modified catalogue. Plot the calibrated 2PCF ξ cal and compare to the previous result.

2. Code up the Hankel transform to obtain ξ+ and ξ− from the theoretical model, Z ∞ 1 ξ+ (ϑ) = d` `J0 (`ϑ)Pκ (`) 2π 0 Z ∞ 1 ξ− (ϑ) = d` `J4 (`ϑ)Pκ (`), 2π 0 Plot together with the data. 3. Plot theoretical power spectrum for different values of σ8 .

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

21 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field XIII 4. Error bars for hMap i and Pκ (`). Re-run athena with the options --out ALL xip resample XIP NAME --out ALL xim resample XIM name. This outputs all resampled realisations of ξ+ and ξ− into the files XIP NAME and XIM name, respectively. There are two options to proceed: 4.1 Bring these files into the format of athena output file xi. Use dummy values for columns xi x, w, sqrt D, sqrt Dcor, n pair (for example copy the ones from xi. Create a different new xi file for each of the NRESAMPLE resample realisation. Run pallas.py with each of the resample xi files. This should provide NRESAMPLE output files; make sure they have unique names or are stored in different sub-directories. The errors bars on hMap i and Pκ (`) are then simply the rms between the different realizations (the errors on ξ± have been properly propagated to the derive quantities).

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

22 / 30

Compute the shear two-point correlation function Data analysis (2PCF) (cycle 1+2)

Weak-lensing statistics on a CFHTLenS field XIV 4.2 Reading resampled input and computing resample errors bars for hMap i and Pκ (`) is already implemented for FITS format, in a new version of pallas.py. See function read xi resample. Download this new version and implement resampling for ASCII format. Compare to option 1.

5. Extend the computation of the jackknife variance (see previous point) to the co-variance. Code up a simple Gaussian likelihood function with the inverse of this covariance. Compute the likelihood for various values of σ8 , and make a plot. Special extra super bonus: Use this likelihood in a sampler, e.g. MontePython. Do an MCMC and plot parameter constraints.

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

23 / 30

Calculations

Effect of convergence and shear (cycle 1)

Convergence and shear I Calculate the effects of κ and γ on a circular image, using the linearized lens equation, I(θ) = I s (β(θ)) ≈ I s (β(θ 0 ) + A(θ − θ 0 )), with the Jacobi matrix A=

1 − κ − γ1 −γ2

−γ2 1 − κ + γ1

.

1. Convergence Set shear to zero. Parametrize a circular isophote (line of constant surface brighness I) in the 2D image coordinates θ = (θ1 , θ2 ). Set θ 0 = 0 and β(θ 0 ) = 0, these are just arbitrary translations in the coordinate system. Compute the source coordinates β(θ) from the linearized lens equation. Show that a positive (negative) κ results in a magnified (demagnified) image compared to the source. Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

24 / 30

Calculations

Effect of convergence and shear (cycle 1)

Convergence and shear II

2. Shear For simplicity, set γ2 = 0, and κ 6= 0. Repeat the calculation from above and show that the transformed image is an ellipse.

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

25 / 30

Calculations

Convergence and shear power spectra (cycle 1)

Convergence and shear power spectra I

Show that the power spectra of the convergence and the shear are equal. 1. Write the relations between κ, γ and ψ in Fourier space, and express γˆ as a function of κ ˆ. 2. Now show that Pκ = Pγ

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

26 / 30

Calculations

Galaxy-galaxy lensing (cycle 2)

Tangential shear and projected overdensity I Exercise: Show that the average tangential shear around a point at an angular radius θ is equal to the projected mass overdensity within θ, minus a boundary term. hγt i (θ) = κ ¯ (≤ θ) − hκi (θ). The projected mass overdensity κ ¯ (≤ θ) averaged over the disk with radius θ, Dθ , is given by (Miralda-Escude 1991, Squires & Kaiser 1996) Z 1 κ ¯ (≤ θ) := d2 θ0 κ(θ 0 ). πθ2 Dθ :|θ0 |<θ 1. First, use the Poisson equation to relate the convergence to the lensing potential ψ. Apply Gauss’ law to replace the ‘volume’ integral over the disk Dθ by a ‘surface’ integral over the boundary of the disk, ∂Dθ , which is the circle at radius θ.

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

27 / 30

Calculations

Galaxy-galaxy lensing (cycle 2)

Tangential shear and projected overdensity II 2. Replace the integration over the line element along the circle with an integral over the polar angle ϕ, accounting for the circle length 2πθ. Convince yourself that the gradient of the potential ψ is projected to the radial direction e ˆθ normal to the circle; the tangential derivative is projected out by the scalar product. 3. To further evalute the lensing potential, we need its second derivatives. Multiply the last result with θ, and take the derivative with respect to θ. The term ∂θ ∂θ ψ can be expressed in terms of convergence and tangential shear using the relations derived earlier in the lecture. Do this in a local Cartesian coordinate system (ˆ eθ , e ˆϕ ). What is the interpretation of the second shear component in this system when seen from the canonical coordinate system? Define circularly averaged quantities hai(θ) :=

1 2π

Z

2π

dϕ a(θ, ϕ). 0

and express ∂[θ¯ κ(≤ θ)]/∂θ in terms of circularly averaged convergence and tangential shear. Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

28 / 30

Calculations

Galaxy-galaxy lensing (cycle 2)

Tangential shear and projected overdensity III

4. Write κ ¯ (≤ θ) of eq. (27) as function of hκi. Multiply by θ and take the derivative with respect to θ, as with the equation before. Equate this with the previous expression to get the final result. 5. In addition (for relation between aperture-mass filters U and Q): Express ∂¯ κ(θ) as function of hγt i(θ).

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

29 / 30

Bibliography

Bibliography I Alsing J, Heavens A F & Jaffe A H 2016 ArXiv e-prints . Benjamin J, van Waerbeke L, Heymans C, Kilbinger M, Erben T & al. 2013 MNRAS 431, 1547–1564. Erben T, Hildebrandt H, Miller L, van Waerbeke L, Heymans C & al. 2013 MNRAS 433, 2545–2563. Heymans C, Van Waerbeke L, Miller L, Erben T, Hildebrandt H & al. 2012 MNRAS 427, 146–166. Kilbinger M, Fu L, Heymans C, Simpson F, Benjamin J & al. 2013 MNRAS 430, 2200–2220. Miller L, Heymans C, Kitching T D, van Waerbeke L, Erben T & al. 2013 MNRAS 429, 2858–2880. Miralda-Escude J 1991 ApJ 370, 1–14. Squires G & Kaiser N 1996 ApJ 473, 65.

Martin Kilbinger

(CEA)

Weak Gravitational Lensing

TD

30 / 30

Our partners will collect data and use cookies for ad personalization and measurement. Learn how we and our ad partner Google, collect and use data. Agree & Close