# aristeidispatselis/trainee_ship-cosmology architecture

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

- Interactive diagram: https://gitdiagram.com/aristeidispatselis/trainee_ship-cosmology
- Repository: https://github.com/aristeidispatselis/trainee_ship-cosmology

## Overview

The repository contains two cosmology-fitting approaches: independent Code_0 research scripts and the more extensible Code_1 fitting framework. The user workflow is to choose a model and observational data, fit cosmological parameters, then inspect statistics and plots. Code_0 spans LCDM, modified-gravity, and Horndeski fits plus comparison analyses; Code_1 separates configuration, data loading, models, inference, and plotting. Several Code_0 branches and Code_1 modules are represented at their tree paths because their implementation was not sampled; relationships are shown only where the README or source index supports them.

Main entry points: [`Codes_1/cosmo_fitter/config/manager.py`](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/config/manager.py) (Configuration), [`Codes_1/cosmo_fitter/models/base.py`](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/models/base.py) (Model Base), [`Codes_1/cosmo_fitter/plotting/contours.py`](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/plotting/contours.py) (Contour Plots), [`Codes_1/cosmo_fitter/inference/optimizer.py`](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/inference/optimizer.py) (Optimizer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_legacy["Independent Code_0 Fits"]
  node_legacy_lcdm["LCDM Fits"]
  node_legacy_delta["Delta Fits"]
  node_legacy_hdot["H-dot Fits"]
  node_legacy_horn["Horndeski Fits"]
  node_legacy_omega["Omega Fits"]
  node_legacy_compare["Model Comparisons"]
end

subgraph group_framework["Code_1 Framework"]
  node_config["Configuration<br/>[manager.py]"]
  node_loader["Dataset Loader<br/>[loader.py]"]
end

subgraph group_models["Cosmology Models"]
  node_model_base["Model Base<br/>[base.py]"]
  node_lcdm_model["LCDM Model<br/>[lcdm.py]"]
  node_delta_model["Delta Model<br/>[delta.py]"]
  node_hdot_model["H-dot Model<br/>[hdot.py]"]
  node_registry["Model Registry<br/>[registry.py]"]
end

subgraph group_analysis["Inference And Results"]
  node_optimizer["Optimizer<br/>[optimizer.py]"]
  node_mcmc["MCMC Sampler<br/>[mcmc.py]"]
  node_stats["Fit Statistics<br/>[stats.py]"]
  node_plot_base["Plot Utilities<br/>[base.py]"]
  node_contours["Contour Plots<br/>[contours.py]"]
  node_hubble_plot["Hubble Plots<br/>[hubble.py]"]
end

node_researcher(("Researcher"))
node_datasets[("Data_Sets")]

node_researcher -->|"runs fits"| node_legacy_lcdm
node_researcher -->|"runs fits"| node_legacy_delta
node_researcher -->|"runs fits"| node_legacy_hdot
node_researcher -->|"runs fits"| node_legacy_horn
node_researcher -->|"runs fits"| node_legacy_omega
node_researcher -->|"compares fits"| node_legacy_compare
node_datasets -->|"supplies data"| node_legacy_lcdm
node_datasets -->|"supplies data"| node_legacy_delta
node_datasets -->|"supplies data"| node_legacy_hdot
node_datasets -->|"supplies data"| node_legacy_horn
node_datasets -->|"supplies data"| node_legacy_omega
node_loader -->|"reads settings"| node_config
node_model_base -->|"reads settings"| node_config
node_optimizer -->|"evaluates model"| node_model_base
node_optimizer -->|"reads settings"| node_config
node_mcmc -->|"evaluates model"| node_model_base
node_mcmc -->|"reads settings"| node_config
node_contours -->|"evaluates model"| node_model_base
node_contours -->|"uses plot helpers"| node_plot_base
node_contours -->|"reads settings"| node_config

click node_legacy_lcdm "https://github.com/aristeidispatselis/trainee_ship-cosmology/tree/main/Codes_0/model_lcdm"
click node_legacy_delta "https://github.com/aristeidispatselis/trainee_ship-cosmology/tree/main/Codes_0/model_delta"
click node_legacy_hdot "https://github.com/aristeidispatselis/trainee_ship-cosmology/tree/main/Codes_0/model_a"
click node_legacy_horn "https://github.com/aristeidispatselis/trainee_ship-cosmology/tree/main/Codes_0/Horndeski"
click node_legacy_omega "https://github.com/aristeidispatselis/trainee_ship-cosmology/tree/main/Codes_0/other/model_omega_delta"
click node_legacy_compare "https://github.com/aristeidispatselis/trainee_ship-cosmology/tree/main/Codes_0/comparison"
click node_config "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/config/manager.py"
click node_loader "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/data/loader.py"
click node_model_base "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/models/base.py"
click node_lcdm_model "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/models/lcdm.py"
click node_delta_model "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/models/delta.py"
click node_hdot_model "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/models/hdot.py"
click node_registry "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/models/registry.py"
click node_optimizer "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/inference/optimizer.py"
click node_mcmc "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/inference/mcmc.py"
click node_stats "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/inference/stats.py"
click node_plot_base "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/plotting/base.py"
click node_contours "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/plotting/contours.py"
click node_hubble_plot "https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/plotting/hubble.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_legacy_lcdm,node_legacy_delta,node_legacy_hdot,node_legacy_horn,node_legacy_omega,node_legacy_compare toneBlue
class node_config,node_loader,node_datasets toneAmber
class node_model_base,node_lcdm_model,node_delta_model,node_hdot_model,node_registry toneMint
class node_optimizer,node_mcmc,node_stats,node_plot_base,node_contours,node_hubble_plot toneRose
class node_researcher toneIndigo
```

## Components

### Independent Code_0 Fits

- [LCDM Fits](https://github.com/aristeidispatselis/trainee_ship-cosmology/tree/main/Codes_0/model_lcdm): `Codes_0/model_lcdm`
- [Delta Fits](https://github.com/aristeidispatselis/trainee_ship-cosmology/tree/main/Codes_0/model_delta): `Codes_0/model_delta`
- [H-dot Fits](https://github.com/aristeidispatselis/trainee_ship-cosmology/tree/main/Codes_0/model_a): `Codes_0/model_a`
- [Horndeski Fits](https://github.com/aristeidispatselis/trainee_ship-cosmology/tree/main/Codes_0/Horndeski): `Codes_0/Horndeski`
- [Omega Fits](https://github.com/aristeidispatselis/trainee_ship-cosmology/tree/main/Codes_0/other/model_omega_delta): `Codes_0/other/model_omega_delta`
- [Model Comparisons](https://github.com/aristeidispatselis/trainee_ship-cosmology/tree/main/Codes_0/comparison): `Codes_0/comparison`

### Code_1 Framework

- [Configuration](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/config/manager.py): `Codes_1/cosmo_fitter/config/manager.py`
- [Dataset Loader](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/data/loader.py): `Codes_1/cosmo_fitter/data/loader.py`

### Cosmology Models

- [Model Base](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/models/base.py): `Codes_1/cosmo_fitter/models/base.py`
- [LCDM Model](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/models/lcdm.py): `Codes_1/cosmo_fitter/models/lcdm.py`
- [Delta Model](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/models/delta.py): `Codes_1/cosmo_fitter/models/delta.py`
- [H-dot Model](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/models/hdot.py): `Codes_1/cosmo_fitter/models/hdot.py`
- [Model Registry](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/models/registry.py): `Codes_1/cosmo_fitter/models/registry.py`

### Inference And Results

- [Optimizer](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/inference/optimizer.py): `Codes_1/cosmo_fitter/inference/optimizer.py`
- [MCMC Sampler](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/inference/mcmc.py): `Codes_1/cosmo_fitter/inference/mcmc.py`
- [Fit Statistics](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/inference/stats.py): `Codes_1/cosmo_fitter/inference/stats.py`
- [Plot Utilities](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/plotting/base.py): `Codes_1/cosmo_fitter/plotting/base.py`
- [Contour Plots](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/plotting/contours.py): `Codes_1/cosmo_fitter/plotting/contours.py`
- [Hubble Plots](https://github.com/aristeidispatselis/trainee_ship-cosmology/blob/main/Codes_1/cosmo_fitter/plotting/hubble.py): `Codes_1/cosmo_fitter/plotting/hubble.py`

### Other components

- **Researcher**
- **Data_Sets**

## Connections

- Researcher → LCDM Fits: runs fits
- Researcher → Delta Fits: runs fits
- Researcher → H-dot Fits: runs fits
- Researcher → Horndeski Fits: runs fits
- Researcher → Omega Fits: runs fits
- Researcher → Model Comparisons: compares fits
- Data_Sets → LCDM Fits: supplies data
- Data_Sets → Delta Fits: supplies data
- Data_Sets → H-dot Fits: supplies data
- Data_Sets → Horndeski Fits: supplies data
- Data_Sets → Omega Fits: supplies data
- Dataset Loader → Configuration: reads settings (evidence: `Codes_1/cosmo_fitter/data/loader.py`)
- Model Base → Configuration: reads settings (evidence: `Codes_1/cosmo_fitter/models/base.py`)
- Optimizer → Model Base: evaluates model (evidence: `Codes_1/cosmo_fitter/inference/optimizer.py`)
- Optimizer → Configuration: reads settings (evidence: `Codes_1/cosmo_fitter/inference/optimizer.py`)
- MCMC Sampler → Model Base: evaluates model (evidence: `Codes_1/cosmo_fitter/inference/mcmc.py`)
- MCMC Sampler → Configuration: reads settings (evidence: `Codes_1/cosmo_fitter/inference/mcmc.py`)
- Contour Plots → Model Base: evaluates model (evidence: `Codes_1/cosmo_fitter/plotting/contours.py`)
- Contour Plots → Plot Utilities: uses plot helpers (evidence: `Codes_1/cosmo_fitter/plotting/contours.py`)
- Contour Plots → Configuration: reads settings (evidence: `Codes_1/cosmo_fitter/plotting/contours.py`)
