打印坐标(Astropy)



从Astropy文档中,给出了以下示例:

c = SkyCoord('00h42m30s', '+41d12m00s')

当给print(c)时,你会得到

<SkyCoord (ICRS): (ra, dec) in deg (10.625, 41.2)>

但是如果我想要一个像";赤经是10.625,赤纬是41.2〃;?

我最初的想法是,我可以只使用c[0]和c[1],但它似乎是不可索引的,有什么提示吗?

我不确定我是否理解这个问题。你试过吗

>>> c = SkyCoord('00h42m30s', '+41d12m00s')
>>> print(f'the right ascention is {c.ra.value:0.3f} and the declination is {c.dec.value:0.2f}')
the right ascention is 10.625 and the declination is 41.20

最新更新