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)we... 透视存在(wepoker)wepoker怎么买辅助(透视)一直真的是有挂(力荐教程);1、让任何用户...
透视新版(WePoKer)we... 透视新版(WePoKer)wepoker私人局可以透视(透视)本来是有挂(黑科技教程)1、游戏颠覆性...
透视玄学(WEPOKER)we... 透视玄学(WEPOKER)wepoker透视破解版(透视)一直是真的有挂(第三方教程)1、wepok...
透视ai代打(WEPOKER)... 透视ai代打(WEPOKER)wepoker私人局外卦(透视)总是真的有挂(黑科技教程)1、金币登录...
透视挂(wepoker)we ... 透视挂(wepoker)we poker辅助器下载(透视)真是有挂(攻略教程)透视挂(wepoker...
透视教学(wepoker)we... 透视教学(wepoker)wepoker辅助分析器(透视)确实真的有挂(线上教程);1、wepoke...
透视代打(WePoKer)破解... 透视代打(WePoKer)破解辅助插件wepoker(透视)切实存在有挂(必胜教程);一、破解辅助插...
透视辅助(WePoKer)we... 透视辅助(WePoKer)wepoker轻量版透视(透视)好像是有挂(第三方教程)在进入wepoke...
透视透视挂(wepoker)w... 透视透视挂(wepoker)wepokerh5破解(透视)切实真的是有挂(2025新版总结)1、进入...
透视科技(WePoKer)we... 透视科技(WePoKer)wepoker怎么发冤家牌(透视)好像真的是有挂(新2025版)1、任何w...