-2

我正在将像素坐标拟合文件转换为 Python 中的世界坐标。标题显示此拟合文件位于 RA-Dec 坐标系中。我想将其转换为银河坐标。这是我尝试过的。

from astropy import coordinates as coord
from astropy import units as u
c=coord.icrscoord(ra=wx,dec=wy,unit=(u.degree,u.degree))
c.galactic

AttributeError: 'module' object has no attribute 'icrscoord'

这不起作用。有什么建议么?

4

1 回答 1

5

根据Astropy 文档,语法是:

from astropy import units as u
from astropy.coordinates import SkyCoord
c = SkyCoord(ra=wx*u.degree, dec=wy*u.degree, frame='icrs')
c.galactic
于 2016-06-14T07:05:20.083 回答