# exobssim/exorad2-public architecture

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

- Interactive diagram: https://gitdiagram.com/exobssim/exorad2-public
- Repository: https://github.com/exobssim/exorad2-public

## Overview

ExoRad is a point-source radiometric model. A researcher invokes the CLI with payload and target-list files; configuration builds instrument channels, targets are loaded, light is propagated through optics, foregrounds and detector noise are estimated, and per-channel results are merged and written to HDF5, with optional plots. The graph reflects sampled orchestration and model code; some task internals were omitted, so only documented or directly evidenced connections are shown.

Main entry points: [`exorad/exorad.py`](https://github.com/exobssim/exorad2-public/blob/master/exorad/exorad.py) (CLI Pipeline), [`exorad/models/target.py`](https://github.com/exobssim/exorad2-public/blob/master/exorad/models/target.py) (Target Model), [`exorad/tasks/instrumentHandler.py`](https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/instrumentHandler.py) (Payload Builder), [`exorad/models/instruments/instrument.py`](https://github.com/exobssim/exorad2-public/blob/master/exorad/models/instruments/instrument.py) (Instrument Models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Pipeline Orchestration"]
  node_cli["CLI Pipeline<br/>[exorad.py]"]
  node_options["Option Loading<br/>[loadOptions.py]"]
end

subgraph group_inputs["Inputs And Instruments"]
  node_target_ingest["Target Ingestion<br/>[targetlist.py]"]
  node_target_model["Target Model<br/>[target.py]"]
  node_payload["Payload Builder"]
  node_instrument["Instrument Models<br/>[instrument.py]"]
  node_photometer["Photometer Channels<br/>[photometer.py]"]
  node_spectrometer["Spectrometer Channels<br/>[spectrometer.py]"]
end

subgraph group_radiometry["Radiometric Modeling"]
  node_optics["Optical Path<br/>[opticalPath.py]"]
  node_propagation["Light Propagation<br/>[propagateLight.py]"]
  node_signal["Signal Model<br/>[signal.py]"]
  node_foregrounds["Foreground Estimation"]
  node_noise_tasks["Noise Estimation<br/>[noiseHandler.py]"]
  node_noise_model["Noise Models<br/>[noise.py]"]
end

subgraph group_results["Results And Output"]
  node_target_results["Target Results<br/>[targetHandler.py]"]
  node_hdf5[("HDF5 Output<br/>[hdf5.py]")]
  node_plotter["Result Plotting<br/>[plotter.py]"]
end

node_user(("Researcher"))

node_user -->|"invokes"| node_cli
node_cli -->|"loads options"| node_options
node_cli -->|"builds payload"| node_payload
node_cli -->|"loads targets"| node_target_ingest
node_payload -->|"creates instruments"| node_instrument
node_instrument -->|"builds channels"| node_photometer
node_instrument -->|"builds channels"| node_spectrometer
node_target_ingest -->|"creates targets"| node_target_model
node_payload -->|"configures optics"| node_optics
node_cli -->|"runs observation"| node_propagation
node_propagation -->|"computes signals"| node_signal
node_target_model -->|"estimates foregrounds"| node_foregrounds
node_target_model -->|"estimates noise"| node_noise_tasks
node_noise_tasks -->|"computes noise"| node_noise_model
node_target_results -->|"updates tables"| node_target_model
node_cli -->|"merges results"| node_target_results
node_cli -->|"writes results"| node_hdf5
node_cli -.->|"saves plots"| node_plotter

click node_cli "https://github.com/exobssim/exorad2-public/blob/master/exorad/exorad.py"
click node_options "https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/loadOptions.py"
click node_target_ingest "https://github.com/exobssim/exorad2-public/blob/master/exorad/models/targetlist.py"
click node_target_model "https://github.com/exobssim/exorad2-public/blob/master/exorad/models/target.py"
click node_payload "https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/instrumentHandler.py"
click node_instrument "https://github.com/exobssim/exorad2-public/blob/master/exorad/models/instruments/instrument.py"
click node_photometer "https://github.com/exobssim/exorad2-public/blob/master/exorad/models/instruments/photometer.py"
click node_spectrometer "https://github.com/exobssim/exorad2-public/blob/master/exorad/models/instruments/spectrometer.py"
click node_optics "https://github.com/exobssim/exorad2-public/blob/master/exorad/models/optics/opticalPath.py"
click node_propagation "https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/propagateLight.py"
click node_signal "https://github.com/exobssim/exorad2-public/blob/master/exorad/models/signal.py"
click node_foregrounds "https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/foregroundHandler.py"
click node_noise_tasks "https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/noiseHandler.py"
click node_noise_model "https://github.com/exobssim/exorad2-public/blob/master/exorad/models/noise.py"
click node_target_results "https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/targetHandler.py"
click node_hdf5 "https://github.com/exobssim/exorad2-public/blob/master/exorad/output/hdf5/hdf5.py"
click node_plotter "https://github.com/exobssim/exorad2-public/blob/master/exorad/utils/plotter.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_options toneBlue
class node_target_ingest,node_target_model,node_payload,node_instrument,node_photometer,node_spectrometer toneAmber
class node_optics,node_propagation,node_signal,node_foregrounds,node_noise_tasks,node_noise_model toneMint
class node_target_results,node_hdf5,node_plotter toneRose
class node_user toneIndigo
```

## Components

### Pipeline Orchestration

- [CLI Pipeline](https://github.com/exobssim/exorad2-public/blob/master/exorad/exorad.py): `exorad/exorad.py`
- [Option Loading](https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/loadOptions.py): `exorad/tasks/loadOptions.py`

### Inputs And Instruments

- [Target Ingestion](https://github.com/exobssim/exorad2-public/blob/master/exorad/models/targetlist.py): `exorad/models/targetlist.py`
- [Target Model](https://github.com/exobssim/exorad2-public/blob/master/exorad/models/target.py): `exorad/models/target.py`
- [Payload Builder](https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/instrumentHandler.py): `exorad/tasks/instrumentHandler.py`
- [Instrument Models](https://github.com/exobssim/exorad2-public/blob/master/exorad/models/instruments/instrument.py): `exorad/models/instruments/instrument.py`
- [Photometer Channels](https://github.com/exobssim/exorad2-public/blob/master/exorad/models/instruments/photometer.py): `exorad/models/instruments/photometer.py`
- [Spectrometer Channels](https://github.com/exobssim/exorad2-public/blob/master/exorad/models/instruments/spectrometer.py): `exorad/models/instruments/spectrometer.py`

### Radiometric Modeling

- [Optical Path](https://github.com/exobssim/exorad2-public/blob/master/exorad/models/optics/opticalPath.py): `exorad/models/optics/opticalPath.py`
- [Light Propagation](https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/propagateLight.py): `exorad/tasks/propagateLight.py`
- [Signal Model](https://github.com/exobssim/exorad2-public/blob/master/exorad/models/signal.py): `exorad/models/signal.py`
- [Foreground Estimation](https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/foregroundHandler.py): `exorad/tasks/foregroundHandler.py`
- [Noise Estimation](https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/noiseHandler.py): `exorad/tasks/noiseHandler.py`
- [Noise Models](https://github.com/exobssim/exorad2-public/blob/master/exorad/models/noise.py): `exorad/models/noise.py`

### Results And Output

- [Target Results](https://github.com/exobssim/exorad2-public/blob/master/exorad/tasks/targetHandler.py): `exorad/tasks/targetHandler.py`
- [HDF5 Output](https://github.com/exobssim/exorad2-public/blob/master/exorad/output/hdf5/hdf5.py): `exorad/output/hdf5/hdf5.py`
- [Result Plotting](https://github.com/exobssim/exorad2-public/blob/master/exorad/utils/plotter.py): `exorad/utils/plotter.py`

### Other components

- **Researcher**

## Connections

- Researcher → CLI Pipeline: invokes
- CLI Pipeline → Option Loading: loads options
- CLI Pipeline → Payload Builder: builds payload
- CLI Pipeline → Target Ingestion: loads targets
- Payload Builder → Instrument Models: creates instruments
- Instrument Models → Photometer Channels: builds channels
- Instrument Models → Spectrometer Channels: builds channels
- Target Ingestion → Target Model: creates targets
- Payload Builder → Optical Path: configures optics
- CLI Pipeline → Light Propagation: runs observation
- Light Propagation → Signal Model: computes signals
- Target Model → Foreground Estimation: estimates foregrounds
- Target Model → Noise Estimation: estimates noise
- Noise Estimation → Noise Models: computes noise
- Target Results → Target Model: updates tables
- CLI Pipeline → Target Results: merges results
- CLI Pipeline → HDF5 Output: writes results
- CLI Pipeline → Result Plotting: saves plots
