-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add 4pi beam convolution #338
base: master
Are you sure you want to change the base?
Conversation
I must say that some of the pre-commit hooks are driving me quite crazy ... from .beam_convolution import (
add_convolved_sky_to_observations,
) This is what I'm trying to do:
So I have the mentioned changes in my tree.
If I now look at the status, all changes are gone!
As you can see, the pre-commit hooks somehow remove my changes from |
Hi @mreineck, I can help in the high level integration. I can work on this branch and prepare a coherent |
Thank you so much, @paganol, this is a great relief for me! Concerning the precommit hook, I managed to get the crucial information of of
So I need to add the new function to |
I wonder whether we should merge #337 wit this PR, then we can add the signal modulation by the HWP as well (optionally, of course!). The only additional required quantity for this is the time-dependent HWP angle. |
I know that the PR doesn't look like much, but apart from obtaining the missing input data (which, I admit, may be complicated to achieve!), it is pretty much complete. All the numerical details are handled by |
Thank you, @paganol, your interfacing work looks great to me! |
Hi @mreineck, sorry I forgot to update the error messages! No deeper connection 😅... Of course if we find better names for the lower level functions we can change them. About merging the PRs, I totally agree with you. |
Stupid question: is there a place in |
Would |
No, that's perfectly fine, thanks for pointing this out! |
Thanks for te tip, I'll fix this! |
If this has the blessing of @martamonelli, I'm totally happy with it! |
Hi all, @mreineck: I started working on checking what changes for the comparison with beamconv, but I'm not done yet. I'll let you know as soon as I'm done. |
Sorry for the long delay, @martamonelli, and thanks a lot also for te verification work! Having a tested Mueller convolver is a huge milestone! |
@mreineck, I've checked whether the changes proposed by Yuya to Mueller convolver take care of the discrepancies with beamconv and they don't. (This does make sense though: Yuya's formulae for the beam convolution assumes the same conventions as scan map, which seem to be different than the ones used in beamconv.) |
Thank you for looking into this! |
Good news! I made some tests, after having merged master, and having adjusted the interface. The results are consistent with the previous implementation if the beams are rotated by the proper polarization angle.
btw.. potentially we could add a function like this to the code that automatically:
But we can discuss this later.. Regarding the comparison, here the results for Gaussian beams: this for non ideal HWP, assuming for each detector an ideal HWP + a random perturbation I think we accomplished the first part of the validation. @martamonelli, @okayamayu8, @mreineck, @ziotom78, @patanch, I guess we can move to the asymmetric beam validation and also work a bit on the optimization. Last thing.. the ~0.2% normalization mismatch in polarization is still there.. whatever I do.. any idea? |
Just curious, do you have an intuition why there is so much ringing in the polarization maps (and not in T) for nonideal HWP? |
Hi @mreineck, I also thought it was ringing at first, but I believe it's actually T-to-P leakage caused by the coupling of a non-ideal HWP and the scanning strategy. When I feed (0, Q, U) into the simulation, this is the result I get: Probably the ringing-like pattern is due to the scanning strategy.. does that sound convincing to you? |
I did think of a purely scanning strategy related issue, i.e. that the equation system that needs to be solved for Q/U was ill-conditioned in some pixels. But that would have affected the ideal HWP as well, I guess. The leakage theory sounds much more convincing to me, thanks! |
I still have absolutely no clue about the normalization issue; this almost feels as if there was a |
Yeah, I was checking for that too, but I couldn’t find anything. |
If `strict_typing` is `True` (the default), mismatches in the floating-point type of the pointings will trigger a `TypeError` exception instead of silently allocating a new array and performing the conversion.
… into beam_comvolution_2
… into beam_comvolution_2
This aims to add 4pi convolution with non-axisymmetric beams (very similar to the "conviqt" functionality in TOAST, but more accurate and hopefully also quicker).
Currently this cannot be fully implemented because the code requires
It should be possible to load the beams from files for testing purposes, using
healpy.read_alm
, but I'm not sure how to provide the corresponding file names in the input parameters and how they would be passed to the beam convolution module.Unfortunately I'm not very familiar with the simulation framework and the really large set of tools it uses. I'm happy to help tweaking and debugging the underlying algorithms, but I need help from experts with the high-level integration.