# george-r-heath/nanolocz architecture

> Architecture diagram of the GitHub repository george-r-heath/nanolocz, 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/george-r-heath/nanolocz
- Repository: https://github.com/george-r-heath/nanolocz

## Overview

NanoLocz is an interactive AFM/HS-AFM image viewing and analysis platform. The user opens AFM data in the app, applies analysis and processing tools, and exports results. Its documented capabilities include particle detection and tracking, AFM simulation, and localization-AFM workflows. The README states that core processing functions live in NanoLocz-lib; source excerpts were unavailable, so internal call relationships beyond documented app-to-library use are not asserted.

Main entry points: [`GUI/plotter.mlapp`](https://github.com/george-r-heath/nanolocz/blob/main/GUI/plotter.mlapp) (NanoLocz app), [`NanoLocz-lib/ReadAFMFile.m`](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/ReadAFMFile.m) (AFM import), [`NanoLocz-lib/level.m`](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/level.m) (Image levelling), [`NanoLocz-lib/align_iterate.m`](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/align_iterate.m) (Image alignment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["NanoLocz app<br/>[plotter.mlapp]"]
  node_readers["AFM import<br/>[ReadAFMFile.m]"]
end

subgraph group_processing["Image Processing"]
  node_level["Image levelling<br/>[level.m]"]
  node_align["Image alignment<br/>[align_iterate.m]"]
  node_profile["Line profiling<br/>[Lineprofiler.m]"]
end

subgraph group_analysis["Analysis"]
  node_masks["Mask analysis<br/>[AnalyzeAreas.m]"]
  node_detect["Particle detection<br/>[Detector.m]"]
  node_tracking["Particle tracking<br/>[track_particles.m]"]
  node_lafm["LAFM localization<br/>[localize.m]"]
  node_lafm_render["LAFM rendering<br/>[LAFM_renderer.m]"]
  node_lafm_align["LAFM alignment<br/>[align_movie.m]"]
  node_frc["FRC analysis<br/>[measureFRC.m]"]
end

subgraph group_outputs["Simulation and Export"]
  node_sim["AFM simulation<br/>[Mat_SimAFM.m]"]
  node_export["Data export<br/>[exporter.m]"]
end

node_user(("AFM analyst"))

node_user -->|"uses"| node_app
node_app -->|"opens AFM data"| node_readers
node_app -->|"offers levelling"| node_level
node_app -->|"offers alignment"| node_align
node_app -->|"offers profiling"| node_profile
node_app -->|"offers mask analysis"| node_masks
node_app -->|"offers detection"| node_detect
node_app -->|"offers tracking"| node_tracking
node_app -->|"offers localization"| node_lafm
node_app -->|"offers rendering"| node_lafm_render
node_app -->|"offers alignment tools"| node_lafm_align
node_app -->|"offers FRC analysis"| node_frc
node_app -->|"offers simulation"| node_sim
node_app -->|"exports results"| node_export

click node_app "https://github.com/george-r-heath/nanolocz/blob/main/GUI/plotter.mlapp"
click node_readers "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/ReadAFMFile.m"
click node_level "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/level.m"
click node_align "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/align_iterate.m"
click node_profile "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/Lineprofiler.m"
click node_masks "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/AnalyzeAreas.m"
click node_detect "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/Detector.m"
click node_tracking "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/track_particles.m"
click node_lafm "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/localize.m"
click node_lafm_render "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/LAFM_renderer.m"
click node_lafm_align "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/align_movie.m"
click node_frc "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/measureFRC.m"
click node_sim "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/Mat_SimAFM.m"
click node_export "https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/exporter.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_app,node_readers toneBlue
class node_level,node_align,node_profile toneAmber
class node_masks,node_detect,node_tracking,node_lafm,node_lafm_render,node_lafm_align,node_frc toneMint
class node_sim,node_export toneRose
class node_user toneIndigo
```

## Components

### Application

- [NanoLocz app](https://github.com/george-r-heath/nanolocz/blob/main/GUI/plotter.mlapp): `GUI/plotter.mlapp`
- [AFM import](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/ReadAFMFile.m): `NanoLocz-lib/ReadAFMFile.m`

### Image Processing

- [Image levelling](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/level.m): `NanoLocz-lib/level.m`
- [Image alignment](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/align_iterate.m): `NanoLocz-lib/align_iterate.m`
- [Line profiling](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/Lineprofiler.m): `NanoLocz-lib/Lineprofiler.m`

### Analysis

- [Mask analysis](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/AnalyzeAreas.m): `NanoLocz-lib/AnalyzeAreas.m`
- [Particle detection](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/Detector.m): `NanoLocz-lib/Detector.m`
- [Particle tracking](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/track_particles.m): `NanoLocz-lib/track_particles.m`
- [LAFM localization](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/localize.m): `NanoLocz-lib/localize.m`
- [LAFM rendering](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/LAFM_renderer.m): `NanoLocz-lib/LAFM_renderer.m`
- [LAFM alignment](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/align_movie.m): `NanoLocz-lib/align_movie.m`
- [FRC analysis](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/measureFRC.m): `NanoLocz-lib/measureFRC.m`

### Simulation and Export

- [AFM simulation](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/Mat_SimAFM.m): `NanoLocz-lib/Mat_SimAFM.m`
- [Data export](https://github.com/george-r-heath/nanolocz/blob/main/NanoLocz-lib/exporter.m): `NanoLocz-lib/exporter.m`

### Other components

- **AFM analyst**

## Connections

- AFM analyst → NanoLocz app: uses (evidence: `README.md`)
- NanoLocz app → AFM import: opens AFM data (evidence: `README.md`)
- NanoLocz app → Image levelling: offers levelling (evidence: `README.md`)
- NanoLocz app → Image alignment: offers alignment (evidence: `README.md`)
- NanoLocz app → Line profiling: offers profiling (evidence: `README.md`)
- NanoLocz app → Mask analysis: offers mask analysis (evidence: `README.md`)
- NanoLocz app → Particle detection: offers detection (evidence: `README.md`)
- NanoLocz app → Particle tracking: offers tracking (evidence: `README.md`)
- NanoLocz app → LAFM localization: offers localization (evidence: `README.md`)
- NanoLocz app → LAFM rendering: offers rendering (evidence: `README.md`)
- NanoLocz app → LAFM alignment: offers alignment tools (evidence: `README.md`)
- NanoLocz app → FRC analysis: offers FRC analysis (evidence: `README.md`)
- NanoLocz app → AFM simulation: offers simulation (evidence: `README.md`)
- NanoLocz app → Data export: exports results (evidence: `README.md`)
