Constants#

Constants used throughout the package.

jorbit.data.constants.ALL_PLANET_IDS = {'earth': 399, 'earth_bary': 3, 'jupiter': 5, 'mars': 4, 'mercury': 1, 'moon': 301, 'neptune': 8, 'pluto': 9, 'saturn': 6, 'sun': 10, 'uranus': 7, 'venus': 2}#

The IDs of the planets and sun.

jorbit.data.constants.ALL_PLANET_LOG_GMS = {'earth': Array(-20.84118348, dtype=float64, weak_type=True), 'earth_bary': Array(-inf, dtype=float64, weak_type=True), 'jupiter': Array(-15.07946488, dtype=float64, weak_type=True), 'mars': Array(-23.07194211, dtype=float64, weak_type=True), 'mercury': Array(-23.73665301, dtype=float64, weak_type=True), 'moon': Array(-25.23933649, dtype=float64, weak_type=True), 'neptune': Array(-17.99910783, dtype=float64, weak_type=True), 'pluto': Array(-26.8539481, dtype=float64, weak_type=True), 'saturn': Array(-16.28536632, dtype=float64, weak_type=True), 'sun': Array(-8.12544774, dtype=float64, weak_type=True), 'uranus': Array(-18.16446878, dtype=float64, weak_type=True), 'venus': Array(-21.045753, dtype=float64, weak_type=True)}#

The log GM values of the planets and sun, units of AU^3 / day^2.

These are NOT from the JPL ephemeris comments. They are actually from https://ssd.jpl.nasa.gov/ftp/xfr/gm_Horizons.pck, which lists Earth as apparently 1% different from its de440 and de441 value. Chasing that down was a top-5 debugging day for sure.

jorbit.data.constants.ALL_PLANET_NAMES = ['sun', 'mercury', 'venus', 'earth_bary', 'earth', 'moon', 'mars', 'jupiter', 'saturn', 'uranus', 'neptune', 'pluto']#

The ordered names of the planets and sun.

jorbit.data.constants.DE430_ASTEROID_EPHEMERIS_URL = 'https://ssd.jpl.nasa.gov//ftp/eph/small_bodies/asteroids_de430/ast343de430.bsp'#

The URL for the DE430 asteroid ephemeris.

jorbit.data.constants.DE430_PLANET_EPHEMERIS_URL = 'https://ssd.jpl.nasa.gov//ftp/eph/planets/bsp/de430_1850-2150.bsp'#

The URL for the DE430 planet ephemeris.

jorbit.data.constants.DEFAULT_ASTEROID_EPHEMERIS_URL = 'https://ssd.jpl.nasa.gov//ftp/eph/small_bodies/asteroids_de441/sb441-n16.bsp'#

The default URL for the asteroid ephemeris.

jorbit.data.constants.DEFAULT_PLANET_EPHEMERIS_URL = 'https://ssd.jpl.nasa.gov//ftp/eph/planets/bsp/de440.bsp'#

The default URL for the planet ephemeris.

jorbit.data.constants.EARTH_J_HARMONICS = Array([ 1.08262539e-03, -2.53241000e-06, -1.61989800e-06], dtype=float64)#

The J2, J3, and J4 harmonics of the Earth. Taken from the JPL DE440/441 ephemeris.

jorbit.data.constants.EARTH_POLE_DEC = 1.5707963267948966#

The declination of the Earth’s pole in radians at the J2000 epoch.

jorbit.data.constants.EARTH_POLE_RA = 0.0#

The right ascension of the Earth’s pole in radians at the J2000 epoch.

jorbit.data.constants.EARTH_RADIUS = 4.263520978042905e-05#

The radius of the Earth in AU. Matches the value ASSIST uses for its Earth flattening / J2 model (≈0.6 m smaller than the DE440/441 6378.137 km that was previously here).

jorbit.data.constants.EPSILON = 2.220446049250313e-16#

Machine specific precision.

