我正试图用天文望远镜把日心笛卡尔矢量转换成RA/Dec。你知道吗
我从Skybot服务器得到了以下关于木星和小行星弗洛拉(8)在2019-10-11 00:00的位置的输出:
使用Astropy坐标包,我可以变换日心笛卡尔矢量Px,Py,Pz(x=-1.0394055704345,y=-5.1017277480665,z=-2.1859827838526)以匹配Skybot输出的RA/Dec(17 13 56.2541-22 46 31.024)。你知道吗
# Jupiter, Cartesian to ra/dec
from astropy.coordinates import SkyCoord
h = (-1.0394055704345, -5.1017277480665, -2.1859827838526) #Skybot Cartesian
Skybot_radec = '17 13 56.2541 -22 46 31.024'
helio = SkyCoord(x = h[0], y = h[1], z = h[2],
unit='AU',
representation_type ='cartesian')
print('\nJupiter\nAstropy = ', helio.to_string('hmsdms'))
print ('Skybot = ', Skybot_radec )
Skybot和Astropy给出了相同的结果:
>>>
Jupiter
Astropy = 17h13m56.2542s -22d46m31.0237s
Skybot = 17 13 56.2541 -22 46 31.024
然而,尝试同样的过程与小行星弗洛拉的结果 在ra/dec中不匹配:
h = ( -0.217732049, -2.230749006, -0.848768038 ) #Skybot Cartesian
Skybot_radec = '16 25 19.6257 -19 37 54.618'
helio = SkyCoord(x = h[0], y = h[1], z = h[2],
unit='AU',
representation_type='cartesian')
print('\nFlora\nAstropy = ', helio.to_string('hmsdms'))
print ('Skybot = ', Skybot_radec )
>>>
Flora
Astropy = 17h37m42.0741s -20d44m27.5348s
Skybot = 16 25 19.6257 -19 37 54.618
为什么它只适用于一种情况而不适用于另一种情况?你知道吗
针对Stuart在下面的评论,下面是包含GCRS帧和obstime的代码:
from astropy.coordinates import SkyCoord, GCRS
from astropy import units as u
obs_date = '2019-10-11 00:00'
h = ( -0.217732049, -2.230749006, -0.848768038 ) #Skybot cartesian
Skybot_radec = '16 25 19.6257 -19 37 54.618'
helio = SkyCoord(x = h[0], y = h[1], z = h[2],
unit='AU',
frame = 'icrs',
representation_type='cartesian',
obstime = obs_date)
geo = helio.transform_to(GCRS(obstime = obs_date))
print('\nFlora\nAstropy = ', geo.to_string('hmsdms'))
print ('Skybot = ', Skybot_radec )
## calculate object separation in the sky
Skybot_radec = SkyCoord(Skybot_radec, frame = 'gcrs', unit = (u.hourangle, u.deg),
obstime = obs_date)
print('separation is ',Skybot_radec.separation(geo))
结果是:
Flora
Astropy = 16h20m00.3151s -19d17m49.5591s
Skybot = 16 25 19.6257 -19 37 54.618
separation is 1d17m53.9205s
更接近,但仍有显著差异。有什么建议让它更接近吗?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