In [2]:
%matplotlib inline
#from IPython.external import mathjax; mathjax.install_mathjax()
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
import healpy as hp
import healpy.projector as pro
import pyfits

In [3]:



NSIDE = 4096
ORDERING = NESTED in fits file
Ordering converted to RING

In [3]:
###Make degraded versions of AKARI FIS 65micron Map
##Read-in and Display original map
map_in = hp.read_map("../AKARI_HEALPix_orig/4096_nside/akari_9_1_4096.fits")
hp.mollview(map_in, title='AKARI 9um, Nside4096, All-Sky Map:', norm = 'hist')
##Make and Display NSIDE 2048 Map
map_out = hp.pixelfunc.ud_grade(map_in,nside_out = 2048)
hp.mollview(map_out, title='AKARI 9um, Nside2048, All-Sky Map:', norm = 'hist')
#Write NSIDE 2048 Map
hp.fitsfunc.write_map("../AKARI_HEALPix_orig/2048_nside/akari_9_1_2048.fits", map_out)
##Make and Display NSIDE 1024 Map
map_out = hp.pixelfunc.ud_grade(map_in,nside_out = 1024)
hp.mollview(map_out, title='AKARI 9um, Nside1024, All-Sky Map:', norm = 'hist')
#Write NSIDE 1024 Map
hp.fitsfunc.write_map("../AKARI_HEALPix_orig/1024_nside/akari_9_1_1024.fits", map_out)
#Smooth the NSIDE 1024 Map with a 1-degFWHM-gaussian beam
map_out = hp.sphtfunc.smoothing(map_out, fwhm = 0.017, iter = 1)
#Display and write the smoothed map
hp.mollview(map_out, title='AKARI 9um, Nside1024-1Deg.Smoothed, All-Sky Map:', nest = False, norm = 'hist')
hp.write_map("../AKARI_HEALPix_orig/1024_nside/akari_9_1_1024_1dres.fits",map_out)


NSIDE = 4096
ORDERING = NESTED in fits file
Ordering converted to RING
/home/aaronb/.local/lib/python2.7/site-packages/healpy/pixelfunc.py:267: RuntimeWarning: invalid value encountered in less_equal
  return np.absolute(m - badval) <= atol + rtol * np.absolute(badval)
/work1/users/aaronb/Softbrary/Anaconda/lib/python2.7/site-packages/numpy/ma/core.py:2245: RuntimeWarning: invalid value encountered in less_equal
  mabs(xnew - value), atol + rtol * mabs(value))
/work1/users/aaronb/Softbrary/Anaconda/lib/python2.7/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):
WARNING: AstropyDeprecationWarning: The new_table function is deprecated and may be removed in a future version.
        Use :meth:`BinTableHDU.from_columns` for new BINARY tables or :meth:`TableHDU.from_columns` for new ASCII tables instead. [astropy.utils.decorators]
WARNING:astropy:AstropyDeprecationWarning: The new_table function is deprecated and may be removed in a future version.
        Use :meth:`BinTableHDU.from_columns` for new BINARY tables or :meth:`TableHDU.from_columns` for new ASCII tables instead.
WARNING: AstropyDeprecationWarning: The use of header.update() to add new keywords to a header is deprecated.  Instead, use either header.set() or simply `header[keyword] = value` or `header[keyword] = (value, comment)`.  header.set() is only necessary to use if you also want to use the before/after keyword arguments. [astropy.io.fits.header]
WARNING:astropy:AstropyDeprecationWarning: The use of header.update() to add new keywords to a header is deprecated.  Instead, use either header.set() or simply `header[keyword] = value` or `header[keyword] = (value, comment)`.  header.set() is only necessary to use if you also want to use the before/after keyword arguments.
Sigma is 24.817903 arcmin (0.007219 rad) 
-> fwhm is 58.441695 arcmin
Sigma is 0.000000 arcmin (0.000000 rad) 
-> fwhm is 0.000000 arcmin