jorbit.data.constants.HORIZONS_ECLIPTIC_TO_ICRS_ROT_MAT = Array([[ 1.        ,  0.        ,  0.        ],        [ 0.        ,  0.91748206, -0.39777716],        [ 0.        ,  0.39777716,  0.91748206]], dtype=float64)#

Transpose of ICRS_TO_HORIZONS_ECLIPTIC_ROT_MAT.

jorbit.data.constants.HUGE_ASTEROID_EPHEMERIS_URL = 'https://ssd.jpl.nasa.gov//ftp/eph/small_bodies/asteroids_de441/sb441-n373.bsp'#

The URL for the asteroid ephemeris with 373 asteroids. Currently never used.

jorbit.data.constants.IAS15_BEZIER_COEFFS = Array([[ 1.,  2.,  3.,  4.,  5.,  6.,  7.],        [ 0.,  1.,  3.,  6., 10., 15., 21.],        [ 0.,  0.,  1.,  4., 10., 20., 35.],        [ 0.,  0.,  0.,  1.,  5., 15., 35.],        [ 0.,  0.,  0.,  0.,  1.,  6., 21.],        [ 0.,  0.,  0.,  0.,  0.,  1.,  7.],        [ 0.,  0.,  0.,  0.,  0.,  0.,  1.]], dtype=float64)#

The coefficients needed to predict the next b coefficients.

jorbit.data.constants.IAS15_BV_DENOMS = Array([[[8]],         [[7]],         [[6]],         [[5]],         [[4]],         [[3]],         [[2]]], dtype=int64)#

The denominators for the coefficients in the polynomial to estimate v(t).

jorbit.data.constants.IAS15_BX_DENOMS = Array([[[72]],         [[56]],         [[42]],         [[30]],         [[20]],         [[12]],         [[ 6]]], dtype=int64)#

The denominators for the coefficients in the polynomial to estimate x(t).

jorbit.data.constants.IAS15_C = Array([-5.62625605e-02,  1.01408028e-02, -2.36503252e-01, -3.57589773e-03,         9.35376953e-02, -5.89127969e-01,  1.95656541e-03, -5.47553869e-02,         4.15881200e-01, -1.13628160e+00, -1.43653024e-03,  4.21585277e-02,        -3.60099597e-01,  1.25015071e+00, -1.87049177e+00,  1.27179031e-03,        -3.87603579e-02,  3.60962243e-01, -1.46688421e+00,  2.90613626e+00,        -2.75581272e+00], dtype=float64)#

The C array from REBOUND.

jorbit.data.constants.IAS15_D = Array([5.62625605e-02, 3.16547572e-03, 2.36503252e-01, 1.78097769e-04,        4.57929855e-02, 5.89127969e-01, 1.00202365e-05, 8.43185715e-03,        2.53534069e-01, 1.13628160e+00, 5.63764164e-07, 1.52978400e-03,        9.78342365e-02, 8.75254665e-01, 1.87049177e+00, 3.17188154e-08,        2.76293091e-04, 3.60285540e-02, 5.76733000e-01, 2.24858876e+00,        2.75581272e+00], dtype=float64)#

The D array from REBOUND.

jorbit.data.constants.IAS15_D_MATRIX = Array([[1.00000000e+00, 5.62625605e-02, 3.16547572e-03, 1.78097769e-04,         1.00202365e-05, 5.63764164e-07, 3.17188154e-08],        [0.00000000e+00, 1.00000000e+00, 2.36503252e-01, 4.57929855e-02,         8.43185715e-03, 1.52978400e-03, 2.76293091e-04],        [0.00000000e+00, 0.00000000e+00, 1.00000000e+00, 5.89127969e-01,         2.53534069e-01, 9.78342365e-02, 3.60285540e-02],        [0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00,         1.13628160e+00, 8.75254665e-01, 5.76733000e-01],        [0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,         1.00000000e+00, 1.87049177e+00, 2.24858876e+00],        [0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,         0.00000000e+00, 1.00000000e+00, 2.75581272e+00],        [0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,         0.00000000e+00, 0.00000000e+00, 1.00000000e+00]], dtype=float64)#

