You can even read more on healpy's documentation!
In [1]:
%matplotlib inline
In [2]:
import matplotlib.pyplot as plt
In [21]:
import numpy as np
import healpy as hp
NSIDE = 32
m = np.arange(hp.nside2npix(NSIDE))
hp.mollview(m, title="Mollview image RING")
In [4]:
hp.mollview(m, nest=True, title="Mollview image NESTED")
In [5]:
map_I = hp.read_map('data/LFI_SkyMap_044-BPassCorrected-field-IQU_0256_R2.01_full.fits', field=0)
In [22]:
hp.mollview(map_I, title='Histogram equalized Ecliptic', norm='hist', min=-0.1, max=0.1, xsize=2000)
# hp.graticule()
In [7]:
map_Q = hp.read_map('data/LFI_SkyMap_044-BPassCorrected-field-IQU_0256_R2.01_full.fits', field=1)
In [8]:
hp.mollview(map_Q, title='Histogram equalized Ecliptic', norm='hist', min=-0.1, max=0.1, xsize=2000)
# hp.graticule()
In [9]:
map_U = hp.read_map('data/LFI_SkyMap_044-BPassCorrected-field-IQU_0256_R2.01_full.fits', field=2)
In [10]:
hp.mollview(map_U, title='Histogram equalized Ecliptic', norm='hist', min=-0.1, max=0.1, xsize=2000)
# hp.graticule()
In [11]:
hp.gnomview(map_I, rot=[0.0,0.3], title='GnomView', unit='mK', format='%.2g')
hp.gnomview(map_Q, rot=[0.0,0.3], title='GnomView', unit='mK', format='%.2g')
hp.gnomview(map_U, rot=[0.0,0.3], title='GnomView', unit='mK', format='%.2g')
In [12]:
cl_I = hp.anafast(map_I)
cl_Q = hp.anafast(map_Q)
cl_U = hp.anafast(map_U)
In [13]:
ell = np.arange(len(cl_I))
In [14]:
plt.figure(figsize=(5,5))
plt.plot(ell, ell * (ell+1) * cl_I)
plt.xlabel('ell'); plt.ylabel('ell(ell+1)cl_I'); plt.grid()
# hp.write_cl('cl_I.fits', cl_I)
plt.figure(figsize=(5,5))
plt.plot(ell, ell * (ell+1) * cl_Q)
plt.xlabel('ell'); plt.ylabel('ell(ell+1)cl_Q'); plt.grid()
# hp.write_cl('cl_Q.fits', cl_Q)
plt.figure(figsize=(5,5))
plt.plot(ell, ell * (ell+1) * cl_U)
plt.xlabel('ell'); plt.ylabel('ell(ell+1)cl_U'); plt.grid()
# hp.write_cl('cl_U.fits', cl_U)
In [15]:
map_I_smoothed = hp.smoothing(map_I, fwhm=np.radians(2.0))
hp.mollview(map_I_smoothed, coord=['G','E'], title='Histogram equalized Ecliptic', norm='hist', min=-0.1, max=0.1, xsize=2000)
In [16]:
hp.gnomview(map_I_smoothed, rot=[0.0,0.3], title='GnomView', unit='mK', format='%.2g')
In [17]:
map_Q_smoothed = hp.smoothing(map_Q, fwhm=np.radians(2.0))
hp.mollview(map_Q_smoothed, coord=['G','E'], title='Histogram equalized Ecliptic', norm='hist', min=-0.1, max=0.1, xsize=2000)
In [18]:
hp.gnomview(map_Q_smoothed, rot=[0.0,0.3], title='GnomView', unit='mK', format='%.2g')
In [19]:
map_U_smoothed = hp.smoothing(map_U, fwhm=np.radians(2.0))
hp.mollview(map_U_smoothed, coord=['G','E'], title='Histogram equalized Ecliptic', norm='hist', min=-0.1, max=0.1, xsize=2000)
In [20]:
hp.gnomview(map_U_smoothed, rot=[0.0,0.3], title='GnomView', unit='mK', format='%.2g')