galsci / pysm

PySM 3: Sky emission simulations for Cosmic Microwave Background experiments
https://pysm3.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
33 stars 23 forks source link

angular power spectra assumed by PySM #149

Closed martamonelli closed 1 year ago

martamonelli commented 1 year ago

Hi, I'd need to know the BB angular power spectrum that PySM assumes to generate the CMB-only maps (c1 model). I've read in the documentation that "This code takes, as an input, a set of unlensed Cl’s generated using CAMB. The params.ini is in the Ancillary directory. There is a pre-computed CMB map provided at Nside 512."

I couldn't find the Ancillary directory, but I found a params.ini file in my /anaconda3/pkgs/camb/info directory. Is the documentation referring to that file?

Anyway, I tried running CAMB from a python script using that parameter file and computed the Cls with

pars=camb.read_ini(params_path)
results = camb.get_results(pars)
powers = results.get_cmb_power_spectra(pars, CMB_unit='muK')
Cl_CAMB = powers['total']

If I plot them together with the spectra computed from the maps returned by PySM, however, they are in disagreement. I'd guess it's due to different assumptions for the lensing, but I don't know how to make them agree.

Do you have any suggestions?

(Sorry for the probably silly question, but I couldn't figure it out by myself.)

zonca commented 1 year ago

have you checked already in the PySM 2 paper? https://arxiv.org/abs/1608.02841

see also the PySM 2 repository, for example https://github.com/bthorne93/PySM_public/blob/master/pysm/template/camb_lenspotentialCls.dat

martamonelli commented 1 year ago

I checked PySM 2 documentation and paper, but with no luck..

I ended up doing the following:

In this way, I can run get_emission and be sure of the underlying Cls of the maps.

zonca commented 1 year ago

that is best, so you can also run at higher nside