# rafm1101/phoibe architecture

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

- Interactive diagram: https://gitdiagram.com/rafm1101/phoibe
- Repository: https://github.com/rafm1101/phoibe

## Overview

Phoibe is a Python toolkit for data-science workflows. Its clearest end-to-end use case is terrain and wind-transferability assessment: a caller supplies terrain and locations, the RIX pipeline checks inputs, computes ruggedness and optional TRIX results, then publishes artifacts. Other documented capabilities include layered machine-data profiling and validation, raster reprojection and visualization, and synthetic data generation. The RIX composition root and several validation relationships are visible in excerpts or the source index; other capability links rely on the README, so unsampled internal flow is not inferred.

Main entry points: [`phoibe/geography/complexity/rix/pipelines/analyzer.py`](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/pipelines/analyzer.py) (TRIX Analyzer), [`phoibe/geography/complexity/rix/main.py`](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/main.py) (Composition Root), [`phoibe/layered/application/factory.py`](https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/application/factory.py) (Validation Factory), [`phoibe/layered/application/validator.py`](https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/application/validator.py) (Layer Validator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_terrain["Terrain Assessment"]
  node_cli["CLI<br/>[cli.py]"]
  node_composition["Composition Root<br/>[main.py]"]
  node_inputs["Input Readers"]
  node_product["Product Specification<br/>[specification.py]"]
  node_analyzer["TRIX Analyzer<br/>[analyzer.py]"]
  node_checks["Input Checks"]
  node_sampling["Field Sampling<br/>[fieldsampler.py]"]
  node_profiles["Terrain Profiles<br/>[profiles.py]"]
  node_rix["RIX Evaluation<br/>[results.py]"]
  node_trix["TRIX Computation<br/>[trix.py]"]
  node_result_tables["Result Tables<br/>[tables.py]"]
  node_publishing["Publishing Contract"]
  node_writer["Artifact Writer<br/>[writer.py]"]
  node_summary["Result Summary<br/>[result_summary.py]"]
end

subgraph group_validation["Layered Validation"]
  node_machine_data["Machine Data<br/>[io.py]"]
  node_factory["Validation Factory<br/>[factory.py]"]
  node_registry["Rule Registry<br/>[registry.py]"]
  node_validator["Layer Validator<br/>[validator.py]"]
  node_context["Validation Context<br/>[context.py]"]
  node_rules["Validation Rules<br/>[rule.py]"]
  node_index_rules["Time-Series Rules<br/>[rules_index.py]"]
  node_entities["Reports and Results<br/>[entities.py]"]
  node_export["Report Export<br/>[export.py]"]
  node_logging["Validation Logging<br/>[logging.py]"]
end

subgraph group_geography["Geographic Tools"]
  node_raster["Raster Reprojection<br/>[reproject.py]"]
  node_plot["Raster Visualization<br/>[raster.py]"]
  node_landmarks["Landmark Plotting<br/>[landmarks.py]"]
end

subgraph group_synthetic["Synthetic Data"]
  node_synthetic_fields["Synthetic Fields<br/>[fields.py]"]
  node_synthetic_sites["Sample Sites<br/>[sites.py]"]
  node_turbine["Synthetic Turbine Data<br/>[turbine.py]"]
  node_noise["SCADA Noise<br/>[_turbine_noise.py]"]
  node_scada["SCADA Timeseries<br/>[_turbine_scada.py]"]
end

node_user(("Caller"))

node_user -->|"invokes"| node_cli
node_user -->|"configures"| node_composition
node_cli -->|"dispatches"| node_composition
node_composition -->|"builds"| node_analyzer
node_composition -->|"reads inputs"| node_inputs
node_composition -->|"configures"| node_product
node_composition -->|"supplies writer"| node_writer
node_analyzer -->|"checks inputs"| node_checks
node_analyzer -->|"samples field"| node_sampling
node_analyzer -->|"computes RIX"| node_rix
node_analyzer -->|"computes TRIX"| node_trix
node_analyzer -->|"builds tables"| node_result_tables
node_profiles -->|"samples profiles"| node_sampling
node_rix -->|"evaluates profiles"| node_profiles
node_analyzer -->|"publishes results"| node_publishing
node_analyzer -->|"writes artifacts"| node_writer
node_writer -->|"returns summary"| node_summary
node_machine_data -.->|"provides data"| node_factory
node_factory -->|"uses registry"| node_registry
node_factory -->|"uses validator"| node_validator
node_factory -->|"creates entities"| node_entities
node_validator -->|"builds context"| node_context
node_validator -->|"executes rules"| node_rules
node_registry -->|"registers rules"| node_rules
node_index_rules -->|"extends base"| node_rules
node_validator -->|"produces reports"| node_entities
node_export -->|"exports reports"| node_entities
node_raster -.->|"reprojects rasters"| node_user
node_user -.->|"visualizes data"| node_plot
node_user -.->|"plots landmarks"| node_landmarks
node_user -.->|"generates fields"| node_synthetic_fields
node_user -.->|"generates points"| node_synthetic_sites
node_user -.->|"generates timeseries"| node_turbine
node_turbine -->|"uses noise"| node_noise
node_turbine -->|"uses generator"| node_scada

click node_cli "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/entrypoints/cli.py"
click node_composition "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/main.py"
click node_inputs "https://github.com/rafm1101/phoibe/tree/main/phoibe/geography/complexity/rix/adapters"
click node_product "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/pipelines/product/specification.py"
click node_analyzer "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/pipelines/analyzer.py"
click node_checks "https://github.com/rafm1101/phoibe/tree/main/phoibe/geography/complexity/rix/pipelines/checks"
click node_sampling "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/computations/fieldsampler.py"
click node_profiles "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/computations/profiles.py"
click node_rix "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/computations/results.py"
click node_trix "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/computations/trix.py"
click node_result_tables "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/pipelines/results/tables.py"
click node_publishing "https://github.com/rafm1101/phoibe/tree/main/phoibe/geography/complexity/rix/pipelines/publishing"
click node_writer "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/adapters/writer.py"
click node_summary "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/pipelines/results/result_summary.py"
click node_machine_data "https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/infrastructure/io.py"
click node_factory "https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/application/factory.py"
click node_registry "https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/application/registry.py"
click node_validator "https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/application/validator.py"
click node_context "https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/application/context.py"
click node_rules "https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/rules/rule.py"
click node_index_rules "https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/rules/rules_index.py"
click node_entities "https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/core/entities.py"
click node_export "https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/infrastructure/export.py"
click node_logging "https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/logging/logging.py"
click node_raster "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/crs/reproject.py"
click node_plot "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/plot/raster.py"
click node_landmarks "https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/plot/landmarks.py"
click node_synthetic_fields "https://github.com/rafm1101/phoibe/blob/main/phoibe/synthetic_data/fields.py"
click node_synthetic_sites "https://github.com/rafm1101/phoibe/blob/main/phoibe/synthetic_data/sites.py"
click node_turbine "https://github.com/rafm1101/phoibe/blob/main/phoibe/synthetic_data/turbine.py"
click node_noise "https://github.com/rafm1101/phoibe/blob/main/phoibe/synthetic_data/_turbine_noise.py"
click node_scada "https://github.com/rafm1101/phoibe/blob/main/phoibe/synthetic_data/_turbine_scada.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_composition,node_inputs,node_product,node_analyzer,node_checks,node_sampling,node_profiles,node_rix,node_trix,node_result_tables,node_publishing,node_writer,node_summary toneBlue
class node_machine_data,node_factory,node_registry,node_validator,node_context,node_rules,node_index_rules,node_entities,node_export,node_logging toneAmber
class node_raster,node_plot,node_landmarks toneMint
class node_synthetic_fields,node_synthetic_sites,node_turbine,node_noise,node_scada toneRose
class node_user toneIndigo
```

## Components

### Terrain Assessment

- [CLI](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/entrypoints/cli.py): `phoibe/geography/complexity/rix/entrypoints/cli.py`
- [Composition Root](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/main.py): `phoibe/geography/complexity/rix/main.py`
- [Input Readers](https://github.com/rafm1101/phoibe/tree/main/phoibe/geography/complexity/rix/adapters): `phoibe/geography/complexity/rix/adapters`
- [Product Specification](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/pipelines/product/specification.py): `phoibe/geography/complexity/rix/pipelines/product/specification.py`
- [TRIX Analyzer](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/pipelines/analyzer.py): `phoibe/geography/complexity/rix/pipelines/analyzer.py`
- [Input Checks](https://github.com/rafm1101/phoibe/tree/main/phoibe/geography/complexity/rix/pipelines/checks): `phoibe/geography/complexity/rix/pipelines/checks`
- [Field Sampling](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/computations/fieldsampler.py): `phoibe/geography/complexity/rix/computations/fieldsampler.py`
- [Terrain Profiles](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/computations/profiles.py): `phoibe/geography/complexity/rix/computations/profiles.py`
- [RIX Evaluation](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/computations/results.py): `phoibe/geography/complexity/rix/computations/results.py`
- [TRIX Computation](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/computations/trix.py): `phoibe/geography/complexity/rix/computations/trix.py`
- [Result Tables](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/pipelines/results/tables.py): `phoibe/geography/complexity/rix/pipelines/results/tables.py`
- [Publishing Contract](https://github.com/rafm1101/phoibe/tree/main/phoibe/geography/complexity/rix/pipelines/publishing): `phoibe/geography/complexity/rix/pipelines/publishing`
- [Artifact Writer](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/adapters/writer.py): `phoibe/geography/complexity/rix/adapters/writer.py`
- [Result Summary](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/complexity/rix/pipelines/results/result_summary.py): `phoibe/geography/complexity/rix/pipelines/results/result_summary.py`

### Layered Validation

- [Machine Data](https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/infrastructure/io.py): `phoibe/layered/infrastructure/io.py`
- [Validation Factory](https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/application/factory.py): `phoibe/layered/application/factory.py`
- [Rule Registry](https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/application/registry.py): `phoibe/layered/application/registry.py`
- [Layer Validator](https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/application/validator.py): `phoibe/layered/application/validator.py`
- [Validation Context](https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/application/context.py): `phoibe/layered/application/context.py`
- [Validation Rules](https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/rules/rule.py): `phoibe/layered/rules/rule.py`
- [Time-Series Rules](https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/rules/rules_index.py): `phoibe/layered/rules/rules_index.py`
- [Reports and Results](https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/core/entities.py): `phoibe/layered/core/entities.py`
- [Report Export](https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/infrastructure/export.py): `phoibe/layered/infrastructure/export.py`
- [Validation Logging](https://github.com/rafm1101/phoibe/blob/main/phoibe/layered/logging/logging.py): `phoibe/layered/logging/logging.py`

### Geographic Tools

- [Raster Reprojection](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/crs/reproject.py): `phoibe/geography/crs/reproject.py`
- [Raster Visualization](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/plot/raster.py): `phoibe/geography/plot/raster.py`
- [Landmark Plotting](https://github.com/rafm1101/phoibe/blob/main/phoibe/geography/plot/landmarks.py): `phoibe/geography/plot/landmarks.py`

### Synthetic Data

- [Synthetic Fields](https://github.com/rafm1101/phoibe/blob/main/phoibe/synthetic_data/fields.py): `phoibe/synthetic_data/fields.py`
- [Sample Sites](https://github.com/rafm1101/phoibe/blob/main/phoibe/synthetic_data/sites.py): `phoibe/synthetic_data/sites.py`
- [Synthetic Turbine Data](https://github.com/rafm1101/phoibe/blob/main/phoibe/synthetic_data/turbine.py): `phoibe/synthetic_data/turbine.py`
- [SCADA Noise](https://github.com/rafm1101/phoibe/blob/main/phoibe/synthetic_data/_turbine_noise.py): `phoibe/synthetic_data/_turbine_noise.py`
- [SCADA Timeseries](https://github.com/rafm1101/phoibe/blob/main/phoibe/synthetic_data/_turbine_scada.py): `phoibe/synthetic_data/_turbine_scada.py`

### Other components

- **Caller**

## Connections

- Caller → CLI: invokes
- Caller → Composition Root: configures (evidence: `phoibe/geography/complexity/rix/main.py`)
- CLI → Composition Root: dispatches (evidence: `phoibe/geography/complexity/rix/main.py`)
- Composition Root → TRIX Analyzer: builds (evidence: `phoibe/geography/complexity/rix/main.py`)
- Composition Root → Input Readers: reads inputs (evidence: `phoibe/geography/complexity/rix/main.py`)
- Composition Root → Product Specification: configures (evidence: `phoibe/geography/complexity/rix/main.py`)
- Composition Root → Artifact Writer: supplies writer (evidence: `phoibe/geography/complexity/rix/main.py`)
- TRIX Analyzer → Input Checks: checks inputs (evidence: `phoibe/geography/complexity/rix/pipelines/analyzer.py`)
- TRIX Analyzer → Field Sampling: samples field (evidence: `phoibe/geography/complexity/rix/pipelines/analyzer.py`)
- TRIX Analyzer → RIX Evaluation: computes RIX (evidence: `phoibe/geography/complexity/rix/pipelines/analyzer.py`)
- TRIX Analyzer → TRIX Computation: computes TRIX (evidence: `phoibe/geography/complexity/rix/pipelines/analyzer.py`)
- TRIX Analyzer → Result Tables: builds tables (evidence: `phoibe/geography/complexity/rix/pipelines/analyzer.py`)
- Terrain Profiles → Field Sampling: samples profiles (evidence: `phoibe/geography/complexity/rix/computations/profiles.py`)
- RIX Evaluation → Terrain Profiles: evaluates profiles (evidence: `phoibe/geography/complexity/rix/computations/results.py`)
- TRIX Analyzer → Publishing Contract: publishes results (evidence: `phoibe/geography/complexity/rix/pipelines/analyzer.py`)
- TRIX Analyzer → Artifact Writer: writes artifacts (evidence: `phoibe/geography/complexity/rix/pipelines/analyzer.py`)
- Artifact Writer → Result Summary: returns summary (evidence: `phoibe/geography/complexity/rix/adapters/writer.py`)
- Machine Data → Validation Factory: provides data (evidence: `README.md`)
- Validation Factory → Rule Registry: uses registry (evidence: `phoibe/layered/application/factory.py`)
- Validation Factory → Layer Validator: uses validator (evidence: `phoibe/layered/application/factory.py`)
- Validation Factory → Reports and Results: creates entities (evidence: `phoibe/layered/application/factory.py`)
- Layer Validator → Validation Context: builds context (evidence: `phoibe/layered/application/validator.py`)
- Layer Validator → Validation Rules: executes rules (evidence: `phoibe/layered/application/validator.py`)
- Rule Registry → Validation Rules: registers rules (evidence: `phoibe/layered/application/registry.py`)
- Time-Series Rules → Validation Rules: extends base (evidence: `phoibe/layered/rules/rules_index.py`)
- Layer Validator → Reports and Results: produces reports (evidence: `phoibe/layered/application/validator.py`)
- Report Export → Reports and Results: exports reports (evidence: `phoibe/layered/infrastructure/export.py`)
- Raster Reprojection → Caller: reprojects rasters (evidence: `README.md`)
- Caller → Raster Visualization: visualizes data (evidence: `README.md`)
- Caller → Landmark Plotting: plots landmarks (evidence: `README.md`)
- Caller → Synthetic Fields: generates fields (evidence: `README.md`)
- Caller → Sample Sites: generates points (evidence: `README.md`)
- Caller → Synthetic Turbine Data: generates timeseries (evidence: `README.md`)
- Synthetic Turbine Data → SCADA Noise: uses noise (evidence: `phoibe/synthetic_data/turbine.py`)
- Synthetic Turbine Data → SCADA Timeseries: uses generator (evidence: `phoibe/synthetic_data/turbine.py`)
