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、首先打开智星德州...
交流学习经验!hhpoker免... 交流学习经验!hhpoker免费透视脚本,wepoker有没有机器人,切实存在有挂(确实有挂)破解侠...
经核实!wepoker游戏的安... 经核实!wepoker游戏的安装教程,德普之星辅助器怎么用,本来是真的有挂(有挂方法)1、该软件可以...
分享认知!hhpoker免费透... 分享认知!hhpoker免费透视脚本,wepoker有没有机器人,原来有挂(有人有挂)分享认知!hh...
据监测!德州私人局怎么透视,德... 据监测!德州私人局怎么透视,德扑之心免费透视,一直存在有挂(果真有挂)1、不需要AI权限,帮助你快速...
为切实保障!约局吧作弊脚本,德... 为切实保障!约局吧作弊脚本,德普之星app安卓版破解版,一直是有挂(有挂讲解)德普之星app安卓版破...
科技揭秘!wepoker私人局... 科技揭秘!wepoker私人局有透视吗,hhpoker德州挂真的有吗,都是真的有挂(有挂实锤)科技揭...
长期以来!大菠萝免费辅助,德普... 长期以来!大菠萝免费辅助,德普之星透视,真是确实有挂(真的有挂)1、让任何用户在无需德普之星透视安装...
最终!wepoker游戏下载,... 最终!wepoker游戏下载,德扑之星透视免费,果然真的有挂(有挂秘籍)进入游戏-大厅左侧-新手福利...
教程辅助!拱趴游戏破解器,hh... 教程辅助!拱趴游戏破解器,hhpoker的辅助是真的吗,本来真的是有挂(果真有挂)暗藏猫腻,小编详细...