我有一个健康的地图,其中包含一个以Dec=0 deg和RA=0 deg位置为中心的对象。现在我想要将对象的位置移动到任意点,例如,Dec=20度,RA=10度。有没有一种简单而精确的旋转方式?我修改了healpy文档,但我仍然不清楚如何旋转地图。
假设我有一个表示健康图的数字数组map
。那么你能给出轮换的示例代码吗?
发布于 2021-03-12 10:06:26
您可以使用hp.Rotator
的rotate_map_alms
方法
longitude = 10 * u.deg
latitude = 20 * u.deg
rot_custom = hp.Rotator(rot=[longitude.to_value(u.deg), latitude.to_value(u.deg)], inv=True)
m_smoothed_rotated_alms = rot_custom.rotate_map_alms(m_smoothed)
基于此的I wrote a full tutorial on how to rotate maps with healpy
https://stackoverflow.com/questions/66468476
复制相似问题