Code Familiarization Plan
This is a study plan for a developer who has just cloned the repository and wants to come up to speed on RMS-NAV in the most efficient order. Each stage lists documentation pages to read and source modules to inspect alongside them. The earlier stages are prerequisites for the later ones; the later stages can be read more selectively once the core pipeline makes sense.
The plan does not explain the code — it sequences it. Read each
documentation page first, then look at the corresponding source. Every class,
function, and module name below is a hyperlink into the API reference; click
through to jump straight to the autodoc page (and from there to the
[source] link to the file itself).
Stage 1 — Orientation
Goal: understand what the package does, the repository layout, and the top-level architecture. Skim only — do not try to absorb every detail.
README.md— PyPI-facing summary of whatrms-navis and the installation / quick-start commands.Introduction — environment variables, CLI entry points, test / lint / docs commands, CI / release process.
Navigation Overview — the six-subsystem architectural sketch and the per-image data flow.
Class Hierarchy — the inheritance graph and the shared base classes the rest of the manual assumes.
Stage 2 — Cross-cutting foundations
Goal: understand the shared infrastructure every subsystem depends on (configuration, logging, the universal base class, common helpers).
Config and Static Data — how YAML defaults are layered, the
Configsingleton, and the static-data citation policy.Developer Guide: Logging —
pdsloggerusage, section conventions, and the rule against bareprint.nav.config— config loader and module-level logger:src/nav/config_files/— the bundled YAML defaults (numeric-prefix load order); not autodoc’d since it is data, not code.nav.support— cross-cutting helpers. Start with these two; the rest can be browsed on demand:nav.support.nav_base—NavBase, the shared base providingconfigandlogger.
Stage 3 — Inputs: datasets, observations, features
Goal: understand how an image goes from a file path on disk to an
in-memory Observation (from oops) carrying the per-pixel features
that the rest of the pipeline consumes.
Observations —
DataSetenumeration, theObsSnapshotInstper-instrument hierarchy, and theNavFeaturedataclass / feature-type taxonomy.nav.dataset— file enumeration. The per-mission subclasses share theDataSet/DataSetPDS3bases:nav.obs— observation wrappers. The per-instrumentObsInstsubclasses share theObsSnapshotInstbase:nav.feature:nav.feature.feature— theNavFeaturedataclass itself.nav.feature.feature_type— the feature-type taxonomy.
Stage 5 — Orchestrator round-trip: feasibility, confidence, diagnostics, ensemble
Goal: understand how individual technique results are gated, calibrated, classified, and combined into the single per-image answer the orchestrator returns.
Feasibility Reporting (Shared NavFeasibilityReport) — when a technique declines to run and how the reason is reported.
Confidence Calibration (Shared Sigmoid-of-Linear Combination) — calibrated [0, 1] confidence per technique.
Per-Technique Diagnostics (Shared Dataclass Family) — the typed diagnostics dataclass attached to each technique result.
Ensemble Combine (ensemble + EnsembleConfig) — the
ensemble()combine that reconciles per-technique results into the final offset.Image Classifier (NavImageClassifier) — per-image classification feeding feasibility / weighting.
Per-Instrument Settings (InstrumentSettings) — per-instrument tunables the orchestrator threads through.
Reproducibility Envelope (Provenance) — the provenance record carried through the pipeline.
Per-Feature Post-Mortem (NavFeatureSummary) — the per-image feature-summary dataclass.
Technique-side helpers:
Orchestrator-side helpers:
nav.support.status_reason— the shared status-reason enum.
Stage 6 — Remaining models and their techniques
Goal: extend the picture from Stage 4 to every other registered model and every other technique. Each subsection pairs a model with the techniques that consume its features, in roughly increasing order of complexity.
Stars (model + star techniques)
Stars — the star-model family.
Star Navigation Model —
NavModelStarsin detail.Star Unique Match (StarUniqueMatchNav) — direct catalog-to-image unique matching.
Star Refinement (StarRefineNav) — refinement against an existing prior.
Star Field Pattern Match (StarFieldFromCatalogNav) — full star-field correlation.
nav.nav_model.starssubpackage:The shared
_star_helpersmodule is internal and not part of the autodoc API.
Body (additional techniques)
Body Terminator Fit (BodyTerminatorNav) — illuminated-body terminator fitting (DT pipeline).
Body Blob Centroid (BodyBlobNav) — small / unresolved body navigation.
Body Disc Correlate (BodyDiscCorrelateNav) — full-disc correlation.
Rings (model + ring techniques)
Rings — the ring-model family.
Ring Navigation Model —
NavModelRingsin detail.Ring Edge Fit (RingEdgeNav) — the ring-edge DT technique.
Ring Annulus Correlate (RingAnnulusNav) — the ring-annulus technique.
nav.nav_model.ringssubpackage:
Titan (model only)
Titan — the Titan family.
Titan Navigation Model —
NavModelTitan(registered placeholder; emits no features pending a haze-aware extractor).
Manual
Manual Navigation (NavTechniqueManual) — the interactive PyQt6 driver.
The
nav.ui.commonmodule is internal and not autodoc’d.
Stage 7 — Simulated images
Goal: understand the synthetic-image renderer and the simulated-image
sibling of each model family. These are used both by
nav_create_simulated_image and by tests.
nav.sim— the synthetic-image renderer:src/nav/dataset/dataset_sim.pyandsrc/nav/obs/obs_inst_sim.py— the simulated-image dataset and observation wrappers (not autodoc’d).
Stage 8 — Calibration and regression
Goal: understand how confidence calibration is anchored to a curated cohort of real images, and how per-instrument camera-rotation correction is calibrated.
Image Library — the operator-curated regression cohort (
tests/integration/image_library/), sidecar schema, and baseline workflow.Camera-rotation correction — per-instrument camera-rotation correction.
tests/integration/— the integration suite that consumes the image library.
Stage 9 — Downstream products
Goal: understand the products built on top of a navigated image — mosaics / reprojections, per-pixel backplanes, and PDS4 bundles.
Reprojection Internals — body and ring mosaicing plus the thread-safety constraints.
nav.reproj— reprojection core:src/reproj_cli/— CLI-only helpers shared by the mosaic drivers (not part of the importablenavAPI and not autodoc’d).Backplanes — per-pixel geometry product generation.
src/backplanes/— driven bynav_backplanes(not autodoc’d in thenavAPI surface).PDS4 Bundle Generation — PDS4 bundle assembly.
src/pds4/— driven bynav_create_bundle; per-dataset hooks live on theDataSetsubclasses introduced in Stage 3 (this tree is not autodoc’d either).
Stage 10 — Extending and conventions
Goal: be ready to make changes. Read these once at the end so the conventions land on top of a working mental model of the code.
Extending the System — how to add a new instrument, dataset, model, or technique (the registry hooks each subsystem exposes).
Best Practices — line length, docstring style, ruff / mypy expectations, commit conventions.
src/main/— CLI dispatch modules for every entry point listed in[project.scripts](not autodoc’d).The PyQt6 mosaic viewer; read after
nav.ui.manual_nav_dialogfrom Stage 6:Contributing — the contributor checklist that gates every PR.