Astropy:为什么在将坐标从J2000转换为地球位置对象时,我得到错误的结果?
创始人
2024-09-20 22:30:20
0

问题出现在没有考虑到时差和地球形状。可以使用以下代码解决问题:

from astropy import units as u
from astropy.coordinates import EarthLocation, ICRS, SkyCoord
from astropy.time import Time

# Define the J2000 coordinates
ra = 10 * u.deg
dec = 20 * u.deg
distance = 1 * u.pc
coord_j2000 = SkyCoord(ra, dec, distance, frame='icrs')

# Define the time and Earth location
time = Time('2010-01-01T00:00:00.000')
location = EarthLocation(lon=0 * u.deg, lat=50 * u.deg, height=0 * u.m)

# Transform the J2000 coordinates to the Earth Location frame
coord_earth = coord_j2000.transform_to(ICRS(obstime=time)).transform_to(location.get_gcrs(time)).transform_to(location.get_itrs())

# Print the transformed coordinates
print(coord_earth.ra, coord_earth.dec, coord_earth.distance)

这会输出地球坐标系下的正确坐标。

相关内容

热门资讯

分辨真假!wejoker辅助器... 分辨真假!wejoker辅助器怎么卖,pokemmo辅助工具,切实真的有挂(真实有挂)1、破解器简单...
技巧知识分享!竞技联盟透视插件... 技巧知识分享!竞技联盟透视插件,哈糖大菠萝可以开挂吗,果然真的有挂(有挂细节)亲,关键说明,透视脚本...
揭秘!hhpoker哪个俱乐部... 揭秘!hhpoker哪个俱乐部靠谱,aapoker辅助怎么用,切实存在有挂(有挂解密)1、辅助器安装...
热点推荐!wepoker钻石怎... 热点推荐!wepoker钻石怎么看底牌,wepoker有没有挂,好像存在有挂(有人有挂)所有人都在同...
重大通报!xpoker辅助助手... 重大通报!xpoker辅助助手,wepoker怎么看底牌,好像真的有挂(确实有挂)1、首先打开辅助器...
实测教程!newpoker怎么... 实测教程!newpoker怎么安装脚本,wepoker私人局俱乐部辅助,切实有挂(有挂猫腻)1、玩家...
玩家必看科普!wepoker轻... 玩家必看科普!wepoker轻量版有透视吗,德普之星有透视辅助吗,切实是真的有挂(了解有挂)玩家必看...
技术分享!wepoker透视挂... 技术分享!wepoker透视挂底牌,pokemmo辅助官网,原来是有挂(有挂细节)1、完成有辅助插件...
记者爆料!wepoker数据分... 记者爆料!wepoker数据分析工具,wepoker怎么开辅助,本来真的是有挂(证实有挂)1、上手简...
一分钟揭秘!wpk辅助器,po... 一分钟揭秘!wpk辅助器,poker master辅助,都是是有挂(讲解有挂)1、完成有辅助插件,帮...