Skip to content

Instantly share code, notes, and snippets.

@zonca
Created July 14, 2011 09:14
Show Gist options
  • Save zonca/1082146 to your computer and use it in GitHub Desktop.
Save zonca/1082146 to your computer and use it in GitHub Desktop.
query_disc issue
NSIDE=8
vec = [ 0.17101007, 0.03015369, 0.98480775]
qd=healpy.query_disc(NSIDE, vec, 6, deg=True, nest=False)
m = np.zeros(healpy.nside2npix(NSIDE))
m[qd]=1
healpy.mollview(m)
print(qd)
#array([ 3, 0, 11, 4])
#IDL
#HIDL> query_disc, 8, [ 0.17101007, 0.03015369, 0.98480775],6,listpix,/DEG,NESTED=0
#HIDL> print,listpix
# 4
#HIDL> query_disc, 8, [ 0.17101007, 0.03015369, 0.98480775],6,listpix,/DEG,NESTED=0,/inclusive
#HIDL> print,listpix
# 0 3 4 5 11 12 13 23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment