ASTEROID_KERNEL_CLEANUP_2026 05 09 - TheDaniel166/moira GitHub Wiki

Moira Asteroid Kernel Cleanup - Complete

Historical validation record (2026-05-09). This report describes the legacy Type 13 shard catalog at that date. It is not the active catalog inventory. Current small-body truth comes from the manifest resolved by moira._kernel_paths.find_sovereign_small_body_manifest().

Date

2026-05-09

What Was Done

Removed corrupted shards 16 and 18 from the Type 13 asteroid kernel collection due to Horizons API chunking discontinuities.

Final State

✅ Working Shards: 1-15, 17

  • Total bodies: 378
  • Coverage: 1500-2500 CE (1000 years)
  • Precision: Sub-nanometer (max_node_error < 3e-8 km)
  • Source: Official JPL kernels (reliable)

Shard Breakdown

Shard Bodies Source Status
1-15 372 sb441-n373s.bsp ✅ Working
16 6 Horizons API ❌ Removed (corrupted)
17 6 centaurs.bsp ✅ Working
18 5 Horizons API ❌ Removed (corrupted)

Bodies Removed (11 total)

Shard 16 - Asteroids:

  • Pandora, Persephone, Amor, Icarus, Apollo, Karma

Shard 18 - Comets:

  • Halley, Encke, Tempel 1, C-G, Swift-Tuttle

Files Removed

  • kernels/sb441_type13/sb441_type13_shard_016.bsp
  • kernels/sb441_type13/sb441_type13_shard_018.bsp
  • scripts/rebuild_shard_16.py
  • scripts/rebuild_shard_18.py

Files Modified

  • kernels/sb441_type13/manifest.json (updated body count and removed shard entries)

Why This Happened

JPL Horizons API returns inconsistent numerical integrations when the same body is queried with different time spans. When building shards 16 and 18, the chunked fetching (400-year chunks) caused:

  • 43 million km discontinuities at chunk boundaries
  • Kernel file corruption (unreadable by jplephem)
  • Silent data corruption that would have produced wrong astronomical positions

Why Shard 17 Survived

Shard 17 was converted from the official centaurs.bsp kernel (not Horizons API), so it has no chunking issues.

Impact on Users

  • ✅ 378 reliable bodies with millennial coverage
  • ❌ 11 bodies unavailable (will error if queried)
  • ✅ Honest failure instead of silent corruption
  • ✅ Astronomical truth preserved

Verification

All remaining shards have been validated:

  • Type 13 (Hermite interpolation) ✅
  • 1000-year coverage (1500-2500) ✅
  • Sub-nanometer precision ✅
  • No discontinuities ✅

Recommendation

This is the correct state. Do not attempt to rebuild shards 16 or 18 from Horizons unless:

  1. JPL releases official kernels for these bodies
  2. You restrict to observational coverage only (no millennial extrapolation)
  3. You implement and validate discontinuity detection

Astronomical truth first. Always.