Astropy 和 JPL 的 Horizons 查询有不同的输出

问题描述 投票:0回答:1

我正在尝试将 Astropy 给出的地球在日心系统中的位置与喷气推进实验室的地平线位置进行比较。我发现了显着的差异,但我不知道它们可能是什么原因......

我想这样做,因为我的目的是将地理坐标转换为日心坐标。

    from astropy.coordinates import SkyCoord
    from astropy.time import Time
    from astropy import units as u
    from astroquery.jplhorizons import Horizons
    
    time = '2015-03-30T21:33:52.000'
    JD = Time(time).jd
    
    observing_time = Time(time, format='isot', scale='utc')
    
    #ASTROPY
    c = SkyCoord(x=0,y=0,z=0, unit='au', representation_type='cartesian', frame='gcrs', obstime=time)
    
    cc = c.transform_to("heliocentriceclipticiau76")
    print(cc.cartesian.x, cc.cartesian.y, cc.cartesian.z)
    
    cc = c.transform_to("heliocentricmeanecliptic")
    print(cc.cartesian.x, cc.cartesian.y, cc.cartesian.z)
    
    cc = c.transform_to("heliocentrictrueecliptic")
    print(cc.cartesian.x, cc.cartesian.y, cc.cartesian.z)
    
    #JPL'S HORIZONS
    obj = Horizons(id="Geocenter", location="@sun", epochs=JD, id_type='id').vectors()
    print(obj['x'], obj['y'], obj['z'])
python coordinate-systems astropy orbit
1个回答
0
投票

可能两年后人们不再对此感兴趣,但为了可能被这种微妙之处所困扰的未来用户的利益,这就是答案。在请求状态向量与星历表时,JPL HORIZONS 以及扩展的

astroquery.jplhorizons
代码所期望的时间尺度存在细微的差异。如
epochs
(
docs
) 的 HorizonsClass 部分所述:

Epoch timescales depend on the type of query performed: UTC for ephemerides queries, TDB for element and vector queries. 

因此,虽然 AstroPy 假设 UTC(您最好将

observing_time
Time
对象传递给
SkyCoord
例程的构造函数,以便它明确知道它所处的时间尺度并能够对其进行转换),但您传递的是 Julian UTC 时间刻度中的日期 (
JD
) 到 HORIZONS,预计 TDB 时间刻度中的时间。在您要求时,TDB-UTC 之差约为 67.184 秒(由于相对论原因,我们可以忽略正负 1-2 毫秒),因此您不会同时通过两个时间要求地球的位置方法。

如果您将对

Horizons
的呼叫更改为
obj = Horizons(id="Geocenter", location="@sun", epochs=observing_time.tdb.jd, id_type='id').vectors(delta_T=True)
,则
epochs
将在与同一 UTC 时刻相对应的 TDB 时间尺度中获得正确的 JD。 (我还在对
delta_T=True
的调用中包含了
.vectors()
,以便您可以看到 TDB-UTC 的准确值)。通过这一更改,生成的 HORIZONS 位置与 Astropy 位置的匹配范围在约 2 公里范围内,这在 AstroPy 内部使用的 erfa.epv00 例程生成的地球位置的规定精度内。

© www.soinside.com 2019 - 2024. All rights reserved.