In [4]:
###Make degraded versions of AKARI FIS 65micron Map
##Read-in and Display original map
map_in = hp.read_map("../AKARI_HEALPix_orig/4096_nside/akari_65_1_4096.fits")
hp.mollview(map_in, title='AKARI 65um, Nside4096, All-Sky Map:', norm = 'hist')
##Make and Display NSIDE 2048 Map
map_out = hp.pixelfunc.ud_grade(map_in,nside_out = 2048)
hp.mollview(map_out, title='AKARI 65um, Nside2048, All-Sky Map:', norm = 'hist')
#Write NSIDE 2048 Map
hp.fitsfunc.write_map("../AKARI_HEALPix_orig/2048_nside/akari_65_1_2048.fits", map_out)
##Make and Display NSIDE 1024 Map
map_out = hp.pixelfunc.ud_grade(map_in,nside_out = 1024)
hp.mollview(map_out, title='AKARI 65um, Nside1024, All-Sky Map:', norm = 'hist')
#Write NSIDE 1024 Map
hp.fitsfunc.write_map("../AKARI_HEALPix_orig/1024_nside/akari_65_1_1024.fits", map_out)
#Smooth the NSIDE 1024 Map with a 1-degFWHM-gaussian beam
map_out = hp.sphtfunc.smoothing(map_out, fwhm = 0.017, iter = 1)
#Display and write the smoothed map
hp.mollview(map_out, title='AKARI 65um, Nside1024-1Deg.Smoothed, All-Sky Map:', nest = False, norm = 'hist')
hp.write_map("../AKARI_HEALPix_orig/1024_nside/akari_65_1_1024_1dres.fits",map_out)


NSIDE = 4096
ORDERING = NESTED in fits file
Ordering converted to RING
Sigma is 24.817903 arcmin (0.007219 rad) 
-> fwhm is 58.441695 arcmin
Sigma is 0.000000 arcmin (0.000000 rad) 
-> fwhm is 0.000000 arcmin

In [5]:
###Make degraded versions of AKARI FIS WideS Map
##Read-in and Display original map
map_in = hp.read_map("../AKARI_HEALPix_orig/4096_nside/akari_WideS_1_4096.fits")
hp.mollview(map_in, title='AKARI WideS, Nside4096, All-Sky Map:', norm = 'hist')
##Make and Display NSIDE 2048 Map
map_out = hp.pixelfunc.ud_grade(map_in,nside_out = 2048)
hp.mollview(map_out, title='AKARI WideS, Nside2048, All-Sky Map:', norm = 'hist')
#Write NSIDE 2048 Map
hp.fitsfunc.write_map("../AKARI_HEALPix_orig/2048_nside/akari_WideS_1_2048.fits", map_out)
##Make and Display NSIDE 1024 Map
map_out = hp.pixelfunc.ud_grade(map_in,nside_out = 1024)
hp.mollview(map_out, title='AKARI WideS, Nside1024, All-Sky Map:', norm = 'hist')
#Write NSIDE 1024 Map
hp.fitsfunc.write_map("../AKARI_HEALPix_orig/1024_nside/akari_WideS_1_1024.fits", map_out)
#Smooth the NSIDE 1024 Map with a 1-degFWHM-gaussian beam
map_out = hp.sphtfunc.smoothing(map_out, fwhm = 0.017, iter = 1)
#Display and write the smoothed map
hp.mollview(map_out, title='AKARI WideS, Nside1024-1Deg.Smoothed, All-Sky Map:', nest = False, norm = 'hist')
hp.write_map("../AKARI_HEALPix_orig/1024_nside/akari_WideS_1_1024_1dres.fits",map_out)


NSIDE = 4096
ORDERING = NESTED in fits file
Ordering converted to RING
Sigma is 24.817903 arcmin (0.007219 rad) 
-> fwhm is 58.441695 arcmin
Sigma is 0.000000 arcmin (0.000000 rad) 
-> fwhm is 0.000000 arcmin