IAS15D in matrix form for batched operations.

jorbit.data.constants.IAS15_EPSILON = 1e-09#

Constant from REBOUND.

jorbit.data.constants.IAS15_EPS_Modified = 0.17506702932189996#

Precomputed implementation of sqrt7(r->ri_ias15.epsilon*5040.0)

jorbit.data.constants.IAS15_H = Array([0.        , 0.05626256, 0.18024069, 0.35262472, 0.54715363,        0.73421018, 0.88532095, 0.97752061], dtype=float64)#

The H array from REBOUND.

jorbit.data.constants.IAS15_MIN_DT = 0.001#

Floor on the proposed step size; matches ASSIST’s sim.ri_ias15.min_dt = 0.001 recipe for solar-system close-encounter work. Without a floor, the GLOBAL adaptive controller can grind to ~1e-7-day steps near a planetary close approach (ASSIST itself takes ~1.66M steps for the 2029 Apophis flyby year if min_dt = 0). The original REBOUND default is 0.0.

jorbit.data.constants.IAS15_PADDED_CS = Array([[ 1.00000000e+00,  0.00000000e+00,  0.00000000e+00,          0.00000000e+00,  0.00000000e+00,  0.00000000e+00,          0.00000000e+00],        [-5.62625605e-02,  1.00000000e+00,  0.00000000e+00,          0.00000000e+00,  0.00000000e+00,  0.00000000e+00,          0.00000000e+00],        [ 1.01408028e-02, -2.36503252e-01,  1.00000000e+00,          0.00000000e+00,  0.00000000e+00,  0.00000000e+00,          0.00000000e+00],        [-3.57589773e-03,  9.35376953e-02, -5.89127969e-01,          1.00000000e+00,  0.00000000e+00,  0.00000000e+00,          0.00000000e+00],        [ 1.95656541e-03, -5.47553869e-02,  4.15881200e-01,         -1.13628160e+00,  1.00000000e+00,  0.00000000e+00,          0.00000000e+00],        [-1.43653024e-03,  4.21585277e-02, -3.60099597e-01,          1.25015071e+00, -1.87049177e+00,  1.00000000e+00,          0.00000000e+00],        [ 1.27179031e-03, -3.87603579e-02,  3.60962243e-01,         -1.46688421e+00,  2.90613626e+00, -2.75581272e+00,          1.00000000e+00]], dtype=float64)#

Padded version of the IAS15 sub_cs for easier use in jax.vmap and jax.lax.scan.

jorbit.data.constants.IAS15_PADDED_RS = Array([[17.77380891,  0.        ,  0.        ,  0.        ,  0.        ,          0.        ,  0.        ],        [ 5.54813672,  8.06593865,  0.        ,  0.        ,  0.        ,          0.        ,  0.        ],        [ 2.83587608,  3.37424998,  5.80100156,  0.        ,  0.        ,          0.        ,  0.        ],        [ 1.82764027,  2.03711184,  2.72544221,  5.14062411,  0.        ,          0.        ,  0.        ],        [ 1.36200782,  1.47504022,  1.80515358,  2.62064493,  5.3459769 ,          0.        ,  0.        ],        [ 1.12953388,  1.20618767,  1.41827826,  1.8772425 ,  2.95711602,          6.61766201,  0.        ],        [ 1.02299633,  1.08547219,  1.25426462,  1.60026655,  2.3235983 ,          4.10997578, 10.84602619]], dtype=float64)#

Padded version of the IAS15 sub_rs for easier use in jax.vmap and jax.lax.scan.

jorbit.data.constants.IAS15_RR = Array([0.05626256, 0.18024069, 0.12397813, 0.35262472, 0.29636216,        0.17238403, 0.54715363, 0.49089107, 0.36691293, 0.19452891,        0.73421018, 0.67794762, 0.55396949, 0.38158546, 0.18705655,        0.88532095, 0.82905839, 0.70508026, 0.53269623, 0.33816732,        0.15111077, 0.97752061, 0.92125805, 0.79727992, 0.6248959 ,        0.43036699, 0.24331044, 0.09219967], dtype=float64)#

