Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The rotate_alm method in healpy/src/_sphtools.pyx mentions a helper routine, coordsys2euler_zyz that can be used to obtain the euler angles corresponding to a coordinate system transformation. However, the routine does not exist in Healpy but is rather implemented only in the Healpix Fortran library. This pull request implements the missing routine.
The angles are needed because the Cython interface does not expose the rotation matrix version of rotate_alm in the C++ library. The rotation matrices are a separate class in the C++ library that would need to be exported to use the C++ routines directly. It is much more straightforward to convert the rotation matrices into Euler angles in the Python side.
This pull request also adds the "overwrite" keyword to write_cl (to mirror write_map), generalizes the accepted inputs to write_cl to include 2D arrays and fixes trivial white space issues in the affected files.
The unit tests in coordsys2euler_zyz were checked against the Fortran library.