Skip to main content

Differentiable small-body orbit computation and orbit determination with JAX.

Project description

DiffOrb

DiffOrb is a differentiable, batchable Python framework for small-body orbit propagation, orbit determination, and Horizons-like ephemeris products. It is built on JAX and keeps the main numerical objects compatible with automatic differentiation, JIT compilation, and vectorized execution.

Documentation: Read the DiffOrb documentation

Features

  • Native JAX with an object-oriented interface.
  • Automatic differentiation support and usage.
  • Batch computation and automatic broadcasting.
  • Dense orbit propagation.
  • Composable orbit-determination and ephemeris-generation workflow.
  • Horizons-like ephemeris products.
  • Reusable astrometric and astrodynamical infrastructure.

Installation

DiffOrb requires Python 3.11 or later.

python -m pip install difforb

Download the EOP parameter file, observatory list, and optical debiasing model:

python -m difforb.data install all

Verify the downloaded data:

python -m difforb.data status

Quick Start

Propagate a small body and query its state from the dense trajectory:

from difforb.body import SmallBody
from difforb.core import BCRS, State, Time
from difforb.dynamics import DynamicSystem
from difforb.integrator import NumericalIntegrator
from difforb.spk import set_default_ephemeris

set_default_ephemeris("/path/to/de441.bsp")

t0 = Time.from_tdb_date(2025, 1, 2)
t1 = Time.from_tdb_date(2025, 2, 15)
t_query = Time.from_tdb_date(2025, 1, 20)

state0 = State(
    tdb=t0.tdb(),
    pos=[1.685775738339898, -1.336388854313325, -0.2144927004440800],
    vel=[0.008995712853117517, 0.006985684417802803, 0.004020851173846060],
    frame=BCRS,
)

force_model = DynamicSystem.from_standard_system().build_force_model()
integrator = NumericalIntegrator(method="IAS15", tol=1e-12)

body = SmallBody.create(state0).propagate(t0.tdb(), t1.tdb(), force_model, integrator)
state = body.state(t_query.tdb(), frame=BCRS)

print(state.frame.name)
print(state.pos)
print(state.vel)

License

DiffOrb source code, documentation, and DiffOrb-maintained bundled data files are licensed under the Apache License, Version 2.0. Data files downloaded from external sources are still governed by the original providers' terms.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

difforb-0.1.0.tar.gz (263.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

difforb-0.1.0-py3-none-any.whl (303.0 kB view details)

Uploaded Python 3

File details

Details for the file difforb-0.1.0.tar.gz.

File metadata

  • Download URL: difforb-0.1.0.tar.gz
  • Upload date:
  • Size: 263.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for difforb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f3e7cd10e54ebacd51dddc7a972d91575465767c017b5f2ee097c9d5a543a181
MD5 ab1dad4b250357d0be1c38e12959cb78
BLAKE2b-256 12faf0c123ecff3526a29d8682546fcd2c37bf89c9594de245aa6fae46573825

See more details on using hashes here.

Provenance

The following attestation bundles were made for difforb-0.1.0.tar.gz:

Publisher: publish.yml on jianhua-naoc/difforb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file difforb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: difforb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 303.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for difforb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65b13314c1664be1fe253114ca9e72205f7b547d911ea3a88cbe46dcc3e51d26
MD5 c91d2683686e341df9e9fd9d8570ab55
BLAKE2b-256 087177436c2d91e821130410683d80ed85703eca220815e18ea89afda7bbe55a

See more details on using hashes here.

Provenance

The following attestation bundles were made for difforb-0.1.0-py3-none-any.whl:

Publisher: publish.yml on jianhua-naoc/difforb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page