# xmuiewst/3d-ingan-led-model architecture

> Architecture diagram of the GitHub repository xmuiewst/3d-ingan-led-model, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xmuiewst/3d-ingan-led-model
- Repository: https://github.com/xmuiewst/3d-ingan-led-model

## Overview

This MATLAB package reproduces a model-constrained 3D cathodoluminescence reconstruction, centered on a 5 kV example. The documented workflow takes a TIFF image, simulates selected pixels, saves spectral and integrated mappings, computes validation metrics, and exports an activity-structure package; forward ablation is optional. A separate entry point provides 3D modeling. Module roles are indicated by filenames, but source excerpts were unavailable, so internal calls and data flow between those modules are not asserted.

Main entry points: [`run_reconstruction.m`](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/run_reconstruction.m) (Reconstruction entry), [`data/5KV-Example.tif`](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/data/5KV-Example.tif) (5 kV example TIFF), [`+precies/simulation.m`](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/simulation.m) (Pixel simulation), [`run_3d_modeling.m`](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/run_3d_modeling.m) (3D modeling entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Reconstruction workflow"]
  node_reconstruct["Reconstruction entry"]
  node_workflow_impl["Workflow implementation<br/>[workflow.m]"]
  node_ablation["Forward ablation"]
end

subgraph group_methods["Model methods"]
  node_simulation["Pixel simulation<br/>[simulation.m]"]
  node_pixelwise["Pixelwise inversion"]
  node_structural["Structural inversion"]
  node_config["Model configuration<br/>[config.m]"]
  node_vpit["VPIT method<br/>[vpit.m]"]
  node_tiffops["TIFF operations<br/>[tiffops.m]"]
end

subgraph group_data["Inputs and outputs"]
  node_example["5 kV example TIFF<br/>[5KV-Example.tif]"]
  node_mapping["Simulation mappings"]
  node_metrics["Reconstruction metrics"]
  node_activity["Activity-structure package"]
end

subgraph group_modeling["3D modeling"]
  node_model_entry["3D modeling entry<br/>[run_3d_modeling.m]"]
end

node_user(("Researcher"))

node_user -->|"runs"| node_reconstruct
node_example -->|"provides TIFF"| node_reconstruct
node_reconstruct -->|"simulates pixels"| node_simulation
node_reconstruct -->|"saves mappings"| node_mapping
node_reconstruct -->|"writes metrics"| node_metrics
node_reconstruct -->|"exports package"| node_activity
node_reconstruct -.->|"optionally prompts"| node_ablation
node_user -->|"runs"| node_model_entry

click node_reconstruct "https://github.com/xmuiewst/3d-ingan-led-model/blob/main/run_reconstruction.m"
click node_simulation "https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/simulation.m"
click node_pixelwise "https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/pixelwise_inversion.m"
click node_structural "https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/structural_inversion.m"
click node_config "https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/config.m"
click node_vpit "https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/vpit.m"
click node_tiffops "https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/tiffops.m"
click node_workflow_impl "https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/workflow.m"
click node_example "https://github.com/xmuiewst/3d-ingan-led-model/blob/main/data/5KV-Example.tif"
click node_model_entry "https://github.com/xmuiewst/3d-ingan-led-model/blob/main/run_3d_modeling.m"

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_reconstruct,node_workflow_impl,node_ablation toneBlue
class node_simulation,node_pixelwise,node_structural,node_config,node_vpit,node_tiffops toneAmber
class node_example,node_mapping,node_metrics,node_activity toneMint
class node_model_entry toneRose
class node_user toneIndigo
```

## Components

### Reconstruction workflow

- [Reconstruction entry](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/run_reconstruction.m): `run_reconstruction.m`
- [Workflow implementation](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/workflow.m): `+precies/workflow.m`
- **Forward ablation**

### Model methods

- [Pixel simulation](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/simulation.m): `+precies/simulation.m`
- [Pixelwise inversion](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/pixelwise_inversion.m): `+precies/pixelwise_inversion.m`
- [Structural inversion](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/structural_inversion.m): `+precies/structural_inversion.m`
- [Model configuration](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/config.m): `+precies/config.m`
- [VPIT method](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/vpit.m): `+precies/vpit.m`
- [TIFF operations](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/%2Bprecies/tiffops.m): `+precies/tiffops.m`

### Inputs and outputs

- [5 kV example TIFF](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/data/5KV-Example.tif): `data/5KV-Example.tif`
- **Simulation mappings**
- **Reconstruction metrics**
- **Activity-structure package**

### 3D modeling

- [3D modeling entry](https://github.com/xmuiewst/3d-ingan-led-model/blob/main/run_3d_modeling.m): `run_3d_modeling.m`

### Other components

- **Researcher**

## Connections

- Researcher → Reconstruction entry: runs
- 5 kV example TIFF → Reconstruction entry: provides TIFF
- Reconstruction entry → Pixel simulation: simulates pixels
- Reconstruction entry → Simulation mappings: saves mappings
- Reconstruction entry → Reconstruction metrics: writes metrics
- Reconstruction entry → Activity-structure package: exports package
- Reconstruction entry → Forward ablation: optionally prompts
- Researcher → 3D modeling entry: runs
