lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
234 stars 289 forks source link

Classy: Shear Cl and Magnification bias #72

Open aurelienbl opened 8 years ago

aurelienbl commented 8 years ago

Hi there!

I have an issue with classy (thus maybe with class?) and the computation of the shear power spectrum. I noticed that the shear power spectrum (as obtained by cl['ll'][0], where cl = Class().density_cl), depends a lot on the value of s_bias. If s_bias is 0.4 then cl['ll'][0] is 0. So my questions are:

is cl['ll'][0] indeed the shear power spectrum? If so, then it should not depend (that much) on magnification. If not, how can I get it? I don't see a method Class().shear_cl, and I add 'sCl' in the list of ouptuts.

Thanks a lot for the help!

Aurélien

lesgourg commented 8 years ago

Sorry for the late answer Aurelien! I agree that if you have 'sCl' in the list of ouptuts, Class().density_cl() will return the shear power spectrum in cl['ll'][N], where N is an index running over the different requested redshift bins, for the auto-correlation and cross-correlation spectra (you control this with 'selection_mean =' and 'non_diagonal =', see class/explanatory.ini for detailed explanations). You must be using an ancient version of Class, otherwise the code would give you a message saying that the syntax 's_bias' is obsolete, and that you should use 'selection_magnitude_bias': the new syntax allows for a different bias in each redshift bin, since you can pass a list instead of a single number (again this is documented in class/explanatory.ini). Anyway, it should be OK to use the old version and the syntax 's_bias' if you are only interested in a single bin or a common magnification bias for all bins.

The role of the parameter 'selection_magnification_bias' is to multiply the shear source function in each bin by a factor (2-5s)/2, where s=selection_magnification_bias, set by default to zero. So indeed you get zeros for s=2/5=0.4. Is this incorrect physically? You must know a lot more than me on magnification bias! We introduced this factor (2-5s)/2 for the calculation of the lensing contribution to the galaxy number count spectrum (see http://arxiv.org/pdf/1307.1459.pdf, second equation of (A.14), and first equation of (A.15)) and we assumed that the factor should be the same in the source function of the galaxy shear power spectrum.

aurelienbl commented 8 years ago

Hi Julien,

Thank you for the answer. I'll check my version then as indeed I may be using an old one. But if you say that for one bin it should not matter then indeed there might be something wrong with the way shear is computed.

I have the feeling that the weak lensing (shear) kernel should not have anything to do with magnification (at least at first order). Magnification in relevant for number count as is changes the number counts, but I don't think it should affect shear, e.g. eqs 4,5,6 of http://www.aanda.org/articles/aa/pdf/2010/15/aa13657-09.pdf . In eq. 4 the "shape" observable is contaminated by Intrinsic alignments, but not by magnification (as opposed to the number counts, eq.5).

aurelienbl commented 8 years ago

On a related note, I don't see a "selection_magnitude_bias" in (what I believe is) the most up-to-date explanatory.ini (https://github.com/lesgourg/class_public/blob/master/explanatory.ini), but my knowledge of git is 'limited', so It might be that I am not looking at the right place.

lesgourg commented 8 years ago

On your first point (the physics): I will share this concern with my collaborators Montanari and Di Dio, and we may remove the factor (2-5s)/2 from the shear source function (or replace it by something better). Don't hesitate to let us know if you find a more explicit reference to the impact of magnification bias on the shear spectrum, or if you know somebody expert on that. On your second point: you are right, I did not realise that the updated syntax "selection_magnitude_bias" is in our development branch but not yet int he public branch. It doesn't matter, please keep using "s_bias" until the next major release (that will be called 2.5 or maybe 3.0)

lesgourg commented 8 years ago

Yes, after thinking better about it and talking with Francesco Montanari, it is obvious that this factor (2-r*s)/2 should be included only in the number count, not shear. So we will just remove this prefactor from the expression of the shear source function in the next revision (minor or major). In the meantime, just used the default value (s_bias=0 or left unspecified).

aurelienbl commented 8 years ago

Hi Julien (and collaborators),

Thank you very much. I'll set the s_bais to 0 then. When do you plan to publish the new major version?

PaniezPaykari commented 8 years ago

Hello Julien,

There is something I do not understand about the class shear power spectrum output. It seems to have the wrong tilt and amplitude for me! Here is a plot of class output:

screen shot 2016-02-01 at 13 55 24

Please compare it to e.g. c_kk_l-euclid

The header of the output file says that it already has the l(l+1)/2pi factor. I have tried changing k_pivot, camb/class output format/adding the l(l+1)/2pi factor (just in case it is missed out)/etc. Nothing seems to help! Do you have any ideas about what I could have missed in my ini file? My ini file is below.

Thank you very much, Paniez

H0 = 67.556

h =0.67556

100*theta_s = 1.042143

T_cmb = 2.7255

Omega_g =

omega_g =

Omega_b =

omega_b = 0.022032

N_ur = 3.046

Omega_ur =

omega_ur =

Omega_cdm =

omega_cdm = 0.12038

Omega_k = 0.

Omega_Lambda = 0.7

Omega_fld = 0 Omega_scf = 0

output = tCl,lCl,sCl

output = tCl,pCl,lCl,mPk

output = mPk,mTk

number count contributions = density, rsd, lensing, gr

non linear =

lensing = yes

P_k_ini type = analytic_Pk

k_pivot = 0.05

A_s = 2.215e-9

ln10^{10}A_s = 3.0980

n_s = 0.9619 alpha_s = 0.

l_max_scalars = 2500 l_max_tensors = 500 l_max_lss = 2000

P_k_max_h/Mpc = 10

P_k_max_1/Mpc = 0.7

z_pk = 0

z_pk = 0., 1.2, 3.5

z_max_pk = 10.

selection=gaussian selection_mean = 1.0

0.98,0.99,1.0,1.1,1.2

selection_width = 0.1 non_diagonal=0

dNdz_selection =

dNdz_evolution =

bias = 1.

s_bias = 0.

root = output/test_

headers = yes

format = camb

write background = no

write thermodynamics = no

k_output_values = #0.01, 0.1, 0.0001

write primordial = no

write parameters = yeap

montanari commented 8 years ago

Hi,

According to the explanatory.ini, the output output = sCl gives the galaxy lensing potential Cl's, not the shear power spectrum, so I think you should multiply the output sCl by a further factor l(l+2)(l^2-1)/4 to obtain l(l+1)/2pi*Cl^{\gamma}.

Francesco

PaniezPaykari commented 8 years ago

Dear Francesco,

Many thanks for the clarification.

Best regards, Paniez

On 19 Feb 2016, at 16:58, Francesco Montanari notifications@github.com wrote:

Hi,

According to the explanatory.ini, the output output = sCl gives the galaxy lensing potential Cl's, not the shear power spectrum, so I think you should multiply the output sCl by a further factor l(l+2)(l^2-1)/4 to obtain l(l+1)/2pi*Cl^{\gamma}.

Francesco

— Reply to this email directly or view it on GitHub https://github.com/lesgourg/class_public/issues/72#issuecomment-186302631.


Dr Paniez Paykari Post-doctoral Researcher

University College London
Department of Space & Climate Physics
Mullard Space Science Laboratory

http://www.mssl.ucl.ac.uk