-
Notifications
You must be signed in to change notification settings - Fork 17
New Map/Harmonic Containers & ducc0 Integration
#479
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
base: master
Are you sure you want to change the base?
Conversation
…in input production
|
I added a new module, In detail, compared to
Let me know what you think. I can easily add other features or change implementation details based on your feedback. One design question: |
For some reason commits were passed without the pre-commit filtering, so some errors passed through
This PR introduces a new data model and integrates
ducc0for high-accuracy operations. It includes several breaking changes.1. New Module:
maps_and_harmonics.pyWe introduced a centralized module for map and harmonic operations, featuring two new data classes:
HealpixMap: A container for map data that carriesunitandcoordinatemetadata.SphericalHarmonics: Updated to includeunitandcoordinatefields alongside coefficients.2. Robust
scan_mapInterface (Breaking Change)We aligned
scan_mapandconvolve_skywith the map-making interfaces.HealpixMaporSphericalHarmonicsobjects.3.
ducc0Wrapper FunctionsWe added
ducc0wrappers tomaps_and_harmonics.pyfor efficient transforms:interpolate_alm: Synthesizes signal at arbitrary detector positions (viaducc0.sht.synthesis_general).pixelize_alm: Convertsducc0.sht.synthesis).estimate_alm: Converts HEALPix mapducc0.sht.adjoint_synthesis).4. Improved interpolation in
scan_mapThe
scan_mapinterpolation logic has been improved removing the explicit interpolation flag, now:HealpixMapis passed, the code performs direct pixel lookup (ang2pix).SphericalHarmonicsare passed, the code automatically usesinterpolate_alm. This replaces the linear interpolation with exact synthesis.5. Updates to
units.py(Breaking Change)We refactored
units.pyto standardize naming conventions and expand functionality:constants.pyhave been renamed. In the future we should make the naming convention more uniform.6.
MbsOutput UpdatesThe
Mbsclass has been updated to fully utilize the new containers. It now outputs eitherHealpixMaporSphericalHarmonicsobjects, ensuring that all generated maps and alms automatically carry the correctunitandcoordinatemetadata.7. Spectral Utilities (Prep for #425)
To support future work on
Mbs, we added utility functions:synthesize_alm: Generatescompute_cl: Computes angular power spectra (⏳ Remaining Tasks / Future Work
There are still a few things that need to be addressed:
hwp_harmonic: The interface for pointing and metadata in this module can be improved (though it currently passes tests). Here I can try to improve it and then @mj-gomes can check it.scan_map. This should be straightforward to add now.Regarding the connection with PR #425
It might be strategic to unify the two activities. I propose merging PR #425 into this branch and continuing the development here. This would ensure that the Mbs rework is immediately aligned with the new data containers and ducc0 integration.
What do you think? @ziotom78 @ggalloni @mj-gomes