Page 1 of 1

Cobaya: only use linear for DES_y1

Posted: September 26 2022
by Zhuangfei Wang
Hello:

I just have a question about using DES_y1 in Cobaya. Specifically, I want to use the linear power spectrum only for weak lensing in all types of measurements. It looks like from the source: /likelihoods/base_classess/des.py, I could set "nonlinear" to False in function get_requirements to achieve this. But I was just wondering if there is any more convenient way to do this? For example, is it likely to set it in the input ".yaml" file together with other input parameters, based on the idea of touching Cobaya source as little as possible? Thanks.

Re: Cobaya: only use linear for DES_y1

Posted: September 26 2022
by Antony Lewis
I think that probably is the easiest way (or inherit a likelihood new class, overriding get_requirements)

Re: Cobaya: only use linear for DES_y1

Posted: September 26 2022
by Antony Lewis
Actually, more importantly, you need to pass nonlinear False argument to

Code: Select all

get_Pk_interpolator

Re: Cobaya: only use linear for DES_y1

Posted: September 27 2022
by Zhuangfei Wang
Thanks for your reply. Maybe one more simple question on this. I was thinking to set "nonlinear" to False in the value of key "Pk_interpolator" in function "get_requirements", and will this procedure effectively override the argument in function get_Pk_interpolator? Or do I need to modify "get_Pk_interpolator" separately as well? I am not very familiar with how these functions or definitions work together. Thank you very much.

Re: Cobaya: only use linear for DES_y1

Posted: September 27 2022
by Antony Lewis
get_requirements tells it what it needs to compute. If you only want the linear spectrum, you need to say so (other components may have requested non-linear).

Re: Cobaya: only use linear for DES_y1

Posted: September 28 2022
by Zhuangfei Wang
Thanks a lot for your explanation!

Re: Cobaya: only use linear for DES_y1

Posted: September 29 2022
by Zhuangfei Wang
Hi Antony. Can I ask some further questions? Firstly, there should be three types of power spectrum for weak lensing likelihood: galaxy clustering, galaxy-lensing cross-correlation and cosmic shear according to this paper: https://arxiv.org/abs/1708.01530. However, when I checked the DES likelihood class in Cobaya(des.py), I only found two types of variable pairs: ("delta_tot", "delta_tot") and ("Weyl", "Weyl") in logp function, and there is no cross pair. What is the reason for that?

Besides, when I set "use_Weyl: True" in galaxy_galaxy.yaml and run the code, I got an error:
---
cobaya.log.LoggedError: DES currently only supports Weyl potential for lensing only
---
which is confusing to me since it is for galaxy-lensing cross-correlation and should be able to use lensing.

I am new to DES likelihood calculation so please feel free to correct me if I mistake anything. Thanks a lot.

Re: Cobaya: only use linear for DES_y1

Posted: September 29 2022
by Antony Lewis
The error message is warning you that the implementation is partial - Weyl is only supported for lensing. The DES papers always use the density perturbation approximation, not Weyl, and that is what is used by default (and always for the cross). Feel free to submit a PR with full support for Weyl.