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)

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

相关内容

热门资讯

玩家必看秘籍!wepoker安... 玩家必看秘籍!wepoker安装教程,we poker辅助器,透明挂教程(有挂教程);原来确实真的有...
今日公布!红龙poker作弊指... 今日公布!红龙poker作弊指令,wepoker怎么提高运气,安装教程(有挂教程);wepoker怎...
揭秘一下!hhpoker万能辅... 揭秘一下!hhpoker万能辅助器,wejoker黑侠辅助器,软件教程(有挂方法),支持语音通讯、好...
实测发现!德普之星透视辅助,w... 实测发现!德普之星透视辅助,wepoker私局代打,wpk教程(有挂透明);致您一封信;亲爱德普之星...
安装程序教程!htx矩阵wep... 安装程序教程!htx矩阵wepoker辅助,cloudpoker作弊,安装教程(有挂攻略);玩家必备...
重大通报!智星德州辅助译码插件... 1、重大通报!智星德州辅助译码插件靠谱吗,约局吧德州透视,玩家教你(有挂神器);详细教程。2、智星德...
重大通报!德普之星怎么设置埋牌... 重大通报!德普之星怎么设置埋牌,aapoker俱乐部靠谱吗,详细教程(有挂教程);人气非常高,ai更...
每日必看!wepoker怎么破... 每日必看!wepoker怎么破解游戏,wepoker买脚本靠谱吗,教你攻略(有挂方法);亲真的是有正...
重大推荐!hhpoker哪个俱... 这是一款非常优秀的hhpoker哪个俱乐部靠谱 ia辅助检测软件,能够让你了解到hhpoker哪个俱...
一分钟了解!wepoker怎么... 1、一分钟了解!wepoker怎么下载游戏,wepoker透视脚本免费下载,解密教程(有挂技巧)。2...