# jacobbusshart/cuberaman architecture

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

- Interactive diagram: https://gitdiagram.com/jacobbusshart/cuberaman
- Repository: https://github.com/jacobbusshart/cuberaman

## Overview

CubeRaman is an affordable, 3D-printed back-scattering Raman spectrometer paired with a desktop spectrum-processing tool. The user measures a sample with the optical instrument, then loads spectral data into the software to convert wavelength to Raman shift, clean and process the spectrum, visualize it, and optionally identify peaks or fit them. The README documents the optical path and processing capabilities; the sampled Python excerpts show file loading, recomputation, matching, and fitting behavior. The software excerpts are partial, so edges for less-visible processing steps rely on the README.

Main entry points: [`software/CubeRaman-SpectrumPro_v2.py`](https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.py) (Processor app), [`parts`](https://github.com/jacobbusshart/cuberaman/tree/main/parts) (Dichroic mirror), [`parts/Cube-Insert_Laser.stl`](https://github.com/jacobbusshart/cuberaman/blob/main/parts/Cube-Insert_Laser.stl) (532 nm laser), [`CubeRaman_v107.f3z`](https://github.com/jacobbusshart/cuberaman/blob/main/CubeRaman_v107.f3z) (3D assembly model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_optics["Optical instrument"]
  node_sample["Sample"]
  node_laser["532 nm laser"]
  node_excitation_filter["Excitation filter"]
  node_dichroic["Dichroic mirror"]
  node_objective["20x objective"]
  node_rayleigh_rejection["Rayleigh rejection"]
  node_slit_focus["Slit focusing"]
  node_spectrometer["Spectrometer"]
end

subgraph group_fabrication["Fabrication"]
  node_cad_model["3D assembly model<br/>[CubeRaman_v107.f3z]"]
  node_printed_parts["Printed components"]
end

subgraph group_software["Spectrum software"]
  node_spectrum_file["Spectrum CSV"]
  node_desktop_app["Processor app"]
  node_load_convert["Load and convert"]
  node_preprocessing["Spectrum processing"]
  node_visualize_export["Plot and export"]
end

subgraph group_analysis["Spectral analysis"]
  node_peak_analysis["Peak fitting"]
  node_library_match["Library matching"]
  node_processed_spectrum["Processed spectrum"]
end

node_user(("User"))

node_user -->|"measures"| node_sample
node_laser -->|"passes through"| node_excitation_filter
node_excitation_filter -->|"illuminates"| node_dichroic
node_dichroic -->|"reflects toward"| node_objective
node_objective -->|"illuminates"| node_sample
node_sample -->|"backscatters through"| node_objective
node_objective -->|"returns light"| node_dichroic
node_dichroic -->|"transmits Raman"| node_rayleigh_rejection
node_rayleigh_rejection -->|"filters"| node_slit_focus
node_slit_focus -->|"focuses onto slit"| node_spectrometer
node_cad_model -.->|"models"| node_printed_parts
node_user -.->|"provides"| node_spectrum_file
node_spectrum_file -->|"loads into"| node_desktop_app
node_desktop_app -->|"invokes"| node_load_convert
node_load_convert -->|"recomputes"| node_preprocessing
node_preprocessing -->|"produces"| node_processed_spectrum
node_desktop_app -->|"plots and exports"| node_visualize_export
node_desktop_app -->|"fits peaks"| node_peak_analysis
node_desktop_app -->|"matches library"| node_library_match

click node_laser "https://github.com/jacobbusshart/cuberaman/blob/main/parts/Cube-Insert_Laser.stl"
click node_excitation_filter "https://github.com/jacobbusshart/cuberaman/tree/main/parts"
click node_dichroic "https://github.com/jacobbusshart/cuberaman/tree/main/parts"
click node_objective "https://github.com/jacobbusshart/cuberaman/tree/main/parts"
click node_rayleigh_rejection "https://github.com/jacobbusshart/cuberaman/tree/main/parts"
click node_slit_focus "https://github.com/jacobbusshart/cuberaman/tree/main/parts"
click node_cad_model "https://github.com/jacobbusshart/cuberaman/blob/main/CubeRaman_v107.f3z"
click node_printed_parts "https://github.com/jacobbusshart/cuberaman/tree/main/parts"
click node_desktop_app "https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.py"
click node_load_convert "https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.py"
click node_preprocessing "https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.py"
click node_visualize_export "https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.py"
click node_peak_analysis "https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.py"
click node_library_match "https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.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_sample,node_laser,node_excitation_filter,node_dichroic,node_objective,node_rayleigh_rejection,node_slit_focus,node_spectrometer,node_user toneBlue
class node_cad_model,node_printed_parts toneAmber
class node_spectrum_file,node_desktop_app,node_load_convert,node_preprocessing,node_visualize_export toneMint
class node_peak_analysis,node_library_match,node_processed_spectrum toneRose
```

## Components

### Optical instrument

- **Sample**
- [532 nm laser](https://github.com/jacobbusshart/cuberaman/blob/main/parts/Cube-Insert_Laser.stl): `parts/Cube-Insert_Laser.stl`
- [Excitation filter](https://github.com/jacobbusshart/cuberaman/tree/main/parts): `parts`
- [Dichroic mirror](https://github.com/jacobbusshart/cuberaman/tree/main/parts): `parts`
- [20x objective](https://github.com/jacobbusshart/cuberaman/tree/main/parts): `parts`
- [Rayleigh rejection](https://github.com/jacobbusshart/cuberaman/tree/main/parts): `parts`
- [Slit focusing](https://github.com/jacobbusshart/cuberaman/tree/main/parts): `parts`
- **Spectrometer**

### Fabrication

- [3D assembly model](https://github.com/jacobbusshart/cuberaman/blob/main/CubeRaman_v107.f3z): `CubeRaman_v107.f3z`
- [Printed components](https://github.com/jacobbusshart/cuberaman/tree/main/parts): `parts`

### Spectrum software

- **Spectrum CSV**
- [Processor app](https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.py): `software/CubeRaman-SpectrumPro_v2.py`
- [Load and convert](https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.py): `software/CubeRaman-SpectrumPro_v2.py`
- [Spectrum processing](https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.py): `software/CubeRaman-SpectrumPro_v2.py`
- [Plot and export](https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.py): `software/CubeRaman-SpectrumPro_v2.py`

### Spectral analysis

- [Peak fitting](https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.py): `software/CubeRaman-SpectrumPro_v2.py`
- [Library matching](https://github.com/jacobbusshart/cuberaman/blob/main/software/CubeRaman-SpectrumPro_v2.py): `software/CubeRaman-SpectrumPro_v2.py`
- **Processed spectrum**

### Other components

- **User**

## Connections

- User → Sample: measures (evidence: `README.md`)
- 532 nm laser → Excitation filter: passes through (evidence: `README.md`)
- Excitation filter → Dichroic mirror: illuminates (evidence: `README.md`)
- Dichroic mirror → 20x objective: reflects toward (evidence: `README.md`)
- 20x objective → Sample: illuminates (evidence: `README.md`)
- Sample → 20x objective: backscatters through (evidence: `README.md`)
- 20x objective → Dichroic mirror: returns light (evidence: `README.md`)
- Dichroic mirror → Rayleigh rejection: transmits Raman (evidence: `README.md`)
- Rayleigh rejection → Slit focusing: filters (evidence: `README.md`)
- Slit focusing → Spectrometer: focuses onto slit (evidence: `README.md`)
- 3D assembly model → Printed components: models
- User → Spectrum CSV: provides
- Spectrum CSV → Processor app: loads into (evidence: `README.md`)
- Processor app → Load and convert: invokes (evidence: `software/CubeRaman-SpectrumPro_v2.py`)
- Load and convert → Spectrum processing: recomputes (evidence: `software/CubeRaman-SpectrumPro_v2.py`)
- Spectrum processing → Processed spectrum: produces (evidence: `README.md`)
- Processor app → Plot and export: plots and exports (evidence: `software/CubeRaman-SpectrumPro_v2.py`)
- Processor app → Peak fitting: fits peaks (evidence: `software/CubeRaman-SpectrumPro_v2.py`)
- Processor app → Library matching: matches library (evidence: `software/CubeRaman-SpectrumPro_v2.py`)
