using HealPix
using Plots
resol = Resolution(64)
(theta, phi) = (.01,pi/4)
pixidx = queryDiscRing(resol, theta, phi, .1)
m = HealpixMap{Float32, RingOrder}(resol.nside);
m[pixidx] .= 5;
m[ang2pix(m, theta, phi)] = 8 # Highlight the pixel at the center
plot(m,orthographic, Dict(:center=>(pi/2,pi/2)))
I was not able to follow the logic all the way through the method, but did hack together a version that seems to work based on the IDL implementation (https://healpix.sourceforge.io/html/idl_query_disc.htm)) . However, I did not implement the "fact" functionality which I don't need. I'm happy to share this code if it would be helpful.
Thanks for reporting this! There were tree problems in the implementation of the function, but I think I managed to fix them all. The new release 4.2.0 fixes this.
I was not able to follow the logic all the way through the method, but did hack together a version that seems to work based on the IDL implementation (https://healpix.sourceforge.io/html/idl_query_disc.htm)) . However, I did not implement the "fact" functionality which I don't need. I'm happy to share this code if it would be helpful.