Cobaya: only use linear for DES_y1

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Zhuangfei Wang
Posts: 27
Joined: October 09 2021
Affiliation: Simon Fraser University

Cobaya: only use linear for DES_y1

Post by Zhuangfei Wang » September 26 2022

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.

Antony Lewis
Posts: 1842
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: Cobaya: only use linear for DES_y1

Post by Antony Lewis » September 26 2022

I think that probably is the easiest way (or inherit a likelihood new class, overriding get_requirements)

Antony Lewis
Posts: 1842
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: Cobaya: only use linear for DES_y1

Post by Antony Lewis » September 26 2022

Actually, more importantly, you need to pass nonlinear False argument to

Code: Select all

get_Pk_interpolator

Zhuangfei Wang
Posts: 27
Joined: October 09 2021
Affiliation: Simon Fraser University

Re: Cobaya: only use linear for DES_y1

Post by Zhuangfei Wang » September 27 2022

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.

Antony Lewis
Posts: 1842
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: Cobaya: only use linear for DES_y1

Post by Antony Lewis » September 27 2022

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).

Zhuangfei Wang
Posts: 27
Joined: October 09 2021
Affiliation: Simon Fraser University

Re: Cobaya: only use linear for DES_y1

Post by Zhuangfei Wang » September 28 2022

Thanks a lot for your explanation!

Zhuangfei Wang
Posts: 27
Joined: October 09 2021
Affiliation: Simon Fraser University

Re: Cobaya: only use linear for DES_y1

Post by Zhuangfei Wang » September 29 2022

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.

Antony Lewis
Posts: 1842
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: Cobaya: only use linear for DES_y1

Post by Antony Lewis » September 29 2022

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.

Post Reply