# pseguin05/steelelab_internship architecture

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

- Interactive diagram: https://gitdiagram.com/pseguin05/steelelab_internship
- Repository: https://github.com/pseguin05/steelelab_internship

## Overview

This repository publishes internship measurement scripts and a Python library for modeling, analyzing, and automatically tuning a wide-range microwave cavity. The principal workflow configures a VNA and motion control, maps resonances over cavity length, compares measurements with theoretical modes, fits resonance branches, then iteratively adjusts cavity length toward a target frequency. The graph emphasizes the documented package capabilities and sampled implementation; standalone analysis notebooks and scripts are not mapped individually. The tuning code’s references to analysis and theory are visible, but some device wiring and integrations are only partially excerpted.

Main entry points: [`tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning.py`](https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning.py) (Automatic tuning), [`tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning_PNA.py`](https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning_PNA.py) (PNA tuning), [`tunable_microwave_cavity/src/microwave_cavity/zaber_control/zaber_control.py`](https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/zaber_control/zaber_control.py) (Zaber motion control), [`tunable_microwave_cavity/src/microwave_cavity/cavity_theory/cavity_theory.py`](https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/cavity_theory/cavity_theory.py) (Mode theory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tuning["Automatic tuning"]
  node_tuning_basic["Automatic tuning"]
  node_tuning_pna["PNA tuning"]
end

subgraph group_modeling["Cavity modeling"]
  node_theory["Mode theory<br/>[cavity_theory.py]"]
end

subgraph group_control["Instrument control"]
  node_zaber["Zaber motion control<br/>[zaber_control.py]"]
end

subgraph group_analysis["Resonance analysis"]
  node_analysis["Map analysis<br/>[cavity_analysis.py]"]
  node_s11_fit["S11 fitting"]
end

node_operator(("Lab operator"))
node_vna["Vector network analyzer"]
node_motion_device["Zaber controller"]

node_operator -->|"runs workflow"| node_tuning_basic
node_operator -->|"runs workflow"| node_tuning_pna
node_tuning_basic -->|"configures sweeps"| node_vna
node_tuning_pna -->|"configures sweeps"| node_vna
node_tuning_pna -->|"fits branches"| node_analysis
node_tuning_basic -->|"fits branches"| node_analysis
node_tuning_basic -.->|"computes modes"| node_theory
node_tuning_pna -->|"computes modes"| node_theory
node_tuning_basic -.->|"controls motion"| node_zaber
node_tuning_pna -.->|"controls motion"| node_zaber
node_zaber -->|"moves axis"| node_motion_device

click node_tuning_basic "https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning.py"
click node_tuning_pna "https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning_PNA.py"
click node_theory "https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/cavity_theory/cavity_theory.py"
click node_analysis "https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/cavity_analysis/cavity_analysis.py"
click node_s11_fit "https://github.com/pseguin05/steelelab_internship/blob/main/data_analysis/Fit_S11_Resonance/Fit_S11_Resonance.py"
click node_zaber "https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/zaber_control/zaber_control.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_tuning_basic,node_tuning_pna toneBlue
class node_theory toneAmber
class node_zaber toneMint
class node_analysis,node_s11_fit toneRose
class node_operator,node_vna,node_motion_device toneIndigo
```

## Components

### Automatic tuning

- [Automatic tuning](https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning.py): `tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning.py`
- [PNA tuning](https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning_PNA.py): `tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning_PNA.py`

### Cavity modeling

- [Mode theory](https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/cavity_theory/cavity_theory.py): `tunable_microwave_cavity/src/microwave_cavity/cavity_theory/cavity_theory.py`

### Instrument control

- [Zaber motion control](https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/zaber_control/zaber_control.py): `tunable_microwave_cavity/src/microwave_cavity/zaber_control/zaber_control.py`

### Resonance analysis

- [Map analysis](https://github.com/pseguin05/steelelab_internship/blob/main/tunable_microwave_cavity/src/microwave_cavity/cavity_analysis/cavity_analysis.py): `tunable_microwave_cavity/src/microwave_cavity/cavity_analysis/cavity_analysis.py`
- [S11 fitting](https://github.com/pseguin05/steelelab_internship/blob/main/data_analysis/Fit_S11_Resonance/Fit_S11_Resonance.py): `data_analysis/Fit_S11_Resonance/Fit_S11_Resonance.py`

### Other components

- **Lab operator**
- **Vector network analyzer**
- **Zaber controller**

## Connections

- Lab operator → Automatic tuning: runs workflow (evidence: `tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning.py`)
- Lab operator → PNA tuning: runs workflow (evidence: `tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning_PNA.py`)
- Automatic tuning → Vector network analyzer: configures sweeps (evidence: `tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning.py`)
- PNA tuning → Vector network analyzer: configures sweeps (evidence: `tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning_PNA.py`)
- PNA tuning → Map analysis: fits branches (evidence: `tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning_PNA.py`)
- Automatic tuning → Map analysis: fits branches (evidence: `tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning.py`)
- Automatic tuning → Mode theory: computes modes (evidence: `tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning.py`)
- PNA tuning → Mode theory: computes modes (evidence: `tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning_PNA.py`)
- Automatic tuning → Zaber motion control: controls motion (evidence: `tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning.py`)
- PNA tuning → Zaber motion control: controls motion (evidence: `tunable_microwave_cavity/src/microwave_cavity/automatic_tuning/automatic_tuning_PNA.py`)
- Zaber motion control → Zaber controller: moves axis (evidence: `tunable_microwave_cavity/src/microwave_cavity/zaber_control/zaber_control.py`)
