在Astropy文档中,给出了这个示例:
c = SkyCoord('00h42m30s', '+41d12m00s')当给定print(c)时,您将得到
<SkyCoord (ICRS): (ra, dec) in deg (10.625, 41.2)>
但是,如果我想要一个类似“右升角是10.625,纬度是41.2”的输出,该怎么办?
我最初的想法是我可以只使用c和c1,但它似乎是不可索引的,有什么建议吗?
发布于 2021-11-24 11:31:28
我不确定我是否理解这个问题。你试过了吗
>>> 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.20https://stackoverflow.com/questions/70081289
复制相似问题