The RR array from REBOUND.

jorbit.data.constants.IAS15_SAFETY_FACTOR = 0.25#

Constant from REBOUND.

jorbit.data.constants.IASNN_DD_EPSILON = DoubleDouble(1.0000000053751288e-32, -5.37512870279553e-41)#

DoubleDouble type epsilon.

jorbit.data.constants.ICRS_TO_HORIZONS_ECLIPTIC_ROT_MAT = Array([[ 1.        ,  0.        ,  0.        ],        [ 0.        ,  0.91748206,  0.39777716],        [ 0.        , -0.39777716,  0.91748206]], dtype=float64)#

Rotation matrix to convert from ICRS to Horizons Ecliptic J2000.

The former is defined as a 84381.448” rotation about the ICRS x-axis. Values computed using mpmath with 24 digits of precision.

jorbit.data.constants.INV_SPEED_OF_LIGHT = 0.005775518331436995#

1 / c in day/AU.

jorbit.data.constants.JORBIT_EPHEM_CACHE_TIMEOUT = 16070400#

The timeout for the jorbit ephemeris cache.

jorbit.data.constants.JORBIT_EPHEM_URL_BASE = 'https://huggingface.co/datasets/jorbit/jorbit_mpchecker/resolve/main/'#

The URL root where are the jorbit ephemeris files are stored.

jorbit.data.constants.LARGE_ASTEROID_IDS = {'camilla': 2000107, 'ceres': 2000001, 'cybele': 2000065, 'davida': 2000511, 'eunomia': 2000015, 'euphrosyne': 2000031, 'europa': 2000052, 'hygiea': 2000010, 'interamnia': 2000704, 'iris': 2000007, 'juno': 2000003, 'pallas': 2000002, 'psyche': 2000016, 'sylvia': 2000087, 'thisbe': 2000088, 'vesta': 2000004}#

The SPK ID numbers for the 16 asteroid perturbers.

jorbit.data.constants.LARGE_ASTEROID_LOG_GMS = {'camilla': Array(-33.3696624, dtype=float64, weak_type=True), 'ceres': Array(-29.59967161, dtype=float64, weak_type=True), 'cybele': Array(-33.80079085, dtype=float64, weak_type=True), 'davida': Array(-32.37733729, dtype=float64, weak_type=True), 'eunomia': Array(-33.03230633, dtype=float64, weak_type=True), 'euphrosyne': Array(-33.66051937, dtype=float64, weak_type=True), 'europa': Array(-32.7499493, dtype=float64, weak_type=True), 'hygiea': Array(-32.00965106, dtype=float64, weak_type=True), 'interamnia': Array(-32.69647681, dtype=float64, weak_type=True), 'iris': Array(-33.605982, dtype=float64, weak_type=True), 'juno': Array(-33.08427588, dtype=float64, weak_type=True), 'pallas': Array(-31.12199618, dtype=float64, weak_type=True), 'psyche': Array(-33.27337921, dtype=float64, weak_type=True), 'sylvia': Array(-32.96298614, dtype=float64, weak_type=True), 'thisbe': Array(-33.56310656, dtype=float64, weak_type=True), 'vesta': Array(-30.88687217, dtype=float64, weak_type=True)}#

Similar to ALL_PLANET_LOG_GMS but for the 16 asteroid perturbers.

jorbit.data.constants.LARGE_ASTEROID_NAMES = ['ceres', 'pallas', 'juno', 'vesta', 'iris', 'hygiea', 'eunomia', 'psyche', 'euphrosyne', 'europa', 'cybele', 'sylvia', 'thisbe', 'camilla', 'davida', 'interamnia']#

The ordered names of the 16 asteroid perturbers.

jorbit.data.constants.PERTURBER_PACKED_DESIGNATIONS = ['00001', '00002', '00003', '00004', '00007', '00010', '00015', '00016', '00031', '00052', '00065', '00087', '00088', '00107', '00511', '00704', 'D4340']#

