Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9f32a2f
feat: comprehensive project cleanup, testing, and roadmap implementation
JGSphaela Jun 26, 2026
b6de863
fix: address PR review feedback
JGSphaela Jun 26, 2026
4f1fb26
fix: address second round of PR review feedback
JGSphaela Jun 26, 2026
e65c21d
fix: honor heater loop param and reject duplicate sweep channels
JGSphaela Jun 26, 2026
09d5565
fix: support direct script launch and cap GUI at 3 sweep channels
JGSphaela Jun 26, 2026
5f5c5ea
fix: add repo root to sys.path for direct launch, validate min 2 chan…
JGSphaela Jun 26, 2026
ac9dcc2
fix: preserve sweep3 cols on abort, retain loaded config fields, dele…
JGSphaela Jun 26, 2026
3312e62
fix: persist partial results on abort when output_file is configured
JGSphaela Jun 26, 2026
9e0b038
fix: prompt for save path when no output_file is configured
JGSphaela Jun 26, 2026
bf9ce9e
fix: use worker config for saves, create output directories before wr…
JGSphaela Jun 26, 2026
b09f722
fix: default compliance to 0.1A, rename finished signal to result_ready
JGSphaela Jun 26, 2026
211d5a7
fix: reset SMU channels on abort to clear biased voltages
JGSphaela Jun 26, 2026
2800a59
fix: use export_with_metadata for GUI saves, add PyQt6 optional dep
JGSphaela Jun 26, 2026
a310939
fix: reset SMU channels after measurement errors too
JGSphaela Jun 27, 2026
445f60d
fix: reset SMUs after successful GUI measurements
JGSphaela Jun 27, 2026
5b4f9fc
fix: create data directory before error dumps
JGSphaela Jun 27, 2026
1ce8b5c
fix: abort measurement before GUI exit
JGSphaela Jun 27, 2026
1f3bb02
fix: make plotting helpers import safe
JGSphaela Jun 27, 2026
e32d74d
fix: include GUI translations in packages
JGSphaela Jun 27, 2026
76d7c2e
fix: support raw measurement columns in plot viewer
JGSphaela Jul 1, 2026
5b6b6eb
fix: harden measurement utilities before merge
JGSphaela Jul 1, 2026
d3edaa6
fix: surface SMU reset failures in GUI
JGSphaela Jul 1, 2026
3f8672b
fix: reuse B1500 setup in two-way sweeps
JGSphaela Jul 1, 2026
81b353e
fix: skip SMU reset before instrument session opens
JGSphaela Jul 1, 2026
9e0d077
fix: preserve B1500 optional command fields
JGSphaela Jul 7, 2026
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
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,17 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# Measurement data
*.csv
*.dat
data/
output*.csv
error_input_data.txt

# Claude Code
.claude/

# macOS
.DS_Store
142 changes: 131 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,143 @@

# PyVAR3

A small software for 3(or more) sweeping parameters measurements. WIP
Multi-parameter sweep measurement tool for semiconductor device characterization.

Clever people at Keysight decided that their software only support 2 sweeps(VAR1, VAR2).
This is an effort to try to change that.
Keysight's B1500 software only supports 2 sweep variables (VAR1, VAR2). PyVAR3 extends this to 3+ sweep parameters, enabling complex characterization of MOSFETs, FinFETs, and other devices — including cryogenic measurements down to 6.5K.

This program was designed to run on all platforms, but the keysight IO suite only _REALLY_ support Windows. NI MAX can be used, but it's untested(it doesn't support Keysight/Aligent instruments that I use).
## Features

## Requirements
- **3+ parameter sweeps** — overcome the VAR1/VAR2 limitation with nested voltage sweeps
- **B1500A/B1505A/B1506A/B1507A support** — full SCPI command set for SMU control
- **Lakeshore Model 335** — integrated temperature reading for temperature-dependent measurements
- **Live progress tracking** — ETA estimation during long multi-hour sweeps
- **Data processing** — automatic parsing of B1500 responses into pandas DataFrames
- **3D visualization** — interactive Plotly plots for multi-parameter data

PyVISA, ~~PyQt6~~ _PySide6_, Numpy, Matplotlib, Pandas
## Installation

Currently immigrating from PyQt6 to PySide6
### Prerequisites

## Progress
- Python 3.10+
- A VISA backend:
- **Windows**: [Keysight IO Libraries Suite](https://www.keysight.com/find/iosuite)
- **macOS/Linux**: [NI-VISA](https://www.ni.com/en/support/downloads/drivers/download.ni-visa.html) or `pyvisa-py`

Connection, data retrieve and 3-way sweep completed.
### Install

Need to solve the problem that current measuring strat is __too slow__.
```bash
git clone https://github.com/JGSphaela/PyVAR3.git
cd PyVAR3
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"
```

Will work on GUI after program is functionally completed.
## Quick Start

### From a script

```python
from src.measurement.advance_sweep import AdvanceTest

test = AdvanceTest()
result = test.three_way_sweep(
gpib_device_id=17,
sweep1_channel=1, sweep1_mode=1, sweep1_range=0,
sweep1_start=0.0, sweep1_stop=1.0, sweep1_step=101,
sweep2_channel=2, sweep2_range=0,
sweep2_start=0.0, sweep2_stop=0.5, sweep2_step=6,
sweep3_channel=3, sweep3_range=0,
sweep3_start=0.0, sweep3_stop=0.3, sweep3_step=4,
)
result.to_csv("measurement_result.csv", index=False)
```

### Run the GUI

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

## Project Structure

```
src/
├── main.py # Application entry point (PySide6 GUI)
├── gpib/
│ ├── gpib_communication.py # PyVISA wrapper for GPIB devices
│ ├── gpib_command_b1500.py # B1500 SCPI command set
│ ├── gpib_command_model335.py # Lakeshore Model 335 commands
│ └── exceptions.py # Custom exception hierarchy
├── measurement/
│ ├── basic_sweep.py # Single-channel sweep execution
│ ├── advance_sweep.py # Multi-way (2/3) sweep orchestration
│ └── preparation.py # Pre-test setup (format, filters, averaging)
├── data_process/
│ ├── read_data_process.py # B1500 response parser → DataFrame
│ ├── plot2d.py # Matplotlib 2D plotting
│ ├── plot3d.py # Plotly interactive 3D plotting
│ └── plot3d2.py, plot3d3.py # Additional 3D visualization variants
├── gui/
│ ├── main_window_pyside.py # Main PySide6 application window
│ ├── sweep_widget.py # Sweep parameter input widget
│ ├── sweep_window.py # Sweep configuration container
│ └── translations/ # i18n (English, Japanese)
└── utils/
└── helper.py # Translation loading utility

examples/ # Usage examples and manual test scripts
tests/ # Automated pytest test suite
docs/ # Architecture and design documentation
```

## Development

### Running tests

```bash
pytest tests/ -v
```

### Running tests with coverage

```bash
pytest tests/ --cov=src --cov-report=term-missing
```

## Hardware Requirements

| Device | Purpose | Connection |
|--------|---------|------------|
| Keysight B1500A/B1505A/B1506A/B1507A | Semiconductor Device Analyzer | GPIB |
| Lakeshore Model 335 | Temperature Controller | GPIB |
| GPIB adapter | Host-to-instrument communication | USB/GPIB |

## Platform Notes

| Platform | VISA Backend | Status |
|----------|-------------|--------|
| Windows | Keysight IO Libraries Suite | Primary, fully supported |
| macOS | NI-VISA | Works, tested |
| Linux | NI-VISA or pyvisa-py | Should work, limited testing |

## Roadmap

### Short-term
- Wire GUI Start button to measurement code
- Temperature sweep integration (voltage sweep at multiple temperatures)
- Measurement profiles (save/load sweep configurations as JSON)

### Medium-term
- Live plotting during measurement
- Safety interlocks (configurable voltage limits, emergency stop)
- CSV export with metadata headers (device, temperature, timestamp)

### Long-term
- Plugin architecture for additional instruments
- Remote monitoring / network control
- Automated measurement sequences (e.g., Id-Vg at multiple temperatures overnight)

## License

[GNU General Public License v3.0](LICENSE)
Loading