我可以使用 Astroquery/Astropy 获取太阳系天体的半径和质量吗?或者另一个公共库?
我一直在尝试使用astroquery.horizons
我尝试过 elements() 和 ephemeris() 但没有骰子,它们不包含质量或半径列。我唯一能找到这些值(以及其他值,见下文)的地方是在原始 API 响应中:
from astroquery.jplhorizons import Horizons
from astropy import units as u
object_id = "199" # Mercury
obj_id = Horizons(id=obj, id_type="majorbody", location="0") # Location 0 is the solar system barycenter
response = obj_id.ephemerides_async(get_raw_response=True)
产品
API VERSION: 1.2
API SOURCE: NASA/JPL Horizons API
*******************************************************************************
Revised: April 12, 2021 Mercury 199 / 1
PHYSICAL DATA (updated 2021-Apr-12):
Vol. Mean Radius (km) = 2440+-1 Density (g cm^-3) = 5.427
Mass x10^23 (kg) = 3.302 Volume (x10^10 km^3) = 6.085
Sidereal rot. period = 58.6463 d Sid. rot. rate (rad/s)= 0.00000124001
Mean solar day = 175.9421 d Core radius (km) = ~1600
Geometric Albedo = 0.106 Surface emissivity = 0.77+-0.06
GM (km^3/s^2) = 22031.86855 Equatorial radius, Re = 2440 km
GM 1-sigma (km^3/s^2) = Mass ratio (Sun/plnt) = 6023682
Mom. of Inertia = 0.33 Equ. gravity m/s^2 = 3.701
Atmos. pressure (bar) = < 5x10^-15 Max. angular diam. = 11.0"
Mean Temperature (K) = 440 Visual mag. V(1,0) = -0.42
Obliquity to orbit[1] = 2.11' +/- 0.1' Hill's sphere rad. Rp = 94.4
Sidereal orb. per. = 0.2408467 y Mean Orbit vel. km/s = 47.362
Sidereal orb. per. = 87.969257 d Escape vel. km/s = 4.435
Perihelion Aphelion Mean
Solar Constant (W/m^2) 14462 6278 9126
Maximum Planetary IR (W/m^2) 12700 5500 8000
Minimum Planetary IR (W/m^2) 6 6 6
*******************************************************************************
... More Lines Below
这真的很难从中提取数据,因为两列文本没有明确的分隔符。
还有
以下维基百科文章同时具有质量和半径。
维基百科 – 按大小列出的太阳系天体列表。
这是一个 regex 抓取。
半径的单位为km,质量的单位为kg-1021。
附加字段存在误差,±。
{
'Sun': { 'r': [ 695508, 0 ], 'm': [ 1989100000, 0 ] },
'Jupiter': { 'r': [ 69911, 6 ], 'm': [ 1898187, 88 ] },
'Uranus': { 'r': [ 25362, 7 ], 'm': [ 86813, 4 ] },
'Neptune': { 'r': [ 24622, 19 ], 'm': [ 102413, 5 ] },
'Earth': { 'r': [ 6371.0084, 0.0001 ], 'm': [ 5972.4, 0.3 ] },
'Venus': { 'r': [ 6052, 1 ], 'm': [ 4867.5, 0.2 ] },
'Mars': { 'r': [ 3389.5, 0.2 ], 'm': [ 641.71, 0.03 ] },
'Mercury': { 'r': [ 2439.4, 0.1 ], 'm': [ 330.11, 0.02 ] }
}