galsci / pysm

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

Porting WebSky extragalactic models to PySM 3 #120

Closed zonca closed 2 years ago

zonca commented 2 years ago

Currently the WebSky models are included in the so_pysm_models package:

https://so-pysm-models.readthedocs.io/en/latest/models.html#websky

The package is already based on PySM 3, so it should not be too difficult to move the functionality in PySM 3 proper.

However, it would be useful to first check if there is any update in WebSky itself, like maps from new simulations, or maps at resolution higher than N_side 4096.

@marcelo-alvarez has there been any update? or is there an update coming soon we should wait for?

/cc @giuspugl @brandonshensley @seclark

marcelo-alvarez commented 2 years ago

@zonca yes there should be an update coming soon, which @xzackli is coordinating / running. There should be the addition of radio sources, update of tSZ and CIB, and likely N_side of 8192.

zonca commented 2 years ago

@xzackli do you have an estimate of when the new websky will be available?

xzackli commented 2 years ago

@zonca We have new maps, and I"d like to set a target of Wednesday, August 24. Most of it is on disk at NERSC -- I briefly looked into writing up a pysm PR, do you have suggestions?

zonca commented 2 years ago

@xzackli we should mostly just port from so_pysm_models, adapting the code for the new maps:

https://github.com/simonsobs/so_pysm_models/blob/master/so_pysm_models/extragalactic.py

also the maps should be in the pysm repository at NERSC:

/global/project/projectdirs/cmb/www/pysm-data
xzackli commented 2 years ago

Seems sensible, looking at this now.

xzackli commented 2 years ago

@zonca a quick clarifying question: of course I don't have write permission to /global/project/projectdirs/cmb/www/pysm-data, should I just direct you to a location in scratch for you to copy over?

zonca commented 2 years ago

@zonca a quick clarifying question: of course I don't have write permission to /global/project/projectdirs/cmb/www/pysm-data, should I just direct you to a location in scratch for you to copy over?

yes, right

zonca commented 2 years ago

@xzackli any update on this?

giuspugl commented 2 years ago

we have released IQU maps of Radio sources painted onto Websky halos, here I 'd say that for time being as we 're supposed to run several simulations for SO and Litebird asap, we can employ the approach we have previously used for CIB, i.e. interpolating maps at different frequencies , see https://so-pysm-models.readthedocs.io/en/latest/models.html#websky. Actually, we can allow a finer interpolation than the CIB one as there're ~40 maps in the range from 18 - 900 GHz all at nside= 4096 reso. Not sure though how much is needed to got for radio sources up to 900 GHz. How does that sound ?

zonca commented 2 years ago

sure @giuspugl, https://pysm3.readthedocs.io/en/latest/api/pysm3.InterpolatingComponent.html#pysm3.InterpolatingComponent is already in PySM 3.

Does this work use the new Websky release? Do newer CIB maps are available yet?

xzackli commented 2 years ago

We have CIB frequency maps at

/global/cscratch1/sd/xzackli/cib_sources/

and radio maps in the directory Giuseppe listed. I'm still porting over the old pysm code to PySM3 by inheriting from the InterpolatingComponent, but I was worried about validating these CIB maps.

zonca commented 2 years ago

thanks @xzackli, the so-pysm-models code was already based on the PySM3 interpolating component, so changes should be minor.

giuspugl commented 2 years ago

@xzackli What are the differences of the new CIB maps you're validating,wrt the ones employed here, which i believe come from WEbsky Stein et al.2020 ?

Does this work use the new Websky release?

@zonca ain't sure what you mean here by new release, yes they used the relatively recent Websky halo distribution from Stein et al.2020 . To my knowledge there is just one halo light-cone produced by websky abd we painted clusters, IR and radio galaxies on top of those haloes .

xzackli commented 2 years ago

They have a different frequency normalization (as discussed in https://github.com/xzackli/XGPaint.jl/issues/7), which I believe behave a bit better in terms of redshift evolution. There's not much else, but I also want to check on the frequency map power spectra and maybe adjust some parameters there.

giuspugl commented 2 years ago

I believe behave a bit better in terms of redshift evolution

Thanks @xzackli ! I checked the redshift evolution by including the new normalization and it left kinda the same the redshift evolution, It's the Shang et al. 2012 prescription that is mostly affecting that..

zonca commented 2 years ago

ok, thanks @xzackli so I'll wait for a pull request, I can then also copy all the input data to the pysm-data folder at NERSC.

zonca commented 2 years ago

see #129