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)

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

相关内容

热门资讯

透视挂"hhpoke... 透视挂"hhpoker俱乐部是干嘛的"详细辅助必赢方法(起初真的是有挂)准备好在hhpoker俱乐部...
科技通报!cloudpoker... 1、科技通报!cloudpoker怎么开挂,wpk免费辅助,教你攻略(有挂神器)。2、cloudpo...
透视透视挂"hhpo... 透视透视挂"hhpoker辅助靠谱吗"详细辅助技巧教程(原生有挂);最新版2024是一款经典耐玩的益...
必备攻略!wepoker买钻石... 必备攻略!wepoker买钻石有用吗,约局吧辅助器,透明教程(有挂教程);实战中需综合运用上述技巧,...
透视规律"wejok... 《透视规律"wejoker手机版透视脚本"详细辅助2025新版教程(起初真的是有挂)》 wejoke...
科技介绍!wepoker国外版... 1、科技介绍!wepoker国外版透视,约局吧开挂神器是真的吗,细节揭秘(有挂神器)(UU poke...
透视安装"wepok... 透视安装"wepokerplus开挂"详细辅助科技教程(最初真的是有挂);《WPK辅助透视》‌:支持...
玩家攻略!hhpoker真能买... 玩家攻略!hhpoker真能买到挂吗,wepoker私人定制透视,攻略教程(有挂攻略);实战中需综合...
透视模拟器"约局吧辅... 透视模拟器"约局吧辅助器"详细辅助详细教程(一向真的有挂);1.约局吧辅助器 ai辅助创建新账号,点...
最新研发!we-poker辅助... 《最新研发!we-poker辅助软件教程,wepoker免费脚本咨询,专业教程(有挂方法)》 we-...