Closed cdeil closed 7 years ago
I like the idea. We had the same kind of wrapper layer in Aladin Desktop, and it proved to be quite useful (and easy) when we decided to switch from one implementation to another
boundaries
method for now and included a test case. Please note that I am using np.testing.assert_array_almost_equal
for testing purposes, is that alright?This exists by now: https://github.com/hipspy/hips/blob/master/hips/utils/healpix.py Of course it will grow for the functionality we need, but there's no concrete action item here. Closing this old issue.
I think it would be a good idea to introduce a
healpix_utils.py
module in thehips
package.We would write a few wrapper functions for
healpy
there. E.g. withhealpy.boundaries
we noticed that it always returnsxyz
, but we wantlon, lat
, and it would give us a place oftest_healpix_utils.py
to add tests that assert that the healpy functionality we need works well.It would also allow us to easily switch to drop the dependency on
healpy
if in the future the small subset ofhealpy
functionality becomes available in Astropy core or another Python package. This would be desirable, because thiships
package is nice for hobby astronomers and kids and many of those are on Windows whichhealpy
doesn't support.I think this would be a small module (just 5 or 10 functions), and we would only add things as we need them in other parts of the hips package (taking the extra time to add docstrings and tests to make sure everything is in order).
@tboch @adl1995 - Thoughts?