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亲友圈有用吗(辅助挂)原来真的有挂(有挂讲解辅助插件)1、免费脚本咨询教...
分享一款!拱趴大菠萝开挂方法(... 分享一款!拱趴大菠萝开挂方法(辅助挂)都是真的有挂(存在有挂辅助攻略)1、实时透视辅助更新:用户可以...
科技介绍!黑侠破解wepoke... 科技介绍!黑侠破解wepoker(辅助挂)确实是真的有挂(有挂详细辅助方法)1、模拟器是什么优化,俱...
最新技巧!德普之星app安卓版... 最新技巧!德普之星app安卓版破解版(辅助挂)竟然存在有挂(真的有挂辅助教程)1、每一步都需要思考,...
玩家交流!wepoker有没有... 您好,这款游戏可以开挂的,确实是有挂的,需要了解加去威信【136704302】很多玩家在这款游戏中打...
解密关于!wepoker插件功... 解密关于!wepoker插件功能辅助器(辅助挂)本来有挂(详细教程辅助器)1、任何透视是真的假的的玩...
科技揭秘!wpk俱乐部辅助器(... 科技揭秘!wpk俱乐部辅助器(辅助挂)好像真的是有挂(发现有挂辅助工具)1、全新机制【ai辅助工具激...
热点推荐!fishpoker透... 热点推荐!fishpoker透视(辅助挂)一直是真的有挂(有人有挂辅助app)1、不需要AI权限,帮...
让我来分享经验!xpoker辅... 让我来分享经验!xpoker辅助器(辅助挂)原来是真的有挂(的确有挂辅助攻略)1、每一步都需要思考,...
一分钟揭秘!xpoker辅助神... 一分钟揭秘!xpoker辅助神器(辅助挂)好像真的有挂(有挂辅助辅助器)1、脚本辅助下载、免费透视脚...