In [6]:
###Make degraded versions of AKARI FIS WideL Map
##Read-in and Display original map
map_in = hp.read_map("../AKARI_HEALPix_orig/4096_nside/akari_WideL_1_4096.fits")
hp.mollview(map_in, title='AKARI WideL, Nside4096, All-Sky Map:', norm = 'hist')
##Make and Display NSIDE 2048 Map
map_out = hp.pixelfunc.ud_grade(map_in,nside_out = 2048)
hp.mollview(map_out, title='AKARI WideL, Nside2048, All-Sky Map:', norm = 'hist')
#Write NSIDE 2048 Map
hp.fitsfunc.write_map("../AKARI_HEALPix_orig/2048_nside/akari_WideL_1_2048.fits", map_out)
##Make and Display NSIDE 1024 Map
map_out = hp.pixelfunc.ud_grade(map_in,nside_out = 1024)
hp.mollview(map_out, title='AKARI WideL, Nside1024, All-Sky Map:', norm = 'hist')
#Write NSIDE 1024 Map
hp.fitsfunc.write_map("../AKARI_HEALPix_orig/1024_nside/akari_WideL_1_1024.fits", map_out)
#Smooth the NSIDE 1024 Map with a 1-degFWHM-gaussian beam
map_out = hp.sphtfunc.smoothing(map_out, fwhm = 0.017, iter = 1)
#Display and write the smoothed map
hp.mollview(map_out, title='AKARI WideL, Nside1024-1Deg.Smoothed, All-Sky Map:', nest = False, norm = 'hist')
hp.write_map("../AKARI_HEALPix_orig/1024_nside/akari_WideL_1_1024_1dres.fits",map_out)


NSIDE = 4096
ORDERING = NESTED in fits file
Ordering converted to RING
Sigma is 24.817903 arcmin (0.007219 rad) 
-> fwhm is 58.441695 arcmin
Sigma is 0.000000 arcmin (0.000000 rad) 
-> fwhm is 0.000000 arcmin

In [7]:
###Make degraded versions of AKARI FIS 160um Map
##Read-in and Display original map
map_in = hp.read_map("../AKARI_HEALPix_orig/4096_nside/akari_160_1_4096.fits")
hp.mollview(map_in, title='AKARI 160 um, Nside4096, All-Sky Map:', norm = 'hist')
##Make and Display NSIDE 2048 Map
map_out = hp.pixelfunc.ud_grade(map_in,nside_out = 2048)
hp.mollview(map_out, title='AKARI 160 um, Nside2048, All-Sky Map:', norm = 'hist')
#Write NSIDE 2048 Map
hp.fitsfunc.write_map("../AKARI_HEALPix_orig/2048_nside/akari_160_1_2048.fits", map_out)
##Make and Display NSIDE 1024 Map
map_out = hp.pixelfunc.ud_grade(map_in,nside_out = 1024)
hp.mollview(map_out, title='AKARI 160 um, Nside1024, All-Sky Map:', norm = 'hist')
#Write NSIDE 1024 Map
hp.fitsfunc.write_map("../AKARI_HEALPix_orig/1024_nside/akari_160_1_1024.fits", map_out)
#Smooth the NSIDE 1024 Map with a 1-degFWHM-gaussian beam
map_out = hp.sphtfunc.smoothing(map_out, fwhm = 0.017, iter = 1)
#Display and write the smoothed map
hp.mollview(map_out, title='AKARI 160 um, Nside1024-1Deg.Smoothed, All-Sky Map:', nest = False, norm = 'hist')
hp.write_map("../AKARI_HEALPix_orig/1024_nside/akari_160_1_1024_1dres.fits",map_out)


NSIDE = 4096
ORDERING = NESTED in fits file
Ordering converted to RING
Sigma is 24.817903 arcmin (0.007219 rad) 
-> fwhm is 58.441695 arcmin
Sigma is 0.000000 arcmin (0.000000 rad) 
-> fwhm is 0.000000 arcmin

In [ ]: