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

Have an lmax keyword #18

Closed
DanielLenz opened this issue Sep 22, 2018 · 8 comments
Closed

Have an lmax keyword #18

DanielLenz opened this issue Sep 22, 2018 · 8 comments

Comments

@DanielLenz
Copy link
Contributor

DanielLenz commented Sep 22, 2018

Apologies for spamming you guys with issues, I'm just really looking forward to using NaMaster.

Did you have any plans to introduce an lmax keyword? For most use cases, I don't see that people require the default lmax of 3*nside.

Moreover, the beam for e.g. Planck is only published for l ~< 4000, which would not suffice for analyses at nside=2048.

I'm currently testing pymaster with Planck data, and just initiating via nmt.NmtField() takes 1-2 min per field, plus 30+ min to do nmt.compute_full_master() on a high-end 2016 Macbook. Does that match your experience, or should it be faster?

@fjaviersanchez
Copy link
Collaborator

@DanielLenz. Sorry, I just saw this. I assume you are using nside=2048, is this right? Are you including foregrounds or just the raw data? Is this for just temperature of temp+polarization? I have to check but if it's temp+polarization auto and cross-correlations for nside=2048, ~30 minutes sounds about right with ~8 threads?

@damonge
Copy link
Collaborator

damonge commented Sep 26, 2018

These times sound about right to me (especially if the 30min include computing the mode-coupling matrix). I just checked that a simple healpy.alm2map on 2048 maps takes about 2min on my own laptop (which I'd also call high-end).

About lmax, this is something that is half-implemented (at the C level, but not visible in python), and which I wanted to include as an option once it's better tested.

@DanielLenz
Copy link
Contributor Author

DanielLenz commented Sep 26, 2018

Thanks for your replies!

Are you including foregrounds or just the raw data? Is this for just temperature of temp+polarization?

I just tested this with the Planck CMB map, nside=2048, temperature only, no foregrounds. I might just be spoiled by the PolSpice implementation, which runs in ~< 1min. It is, however, only approximate and has several other issues that make me really want to switch to nmt, and I'll gladly accept the slightly longer runtime.

Once we have the optional lmax keyword and can set this to ~2048, the computation of the mode-coupling matrix should go down by a factor of ~(3*2048/2048)^3 = 27 to ~1 minute, which is totally acceptable.

Please feel free to close this if you want, but it would be great if could update this thread once an lmax branch is available.

@damonge
Copy link
Collaborator

damonge commented Sep 27, 2018

@DanielLenz now that I think about it, this may be already possible. If you pass an NmtBin structure that only contains bandpowers up to ell=2048, the computation of the MCM should only go up to that. Let me know if this does or doesn't work!

Note however that you probably want to throw away the last bin or two, since the mode coupling will not be correctly represented for those due to the missing multipoles.

@DanielLenz
Copy link
Contributor Author

That works perfectly, thank you! It might be worth to add this to the docs, even though it's hinted at in the NmtBin documentation.

@damonge
Copy link
Collaborator

damonge commented Sep 28, 2018

OK, great. Will update the docs. Can I check that you've seen that this scales as expected?

@DanielLenz
Copy link
Contributor Author

Just did a quick analysis, it appears to scale better than lmax^3 for lmax < 2000. I could run larger values of lmax later as well.

nmt_lmax_scaling

@damonge
Copy link
Collaborator

damonge commented Sep 28, 2018

Awesome, thanks a lot @DanielLenz!

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

3 participants