-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support arrays for nside #66
Comments
In principle there's no reason we can't make the Cython wrappers take a vector nside and it would be easy. My main concern is that we need to keep it efficient for the scalar case and avoid creating an unnecessary array for nside. Could you explain why gammapy needs this, to see if there is another way we can do this efficiently? |
I guess what I'm thinking is that for now it wouldn't be that inefficient to simply call the astropy-healpix routines once for each nside value, since there are only 30 possible nside values. |
Actually, maybe before worrying we should just try and change the Cython wrappers to use vector nside values and then if a scalar nside is passed in |
I need this too because I use healpy for supporting NUNIQ indexing. |
As commented by @lpsinger in #71 (comment) - this should still be implemented, but we should change to |
One of the issues trying to switch Gammapy over to using astropy-healpix is that we call
ang2pix
with an array of nside values:https://gist.github.com/cdeil/754b76dc7f22511a5504fbbe74dccd62#file-gistfile1-txt-L989
Minimum test case that works with healpy
but doesn't work with
astropy_healpix.healpy
(casting to numpy arrays is missing):and also support for array-valued
nside
is missing:I didn't look yet how much work it would be to make this work for
ang2pix
or possibly also similar other functions, I'm just going through and see what's missing for Gammapy today.The text was updated successfully, but these errors were encountered: