Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ It turns a repetitive manual lab workflow into a layered application:
- apply reference calibration
- export MAT/CSV/TXT data and optional plot images

## Demo

This capture shows the real Tkinter operator console replaying a deterministic 72-point fixture
point by point. It demonstrates the UI, plotting, progress/status updates, source receipt, and export
workflow without connected instruments.

It is labeled `No hardware - simulated fixture`: the production AWG/oscilloscope adapters are not used
in this demo, and it is not live hardware validation.

<video controls poster="docs/images/auto-load-off-test-point-replay-demo.png" src="docs/images/auto-load-off-test-point-replay-demo.mp4">
<a href="docs/images/auto-load-off-test-point-replay-demo.mp4">Watch the point-by-point fixture replay demo</a>
</video>

[Open the demo video](docs/images/auto-load-off-test-point-replay-demo.mp4) |
[View the poster frame](docs/images/auto-load-off-test-point-replay-demo.png)

## Why It Exists

Manual AWG/oscilloscope sweep measurements are repetitive and easy to misconfigure. This project separates the workflow into testable layers so the sweep math, signal processing, settings serialization, and use-case flow can be verified without physical instruments.
Expand Down Expand Up @@ -119,6 +135,10 @@ Example result generated from `demo_data/Demo(2).mat`:

![Demo sweep result](docs/images/sweep_result.png)

For application-material capture without connected instruments, see the deterministic Hyperframe fixture in
`demo_data/hyperframe_simulated_fixture.*`. It should be labeled `No hardware - simulated fixture` and is not live
hardware validation.

## Safety Notes

This is a local lab automation tool, not a certified production test platform. Operators are responsible for confirming the connected instrument model, address, voltage range, frequency range, impedance, coupling, and device-under-test limits before running a live sweep.
Expand All @@ -132,6 +152,8 @@ See [docs/safety.md](docs/safety.md) for stop/shutdown behavior and hardware ass
- [Safety Notes](docs/safety.md)
- [Extending The Application](docs/extending.md)
- [Case Study](docs/case_study.md)
- [Hyperframe Demo Fixture](docs/hyperframe_demo.md)
- [Hyperframe Capture Plan](docs/hyperframe_capture_plan.md)
- [Demo Data](demo_data/README.md)

## Project Status
Expand Down
35 changes: 32 additions & 3 deletions demo_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ This folder contains sample MAT files that can be used to inspect the measuremen

## Files

- `hyperframe_simulated_fixture.mat`
- Contains 72 logarithmic frequency points from 1 kHz to 1 MHz.
- Source metadata: `source=mock_fixture`.
- Visible demo label: `Simulated no-hardware demo fixture`.
- Includes `freq_hz`, `gain_linear`, `gain_db`, `phase_deg`, raw gain/phase,
reference gain/phase, and corrected gain/phase fields.
- Useful for Hyperframe or portfolio capture when no AWG/oscilloscope hardware is connected.

- `hyperframe_simulated_fixture.csv`
- Human-readable version of the same simulated fixture.
- Includes the same source label and raw/reference/corrected measurement columns.

- `hyperframe_simulated_fixture.txt`
- Tab-separated numeric export for quick inspection.

- `hyperframe_reference_fixture.mat`
- Reference calibration curve paired with the Hyperframe simulated fixture.

- `hyperframe_simulated_fixture_metadata.json`
- Human-readable metadata and validation boundary.

- `Deme(1).mat`
- Contains 15 frequency points.
- Keys observed: `freq`, `gain_db_raw`, `config`.
Expand All @@ -17,8 +38,16 @@ This folder contains sample MAT files that can be used to inspect the measuremen
## How To Use

1. Start the desktop app with `python src/main.py`.
2. Use the load-measurement action.
3. Select one of the MAT files in this directory.
4. Confirm the plot and loaded point count look reasonable.
2. Use `Load Demo Fixture` for the Hyperframe fixture, or use the load-measurement action.
3. If loading manually, select one of the MAT files in this directory.
4. Confirm the plot, source receipt, no-hardware label, and point count look reasonable.

These files are sample data for review and local testing. They are not a substitute for live instrument verification.

The Hyperframe fixture is explicitly simulated no-hardware data. Do not describe it as a live hardware validation run.

Regenerate the deterministic Hyperframe fixture with:

```bash
python scripts/generate_hyperframe_fixture.py
```
Binary file added demo_data/hyperframe_reference_fixture.mat
Binary file not shown.
73 changes: 73 additions & 0 deletions demo_data/hyperframe_simulated_fixture.csv

Large diffs are not rendered by default.

Binary file added demo_data/hyperframe_simulated_fixture.mat
Binary file not shown.
74 changes: 74 additions & 0 deletions demo_data/hyperframe_simulated_fixture.txt

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions demo_data/hyperframe_simulated_fixture_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"correction_mode": "dual",
"demo_label": "Simulated no-hardware demo fixture",
"generated_from": "src/app/demo/hyperframe_fixture.py",
"point_count": 72,
"source": "mock_fixture",
"sweep_start_hz": 1000.0,
"sweep_stop_hz": 1000000.0,
"trigger_mode": "triggered",
"validation_boundary": "No hardware - simulated fixture; not live hardware validation."
}
117 changes: 117 additions & 0 deletions docs/hyperframe_capture_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Hyperframe Fixture Replay Capture Plan

This plan captures the deterministic fixture replay first. It does not add an app-level demo-mode banner
and does not imply live hardware validation.

Required visible label in the capture:

```text
No hardware - simulated fixture
```

or:

```text
Simulated no-hardware demo fixture
```

Keep the label small and persistent, for example in the lower-left corner or as a compact title overlay.

## Current Tooling Status

No `hyperframe` CLI or repo-local capture script is available in this workspace. The capture itself should
be done in the coordinator's Hyperframe environment or by the person running the desktop capture.

Available local inputs:

- `demo_data/hyperframe_simulated_fixture.mat`
- `demo_data/hyperframe_simulated_fixture.csv`
- `demo_data/hyperframe_simulated_fixture.txt`
- `demo_data/hyperframe_reference_fixture.mat`
- `demo_data/hyperframe_simulated_fixture_metadata.json`

## Capture Storyboard

1. Setup frame
- Show the app purpose in one line: AWG/oscilloscope sweep measurement automation.
- Show the persistent label: `No hardware - simulated fixture`.
- Show the fixture source: `source=mock_fixture`.

2. Sweep configuration frame
- Show a conservative sweep setup: 1 kHz to 1 MHz, log-spaced fixture points.
- Show correction mode as dual and trigger mode as triggered.
- Keep the wording clear that this is fixture replay, not connected instruments.

3. Fixture replay frame
- Use `Load Demo Fixture` in the UI, or load `demo_data/hyperframe_simulated_fixture.mat`
through the normal load-measurement path.
- Show the plot after load.
- If Hyperframe supports animation, reveal points progressively from the fixture CSV.

4. Gain and phase frame
- Show gain dB with a plausible roll-off and mild noise.
- Show phase shifting across frequency.
- Optional: show raw/reference/corrected fields from the CSV as a small data callout.

5. Export/data frame
- Show MAT/CSV/TXT artifacts already present in `demo_data/`.
- Highlight that the same shape is accepted by the existing loader/export paths.

6. Evidence frame
- Show: no-hardware tests, architecture boundaries, and live hardware validation boundary.
- Recommended copy:
`Core sweep math and persistence are testable without instruments; live hardware validation remains manual.`

## Exact Manual Capture Steps

1. Regenerate fixture data if needed:

```bash
python scripts/generate_hyperframe_fixture.py
```

2. Start the desktop app only in the capture environment:

```bash
python src/main.py
```

3. In the UI, choose `Load Demo Fixture`.

If that action is unavailable in an older build, choose the load-measurement action and open:

```text
demo_data/hyperframe_simulated_fixture.mat
```

4. Capture the loaded plot and settings area.

5. In Hyperframe, add a small persistent label:

```text
No hardware - simulated fixture
```

6. Add one short data callout using `demo_data/hyperframe_simulated_fixture_metadata.json`:

```text
source=mock_fixture; not live hardware validation
```

7. Add one short engineering callout:

```text
Hardware side effects are isolated behind adapters; fixture replay exercises loader, plotting, and export shape.
```

## Do Not Claim

- Do not say the fixture is a live AWG/oscilloscope run.
- Do not say the demo validates connected hardware.
- Do not add an app-level demo-mode banner before the first capture.
- Do not edit production instrument adapters for this capture.

## If Hyperframe Automation Is Later Added

Prefer a separate capture helper that consumes the existing fixture files. Keep it outside production
instrument code, and preserve the same visible no-hardware label in every exported clip.
51 changes: 51 additions & 0 deletions docs/hyperframe_demo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Hyperframe Demo Fixture

This demo path is for application-material capture when AWG/oscilloscope hardware is not connected.

Visible label to use in the Hyperframe capture:

```text
No hardware - simulated fixture
```

or:

```text
Simulated no-hardware demo fixture
```

## What To Show

1. Configure a sweep in the desktop UI with conservative AWG/oscilloscope settings.
2. Use the UI's `Load Demo Fixture` action, or manually load `demo_data/hyperframe_simulated_fixture.mat`.
3. Show the plotted gain and phase response.
4. Show the exported CSV/MAT/TXT fields, including raw, reference, and corrected values.
5. Close with a short architecture/testing frame:
UI -> application use case -> domain DSP -> persistence/instrument ports.

For the first fixture-replay capture, use the concrete storyboard in
[`docs/hyperframe_capture_plan.md`](hyperframe_capture_plan.md).

## Data Boundary

The Hyperframe fixture is deterministic simulated data generated by `scripts/generate_hyperframe_fixture.py`.
It is suitable for demonstrating the no-hardware UI, plotting, calibration-data shape, and export workflow.

It is not live hardware validation. Live instrument behavior still depends on the connected AWG,
oscilloscope, VISA/LAN access, DUT limits, and operator safety checks.

## Fixture Files

- `demo_data/hyperframe_simulated_fixture.mat`: loadable measurement fixture.
- `demo_data/hyperframe_simulated_fixture.csv`: human-readable measurement rows.
- `demo_data/hyperframe_simulated_fixture.txt`: tab-separated numeric export.
- `demo_data/hyperframe_reference_fixture.mat`: reference calibration curve.
- `demo_data/hyperframe_simulated_fixture_metadata.json`: source and validation-boundary metadata.

## Regenerate

```bash
python scripts/generate_hyperframe_fixture.py
```

The generator uses a fixed seed so the fixture remains reproducible across machines.
28 changes: 28 additions & 0 deletions docs/images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,33 @@ Expected portfolio screenshots:

- `main_ui.png`: the configured desktop app before a sweep.
- `sweep_result.png`: a completed or loaded sweep result. The current file is generated from `demo_data/Demo(2).mat`.
- `auto-load-off-test-demo-capture.mp4`: real Tk operator console capture showing the no-hardware
Hyperframe fixture load flow.
- `auto-load-off-test-demo-capture.png`: poster frame from that real UI capture.
- `auto-load-off-test-point-replay-demo.mp4`: real Tk operator console capture showing the
deterministic no-hardware fixture replayed point by point.
- `auto-load-off-test-point-replay-demo.png`: poster frame from the point-by-point replay capture.

Capture these from the real Tk desktop app. Do not replace them with generated mockups, because the value of this project is that it controls a real lab workflow.

For Hyperframe application-material capture without instruments, use a visible label such as
`No hardware - simulated fixture` when showing `demo_data/hyperframe_simulated_fixture.*`.
This demonstrates the UI/data workflow but must not be described as live hardware validation.

The reproducible local capture helper is:

```bash
PYTHONPATH=src python scripts/capture_operator_console_demo.py
```

It starts the real Tk app, loads the deterministic fixture through the UI/controller path, captures
the Tk window with macOS `screencapture`, and writes the mp4/poster files above.

For the point-by-point replay capture:

```bash
PYTHONPATH=src python scripts/capture_operator_console_point_replay.py
```

That helper keeps the replay inside the demo/capture boundary: it feeds partial fixture results to the
existing Tk plot/view-model path and never calls production instrument adapters.
Binary file added docs/images/auto-load-off-test-demo-capture.mp4
Binary file not shown.
Binary file added docs/images/auto-load-off-test-demo-capture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading