【问题标题】:Smoothing HEALPix maps with `healpy`: Why does the output map appear "patchy"?使用“healpy”平滑 HEALPIx 贴图:为什么输出贴图看起来“不完整”?
【发布时间】:2016-02-11 09:28:31
【问题描述】:

我有一张来自 AKARI Far Infrared Surveyor 数据库(公开发布)的 HEALPix 全天地图。我尝试使用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 将地图转换为球谐函数,然后与高斯进行卷积,然后将其转换回空间地图。

我已将 ipython 笔记本以及低分辨率 .FITS HEALpix 地图保存在 github 存储库中,此处:

https://github.com/aaroncnb/healpy_smoothing_test

(您需要安装 healpy 软件包)

通过在笔记本中运行代码,您可以轻松地可视化我遇到的问题 - 在对地图进行平滑处理后,会出现一些奇怪的“伪影”,就好像像素是经过迭代箱平均处理的,而不是使用平滑处理的圆形高斯轮廓。我期望看到的只是输入地图的模糊版本。

我认为在平滑完成之前,我缺少关于转换为球谐函数的一些基本知识。

以前有没有人尝试过在 HEALPix 地图上进行这种全天空平滑?

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

【问题讨论】:

    标签: python astronomy healpy


    【解决方案1】:

    看来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')
    


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

    (我认为这实际上是文档中的一个缺点:healpy.sphtfunc.smoothing 的文档没有提到输入所需的表格。我想这是一个治疗问题/改天公关。)

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-12
      • 1970-01-01
      • 2018-11-06
      • 1970-01-01
      相关资源
      最近更新 更多