# batistitooo/exoinstruments architecture

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

- Interactive diagram: https://gitdiagram.com/batistitooo/exoinstruments
- Repository: https://github.com/batistitooo/exoinstruments

## Overview

ExoInstruments is a Kerbal Space Program observatory and exoplanet-survey mod. The principal workflow is selecting a catalogued star and instrument, scheduling an observation under visibility and noise constraints, simulating measurements, and analyzing transit, radial-velocity, or direct-imaging signals. It also provides a separate solar-system imaging capability, forecasts, and image/FITS presentation. The README documents the product-level workflows; the supplied source excerpts are limited, so unverified implementation links are omitted.

Main entry points: [`ExoInstruments/ExoInstrumentsGUI.cs`](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/ExoInstrumentsGUI.cs) (Observatory UI), [`ExoInstruments/Session/ObservationSession.cs`](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Session/ObservationSession.cs) (Observation session), [`ExoInstruments/Session/ImagingObservationSession.cs`](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Session/ImagingObservationSession.cs) (Imaging session), [`ExoInstruments/Core/InstrumentSpec.cs`](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/InstrumentSpec.cs) (Telescope specs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Player interaction"]
  node_gui["Observatory UI"]
  node_targetui["Target search UI"]
  node_scenario["Campaign state"]
end

subgraph group_planning["Targets and planning"]
  node_catalog[("Target catalog<br/>[TargetCatalogue.cs]")]
  node_search["Catalog search<br/>[TargetQuery.cs]"]
  node_forecast["Observing forecast"]
  node_session["Observation session"]
  node_imsession["Imaging session"]
end

subgraph group_science["Observation science"]
  node_transit["Transit pipeline"]
  node_transitdetect["Transit detection<br/>[TransitDetector.cs]"]
  node_rv["Radial velocity<br/>[RvSimulator.cs]"]
  node_rvdetect["RV detection<br/>[RvDetector.cs]"]
  node_direct["Direct imaging"]
  node_lightcurve["Light curves"]
end

subgraph group_imaging["Imaging and output"]
  node_instrument["Telescope specs<br/>[InstrumentSpec.cs]"]
  node_optics["Optics and PSF<br/>[OpticalPsf.cs]"]
  node_flux["Photon flux<br/>[PhotonFluxModel.cs]"]
  node_starfield["Star field render"]
  node_imageview["Image presentation"]
  node_fits["FITS output<br/>[FitsWriter.cs]"]
end

subgraph group_platform["KSP integration"]
  node_flight["Space telescope"]
  node_facility["Observatory facility"]
  node_evi["EVE clouds"]
  node_warp["Time warp"]
end

node_player(("KSP player"))

node_player -->|"uses"| node_gui
node_gui -->|"searches targets"| node_search
node_search -->|"queries stars"| node_catalog
node_gui -->|"checks windows"| node_forecast
node_gui -.->|"schedules observation"| node_session
node_session -.->|"collects light curve"| node_transit
node_session -.->|"collects spectra"| node_rv
node_transit -->|"analyzes signal"| node_transitdetect
node_rv -->|"analyzes signal"| node_rvdetect
node_session -.->|"simulates observation"| node_direct
node_gui -.->|"starts imaging"| node_imsession
node_imsession -.->|"renders sky field"| node_starfield
node_imsession -.->|"uses instrument specs"| node_instrument
node_instrument -.->|"configures optics"| node_optics
node_instrument -.->|"sets throughput"| node_flux
node_direct -.->|"produces image"| node_imageview
node_imageview -->|"exports image"| node_fits
node_gui -.->|"controls telescope"| node_flight
node_forecast -->|"uses cloud cover"| node_evi
node_gui -->|"warps to window"| node_warp

click node_gui "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/ExoInstrumentsGUI.cs"
click node_targetui "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/ExoInstrumentsGUI.TargetSearch.cs"
click node_scenario "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/ExoInstrumentsScenario.cs"
click node_catalog "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/TargetCatalogue.cs"
click node_search "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/TargetQuery.cs"
click node_forecast "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/ObservingForecast.cs"
click node_session "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Session/ObservationSession.cs"
click node_imsession "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Session/ImagingObservationSession.cs"
click node_transit "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/TransitPhotometry.cs"
click node_transitdetect "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/TransitDetector.cs"
click node_rv "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/RvSimulator.cs"
click node_rvdetect "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/RvDetector.cs"
click node_direct "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/DirectImagingSimulator.cs"
click node_lightcurve "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/LightCurveSimulator.cs"
click node_instrument "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/InstrumentSpec.cs"
click node_optics "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/OpticalPsf.cs"
click node_flux "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/PhotonFluxModel.cs"
click node_starfield "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/StarFieldRenderer.cs"
click node_imageview "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Visualization/DirectImagingTexture.cs"
click node_fits "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Visualization/FitsWriter.cs"
click node_flight "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Flight/ModuleExoSpaceTelescope.cs"
click node_facility "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/ExoObservatoryFacility.cs"
click node_evi "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Visualization/EveCloudIntegration.cs"
click node_warp "https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/BetterTimeWarpIntegration.cs"

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_gui,node_targetui,node_scenario toneBlue
class node_catalog,node_search,node_forecast,node_session,node_imsession toneAmber
class node_transit,node_transitdetect,node_rv,node_rvdetect,node_direct,node_lightcurve toneMint
class node_instrument,node_optics,node_flux,node_starfield,node_imageview,node_fits toneRose
class node_flight,node_facility,node_evi,node_warp,node_player toneIndigo
```

## Components

### Player interaction

- [Observatory UI](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/ExoInstrumentsGUI.cs): `ExoInstruments/ExoInstrumentsGUI.cs`
- [Target search UI](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/ExoInstrumentsGUI.TargetSearch.cs): `ExoInstruments/ExoInstrumentsGUI.TargetSearch.cs`
- [Campaign state](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/ExoInstrumentsScenario.cs): `ExoInstruments/ExoInstrumentsScenario.cs`

### Targets and planning

- [Target catalog](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/TargetCatalogue.cs): `ExoInstruments/Core/TargetCatalogue.cs`
- [Catalog search](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/TargetQuery.cs): `ExoInstruments/Core/TargetQuery.cs`
- [Observing forecast](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/ObservingForecast.cs): `ExoInstruments/Core/ObservingForecast.cs`
- [Observation session](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Session/ObservationSession.cs): `ExoInstruments/Session/ObservationSession.cs`
- [Imaging session](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Session/ImagingObservationSession.cs): `ExoInstruments/Session/ImagingObservationSession.cs`

### Observation science

- [Transit pipeline](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/TransitPhotometry.cs): `ExoInstruments/Core/TransitPhotometry.cs`
- [Transit detection](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/TransitDetector.cs): `ExoInstruments/Core/TransitDetector.cs`
- [Radial velocity](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/RvSimulator.cs): `ExoInstruments/Core/RvSimulator.cs`
- [RV detection](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/RvDetector.cs): `ExoInstruments/Core/RvDetector.cs`
- [Direct imaging](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/DirectImagingSimulator.cs): `ExoInstruments/Core/DirectImagingSimulator.cs`
- [Light curves](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/LightCurveSimulator.cs): `ExoInstruments/Core/LightCurveSimulator.cs`

### Imaging and output

- [Telescope specs](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/InstrumentSpec.cs): `ExoInstruments/Core/InstrumentSpec.cs`
- [Optics and PSF](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/OpticalPsf.cs): `ExoInstruments/Core/OpticalPsf.cs`
- [Photon flux](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/PhotonFluxModel.cs): `ExoInstruments/Core/PhotonFluxModel.cs`
- [Star field render](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Core/StarFieldRenderer.cs): `ExoInstruments/Core/StarFieldRenderer.cs`
- [Image presentation](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Visualization/DirectImagingTexture.cs): `ExoInstruments/Visualization/DirectImagingTexture.cs`
- [FITS output](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Visualization/FitsWriter.cs): `ExoInstruments/Visualization/FitsWriter.cs`

### KSP integration

- [Space telescope](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Flight/ModuleExoSpaceTelescope.cs): `ExoInstruments/Flight/ModuleExoSpaceTelescope.cs`
- [Observatory facility](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/ExoObservatoryFacility.cs): `ExoInstruments/ExoObservatoryFacility.cs`
- [EVE clouds](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/Visualization/EveCloudIntegration.cs): `ExoInstruments/Visualization/EveCloudIntegration.cs`
- [Time warp](https://github.com/batistitooo/exoinstruments/blob/main/ExoInstruments/BetterTimeWarpIntegration.cs): `ExoInstruments/BetterTimeWarpIntegration.cs`

### Other components

- **KSP player**

## Connections

- KSP player → Observatory UI: uses (evidence: `README.md`)
- Observatory UI → Catalog search: searches targets (evidence: `README.md`)
- Catalog search → Target catalog: queries stars (evidence: `README.md`)
- Observatory UI → Observing forecast: checks windows (evidence: `README.md`)
- Observatory UI → Observation session: schedules observation
- Observation session → Transit pipeline: collects light curve
- Observation session → Radial velocity: collects spectra
- Transit pipeline → Transit detection: analyzes signal (evidence: `README.md`)
- Radial velocity → RV detection: analyzes signal (evidence: `README.md`)
- Observation session → Direct imaging: simulates observation
- Observatory UI → Imaging session: starts imaging
- Imaging session → Star field render: renders sky field
- Imaging session → Telescope specs: uses instrument specs
- Telescope specs → Optics and PSF: configures optics
- Telescope specs → Photon flux: sets throughput
- Direct imaging → Image presentation: produces image
- Image presentation → FITS output: exports image (evidence: `README.md`)
- Observatory UI → Space telescope: controls telescope
- Observing forecast → EVE clouds: uses cloud cover (evidence: `README.md`)
- Observatory UI → Time warp: warps to window (evidence: `README.md`)
