# assassin29092005/sih2026 architecture

> Architecture diagram of the GitHub repository assassin29092005/sih2026, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/assassin29092005/sih2026
- Repository: https://github.com/assassin29092005/sih2026

## Overview

SANDHI registers lunar imagery across illumination, sensor, and scale differences, then reports controlled correspondence results. The principal workflow is image input through GSD harmonization, illumination normalization, dense matching, sub-pixel refinement, geometric fitting, metrics, and deliverables. Separate analysis paths cover scale experiments, Chandrayaan-2 sensor comparisons (including IIRS), and imagery coverage. Sampled source supports the core pipeline and CLI wiring; README statements identify several unsampled product capabilities, whose internal connections are omitted where source evidence is unavailable.

Main entry points: [`sandhi/pipeline.py`](https://github.com/assassin29092005/sih2026/blob/main/sandhi/pipeline.py) (Registration pipeline), [`sandhi/cli.py`](https://github.com/assassin29092005/sih2026/blob/main/sandhi/cli.py) (Command interface), [`scripts/remeasure.py`](https://github.com/assassin29092005/sih2026/blob/main/scripts/remeasure.py) (Controlled remeasurement), [`scripts/iirs_vs_kaguya.py`](https://github.com/assassin29092005/sih2026/blob/main/scripts/iirs_vs_kaguya.py) (IIRS comparison)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_cli["Command interface<br/>[cli.py]"]
  node_demo["Visual demo<br/>[demo.py]"]
end

subgraph group_registration["Registration core"]
  node_pipeline["Registration pipeline<br/>[pipeline.py]"]
  node_config["Runtime settings<br/>[config.py]"]
  node_normalize["Illumination normalization<br/>[normalize.py]"]
  node_matching["Dense matching<br/>[matching.py]"]
  node_refine["Subpixel refinement<br/>[refine.py]"]
  node_models["Geometric fitting<br/>[models.py]"]
  node_metrics["Match metrics<br/>[metrics.py]"]
end

subgraph group_validation["Validation"]
  node_controls["Control gate<br/>[controls.py]"]
  node_remeasure["Controlled remeasurement<br/>[remeasure.py]"]
  node_ablation["Method ablation<br/>[ablation.py]"]
  node_dense_experiment["Dense-match experiments<br/>[dense_match.py]"]
end

subgraph group_analysis["Lunar analysis"]
  node_triple_io["Kaguya image access<br/>[triple_io.py]"]
  node_scale["Scale evaluation<br/>[scale_pipeline.py]"]
  node_ohrc["OHRC projection<br/>[ohrc_project.py]"]
  node_sensor_study["Sensor comparisons<br/>[ohrc_vs_kaguya.py]"]
  node_iirs_study["IIRS comparison<br/>[iirs_vs_kaguya.py]"]
  node_coverage["Coverage survey<br/>[survey_coverage.py]"]
  node_footprints["Image footprints<br/>[ch2_footprints.py]"]
end

subgraph group_delivery["Results"]
  node_register_product["Registration deliverable<br/>[register.py]"]
  node_outputs["Output serialization<br/>[outputs.py]"]
end

node_user(("Engineer"))

node_user -->|"runs commands"| node_cli
node_cli -->|"registers images"| node_pipeline
node_cli -->|"runs gate"| node_controls
node_cli -->|"dispatches demo"| node_demo
node_cli -->|"dispatches survey"| node_coverage
node_cli -->|"writes results"| node_outputs
node_demo -->|"registers images"| node_pipeline
node_pipeline -->|"reads settings"| node_config
node_pipeline -->|"normalizes images"| node_normalize
node_pipeline -->|"finds correspondences"| node_matching
node_pipeline -->|"refines matches"| node_refine
node_pipeline -->|"fits transform"| node_models
node_pipeline -->|"computes metrics"| node_metrics
node_remeasure -->|"compares methods"| node_ablation
node_remeasure -->|"uses matcher"| node_dense_experiment
node_remeasure -->|"opens imagery"| node_triple_io
node_remeasure -.->|"gates measurements"| node_controls
node_register_product -.->|"loads image pair"| node_triple_io
node_register_product -.->|"registers imagery"| node_pipeline
node_iirs_study -->|"tests registration"| node_pipeline
node_iirs_study -->|"uses projection"| node_ohrc
node_iirs_study -->|"opens reference"| node_triple_io
node_sensor_study -.->|"evaluates registration"| node_pipeline
node_scale -.->|"evaluates scale"| node_pipeline
node_footprints -.->|"supports coverage"| node_coverage

click node_cli "https://github.com/assassin29092005/sih2026/blob/main/sandhi/cli.py"
click node_demo "https://github.com/assassin29092005/sih2026/blob/main/scripts/demo.py"
click node_pipeline "https://github.com/assassin29092005/sih2026/blob/main/sandhi/pipeline.py"
click node_config "https://github.com/assassin29092005/sih2026/blob/main/sandhi/config.py"
click node_normalize "https://github.com/assassin29092005/sih2026/blob/main/sandhi/normalize.py"
click node_matching "https://github.com/assassin29092005/sih2026/blob/main/sandhi/matching.py"
click node_refine "https://github.com/assassin29092005/sih2026/blob/main/sandhi/refine.py"
click node_models "https://github.com/assassin29092005/sih2026/blob/main/sandhi/models.py"
click node_metrics "https://github.com/assassin29092005/sih2026/blob/main/sandhi/metrics.py"
click node_controls "https://github.com/assassin29092005/sih2026/blob/main/sandhi/controls.py"
click node_remeasure "https://github.com/assassin29092005/sih2026/blob/main/scripts/remeasure.py"
click node_ablation "https://github.com/assassin29092005/sih2026/blob/main/scripts/ablation.py"
click node_dense_experiment "https://github.com/assassin29092005/sih2026/blob/main/scripts/dense_match.py"
click node_register_product "https://github.com/assassin29092005/sih2026/blob/main/scripts/register.py"
click node_outputs "https://github.com/assassin29092005/sih2026/blob/main/sandhi/outputs.py"
click node_triple_io "https://github.com/assassin29092005/sih2026/blob/main/scripts/triple_io.py"
click node_scale "https://github.com/assassin29092005/sih2026/blob/main/scripts/scale_pipeline.py"
click node_ohrc "https://github.com/assassin29092005/sih2026/blob/main/scripts/ohrc_project.py"
click node_sensor_study "https://github.com/assassin29092005/sih2026/blob/main/scripts/ohrc_vs_kaguya.py"
click node_iirs_study "https://github.com/assassin29092005/sih2026/blob/main/scripts/iirs_vs_kaguya.py"
click node_coverage "https://github.com/assassin29092005/sih2026/blob/main/scripts/survey_coverage.py"
click node_footprints "https://github.com/assassin29092005/sih2026/blob/main/scripts/ch2_footprints.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_demo toneBlue
class node_pipeline,node_config,node_normalize,node_matching,node_refine,node_models,node_metrics toneAmber
class node_controls,node_remeasure,node_ablation,node_dense_experiment toneMint
class node_triple_io,node_scale,node_ohrc,node_sensor_study,node_iirs_study,node_coverage,node_footprints toneRose
class node_register_product,node_outputs,node_user toneIndigo
```

## Components

### User interface

- [Command interface](https://github.com/assassin29092005/sih2026/blob/main/sandhi/cli.py): `sandhi/cli.py`
- [Visual demo](https://github.com/assassin29092005/sih2026/blob/main/scripts/demo.py): `scripts/demo.py`

### Registration core

- [Registration pipeline](https://github.com/assassin29092005/sih2026/blob/main/sandhi/pipeline.py): `sandhi/pipeline.py`
- [Runtime settings](https://github.com/assassin29092005/sih2026/blob/main/sandhi/config.py): `sandhi/config.py`
- [Illumination normalization](https://github.com/assassin29092005/sih2026/blob/main/sandhi/normalize.py): `sandhi/normalize.py`
- [Dense matching](https://github.com/assassin29092005/sih2026/blob/main/sandhi/matching.py): `sandhi/matching.py`
- [Subpixel refinement](https://github.com/assassin29092005/sih2026/blob/main/sandhi/refine.py): `sandhi/refine.py`
- [Geometric fitting](https://github.com/assassin29092005/sih2026/blob/main/sandhi/models.py): `sandhi/models.py`
- [Match metrics](https://github.com/assassin29092005/sih2026/blob/main/sandhi/metrics.py): `sandhi/metrics.py`

### Validation

- [Control gate](https://github.com/assassin29092005/sih2026/blob/main/sandhi/controls.py): `sandhi/controls.py`
- [Controlled remeasurement](https://github.com/assassin29092005/sih2026/blob/main/scripts/remeasure.py): `scripts/remeasure.py`
- [Method ablation](https://github.com/assassin29092005/sih2026/blob/main/scripts/ablation.py): `scripts/ablation.py`
- [Dense-match experiments](https://github.com/assassin29092005/sih2026/blob/main/scripts/dense_match.py): `scripts/dense_match.py`

### Lunar analysis

- [Kaguya image access](https://github.com/assassin29092005/sih2026/blob/main/scripts/triple_io.py): `scripts/triple_io.py`
- [Scale evaluation](https://github.com/assassin29092005/sih2026/blob/main/scripts/scale_pipeline.py): `scripts/scale_pipeline.py`
- [OHRC projection](https://github.com/assassin29092005/sih2026/blob/main/scripts/ohrc_project.py): `scripts/ohrc_project.py`
- [Sensor comparisons](https://github.com/assassin29092005/sih2026/blob/main/scripts/ohrc_vs_kaguya.py): `scripts/ohrc_vs_kaguya.py`
- [IIRS comparison](https://github.com/assassin29092005/sih2026/blob/main/scripts/iirs_vs_kaguya.py): `scripts/iirs_vs_kaguya.py`
- [Coverage survey](https://github.com/assassin29092005/sih2026/blob/main/scripts/survey_coverage.py): `scripts/survey_coverage.py`
- [Image footprints](https://github.com/assassin29092005/sih2026/blob/main/scripts/ch2_footprints.py): `scripts/ch2_footprints.py`

### Results

- [Registration deliverable](https://github.com/assassin29092005/sih2026/blob/main/scripts/register.py): `scripts/register.py`
- [Output serialization](https://github.com/assassin29092005/sih2026/blob/main/sandhi/outputs.py): `sandhi/outputs.py`

### Other components

- **Engineer**

## Connections

- Engineer → Command interface: runs commands (evidence: `sandhi/cli.py`)
- Command interface → Registration pipeline: registers images (evidence: `sandhi/cli.py`)
- Command interface → Control gate: runs gate (evidence: `sandhi/cli.py`)
- Command interface → Visual demo: dispatches demo (evidence: `sandhi/cli.py`)
- Command interface → Coverage survey: dispatches survey (evidence: `sandhi/cli.py`)
- Command interface → Output serialization: writes results (evidence: `sandhi/cli.py`)
- Visual demo → Registration pipeline: registers images (evidence: `scripts/demo.py`)
- Registration pipeline → Runtime settings: reads settings (evidence: `sandhi/pipeline.py`)
- Registration pipeline → Illumination normalization: normalizes images (evidence: `sandhi/pipeline.py`)
- Registration pipeline → Dense matching: finds correspondences (evidence: `sandhi/pipeline.py`)
- Registration pipeline → Subpixel refinement: refines matches (evidence: `sandhi/pipeline.py`)
- Registration pipeline → Geometric fitting: fits transform (evidence: `sandhi/pipeline.py`)
- Registration pipeline → Match metrics: computes metrics (evidence: `sandhi/pipeline.py`)
- Controlled remeasurement → Method ablation: compares methods (evidence: `scripts/remeasure.py`)
- Controlled remeasurement → Dense-match experiments: uses matcher (evidence: `scripts/remeasure.py`)
- Controlled remeasurement → Kaguya image access: opens imagery (evidence: `scripts/remeasure.py`)
- Controlled remeasurement → Control gate: gates measurements
- Registration deliverable → Kaguya image access: loads image pair (evidence: `scripts/register.py`)
- Registration deliverable → Registration pipeline: registers imagery
- IIRS comparison → Registration pipeline: tests registration (evidence: `scripts/iirs_vs_kaguya.py`)
- IIRS comparison → OHRC projection: uses projection (evidence: `scripts/iirs_vs_kaguya.py`)
- IIRS comparison → Kaguya image access: opens reference (evidence: `scripts/iirs_vs_kaguya.py`)
- Sensor comparisons → Registration pipeline: evaluates registration
- Scale evaluation → Registration pipeline: evaluates scale
- Image footprints → Coverage survey: supports coverage
