What we want to do here is to do a plotting of the Stripe82 region. For such, we need to
In [2]:
# Sky coordinates (limits) for stripe82
ra_deg = [-50,60]
dec_deg = [-1.25,1.25]
# Let's define the limits for our plot also
#ra_lim = [-90,90]
#dec_lim = [-3,3]
In [27]:
# Let's do it now with the Healpix python wrapper (Healpy)
%matplotlib inline
import matplotlib.pyplot as plt
import healpy as hp
import numpy as np
NSIDE=64
mapp = np.arange(hp.nside2npix(NSIDE))
hp.mollview(mapp,nest=True)
plt.savefig('moc_healpy_nest_full.svg')
hp.graticule()
In [26]:
plt.cla()
plt.clf()
import healpy as hp
import random
import numpy as np
NSIDE=64
npix = hp.nside2npix(NSIDE)
mapp = np.arange(npix)
pix_min = random.randint(0,npix)
pix_max = random.randint(pix_min,npix)
mask = np.zeros(mapp.shape).astype(bool)
mask[pix_min:pix_max] = 1
mapp[~mask] = 0
hp.mollview(mapp,nest=True)
plt.savefig('moc_healpy_nest_maskrandom.svg')
hp.graticule()
In [ ]: