<p>我断断续续地找了几个月,找到了另一个可能的解决办法。我还没有做过很多测试,所以请小心!在</p>
<p>索尔的建议是很好的解决办法在</p>
<p>基本上,您将<code>healpy.mollview</code>(<code>gnomview</code>,<code>cartview</code>,和{<cd4>}的功能)与<code>reproject</code>包(<a href="http://reproject.readthedocs.org/en/stable/" rel="nofollow noreferrer">http://reproject.readthedocs.org/en/stable/</a>)中的<code>reproject_to_healpix</code>函数的功能相结合。在</p>
<p>得到的地图适合我的角度比例,但我不能说与其他方法相比转换有多精确。在</p>
<p><strong>-基本大纲</strong></p>
<p><strong>第1步:</strong>读入地图并通过<code>cartview</code>生成矩形数组。正如索尔在上面指出的,这也是一种轮换方式。如果您只是在做一个标准的旋转/坐标转换,那么您只需要<code>coord</code>关键字。从天体坐标到银河系坐标,设置<code>coord = ['C','G']</code></p>
<pre><code>map_Gal = hp.cartview(map_Cel, coord=['C','G'], return_projected_map=True, xsize=desired_xsize, norm='hist',nest=False)
</code></pre>
<p><strong>第2步:</strong>编写模板all sky FITS标题(如下例所示)。我写我的有相同的<em>平均</em>像素比例作为我想要的HEALPix地图。在</p>
<p><strong>第3步:</strong>使用<code>reproject.transform_to_healpix</code></p>
<p><code>reproject</code>包含一个函数,用于将“normal”数组(或FITS文件)映射到HEALPix投影中。再加上返回healpy.mollview/cartview/orthview/gnomview,你可以将一个坐标系(天体)的HEALPix地图旋转到另一个坐标系(银河系)。在</p>
^{pr2}$
<p>本质上,归结为这两个命令。但是,<strong>您必须制作一个模板标题</strong>,给出与您想要制作的中间层全天地图相对应的像素比例和大小。在</p>
<p><strong>-完整的工作示例(iPython笔记本格式+FITS示例数据)</strong></p>
<p><a href="https://github.com/aaroncnb/healpix_coordtrans_example/tree/master" rel="nofollow noreferrer">https://github.com/aaroncnb/healpix_coordtrans_example/tree/master</a></p>
<p>那里的代码应该运行得很快,但那是因为映射严重退化。我对我的nside1024和2048地图也做了同样的工作,而且
大约一个小时。在</p>
<p><strong>图像前后</strong></p>
<p><a href="https://i.stack.imgur.com/eaPjp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eaPjp.png" alt="NSIDE 128, Celestial Coordinates: *Before*"/></a></p>
<p>{a4}</p>