Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a target_nside parameter to the smoothing function #91

Closed
zonca opened this issue Oct 20, 2021 · 7 comments
Closed

Provide a target_nside parameter to the smoothing function #91

zonca opened this issue Oct 20, 2021 · 7 comments

Comments

@zonca
Copy link
Member

zonca commented Oct 20, 2021

  • We need to provide guidelines on how to properly use the code, for example if people want maps at N_side 512, they should run the models at N_side 1024 and transform to target N_side. As we are smoothing at the end, we can easily provide a target_nside parameter, so people can smooth a 1024 map and get a 512 output without transforming twice.

Originally posted by @zonca in #90 (comment)

@zonca
Copy link
Member Author

zonca commented Oct 21, 2021

I'm already doing map2alm and alm2map in:

https://github.com/galsci/pysm/blob/main/pysm3/models/template.py#L99-L152

so it is as easy as providing an extra parameter target_nside and use that for alm2map

@zonca
Copy link
Member Author

zonca commented Oct 21, 2021

from @seclark:

Would make sense to me to let people configure this (with guidelines) but default to running at 2048 for output maps with N_side <= 1024, and default to run at 2*N_side for output maps with 1024 <= N_side<= 4096. i.e., default to our recommended choices.

@zonca
Copy link
Member Author

zonca commented Oct 28, 2021

suggestion my Martin Reinecke, what if we used Gauss Legendre (GL) pixelization internally?

#92 (comment)

So:

  • input is Alms
  • we transform to GL maps cheaply
  • do evaluation of the model in GL pixel space
  • map2alm
  • beam smoothing
  • alm2map HEALPix

I anyone used GL pixelization before, please jump in. Otherwise, I'll give it a try myself using ducc

@zonca
Copy link
Member Author

zonca commented Nov 3, 2021

thanks to @mreineck providing an example of using ducc0 and GL pixels, I made a comparison focused on PySM, I posted the notebook here where it is a bit easier to read (click on button to get the notebook and try it yourself):

https://zonca.dev/2021/11/healpix-gauss-legendre-pysm.html

@mreineck
Copy link

mreineck commented Nov 3, 2021

Good to see that this works well!

Just one word of caution: since the rings of a GL grid are not equidistant in theta, the GL map plots in the notebook can only be a rough approximantion to the real map; doing this accurately requires using the exact coordinates of every ring (obtainable, e.g., via ducc0.misc.GL_thetas()) and telling them to matplotlib.

@zonca
Copy link
Member Author

zonca commented Nov 11, 2021

will try with a more anisotropic map, for example the GNILC dust maps after adding small scales (#97), which is one of our use cases. We want to verify if error in HEALPix goes higher in such maps.

@zonca
Copy link
Member Author

zonca commented Oct 6, 2022

@seclark @brandonshensley I have added a section in the docs about dealing with Nside, see the commit reference above here.

@zonca zonca closed this as completed in 74e34e2 Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants