使用`healpy`平滑HEALPix贴图:为什么输出贴图显示为“斑驳”?

时间:2015-11-10 13:25:35

标签: python astronomy healpy

我有一张HEALPix全天图,来自AKARI远红外测量仪数据库(公开发布)。我试图使用healpy“平滑”地图,但结果看起来很奇怪。有没有更好的办法?然而,我的问题涉及任何全天空HEALPix地图(即IRAS,Planck,WISE,WMAP)。

我的目标是将这个AKARI地图的有效点扩散函数“平滑”到角度分辨率为1度(原始数据的PSF约为1弧分)。这样我可以将远红外AKARI地图与较低分辨率的微波地图(特别是那些异常微波前景)进行比较。

在下面的示例中,我使用的是地图的降级版本,因此它足够小,可以上传到Github。这意味着像素约为3.42弧分。在PSF平滑之前,我不会这么大地降低像素尺度,但这只是一个例子:

#Load the packages needed for visualization, and HEALPix processing
%matplotlib inline
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
import healpy as hp
import healpy.projector as pro

#Loads the HEALPix .FITS file into an array
map_in = hp.read_map("akari_WideL_1_1024.fits", nest = True)

#Visualizes the all-sky map, before any processing is done.
hp.mollview(map_in, title='AKARI All-Sky Map:', nest = True, norm = 'hist')

#Smoothes the map with a 1-degree FWHM Gaussian (fwhm given in radians).
map_out = hp.sphtfunc.smoothing(map_out, fwhm = 0.017, iter = 1)

#Visualizes the the map after smoothing
hp.mollview(map_out, title='AKARI All-Sky Map:', nest = True, norm = 'hist')

我已经尝试了healpy.sphtfunct.smoothing例程(https://healpy.readthedocs.org/en/latest/generated/healpy.sphtfunc.smoothing.html#healpy.sphtfunc.smoothing).As,据我所知,smoothing将地图转换为球谐波,然后与高斯卷积,然后将其转换回空间地图。

我已经在github存储库中保存了ipython笔记本以及低分辨率.FITS HEALpix映射,这里:

https://github.com/aaroncnb/healpy_smoothing_test

(您需要安装healpy包)

通过在笔记本中运行代码,您可以轻松地看到我遇到的麻烦 - 平滑地图后,会出现一些奇怪的“瑕疵”,好像像素已经迭代地进行了盒式平均,而不是平滑圆形的guassian配置文件。我期望看到的只是输入地图的一个模糊版本。

在平滑完成之前,我认为我遗漏了关于转换为球谐函数的基本信息。

有没有人试图在HEALPix地图上进行这种全天平滑?

我相信另一种选择是将地图转换为标准的矩形阵列,然后进行平滑处理。但是,我仍然对在不离开HEALPix格式的情况下解决问题感到好奇。

1 个答案:

答案 0 :(得分:2)

smoothing似乎仅适用于RINGed地图(这对我来说很有意义,因为这似乎更容易以数学方式处理)。因此,您需要将输入映射转换为RINGed格式:

map_ring = hp.pixelfunc.reorder(map_in, inp='NEST', out='RING')
map_out = hp.sphtfunc.smoothing(map_ring, fwhm = 0.17, iter = 1)
hp.mollview(map_out, title='AKARI All-Sky Map:', nest = False, norm = 'hist')

enter image description here

<小时/> 这个答案来自一些反复试验,因为我在文档中找不到任何明确的内容,而且我没有深入研究源代码(但是,结果如下,可能是通过查看相关的源代码,很容易验证我的假设是否正确。) 或者,您可能想直接询问healpix / healpy人。

(我建议它实际上是文档中的一个缺点:healpy.sphtfunc.smoothing的文档没有提到输入所需的表单。我想这是一个健康的问题/ PR另一天。)

顺便说一句,在Github上创建SSCCE作为笔记本文件的奖励积分! (现在,如果只有StackOverflow也会渲染笔记本。)