# askaniy/truecolortools architecture

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

- Interactive diagram: https://gitdiagram.com/askaniy/truecolortools
- Repository: https://github.com/askaniy/truecolortools

## Overview

TrueColorTools is a desktop astronomy application and spectral-processing library that turns photometry, spectra, and images into color output. The principal workflow runs from GUI selection or image input through data import and spectral/color computation to display, plotting, or saved images; the database viewer can also produce category tables. The README documents blackbody and redshift analysis, database tags and references, and color-space settings. Edges are limited to relationships shown in excerpts, the source index, or README; unsampled implementation details are not inferred.

Main entry points: [`src/core.py`](https://github.com/askaniy/truecolortools/blob/master/src/core.py) (Spectra and color), [`src/main.py`](https://github.com/askaniy/truecolortools/blob/master/src/main.py) (GUI event coordinator), [`src/gui.py`](https://github.com/askaniy/truecolortools/blob/master/src/gui.py) (GUI layouts), [`src/image_processing.py`](https://github.com/askaniy/truecolortools/blob/master/src/image_processing.py) (Image color processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_launcher["Application launcher<br/>[runTCT.py]"]
  node_app["GUI event coordinator<br/>[main.py]"]
  node_gui["GUI layouts<br/>[gui.py]"]
  node_localization["Localization<br/>[strings.py]"]
end

subgraph group_spectral["Spectral processing"]
  node_spectral_core["Spectra and color<br/>[core.py]"]
  node_numerics["Numerical helpers<br/>[auxiliary.py]"]
  node_data_import["Spectrum import<br/>[data_import.py]"]
  node_image_import["Image readers<br/>[image_import.py]"]
  node_image_processing["Image color processing"]
  node_blackbody["Blackbody and redshifts<br/>[core.py]"]
end

subgraph group_catalog["Scientific data"]
  node_database[("Catalog access<br/>[database.py]")]
  node_spectra_catalog[("Spectra catalog")]
  node_filter_catalog[("Filter profiles")]
end

subgraph group_outputs["Visualization and output"]
  node_plotter["Spectral plots<br/>[plotter.py]"]
  node_table_generator["Color tables<br/>[table_generator.py]"]
end

node_user(("Astronomy user"))

node_user -->|"starts"| node_launcher
node_launcher -->|"launches"| node_app
node_app -->|"creates interface"| node_gui
node_app -->|"lists objects"| node_database
node_app -->|"calculates colors"| node_spectral_core
node_app -->|"dispatches images"| node_image_processing
node_app -->|"requests plots"| node_plotter
node_app -->|"generates tables"| node_table_generator
node_gui -->|"uses"| node_spectral_core
node_gui -->|"uses"| node_image_processing
node_gui -->|"uses translations"| node_localization
node_spectral_core -->|"imports data"| node_data_import
node_spectral_core -->|"loads catalog data"| node_database
node_spectral_core -->|"uses calculations"| node_numerics
node_spectral_core -->|"uses readers"| node_image_import
node_image_processing -->|"reads images"| node_image_import
node_image_processing -->|"computes image colors"| node_spectral_core
node_table_generator -->|"calculates object colors"| node_spectral_core
node_table_generator -->|"reads objects"| node_database
node_plotter -->|"plots spectra"| node_spectral_core
node_plotter -->|"draws figures"| node_gui
node_database -.->|"reads spectra"| node_spectra_catalog
node_spectral_core -.->|"uses filter profiles"| node_filter_catalog
node_user -.->|"requests analysis"| node_blackbody

click node_launcher "https://github.com/askaniy/truecolortools/blob/master/runTCT.py"
click node_app "https://github.com/askaniy/truecolortools/blob/master/src/main.py"
click node_gui "https://github.com/askaniy/truecolortools/blob/master/src/gui.py"
click node_localization "https://github.com/askaniy/truecolortools/blob/master/src/strings.py"
click node_spectral_core "https://github.com/askaniy/truecolortools/blob/master/src/core.py"
click node_numerics "https://github.com/askaniy/truecolortools/blob/master/src/auxiliary.py"
click node_data_import "https://github.com/askaniy/truecolortools/blob/master/src/data_import.py"
click node_image_import "https://github.com/askaniy/truecolortools/blob/master/src/image_import.py"
click node_image_processing "https://github.com/askaniy/truecolortools/blob/master/src/image_processing.py"
click node_database "https://github.com/askaniy/truecolortools/blob/master/src/database.py"
click node_spectra_catalog "https://github.com/askaniy/truecolortools/tree/master/spectra"
click node_filter_catalog "https://github.com/askaniy/truecolortools/tree/master/filters"
click node_plotter "https://github.com/askaniy/truecolortools/blob/master/src/plotter.py"
click node_table_generator "https://github.com/askaniy/truecolortools/blob/master/src/table_generator.py"
click node_blackbody "https://github.com/askaniy/truecolortools/blob/master/src/core.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_launcher,node_app,node_gui,node_localization,node_user toneBlue
class node_spectral_core,node_numerics,node_data_import,node_image_import,node_image_processing,node_blackbody toneAmber
class node_database,node_spectra_catalog,node_filter_catalog toneMint
class node_plotter,node_table_generator toneRose
```

## Components

### User interface

- [Application launcher](https://github.com/askaniy/truecolortools/blob/master/runTCT.py): `runTCT.py`
- [GUI event coordinator](https://github.com/askaniy/truecolortools/blob/master/src/main.py): `src/main.py`
- [GUI layouts](https://github.com/askaniy/truecolortools/blob/master/src/gui.py): `src/gui.py`
- [Localization](https://github.com/askaniy/truecolortools/blob/master/src/strings.py): `src/strings.py`

### Spectral processing

- [Spectra and color](https://github.com/askaniy/truecolortools/blob/master/src/core.py): `src/core.py`
- [Numerical helpers](https://github.com/askaniy/truecolortools/blob/master/src/auxiliary.py): `src/auxiliary.py`
- [Spectrum import](https://github.com/askaniy/truecolortools/blob/master/src/data_import.py): `src/data_import.py`
- [Image readers](https://github.com/askaniy/truecolortools/blob/master/src/image_import.py): `src/image_import.py`
- [Image color processing](https://github.com/askaniy/truecolortools/blob/master/src/image_processing.py): `src/image_processing.py`
- [Blackbody and redshifts](https://github.com/askaniy/truecolortools/blob/master/src/core.py): `src/core.py`

### Scientific data

- [Catalog access](https://github.com/askaniy/truecolortools/blob/master/src/database.py): `src/database.py`
- [Spectra catalog](https://github.com/askaniy/truecolortools/tree/master/spectra): `spectra`
- [Filter profiles](https://github.com/askaniy/truecolortools/tree/master/filters): `filters`

### Visualization and output

- [Spectral plots](https://github.com/askaniy/truecolortools/blob/master/src/plotter.py): `src/plotter.py`
- [Color tables](https://github.com/askaniy/truecolortools/blob/master/src/table_generator.py): `src/table_generator.py`

### Other components

- **Astronomy user**

## Connections

- Astronomy user → Application launcher: starts (evidence: `ReadMe.md`)
- Application launcher → GUI event coordinator: launches (evidence: `runTCT.py`)
- GUI event coordinator → GUI layouts: creates interface (evidence: `src/main.py`)
- GUI event coordinator → Catalog access: lists objects (evidence: `src/main.py`)
- GUI event coordinator → Spectra and color: calculates colors (evidence: `src/main.py`)
- GUI event coordinator → Image color processing: dispatches images (evidence: `src/main.py`)
- GUI event coordinator → Spectral plots: requests plots (evidence: `src/main.py`)
- GUI event coordinator → Color tables: generates tables (evidence: `src/main.py`)
- GUI layouts → Spectra and color: uses (evidence: `src/gui.py`)
- GUI layouts → Image color processing: uses (evidence: `src/gui.py`)
- GUI layouts → Localization: uses translations (evidence: `src/gui.py`)
- Spectra and color → Spectrum import: imports data (evidence: `src/core.py`)
- Spectra and color → Catalog access: loads catalog data (evidence: `src/core.py`)
- Spectra and color → Numerical helpers: uses calculations (evidence: `src/core.py`)
- Spectra and color → Image readers: uses readers (evidence: `src/core.py`)
- Image color processing → Image readers: reads images (evidence: `src/image_processing.py`)
- Image color processing → Spectra and color: computes image colors (evidence: `src/image_processing.py`)
- Color tables → Spectra and color: calculates object colors (evidence: `src/table_generator.py`)
- Color tables → Catalog access: reads objects (evidence: `src/table_generator.py`)
- Spectral plots → Spectra and color: plots spectra (evidence: `src/plotter.py`)
- Spectral plots → GUI layouts: draws figures (evidence: `src/plotter.py`)
- Catalog access → Spectra catalog: reads spectra (evidence: `ReadMe.md`)
- Spectra and color → Filter profiles: uses filter profiles (evidence: `ReadMe.md`)
- Astronomy user → Blackbody and redshifts: requests analysis (evidence: `ReadMe.md`)
