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)

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

相关内容

热门资讯

分享认知!hhpoker有辅助... 分享认知!hhpoker有辅助吗(辅助挂)真是是有挂(存在有挂)1、超多福利:超高返利,海量正版游戏...
科普分享!pokemmo脚本(... 科普分享!pokemmo脚本(辅助挂)一贯是真的有挂(发现有挂)1、pokemmo脚本公共底牌简单,...
一分钟带你了解!WePoKer... 一分钟带你了解!WePoKer辅助器(辅助挂)切实存在有挂(有挂方法)1、WePoKer辅助器脚本辅...
揭秘关于!黑侠破解wepoke... 揭秘关于!黑侠破解wepoker(辅助挂)原来是真的有挂(了解有挂)1、揭秘关于!黑侠破解wepok...
避坑细节!hh poker辅助... 避坑细节!hh poker辅助器先试用(辅助挂)果然是真的有挂(有挂秘笈)1、hh poker辅助器...
发现一款!佛手在线有挂吗(辅助... 您好,佛手在线有挂吗这款游戏可以开挂的,确实是有挂的,需要了解加去威信【136704302】很多玩家...
来一盘!wepoker怎么提高... 来一盘!wepoker怎么提高运气(辅助挂)本来是真的有挂(有人有挂)1、wepoker怎么提高运气...
揭秘一下!悟空黑桃a有挂嘛(辅... 揭秘一下!悟空黑桃a有挂嘛(辅助挂)本来是真的有挂(有挂方略)悟空黑桃a有挂嘛能透视中分为三种模型:...
玩家必看教程!wepoker可... 玩家必看教程!wepoker可以免费玩吗(辅助挂)一贯有挂(确实有挂)1、首先打开wepoker可以...
玩家爆料!wejoker辅助器... 玩家爆料!wejoker辅助器怎么卖(辅助挂)好像是真的有挂(有挂教程)玩家爆料!wejoker辅助...