cobaya/CAMB: defining a likelihood that requires source Cl's

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Jose Bermejo
Posts: 1
Joined: June 02 2022
Affiliation: University of Rochester

cobaya/CAMB: defining a likelihood that requires source Cl's

Post by Jose Bermejo » June 02 2022

Hi there,

I'd like to create a likelihood for cobaya which depends on CAMB sources products (i. e. source counts Cl's). For the moment, I'm trying to define a simple likelihood class with the following requirements block:

Code: Select all

def get_requirements(self):
        return {'source_Cl': {'sources': {'source1': {'function': 'spline', 'z': z, 'W': W, 'lmax': 800, 'dlog10Ndm': 0.42, 'bias': 1.5}}}}
However, I get this error when loading the likelihood with cobaya.model:

Code: Select all

[CAMB] Importing *local* CAMB from /Users/jbermejo/Desktop/DESI/CAMB
[camb] Initialized!
[camb] *ERROR* Needs a 'sources' key, containing a dict with every source name and definition
I guess there could be a syntax problem that I didn't find out how to solve after looking at the documentation. If the syntax is correct, should I maybe add the 'sources' key the code is expecting somewhere else?
Any help with this issue would be appreciated.

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

Re: cobaya/CAMB: defining a likelihood that requires source Cl's

Post by Antony Lewis » June 05 2022

Not sure, can you attach simple file or notebook to reproduce?

Post Reply