# honorinejj/pymodaq_spectro architecture

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

- Interactive diagram: https://gitdiagram.com/honorinejj/pymodaq_spectro
- Repository: https://github.com/honorinejj/pymodaq_spectro

## Overview

PyMoDAQ Spectro is a PyMoDAQ-based spectrometer interface. The principal workflow is operating the spectrometer UI to communicate with a detector and inspect its wavelength axis; users can open calibration to load spectra, identify peaks, and calculate calibration coefficients. The interface also exposes data load/save/export and unit conversion. The excerpts support the UI-to-calibration and calibration-table relationships, but do not show the full acquisition or persistence call paths, so those connections are omitted. The README is brief, and unsampled implementation details are not inferred.

Main entry points: [`pymodaq_spectro/spectrometer.py`](https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/spectrometer.py) (Spectrometer UI), [`pymodaq_spectro/utils/calibration.py`](https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/utils/calibration.py) (Calibration UI), [`pymodaq_spectro/utils/utils_classes.py`](https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/utils/utils_classes.py) (Peak Table Model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Spectrometer Interface"]
  node_spectrometer["Spectrometer UI<br/>[spectrometer.py]"]
end

subgraph group_calibration["Calibration"]
  node_calibration_ui["Calibration UI<br/>[calibration.py]"]
  node_peaks["Peak Detection and Fit<br/>[calibration.py]"]
end

subgraph group_support["Shared Support"]
  node_peak_table["Peak Table Model<br/>[utils_classes.py]"]
  node_version["Version Utilities<br/>[version.py]"]
end

node_user(("Spectrometer User"))
node_detector["Detector Plugin"]
node_spectrum_browser["HDF5 Spectrum Browser"]

node_user -->|"operates"| node_spectrometer
node_spectrometer -->|"dispatches commands"| node_detector
node_spectrometer -->|"opens"| node_calibration_ui
node_calibration_ui -->|"loads spectra"| node_spectrum_browser
node_calibration_ui -->|"finds and fits peaks"| node_peaks
node_peaks -->|"creates table model"| node_peak_table

click node_spectrometer "https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/spectrometer.py"
click node_calibration_ui "https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/utils/calibration.py"
click node_peaks "https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/utils/calibration.py"
click node_peak_table "https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/utils/utils_classes.py"
click node_version "https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/version.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_spectrometer,node_user,node_spectrum_browser toneBlue
class node_calibration_ui,node_peaks toneAmber
class node_peak_table,node_version toneMint
class node_detector toneIndigo
```

## Components

### Spectrometer Interface

- [Spectrometer UI](https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/spectrometer.py): `pymodaq_spectro/spectrometer.py`

### Calibration

- [Calibration UI](https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/utils/calibration.py): `pymodaq_spectro/utils/calibration.py`
- [Peak Detection and Fit](https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/utils/calibration.py): `pymodaq_spectro/utils/calibration.py`

### Shared Support

- [Peak Table Model](https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/utils/utils_classes.py): `pymodaq_spectro/utils/utils_classes.py`
- [Version Utilities](https://github.com/honorinejj/pymodaq_spectro/blob/master/pymodaq_spectro/version.py): `pymodaq_spectro/version.py`

### Other components

- **Spectrometer User**
- **Detector Plugin**
- **HDF5 Spectrum Browser**

## Connections

- Spectrometer User → Spectrometer UI: operates (evidence: `README.md`)
- Spectrometer UI → Detector Plugin: dispatches commands (evidence: `pymodaq_spectro/spectrometer.py`)
- Spectrometer UI → Calibration UI: opens (evidence: `pymodaq_spectro/spectrometer.py`)
- Calibration UI → HDF5 Spectrum Browser: loads spectra (evidence: `pymodaq_spectro/utils/calibration.py`)
- Calibration UI → Peak Detection and Fit: finds and fits peaks (evidence: `pymodaq_spectro/utils/calibration.py`)
- Peak Detection and Fit → Peak Table Model: creates table model (evidence: `pymodaq_spectro/utils/calibration.py`)