The packed designations of the 16 asteroid perturbers + Pluto.

jorbit.data.constants.SPEED_OF_LIGHT = 173.14463267424034#

c in AU/day.

jorbit.data.constants.SUN_J_HARMONICS = Array([2.19613915e-07], dtype=float64)#

The J2 harmonic of the Sun. Taken from the JPL DE440/441 ephemeris.

jorbit.data.constants.SUN_POLE_DEC = 1.1147417932487782#

The declination of the Sun’s pole in radians at the J2000 epoch. Chosen to match the hard-coded value in ASSIST.

jorbit.data.constants.SUN_POLE_RA = 4.993910588731375#

The right ascension of the Sun’s pole in radians at the J2000 epoch. Chosen to match the hard-coded value in ASSIST.

jorbit.data.constants.SUN_RADIUS = 0.004650467260962158#

The radius of the Sun in AU. Taken from Horizons web interface.

jorbit.data.constants.TOTAL_SOLAR_SYSTEM_GM = 0.000296309274879932#

Just the sum of ALL_PLANET_LOG_GMS and LARGE_ASTEROID_LOG_GMS.

jorbit.data.constants.Y4_C = Array([ 0.6756036, -0.1756036, -0.1756036,  0.6756036], dtype=float64)#

C vector for 4th order leapfrog integrator, created using jorbit.integrators.yoshida_integrator._create_yoshida_coeffs.

jorbit.data.constants.Y4_D = Array([ 1.35120719, -1.70241438,  1.35120719], dtype=float64)#

D vector for 4th order leapfrog integrator, created using jorbit.integrators.yoshida_integrator._create_yoshida_coeffs.

jorbit.data.constants.Y4_Ws = Array([1.35120719], dtype=float64)#

The weight vector for the 4th order leapfrog integrator, Yoshida (1990) Sec 4.

jorbit.data.constants.Y6_C = Array([ 0.39225681,  0.51004341, -0.47105339,  0.06875317,  0.06875317,        -0.47105339,  0.51004341,  0.39225681], dtype=float64)#

C vector for 6th order leapfrog integrator, created using jorbit.integrators.yoshida_integrator._create_yoshida_coeffs.

jorbit.data.constants.Y6_D = Array([ 0.78451361,  0.23557321, -1.17767998,  1.31518632, -1.17767998,         0.23557321,  0.78451361], dtype=float64)#

D vector for 6th order leapfrog integrator, created using jorbit.integrators.yoshida_integrator._create_yoshida_coeffs.

jorbit.data.constants.Y6_Ws = Array([-1.17767998,  0.23557321,  0.78451361], dtype=float64)#

The weight vector for the 6th order leapfrog integrator, Yoshida (1990) Table 1.

jorbit.data.constants.Y8_C = Array([ 0.45742212,  0.58426879, -0.59557945, -0.80154644,  0.88994925,        -0.01123555, -0.92890519,  0.90562646,  0.90562646, -0.92890519,        -0.01123555,  0.88994925, -0.80154644, -0.59557945,  0.58426879,         0.45742212], dtype=float64)#

C vector for 8th order leapfrog integrator, created using jorbit.integrators.yoshida_integrator._create_yoshida_coeffs.

jorbit.data.constants.Y8_D = Array([ 0.91484425,  0.25369334, -1.44485224, -0.15824064,  1.93813914,        -1.96061023,  0.10279985,  1.70845307,  0.10279985, -1.96061023,         1.93813914, -0.15824064, -1.44485224,  0.25369334,  0.91484425],      dtype=float64)#

D vector for 8th order leapfrog integrator, created using jorbit.integrators.yoshida_integrator._create_yoshida_coeffs.

jorbit.data.constants.Y8_Ws = Array([ 0.10279985, -1.96061023,  1.93813914, -0.15824064, -1.44485224,         0.25369334,  0.91484425], dtype=float64)#

The weight vector for the 8th order leapfrog integrator, Yoshida (1990) Table 2.