Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Python migration from kep3

The native package is named pykep_rust, so it can be installed beside pykep/kep3 without import collisions. Phase 16 deliberately does not add a compatibility facade: a partial set of legacy spellings would hide important differences in ownership, dynamics construction, and error behavior. A separate facade can be considered after the deferred ecosystem modules have clear support decisions.

The comparison below is against the public Python surface of the pinned upstream version recorded in UPSTREAM_NOTICE.md.

Equivalent capabilities with descriptive names

Upstreampykep_rustNotes
AU, CAVENDISH, EARTH_VELOCITY, G0ASTRONOMICAL_UNIT, CAVENDISH_CONSTANT, EARTH_ORBITAL_VELOCITY, STANDARD_GRAVITYSame pinned SI values
RAD2DEG, DEG2RAD, DAY2SEC, SEC2DAYRADIANS_TO_DEGREES, DEGREES_TO_RADIANS, DAY_TO_SECONDS, SECONDS_TO_DAYSame conversion factors
m2e, e2m, m2f, f2m, e2f, f2emean_to_eccentric_anomaly, eccentric_to_mean_anomaly, mean_to_true_anomaly, true_to_mean_anomaly, eccentric_to_true_anomaly, true_to_eccentric_anomalyScalar elliptic conversions
n2h, h2n, n2f, f2n, h2f, f2hGudermannian/hyperbolic functions with full namesScalar hyperbolic conversions
m2e_v, e2m_v, m2f_v, f2m_v, e2f_v, f2e_vCorresponding descriptive elliptic _batch functionsOrdered native batches that release the GIL
n2h_v, h2n_v, n2f_v, f2n_v, h2f_v, f2h_v, zeta2f_v, f2zeta_vCorresponding descriptive hyperbolic/Gudermannian _batch functionsOrdered native batches that release the GIL
ic2par, par2ic, ic2mee, mee2ic, par2mee, mee2parCartesian/classical/modified-equinoctial functions with full namesN × 6 NumPy batches are explicit _batch APIs
Lagrangian and Taylor propagation familiespropagate_lagrangian, propagate_lagrangian_grid, evaluated model propagatorsNative Rust numerical implementation
lambert_problemLambertProblem, LambertSolutionDeterministic branch objects
hohmann, bielliptic, mima, mima2Same namesReturn values are typed in the stub
alpha2direct, direct2alpha, eta2direct, direct2etaalpha_to_direct, direct_to_alpha, eta_to_direct, direct_to_etaDescriptive direction
fb_con, fb_dv, fb_voutflyby_constraints, flyby_delta_v, flyby_outgoing_velocityJacobian has a separate named function
leg.sims_flanagan, leg.sims_flanagan_alpha, leg.zohSimsFlanaganLeg, SimsFlanaganAlphaLeg, ZohLegSame numerical cores, immutable validated construction

Intentionally different

Areapykep_rust contract
EpochsEpoch is immutable, has a microsecond-granular internal representation, and requires an explicit mjd2000, mjd, or jd numeric scale. Binary64 JD input has about 40 µs spacing near J2000; use MJD2000 or calendar construction for single-microsecond input resolution. Arithmetic day counts do not imply UTC, TT, or TDB.
PlanetsPlanet uses explicit static constructors and owns a thread-safe native provider instead of accepting arbitrary Python UDPLA objects.
Taylor dynamicsPython receives evaluated RHS and propagation functions. It does not expose or require heyoka expression graphs or integrator objects.
Time-optimal PontryaginThe upstream unused barrier parameter is omitted and lambda0 is fixed to 1; callers that vary time-optimal lambda0 must rescale their formulation explicitly.
ZOH legsZohModel selects one of four built-in native dynamics. Constructor input is copied; validated legs do not expose mutation setters.
ErrorsInvalid values/shapes raise ValueError; singular geometry, convergence, integration, and missing capabilities have typed PykepError subclasses.
BatchesThroughput-sensitive entry points explicitly accept float64 NumPy arrays, preserve order, return owned arrays, and release the GIL during native work.

Deferred or unsupported

The following upstream areas are not part of the completed native numerical core and are not emulated:

  • SPICE kernels, TLE parsing, and Python-defined UDPLA providers (PY-EXT-001);
  • plotting helpers, trajectory-optimization UDPs, gym utilities, and optional ecosystem integrations (PY-ECOSYSTEM-001);
  • symbolic heyoka dynamics/integrator construction and arbitrary user-supplied expression graphs (TA-SYMBOLIC-001);
  • mima_from_hop and mima2_from_hop (MIMA-HOP-001);
  • deprecated compatibility aliases and nested namespace layouts.

Use has_acceleration() and the VSOP2013 availability/threshold queries when code depends on an optional provider capability. Unsupported provider operations raise UnsupportedCapabilityError; unsupported ecosystem modules are absent rather than silently approximated.