8000 Coordsys2euler zyz by keskitalo · Pull Request #399 · healpy/healpy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Coordsys2euler zyz #399

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

Merged
merged 4 commits into from
Jul 8, 2017
Merged

Coordsys2euler zyz #399

merged 4 commits into from
Jul 8, 2017

Conversation

keskitalo
Copy link
Contributor
@keskitalo keskitalo commented Jul 7, 2017

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.

@keskitalo
Copy link
Contributor Author

The issue was raised in #86 thread.

@keskitalo
Copy link
Contributor Author

The latest commit addresses #86 and adds a unit test that compares healpy rotate_alm to values from the Fortran library.

@zonca
Copy link
Member
zonca commented Jul 8, 2017

Awesome, thanks!

@zonca zonca merged commit f5e8151 into healpy:master Jul 8, 2017
@keskitalo keskitalo deleted the coordsys2euler_zyz branch July 8, 2017 05:58
@zonca zonca mentioned this pull request Jan 21, 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

Successfully merging this pull request may close these issues.

2 participants
0