SCPI-Instrument-Control 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. scpi_instrument_control-1.0.0/CHANGELOG.md +1176 -0
  2. scpi_instrument_control-1.0.0/LICENSE +21 -0
  3. scpi_instrument_control-1.0.0/MANIFEST.in +33 -0
  4. scpi_instrument_control-1.0.0/PKG-INFO +918 -0
  5. scpi_instrument_control-1.0.0/README.md +828 -0
  6. scpi_instrument_control-1.0.0/SCPI_Instrument_Control.egg-info/PKG-INFO +918 -0
  7. scpi_instrument_control-1.0.0/SCPI_Instrument_Control.egg-info/SOURCES.txt +43 -0
  8. scpi_instrument_control-1.0.0/SCPI_Instrument_Control.egg-info/dependency_links.txt +1 -0
  9. scpi_instrument_control-1.0.0/SCPI_Instrument_Control.egg-info/entry_points.txt +3 -0
  10. scpi_instrument_control-1.0.0/SCPI_Instrument_Control.egg-info/requires.txt +64 -0
  11. scpi_instrument_control-1.0.0/SCPI_Instrument_Control.egg-info/top_level.txt +1 -0
  12. scpi_instrument_control-1.0.0/docs/SDS800XHD_Series_ProgrammingGuide_EN11G.pdf +0 -0
  13. scpi_instrument_control-1.0.0/docs/VISUAL_MEASUREMENTS.md +638 -0
  14. scpi_instrument_control-1.0.0/docs/images/01_main_window.png +0 -0
  15. scpi_instrument_control-1.0.0/docs/images/channel_controls.png +0 -0
  16. scpi_instrument_control-1.0.0/docs/images/cursors.png +0 -0
  17. scpi_instrument_control-1.0.0/docs/images/fft_analysis.png +0 -0
  18. scpi_instrument_control-1.0.0/docs/images/main_window.png +0 -0
  19. scpi_instrument_control-1.0.0/docs/images/measurements_panel.png +0 -0
  20. scpi_instrument_control-1.0.0/docs/images/visual_measurements.png +0 -0
  21. scpi_instrument_control-1.0.0/examples/README.md +254 -0
  22. scpi_instrument_control-1.0.0/examples/advanced_analysis.py +208 -0
  23. scpi_instrument_control-1.0.0/examples/basic_usage.py +86 -0
  24. scpi_instrument_control-1.0.0/examples/batch_capture.py +61 -0
  25. scpi_instrument_control-1.0.0/examples/continuous_capture.py +67 -0
  26. scpi_instrument_control-1.0.0/examples/function_generator_basic.py +123 -0
  27. scpi_instrument_control-1.0.0/examples/live_plot.py +138 -0
  28. scpi_instrument_control-1.0.0/examples/measurements.py +103 -0
  29. scpi_instrument_control-1.0.0/examples/probe_calibration_analysis.py +325 -0
  30. scpi_instrument_control-1.0.0/examples/psu_advanced_features.py +323 -0
  31. scpi_instrument_control-1.0.0/examples/psu_basic_control.py +152 -0
  32. scpi_instrument_control-1.0.0/examples/psu_gui_test.py +140 -0
  33. scpi_instrument_control-1.0.0/examples/psu_usb_connection.py +267 -0
  34. scpi_instrument_control-1.0.0/examples/report_generation_example.py +339 -0
  35. scpi_instrument_control-1.0.0/examples/simple_capture.py +51 -0
  36. scpi_instrument_control-1.0.0/examples/trigger_based_capture.py +90 -0
  37. scpi_instrument_control-1.0.0/examples/vector_graphics_xy_mode.py +237 -0
  38. scpi_instrument_control-1.0.0/examples/waveform_capture.py +77 -0
  39. scpi_instrument_control-1.0.0/pyproject.toml +191 -0
  40. scpi_instrument_control-1.0.0/resources/Test Equipment Wide.png +0 -0
  41. scpi_instrument_control-1.0.0/resources/Test Equipment.icns +0 -0
  42. scpi_instrument_control-1.0.0/resources/Test Equipment.ico +0 -0
  43. scpi_instrument_control-1.0.0/resources/Test Equipment.png +0 -0
  44. scpi_instrument_control-1.0.0/setup.cfg +4 -0
  45. scpi_instrument_control-1.0.0/siglent/__init__.py +35 -0
@@ -0,0 +1,1176 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.0.0] - 2026-01-06
11
+
12
+ ### ⚠️ MAJOR RELEASE - Package Renamed
13
+
14
+ **This is a major release with a package rename.** The project has been renamed from `Siglent-Oscilloscope` to `SCPI-Instrument-Control` to better reflect its expanded capabilities beyond just Siglent oscilloscopes.
15
+
16
+ ### Breaking Changes
17
+
18
+ - **PyPI Package Name**: `siglent` → `SCPI-Instrument-Control`
19
+ - **Python Import Name**: `import siglent` → `import scpi_control` (recommended)
20
+ - **Old import still works** with deprecation warning (will be removed in v2.0.0)
21
+
22
+ ### Added
23
+
24
+ **Backward Compatibility Layer**
25
+ - Created `siglent/` compatibility shim package
26
+ - Old `import siglent` syntax still works with `DeprecationWarning`
27
+ - Re-exports all `scpi_control` modules for seamless backward compatibility
28
+ - Warning message guides users to migrate imports
29
+ - Compatibility layer will be removed in v2.0.0
30
+
31
+ **Migration Guide**
32
+ - Comprehensive migration documentation in README.md
33
+ - Step-by-step upgrade instructions
34
+ - Comparison table showing what changed and what stayed the same
35
+ - Code examples for old vs new import syntax
36
+ - Explanation of why the rename was necessary
37
+
38
+ ### Changed
39
+
40
+ **Package Structure**
41
+ - Renamed `siglent/` directory to `scpi_control/` (preserving git history)
42
+ - Updated all internal imports from `siglent.*` to `scpi_control.*`
43
+ - 192 import occurrences updated in `scpi_control/` modules
44
+ - All imports updated in `tests/` directory
45
+ - All imports updated in `examples/` directory
46
+ - Package now reflects multi-instrument, multi-vendor capabilities
47
+
48
+ **PyPI Metadata** (`pyproject.toml`)
49
+ - Package name: `siglent` → `SCPI-Instrument-Control`
50
+ - Version bump: `0.5.1` → `1.0.0` (major release)
51
+ - Updated description to emphasize universal SCPI instrument control
52
+ - Updated keywords to reflect multi-instrument support
53
+ - Updated all URLs to point to new repository name
54
+ - Homepage, Repository, Issues, Documentation, Changelog
55
+
56
+ **Documentation**
57
+ - Updated README.md with new project name and branding
58
+ - Added "Package Renamed" notice at top of README
59
+ - Updated all badge URLs to reference new repository name
60
+ - Updated installation commands to use `SCPI-Instrument-Control`
61
+ - Changed GUI application overview section title
62
+ - Updated git clone directory name in examples
63
+ - Added comprehensive Migration Guide section with:
64
+ - Installation update instructions
65
+ - Import statement migration examples
66
+ - Backward compatibility explanation
67
+ - CLI command compatibility notice
68
+ - Comparison table of changes
69
+ - Rationale for the rename
70
+
71
+ **Command-Line Tools** (No Changes)
72
+ - `siglent-gui` command **unchanged** for convenience
73
+ - `siglent-report-generator` command **unchanged**
74
+ - No changes needed to scripts or automation using these commands
75
+
76
+ ### Why the Rename?
77
+
78
+ This library has evolved significantly beyond its original Siglent oscilloscope focus:
79
+
80
+ 1. **Multi-Instrument Support**: Now supports oscilloscopes, power supplies, and function generators
81
+ 2. **Multi-Vendor Support**: Works with any SCPI-compatible equipment, not just Siglent
82
+ 3. **Universal Protocol**: Based on industry-standard SCPI commands (IEEE 488.2)
83
+
84
+ The new name `SCPI-Instrument-Control` accurately represents what the library does: **control any SCPI-compatible test equipment**.
85
+
86
+ ### Migration Instructions
87
+
88
+ #### For New Users
89
+
90
+ ```bash
91
+ pip install SCPI-Instrument-Control
92
+ pip install "SCPI-Instrument-Control[gui]"
93
+ pip install "SCPI-Instrument-Control[all]"
94
+ ```
95
+
96
+ ```python
97
+ from scpi_control import Oscilloscope, PowerSupply, FunctionGenerator
98
+ ```
99
+
100
+ #### For Existing Users
101
+
102
+ **Option 1: Update imports** (recommended)
103
+ ```bash
104
+ pip uninstall siglent
105
+ pip install SCPI-Instrument-Control
106
+ ```
107
+
108
+ Change imports:
109
+ ```python
110
+ # Old
111
+ from siglent import Oscilloscope
112
+ from siglent.gui.app import main
113
+
114
+ # New
115
+ from scpi_control import Oscilloscope
116
+ from scpi_control.gui.app import main
117
+ ```
118
+
119
+ **Option 2: Use compatibility layer** (temporary)
120
+ ```bash
121
+ pip install SCPI-Instrument-Control
122
+ ```
123
+
124
+ Keep old imports (will show `DeprecationWarning`):
125
+ ```python
126
+ from siglent import Oscilloscope # Still works, but deprecated
127
+ ```
128
+
129
+ **Note**: The compatibility layer will be removed in v2.0.0. Please migrate when convenient.
130
+
131
+ ### Technical Details
132
+
133
+ **Git History Preservation**
134
+ - Used `git mv siglent/ scpi_control/` to preserve file history
135
+ - All commit history for individual files maintained
136
+ - No loss of attribution or change tracking
137
+
138
+ **Import Updates**
139
+ - Used automated find/replace for import statement updates
140
+ - 192 occurrences in `scpi_control/` directory
141
+ - All test files updated
142
+ - All example files updated
143
+ - No manual edits required for import changes
144
+
145
+ **Compatibility Implementation**
146
+ - `siglent/__init__.py` re-exports entire `scpi_control` module
147
+ - Uses `warnings.warn()` with `DeprecationWarning` category
148
+ - Warning includes migration instructions and timeline
149
+ - `stacklevel=2` ensures warning points to user code, not library
150
+
151
+ ### Dependencies
152
+
153
+ No dependency changes. All existing dependencies remain the same.
154
+
155
+ ### Deprecation Timeline
156
+
157
+ - **v1.0.0** (2026-01-06): Old `import siglent` works with deprecation warning
158
+ - **v2.0.0** (TBD): Compatibility layer removed, `import siglent` will fail
159
+
160
+ Users have until v2.0.0 to migrate their imports.
161
+
162
+ ## [0.5.1] - 2026-01-05
163
+
164
+ ### Fixed
165
+
166
+ **Documentation Build and Deployment**
167
+ - Fixed GUI API documentation with incorrect module references
168
+ - Corrected all wildcard references (`*`) to proper underscores (`_`) in `docs/api/gui.md`
169
+ - Fixed 20+ module reference errors (e.g., `siglent.gui.main*window` → `siglent.gui.main_window`)
170
+ - Documentation now builds successfully without errors
171
+ - Set up automated GitHub Pages deployment
172
+ - Created `.github/workflows/docs.yml` for automatic documentation deployment
173
+ - Documentation auto-deploys to GitHub Pages on every push to main branch
174
+ - Integrated with existing `make docs-generate` automation
175
+ - Updated PyPI documentation URL
176
+ - Changed from README-only link to proper documentation site
177
+ - PyPI now links to https://little-did-I-know.github.io/Siglent-Oscilloscope/
178
+ - Users can access complete API documentation and guides from PyPI
179
+
180
+ **MkDocs Build System**
181
+ - Ensured autodoc generation works correctly with mkdocstrings
182
+ - Verified API reference pages generate from Python docstrings
183
+ - Confirmed cross-references between documentation pages work properly
184
+
185
+ ### Changed
186
+
187
+ **Documentation Infrastructure**
188
+ - Documentation now automatically generated and deployed on every main branch update
189
+ - API documentation uses mkdocstrings for automatic extraction from code
190
+ - Examples documentation auto-generated from example scripts
191
+ - Improved documentation discoverability for users installing from PyPI
192
+
193
+ ## [0.5.0] - 2026-01-04
194
+
195
+ ### Added
196
+
197
+ **Automated Test Report Generation** 📊
198
+ - **Installation**: `pip install "Siglent-Oscilloscope[report-generator]"`
199
+ - **PDF and Markdown Report Generators**
200
+ - Professional publication-ready reports with waveform plots and analysis
201
+ - Comprehensive metadata tracking (test ID, operator, timestamp, scope model)
202
+ - Multiple output formats (PDF via ReportLab, Markdown with embedded plots)
203
+ - Automatic file organization and asset management
204
+
205
+ - **Signal Type Detection** (`siglent/report_generator/utils/waveform_analyzer.py`)
206
+ - Automatic waveform classification using FFT harmonic analysis
207
+ - Detects 9 signal types: sine, square, triangle, sawtooth, pulse, DC, noise, complex, unknown
208
+ - Confidence scoring for classification accuracy
209
+ - THD (Total Harmonic Distortion) calculation for waveform quality assessment
210
+ - Pattern matching algorithms for periodic signal identification:
211
+ - Square waves: odd harmonics at 1/n amplitude ratio
212
+ - Triangle waves: odd harmonics at 1/n² amplitude ratio
213
+ - Sawtooth waves: all harmonics at 1/n amplitude ratio
214
+ - Signal type displayed in both PDF and Markdown reports with confidence percentage
215
+ - Added `SignalType` constants class for standardized type identification
216
+
217
+ - **Enhanced Waveform Statistics** (`siglent/report_generator/models/report_data.py`)
218
+ - Comprehensive signal analysis with 25+ measurement parameters
219
+ - Amplitude measurements: Vmax, Vmin, Vpp, VRMS, Vmean, DC offset
220
+ - Frequency and timing: frequency, period, rise time, fall time, pulse width, duty cycle
221
+ - Quality metrics: SNR (Signal-to-Noise Ratio), THD, noise level, overshoot, undershoot, jitter
222
+ - Automatic statistics calculation via `WaveformData.analyze()` method
223
+ - Smart unit formatting with SI prefixes (mV, µs, kHz, etc.)
224
+ - Statistics integration in PDF and Markdown report generators
225
+
226
+ - **Plateau Stability Analysis** (Optional Feature)
227
+ - Measures noise on high and low plateaus for periodic signals
228
+ - Uses run-length encoding to identify flat signal regions
229
+ - Analyzes middle 60% of each plateau to exclude edge transitions
230
+ - Reports three metrics:
231
+ - Plateau High Noise: Standard deviation on high-level plateaus
232
+ - Plateau Low Noise: Standard deviation on low-level plateaus
233
+ - Plateau Stability: Average noise across all plateaus
234
+ - User-configurable via Report Options dialog checkbox
235
+ - Auto-applies to pulse, square, triangle, sawtooth, and sine waves
236
+ - Helpful for power supply ripple, logic level stability, and signal quality testing
237
+
238
+ - **LLM Model Detection Feature** (`siglent/report_generator/widgets/llm_settings_dialog.py`)
239
+ - "Detect Models" button in Ollama and LM Studio configuration tabs
240
+ - Automatically queries server for available models and populates dropdown
241
+ - Changed model input from text field to editable combo box
242
+ - Preserves previously selected model after detection
243
+ - User-friendly error messages with troubleshooting steps
244
+ - Shows model count and lists detected models
245
+ - Leverages existing `LLMClient.get_available_models()` API
246
+ - Works with both Ollama Python SDK and OpenAI-compatible endpoints
247
+
248
+ - **Report Options Dialog** (`siglent/report_generator/widgets/report_options_dialog.py`)
249
+ - New checkbox: "Plateau Stability Analysis (Advanced)"
250
+ - Tooltip explains feature usage and applicability
251
+ - Settings persist with report templates
252
+ - Integrated with `ReportOptions` model
253
+
254
+ ### Changed - Report Generator Features
255
+
256
+ - **PDF Generation Progress Tracking** (`siglent/report_generator/generators/pdf_generator.py`)
257
+ - Enhanced with granular waveform-level progress updates
258
+ - Progress now updates for each waveform being processed: 20%, 25%, 30%, ..., 80%
259
+ - Prevents freezing appearance during matplotlib plot generation
260
+ - Progress callback shows current operation: "Processing section X/Y", "Rendering waveform Z"
261
+ - Smooth progression instead of jumping from 20% to 100%
262
+ - Integrated with `QProgressDialog` in GUI for visual feedback
263
+
264
+ - **Unicode Character Normalization** (`siglent/report_generator/generators/pdf_generator.py`)
265
+ - Comprehensive character mapping for AI-generated text compatibility
266
+ - Handles 30+ Unicode characters that ReportLab can't render:
267
+ - Smart quotes (U+201C, U+201D, U+2018, U+2019) → regular quotes
268
+ - Em-dash (U+2014) and en-dash (U+2013) → hyphens
269
+ - Bullets (U+2022) → asterisks
270
+ - Ellipsis (U+2026) → three dots
271
+ - Math symbols: ≤→<=, ≥→>=, ≠→!=, ×→x, ÷→/
272
+ - Degree symbols: °→deg, ℃→C, ℉→F
273
+ - Non-breaking spaces and special formatting characters → regular space
274
+ - Applied to all AI-generated text fields: executive summary, AI insights, AI summary
275
+ - Prevents empty boxes, question marks, or missing characters in PDFs
276
+ - Maintains readability while ensuring PDF compatibility
277
+
278
+ - **Waveform Statistics Display** (PDF and Markdown Generators)
279
+ - Statistics tables now include signal type with confidence
280
+ - Plateau stability metrics shown when enabled and applicable
281
+ - Enhanced formatting with proper units and precision
282
+ - Color-coded headers and organized metric grouping in PDFs
283
+ - Responsive table layout that adapts to content
284
+
285
+ ### Fixed - Report Generator Features
286
+
287
+ - **AI-Generated Text Rendering in PDFs**
288
+ - Fixed special Unicode characters not rendering (showing as boxes/question marks)
289
+ - Root cause: LLMs generate smart quotes, bullets, and math symbols that ReportLab can't handle
290
+ - Solution: Comprehensive character normalization before PDF generation
291
+ - Now handles text from Claude, GPT, Llama, and other LLMs correctly
292
+
293
+ - **Progress Bar Freezing During Plot Generation**
294
+ - Fixed progress bar appearing to freeze at 20% during PDF generation
295
+ - Root cause: No progress updates during slow matplotlib plot rendering
296
+ - Solution: Track waveforms across sections and report per-waveform progress
297
+ - Users now see smooth progression throughout the entire generation process
298
+
299
+ ### Technical Improvements - Report Generator
300
+
301
+ - **FFT-Based Signal Analysis**
302
+ - NumPy FFT with harmonic ratio analysis for signal classification
303
+ - Autocorrelation for period detection in non-periodic signals
304
+ - Robust against noise with configurable confidence thresholds
305
+ - Optimized for real-world oscilloscope waveforms
306
+
307
+ - **Extensible Waveform Analyzer**
308
+ - Static methods for modular analysis capabilities
309
+ - Separation of detection, measurement, and formatting logic
310
+ - Easy to add new signal types or analysis algorithms
311
+ - Comprehensive docstrings with algorithm explanations
312
+
313
+ - **Report Options Architecture**
314
+ - `ReportOptions` dataclass for type-safe configuration
315
+ - Passed through generator chain to all analysis functions
316
+ - Enables feature flags for optional expensive computations
317
+ - JSON-serializable for template saving
318
+
319
+ - **Model Detection Integration**
320
+ - Reuses existing LLMClient infrastructure
321
+ - Handles both Ollama native API and OpenAI-compatible endpoints
322
+ - Graceful error handling with actionable user feedback
323
+ - No duplicate code between Ollama and LM Studio detection
324
+
325
+ **Power Supply - Now Stable** ✅
326
+ - Power supply support graduated from BETA to stable
327
+ - API is now considered production-ready
328
+ - Removed experimental warnings and beta tags
329
+ - Full support for SPD3303X series power supplies
330
+ - Installation: Standard package or `pip install "Siglent-Oscilloscope[power-supply-beta]"` (alias maintained)
331
+
332
+ **Pre-Commit Checks and Code Coverage** 🔍
333
+ - New `make pre-commit-branch` target for lightweight branch commit validation
334
+ - Code formatting checks (Black, Flake8)
335
+ - Fast parallel test execution
336
+ - ~1 minute validation for rapid development
337
+ - Enhanced `make pre-pr` with codecov integration
338
+ - Full test suite with coverage reporting
339
+ - Automatic coverage upload to Codecov
340
+ - Comprehensive validation before pull requests
341
+ - Codecov configuration (`.codecov.yml`)
342
+ - 70-100% coverage range targets
343
+ - Project and patch thresholds
344
+ - Proper ignore patterns for tests, examples, docs
345
+ - Coverage documentation (`docs/development/PRE_COMMIT_CHECKS.md`)
346
+ - Complete guide for pre-commit workflows
347
+ - Coverage concepts and best practices
348
+ - Troubleshooting and CI/CD integration
349
+
350
+ ### Changed
351
+
352
+ **Documentation Updates**
353
+ - Updated README with comprehensive Automated Report Generation section
354
+ - Installation instructions for `[report-generator]` extra
355
+ - Code examples and feature highlights
356
+ - Added to Features, Installation, Optional Extras, and Examples sections
357
+ - Removed BETA designation from power supply in documentation
358
+ - Enhanced package description with automated report generation features
359
+
360
+ **Project Organization**
361
+ - Reorganized main directory structure for better clarity
362
+ - Moved test/development scripts to `scripts/` directory:
363
+ - `test_llm_model_detection.py`
364
+ - `test_pdf_progress.py` and `test_report_progress.pdf`
365
+ - `test_signal_detection.py`
366
+ - `test_unicode_rendering.py` and `test_unicode_rendering.pdf`
367
+ - Moved `ICON_SETUP.md` to `docs/development/` for better organization
368
+ - Removed duplicate `codecov.yml` (keeping `.codecov.yml`)
369
+ - Cleaned up empty `node_modules/` directory
370
+ - Root directory now contains 22 essential files/directories
371
+
372
+ ### Fixed
373
+
374
+ **Development Dependencies**
375
+ - Added `pytest-cov>=4.0.0` to dev dependencies
376
+ - Fixes "unrecognized arguments: --cov" error
377
+ - Ensures coverage plugin available after `pip install -e ".[dev]"`
378
+ - Added `codecov>=2.1.0` to dev dependencies
379
+ - Required by `make codecov-report` and `make pre-pr`
380
+ - Enables coverage uploads in development
381
+
382
+ **Makefile Pytest Integration**
383
+ - Updated all pytest calls to use `python -m pytest`
384
+ - Ensures pytest-cov plugin is properly loaded
385
+ - Fixes coverage generation in nested make calls
386
+ - Updated targets: `test`, `test-cov`, `test-fast`, `test-exceptions`
387
+
388
+ ## [0.4.0-beta.1] - 2026-01-04
389
+
390
+ ### Added (EXPERIMENTAL 🧪)
391
+
392
+ **Power Supply Control** - BETA Release
393
+ - ⚠️ **EXPERIMENTAL**: Power supply API is unstable and may change without warning
394
+ - **Installation**: `pip install "Siglent-Oscilloscope[power-supply-beta]"`
395
+ - **Target Stable Release**: v0.5.0 (pending community feedback)
396
+ - **Feedback**: Please report issues at [GitHub Issues](https://github.com/little-did-I-know/Siglent-Oscilloscope/issues)
397
+
398
+ **Core Power Supply Features**:
399
+ - **Main PowerSupply Class** (`siglent.power_supply.PowerSupply`)
400
+ - SCPI-based communication over Ethernet (port 5024) or USB
401
+ - **Multiple connection types supported**:
402
+ - **Ethernet/LAN** via `SocketConnection` (default)
403
+ - **USB** via `VISAConnection` (new - requires `[usb]` extras)
404
+ - **GPIB** via `VISAConnection` (IEEE-488)
405
+ - **Serial** via `VISAConnection` (RS-232)
406
+ - Automatic model detection from `*IDN?` response
407
+ - Capability-based feature availability
408
+ - Context manager support for automatic connection management
409
+ - Support for multiple power supply models via capability registry
410
+
411
+ - **Model Support**:
412
+ - **Siglent SPD3303X / SPD3303X-E** (triple output, 30V/3A + 30V/3A + 5V/3A)
413
+ - Full feature support including OVP, OCP, timer, waveform generation, tracking modes
414
+ - **Siglent SPD1305X** (single output, 30V/5A)
415
+ - **Siglent SPD1168X** (single output, 16V/8A)
416
+ - **Generic SCPI-99 PSUs** (fallback with conservative defaults)
417
+
418
+ - **Output Control** (`siglent.power_supply_output.PowerSupplyOutput`)
419
+ - Voltage setpoint control with validation against model limits
420
+ - Current limit configuration
421
+ - Output enable/disable
422
+ - Real-time voltage, current, and power measurements
423
+ - Operating mode detection (CV/CC)
424
+ - Over-voltage protection (OVP) and over-current protection (OCP) settings
425
+ - Timer functionality (Siglent SPD specific)
426
+ - Waveform generation enable/disable (SPD3303X specific)
427
+
428
+ - **Advanced Features**:
429
+ - **Tracking Modes** for multi-output PSUs:
430
+ - Independent mode (default)
431
+ - Series tracking (voltages add)
432
+ - Parallel tracking (currents add)
433
+ - Dynamic output creation based on model capabilities
434
+ - Model-specific SCPI command variants
435
+ - Comprehensive error handling and logging
436
+
437
+ - **Model Registry and Capability System** (`siglent.psu_models`)
438
+ - `PSUCapability` dataclass with complete model specifications
439
+ - `OutputSpec` defining per-output voltage/current/power limits
440
+ - Automatic model detection with fuzzy matching
441
+ - Generic SCPI fallback for unknown models
442
+ - Extensible registry for adding new models
443
+
444
+ - **SCPI Command Management** (`siglent.psu_scpi_commands`)
445
+ - Model-specific command variants (Siglent SPD vs generic SCPI)
446
+ - Template-based command generation with parameter substitution
447
+ - Support for multiple SCPI dialects
448
+
449
+ - **Data Logging** (`siglent.psu_data_logger`)
450
+ - **PSUDataLogger**: Manual data capture with configurable channels
451
+ - **TimedPSULogger**: Automated time-series data collection
452
+ - Configurable sampling intervals
453
+ - Background thread-based acquisition
454
+ - Real-time data access during logging
455
+ - Export to CSV, JSON, or custom formats
456
+ - Voltage, current, and power logging for all outputs
457
+ - Timestamp-based data organization
458
+
459
+ - **Connection Layer** (`siglent.connection`)
460
+ - **VISAConnection** class for USB/GPIB/Serial support (new)
461
+ - PyVISA-based connection supporting multiple transport protocols
462
+ - USB-TMC protocol for USB connections
463
+ - GPIB (IEEE-488) support
464
+ - Serial (RS-232) support
465
+ - Optional dependency: install with `[usb]` extras
466
+ - Pure Python backend (pyvisa-py) requires no proprietary drivers
467
+ - **Resource discovery utilities**:
468
+ - `list_visa_resources()` - List all VISA devices
469
+ - `find_siglent_devices()` - Automatically find Siglent instruments
470
+ - Graceful fallback when PyVISA not installed
471
+
472
+ - **Examples**:
473
+ - `examples/psu_basic_control.py` - Basic voltage/current control, measurements (Ethernet)
474
+ - `examples/psu_usb_connection.py` - USB/GPIB/Serial connection examples (new)
475
+ - `examples/psu_advanced_features.py` - Tracking modes, data logging, timer, waveform generation
476
+ - `examples/psu_gui_test.py` - GUI integration test (experimental)
477
+
478
+ - **Testing**:
479
+ - `tests/test_power_supply.py` - Unit tests with mock connection
480
+ - `tests/test_visa_connection.py` - Tests for USB/VISA connections (new)
481
+ - Hardware tests marked with `@pytest.mark.hardware`
482
+ - Coverage for core functionality, model detection, SCPI commands, VISA connections
483
+
484
+ **Documentation**:
485
+ - Added `docs/development/EXPERIMENTAL_FEATURES.md` - Comprehensive guide for experimental features
486
+ - Guidelines for marking features as experimental
487
+ - Version numbering strategies (alpha/beta/rc)
488
+ - Installation and discovery patterns
489
+ - Documentation standards
490
+ - Testing requirements
491
+ - Graduation and deprecation processes
492
+ - Updated `docs/development/contributing.md` with experimental features section
493
+ - Module docstrings with experimental warnings and installation instructions
494
+
495
+ ### Changed
496
+
497
+ - **Version Bumped**: `0.3.2` → `0.4.0-beta.1`
498
+ - Pre-release version indicates experimental status
499
+ - Follows semantic versioning with beta tag
500
+
501
+ - **Package Description Updated**:
502
+ - PyPI description now mentions power supply support (beta)
503
+ - Added SPD series models to package description
504
+ - New keywords: "power supply", "SPD", "PSU", "voltage", "current"
505
+
506
+ - **Export Structure**:
507
+ - `siglent.__init__.py` clearly separates stable vs experimental exports
508
+ - PowerSupply, PSUDataLogger, TimedPSULogger marked as experimental (v0.4.0-beta.1)
509
+ - Documentation in docstring warns about experimental status
510
+
511
+ ### Technical Details
512
+
513
+ **Experimental Feature Implementation**:
514
+ - Module-level `FutureWarning` on import with clear experimental notice
515
+ - Optional dependency groups in pyproject.toml:
516
+ - `[power-supply-beta]` - Power supply features (no extra dependencies)
517
+ - `[usb]` - USB/GPIB/Serial support via PyVISA (optional)
518
+ - `[experimental]` group added for future experimental features
519
+ - Graceful degradation when optional dependencies not installed
520
+
521
+ **Architecture Highlights**:
522
+ - **Connection abstraction layer** (`BaseConnection`)
523
+ - `SocketConnection` for TCP/IP Ethernet (default)
524
+ - `VISAConnection` for USB/GPIB/Serial (optional via PyVISA)
525
+ - Consistent SCPI interface across all connection types
526
+ - Shares exception hierarchy (`SiglentConnectionError`, `SiglentTimeoutError`, `CommandError`)
527
+ - Capability-based design allows easy addition of new models
528
+ - SCPI command abstraction supports multiple manufacturers and SCPI dialects
529
+ - Pluggable transport layer - easy to add new connection types
530
+
531
+ **Known Limitations** (Beta Status):
532
+ - Limited hardware testing (primarily SPD3303X-E)
533
+ - Some SCPI commands may vary between models
534
+ - Timer and waveform generation features only tested on SPD3303X
535
+ - Remote sensing support not yet implemented
536
+ - No GUI integration for power supply control (gui test script only)
537
+
538
+ **API Stability Notice**:
539
+ - Power supply API may change in future releases without deprecation warnings
540
+ - Breaking changes possible in any 0.x release
541
+ - Recommend pinning to specific version for production use: `Siglent-Oscilloscope==0.4.0-beta.1`
542
+ - Feedback welcome to help stabilize API before v0.5.0 stable release
543
+
544
+ ### Upgrading from 0.3.x
545
+
546
+ **For Oscilloscope Users** (No Changes Required):
547
+ - All oscilloscope functionality remains stable
548
+ - No breaking changes to existing APIs
549
+ - Update to `0.4.0-beta.1` is backward compatible
550
+
551
+ **For Power Supply Users** (New Feature):
552
+ ```bash
553
+ # Install with power supply support (Ethernet/LAN only)
554
+ pip install "Siglent-Oscilloscope[power-supply-beta]==0.4.0-beta.1"
555
+
556
+ # Install with USB support (includes PyVISA for USB/GPIB/Serial)
557
+ pip install "Siglent-Oscilloscope[usb]==0.4.0-beta.1"
558
+
559
+ # Install both
560
+ pip install "Siglent-Oscilloscope[power-supply-beta,usb]==0.4.0-beta.1"
561
+ ```
562
+
563
+ **For Developers**:
564
+ - See `docs/development/EXPERIMENTAL_FEATURES.md` for guidance on experimental features
565
+ - Power supply modules will show experimental warnings on import
566
+ - Set `PYTHONWARNINGS=default::FutureWarning` to see all warnings during development
567
+
568
+ ## [0.3.1] - 2026-01-02
569
+
570
+ ### Added
571
+ - **Comprehensive MkDocs Documentation**
572
+ - Added complete user guide documentation (5 files, ~3,000 lines):
573
+ - `basic-usage.md` - Foundation for connecting and controlling oscilloscope
574
+ - `waveform-capture.md` - Advanced capture techniques and data formats
575
+ - `measurements.md` - Automated measurement capabilities
576
+ - `trigger-control.md` - Comprehensive trigger configuration
577
+ - `advanced-features.md` - FFT, math channels, automation, protocol decoding
578
+ - Added GUI documentation (7 files, ~4,700 lines):
579
+ - `overview.md` - GUI introduction and installation
580
+ - `interface.md` - Complete UI reference with keyboard shortcuts
581
+ - `live-view.md` - Real-time waveform visualization
582
+ - `visual-measurements.md` - Interactive measurement markers
583
+ - `fft-analysis.md` - Frequency domain analysis
584
+ - `protocol-decoding.md` - I2C/SPI/UART decoding
585
+ - `vector-graphics.md` - XY mode and waveform generation
586
+ - Added connection guide (~960 lines):
587
+ - `connection.md` - Network setup, troubleshooting, VNC access
588
+ - Added development documentation (3 files, ~2,950 lines):
589
+ - `building.md` - Build system, testing, documentation generation
590
+ - `structure.md` - Codebase organization and design patterns
591
+ - `testing.md` - Testing strategy and best practices
592
+ - Added API reference:
593
+ - `gui.md` - Auto-generated GUI API docs using mkdocstrings
594
+ - **Total: 17 documentation files, ~11,900 lines**
595
+ - Material for MkDocs theme with admonitions (tip, info, warning)
596
+ - Comprehensive examples, troubleshooting sections, and cross-references
597
+ - mkdocstrings integration for auto-generating API docs from Python docstrings
598
+
599
+ ### Fixed
600
+ - **Windows Executable Build Workflow**
601
+ - Fixed 7-Zip archive creation failing with "The system cannot find the file specified" errors
602
+ - Updated Windows build workflow to correctly reference README.md and LICENSE from parent directory
603
+ - Changed paths from `README.md LICENSE` to `../README.md ../LICENSE` to match macOS/Linux builds
604
+ - Resolved workflow exit code 1 error during archive creation
605
+
606
+ ## [0.3.0] - Unreleased
607
+
608
+ ### ⚠️ BREAKING CHANGES
609
+
610
+ - **Exception Class Renaming** (Issue #3 from Code Review)
611
+ - `ConnectionError` renamed to `SiglentConnectionError` to avoid shadowing Python's built-in `ConnectionError`
612
+ - `TimeoutError` renamed to `SiglentTimeoutError` to avoid shadowing Python's built-in `TimeoutError`
613
+ - **Migration Guide:**
614
+ - Update imports: `from siglent.exceptions import SiglentConnectionError, SiglentTimeoutError`
615
+ - Update exception handling: `except (SiglentConnectionError, SiglentTimeoutError) as e:`
616
+ - Backward compatibility aliases provided for transition period (will be removed in v1.0.0)
617
+ - If you use `from siglent import ConnectionError`, update to `from siglent import SiglentConnectionError`
618
+ - **Why:** Prevents naming conflicts with Python built-ins, improves code clarity, follows best practices
619
+ - **Impact:** All code that imports or catches `ConnectionError` or `TimeoutError` from siglent.exceptions needs updating
620
+
621
+ ### Added
622
+ - **Waveform Validation System** (`siglent/gui/utils/validators.py`)
623
+ - `WaveformValidator` class for comprehensive data quality checks
624
+ - Validates waveform data before plotting or processing
625
+ - Catches common issues that cause blank plots:
626
+ - None/missing waveforms
627
+ - Empty voltage or time arrays
628
+ - Mismatched array lengths between time and voltage
629
+ - All-NaN or excessive NaN values (>50%)
630
+ - Invalid voltage ranges (all zeros, infinite values)
631
+ - Suspiciously large voltages (>1000V)
632
+ - `validate()` method returns (is_valid, list_of_issues)
633
+ - `validate_multiple()` separates valid from invalid waveforms
634
+ - `get_summary()` generates diagnostic strings like "CH1: 50,000 samples, range -2.5V to +2.5V"
635
+ - **Detailed Error Dialog Widget** (`siglent/gui/widgets/error_dialog.py`)
636
+ - `DetailedErrorDialog` class for user-friendly error reporting
637
+ - Two-level error display:
638
+ - User-friendly summary for non-technical users
639
+ - Expandable technical details (stack trace, context) for debugging
640
+ - Features:
641
+ - Error icon and timestamp display
642
+ - "Show Details" / "Hide Details" toggle button
643
+ - Read-only text area for stack traces and context
644
+ - "Copy to Clipboard" button for comprehensive error reports
645
+ - Automatic dialog resizing when showing/hiding details
646
+ - Structured error info dictionary format:
647
+ - `type`: Error type name (e.g., 'TimeoutError')
648
+ - `message`: User-friendly error message
649
+ - `details`: Additional error details
650
+ - `context`: Dictionary of context info (operation, settings, etc.)
651
+ - `traceback`: Full stack trace string
652
+ - `timestamp`: Error occurrence time
653
+ - Convenience function `show_error_dialog()` for quick usage
654
+ - **Real-Time Status Updates** (LiveViewWorker)
655
+ - New `status_update` signal (pyqtSignal(str)) for user feedback
656
+ - Status messages during acquisition cycle:
657
+ - "Checking enabled channels..."
658
+ - "Acquiring CH1...", "Acquiring CH2...", etc.
659
+ - "Validating waveforms..."
660
+ - "Live view: CH1, CH2 (50,000, 100,000 samples)"
661
+ - "No enabled channels", "Not connected"
662
+ - Status bar updates reflect worker progress in real-time
663
+
664
+ ### Changed
665
+ - **LiveViewWorker Error Handling Enhanced**
666
+ - Changed `error_occurred` signal from `pyqtSignal(str)` → `pyqtSignal(dict)`
667
+ - Errors now emit structured dictionaries with full context
668
+ - Error info includes:
669
+ - Error type, message, details
670
+ - Operation context (update_interval, operation name)
671
+ - Full traceback for debugging
672
+ - Timestamp for error tracking
673
+ - Integration with `WaveformValidator` for data quality checks
674
+ - Only emits valid waveforms (invalid ones logged at WARNING level)
675
+ - Enhanced logging: acquisition results logged at INFO/WARNING for visibility
676
+ - **WaveformCaptureWorker Validation Integration**
677
+ - Validates all captured waveforms before emitting via `WaveformValidator.validate_multiple()`
678
+ - Logs validation failures at WARNING level (visible to users)
679
+ - Only emits valid waveforms to prevent blank plots
680
+ - Enhanced error messages include validation failure details
681
+ - Progress message updated: "Processing waveforms..." → "Validating waveforms..."
682
+ - **WaveformDisplayPG Pre-Plot Validation**
683
+ - Validates all waveforms before plotting via `WaveformValidator.validate_multiple()`
684
+ - Invalid waveforms logged at WARNING level with specific issues
685
+ - Info label shows "Invalid data - check logs" when all waveforms fail validation
686
+ - Enhanced diagnostic logging:
687
+ - Valid waveforms logged at INFO level with summary
688
+ - Runtime validation checks for None and empty arrays
689
+ - Voltage range logging: "[−2.5V to +2.5V]" or "[all NaN]"
690
+ - Only stores and plots valid waveforms
691
+ - **Main Window Error Handling Integration**
692
+ - Connected to new `status_update` signal from LiveViewWorker
693
+ - New `_on_live_view_status()` method updates status bar with worker messages
694
+ - Enhanced `_on_live_view_error()` method:
695
+ - Accepts structured error dictionary instead of plain string
696
+ - Shows `DetailedErrorDialog` for rich error information
697
+ - Brief error message in status bar (60 chars max, 5 second timeout)
698
+ - Fallback to QMessageBox for legacy string errors
699
+ - User-friendly error display with expandable technical details
700
+
701
+ ### Fixed
702
+ - **Blank Plot Issue from Invalid Waveforms**
703
+ - Root cause: Invalid waveforms (None, empty arrays, all NaN) were being plotted
704
+ - Solution: Comprehensive validation before plotting in all code paths
705
+ - Workers now validate data before emitting to GUI
706
+ - Display widget validates again before rendering as safety check
707
+ - **Cryptic Error Messages**
708
+ - Users previously saw raw exception strings in status bar
709
+ - Now see structured error dialogs with context and debugging info
710
+ - Technical details hidden by default but available on demand
711
+ - **Missing Waveform Quality Diagnostics**
712
+ - Added comprehensive validation with specific issue reporting
713
+ - Users now see exactly why waveforms failed (e.g., "CH1: All voltage values are NaN")
714
+ - Validation results logged at WARNING level for visibility
715
+ - **Bare Exception Handling in Vector Graphics** (Issue #2 from Code Review)
716
+ - Replaced bare `except:` clauses with specific exception types in `vector_graphics.py`
717
+ - Now catches `CommandError`, `SiglentConnectionError`, `SiglentTimeoutError` explicitly
718
+ - Prevents catching system exceptions like `KeyboardInterrupt` and `SystemExit`
719
+ - Improves debugging and error handling clarity
720
+ - **Socket Read Race Condition** (Issue #5 from Code Review)
721
+ - Added timeout protection in `socket.py` read loop
722
+ - Prevents infinite loop if oscilloscope doesn't send newline-terminated responses
723
+ - Raises `SiglentTimeoutError` with detailed message showing bytes received
724
+ - Improves reliability and error diagnostics
725
+ - **Version Mismatch** (Issue #1 from Code Review)
726
+ - Fixed version inconsistency between `__init__.py` (0.1.0) and `pyproject.toml` (0.2.6)
727
+ - Both now correctly report version 0.2.6 (will be bumped to 0.3.0 for this release)
728
+
729
+ ### Technical Improvements
730
+ - **Input Validation for SCPI Commands** (Issue #4 from Code Review)
731
+ - Added ASCII validation before encoding commands in `socket.py`
732
+ - Raises `CommandError` with clear message if non-ASCII characters detected
733
+ - Prevents `UnicodeEncodeError` exceptions during command transmission
734
+ - Example: `CommandError: SCPI command contains non-ASCII characters: "C1:VDIV 1.0V\u2013"`
735
+ - **Magic Number Constants** (Issue #6 from Code Review)
736
+ - Added named constants for waveform conversion in `waveform.py`:
737
+ - `WAVEFORM_CODE_PER_DIV_8BIT = 25.0` (codes per division for 8-bit ADC)
738
+ - `WAVEFORM_CODE_PER_DIV_16BIT = 6400.0` (codes per division for 16-bit ADC)
739
+ - `WAVEFORM_CODE_CENTER = 0` (center code for signed integer data)
740
+ - Improved code documentation with conversion formula from SCPI manual
741
+ - Makes waveform parsing logic easier to understand and maintain
742
+ - Centralized waveform validation logic in reusable `WaveformValidator` class
743
+ - Structured error reporting enables better debugging and user support
744
+ - Separation of user-facing messages from technical diagnostics
745
+ - Thread-safe error propagation from workers to main GUI thread
746
+ - Validation happens at multiple checkpoints (capture → emit → display)
747
+ - All docstrings updated to reference new exception names
748
+ - Backward compatibility aliases ensure gradual migration path
749
+
750
+ ## [0.2.6] - 2025-12-31
751
+
752
+ ### Added
753
+ - **Background Waveform Capture Worker** (`waveform_capture_worker.py`)
754
+ - Non-blocking waveform acquisition in separate thread
755
+ - Progress updates during multi-channel capture
756
+ - Cancellable long-running downloads
757
+ - Thread-safe signal/slot architecture
758
+ - Real-time status updates: "Downloading CH1 data from scope..."
759
+ - **Progress Dialog for Capture Operations**
760
+ - Visual progress indication during waveform downloads
761
+ - Shows channel-by-channel progress
762
+ - Cancel button to abort slow captures
763
+ - Auto-closes on completion
764
+ - Prevents concurrent capture operations
765
+ - **Intelligent Waveform Downsampling**
766
+ - Min-max decimation algorithm for large datasets
767
+ - Preserves signal peaks, valleys, and transients
768
+ - Configurable threshold (default: 500,000 points)
769
+ - Downsamples 5M point waveforms to 500K for display
770
+ - Original data fully preserved for export/analysis
771
+ - Status indicator shows "(display downsampled)" when active
772
+ - **Modern Graph Visual Styling** (PyQtGraph)
773
+ - GitHub-inspired dark theme (#0d1117 background)
774
+ - Thicker, smoother waveform lines (2.0px with antialiasing)
775
+ - Vibrant channel colors for better visibility:
776
+ - CH1: Bright Yellow (255, 220, 50)
777
+ - CH2: Turquoise/Cyan (64, 224, 208)
778
+ - CH3: Hot Pink (255, 105, 180)
779
+ - CH4: Bright Green (50, 255, 100)
780
+ - Subtle dotted grid (20% opacity)
781
+ - Modern typography (Segoe UI, 11pt labels)
782
+ - Muted axis colors for professional appearance
783
+ - Sample count with thousands separators (e.g., "5,000,000 samples")
784
+
785
+ ### Changed
786
+ - **Waveform Capture Architecture Refactored**
787
+ - Moved from synchronous to asynchronous capture model
788
+ - Capture operations now run in `WaveformCaptureWorker` thread
789
+ - Main GUI thread remains responsive during downloads
790
+ - Enhanced error handling with user-friendly messages
791
+ - **Canvas Rendering Optimization** (Matplotlib)
792
+ - Replaced all blocking `canvas.draw()` calls with `canvas.draw_idle()`
793
+ - Removed redundant `canvas.update()`, `canvas.repaint()` calls
794
+ - Deferred rendering prevents GUI thread blocking
795
+ - Applied to 17+ instances across waveform_display.py
796
+ - **Downsampling Threshold Increased**
797
+ - Changed from 100,000 to 500,000 point threshold
798
+ - Provides 5x more waveform detail on display
799
+ - Maintains smooth performance even with millions of samples
800
+ - **Progress Dialog Signal Handling Improved**
801
+ - Disconnects `canceled` signal before closing to prevent race conditions
802
+ - Only triggers cancellation if worker thread is actually running
803
+ - Eliminates spurious "User cancelled capture" messages
804
+
805
+ ### Fixed
806
+ - **Critical: GUI Freezing During Waveform Capture**
807
+ - Fixed multi-second GUI freeze when capturing large waveforms (5M samples)
808
+ - Root cause: Synchronous SCPI queries blocked main thread for 5-10+ seconds
809
+ - Solution: Background worker thread handles all network I/O
810
+ - GUI remains fully responsive during capture operations
811
+ - **Progress Dialog Race Condition**
812
+ - Fixed spurious cancellation events when dialog auto-closed
813
+ - Dialog now properly disconnects signals before closing
814
+ - Prevents "cancelled" state after successful capture
815
+ - **Large Waveform Display Performance**
816
+ - Fixed severe lag when plotting 5+ million point waveforms
817
+ - PyQtGraph could still block GUI thread with massive datasets
818
+ - Min-max downsampling reduces display points by 10x while preserving signal fidelity
819
+ - **Incomplete Waveform Display Issue**
820
+ - Fixed waveforms not showing full captured data
821
+ - Increased downsampling threshold from 100K to 500K points
822
+ - Users now see 5x more detail in displayed waveforms
823
+
824
+ ### Performance
825
+ - **Waveform Capture**: No longer blocks GUI (runs in background thread)
826
+ - **Display Rendering**: 10x faster for large waveforms via intelligent downsampling
827
+ - **Canvas Updates**: Non-blocking deferred rendering throughout
828
+ - **User Responsiveness**: Can interact with GUI during long captures
829
+
830
+ ### Technical Improvements
831
+ - Thread-safe capture worker with Qt signals for status updates
832
+ - Signal/slot disconnect pattern prevents race conditions
833
+ - Min-max decimation preserves signal integrity during downsampling
834
+ - NumPy-optimized downsampling algorithm for performance
835
+ - Clean separation of capture, processing, and display concerns
836
+
837
+ ## [0.2.5] - 2025-12-30
838
+
839
+ ### Added
840
+ - **Buy Me a Coffee Badge**
841
+ - Added support/donation badge to README
842
+ - Links to https://buymeacoffee.com/little.did.i.know
843
+ - **Comprehensive Test Suite**
844
+ - Added `tests/test_channel.py` - 50+ test cases for channel control (280 lines)
845
+ - Tests for enable/disable, voltage scale, offset, coupling
846
+ - Probe ratio, bandwidth limit configuration
847
+ - Multi-channel validation
848
+ - Added `tests/test_trigger_comprehensive.py` - 40+ test cases for trigger (320 lines)
849
+ - Mode control (AUTO, NORMAL, SINGLE, STOP)
850
+ - Source, level, slope configuration
851
+ - Edge trigger setup and actions
852
+ - Holdoff and coupling control
853
+ - Added `tests/test_measurement_comprehensive.py` - 45+ test cases for measurements (340 lines)
854
+ - Frequency, period, Vpp, RMS, amplitude measurements
855
+ - Min/max/mean voltage measurements
856
+ - Timing measurements (rise/fall time, duty cycle)
857
+ - Statistical measurements and cursor support
858
+ - Added `tests/test_waveform_comprehensive.py` - 35+ test cases for waveform handling (280 lines)
859
+ - WaveformData creation and properties
860
+ - Binary waveform capture and parsing
861
+ - Multi-format save/load (CSV, NPZ, MAT, HDF5)
862
+ - Waveform analysis and comparison
863
+ - Added `tests/test_socket_connection.py` - 33+ test cases for connection (270 lines)
864
+ - Connection lifecycle (connect, disconnect, reconnect)
865
+ - Command sending and querying
866
+ - Binary data queries
867
+ - Context manager and error handling
868
+ - **Total: 490+ new test cases across 5 test modules**
869
+ - **Test Coverage and Quality Assurance**
870
+ - Integrated pytest with coverage reporting in CI workflow
871
+ - Added Codecov integration for test coverage tracking and visualization
872
+ - Multi-version testing across Python 3.8-3.12
873
+ - Coverage badge display on GitHub and PyPI
874
+ - **Coverage Improvement**: Overall coverage increased from 39% to 42%
875
+ - channel.py: Enhanced test coverage with comprehensive scenarios
876
+ - trigger.py: Added extensive mode and configuration tests
877
+ - measurement.py: Added tests for all measurement types
878
+ - waveform.py: Added capture, save/load, and analysis tests
879
+ - connection/socket.py: Added full connection lifecycle tests
880
+ - **Professional Project Badges**
881
+ - CI build status badge (GitHub Actions)
882
+ - Test coverage badge (Codecov)
883
+ - PyPI downloads per month badge
884
+ - GitHub issues tracker badge
885
+ - GitHub stars badge
886
+ - Last commit timestamp badge
887
+ - **Codecov Configuration**
888
+ - Added `codecov.yml` with project-specific settings
889
+ - Configured coverage thresholds and reporting
890
+ - **Pytest Configuration**
891
+ - Added `[tool.pytest.ini_options]` to `pyproject.toml`
892
+ - Configured test markers for hardware and GUI tests
893
+ - Added strict pytest configuration for better test quality
894
+ - **Contributing Guide**
895
+ - Comprehensive `CONTRIBUTING.md` with development guidelines
896
+ - Code style, testing, and PR submission instructions
897
+ - Development setup and best practices documentation
898
+ - **Community Standards**
899
+ - Added `CODE_OF_CONDUCT.md` (Contributor Covenant 2.1)
900
+ - Private reporting contacts (email, GitHub, security advisory)
901
+ - Clear enforcement responsibilities (maintainers defined)
902
+ - Anti-retaliation policy
903
+ - Step-by-step "What Happens Next" process
904
+ - Appeals process for disputed decisions
905
+ - Added `SECURITY.md` with vulnerability reporting process
906
+ - Added security best practices and safe usage guidelines
907
+ - **Development Automation**
908
+ - Added `.pre-commit-config.yaml` for automated code quality checks
909
+ - Configured Black, Flake8, isort, Bandit security scanning
910
+ - Added file cleanup and validation hooks
911
+ - **Makefile for Development**
912
+ - Added comprehensive Makefile with common development tasks
913
+ - Commands for testing, linting, formatting, building, publishing
914
+ - Quick setup commands: `make dev-setup`, `make check`
915
+ - Shortcuts: `make test-cov`, `make format`, `make gui`
916
+ - Pre-PR commands: `make pre-pr`, `make pre-pr-fast`, `make pre-pr-fix`
917
+ - **Pre-PR Validation Scripts**
918
+ - Added `scripts/pre_pr_check.py` - Comprehensive Python validation script
919
+ - Added `scripts/pre_pr_check.sh` - Bash version for Unix-like systems
920
+ - Automated checks: formatting, linting, security, tests, coverage, build
921
+ - Options: `--fast` (skip slow checks), `--fix` (auto-fix issues)
922
+ - Color-coded output with detailed error reporting
923
+ - **GitHub Issue Templates**
924
+ - Structured bug report template (`.github/ISSUE_TEMPLATE/bug_report.yml`)
925
+ - Feature request template (`.github/ISSUE_TEMPLATE/feature_request.yml`)
926
+ - Issue template configuration with links to discussions
927
+ - **Pull Request Template**
928
+ - Comprehensive PR template (`.github/PULL_REQUEST_TEMPLATE.md`)
929
+ - Checklists for code quality, testing, and documentation
930
+ - Sections for type of change, testing details, and migration guides
931
+ - **Dependabot Configuration**
932
+ - Automated dependency updates (`.github/dependabot.yml`)
933
+ - Weekly updates for Python packages and GitHub Actions
934
+ - Grouped updates by dependency type (dev, security, GUI, core)
935
+ - **Interactive Tutorial**
936
+ - Jupyter notebook tutorial (`examples/interactive_tutorial.ipynb`)
937
+ - Step-by-step guide for oscilloscope control
938
+ - Examples of waveform capture, FFT analysis, measurements
939
+ - Multi-channel capture and data export demonstrations
940
+
941
+ ### Changed
942
+ - **SEO and PyPI Metadata Improvements**
943
+ - Enhanced package description with comprehensive feature highlights for better discoverability
944
+ - Expanded keywords from 7 to 20 terms covering automation, data acquisition, GUI, protocol decoding, and visualization
945
+ - Improved search ranking for oscilloscope automation, SCPI control, and lab equipment software
946
+ - **CI/CD Enhancements**
947
+ - Enhanced CI workflow with dedicated test suite job
948
+ - Added pytest-cov and pytest-xdist dependencies
949
+ - Improved test execution with verbose output and coverage reporting
950
+ - **Test Organization**
951
+ - Moved manual test scripts to `scripts/` directory
952
+ - Reorganized interactive GUI tests as manual scripts
953
+ - Ensured automated tests properly handle optional dependencies
954
+ - **README Improvements**
955
+ - Added Community and Support section with links to issues, discussions, security
956
+ - Added Resources section highlighting tutorial, examples, and guides
957
+ - Added Quick Start for Contributors with Makefile commands
958
+ - Improved Contributing section with detailed instructions
959
+
960
+ ### Fixed
961
+ - **Test Suite Issues**
962
+ - Fixed CI test failures due to missing PyQt6 dependencies
963
+ - Moved manual test scripts (`test_live_view.py`, `test_pyqtgraph.py`, `test_dependency_check.py`, `test_waveform_display.py`) to `scripts/` directory
964
+ - Prevented pytest from collecting non-test GUI demo scripts
965
+ - Ensured GUI tests skip gracefully when PyQt6 is not installed
966
+ - Fixed hanging test in `test_socket_connection.py::TestSocketQueryBinary::test_query_binary`
967
+ - Test was using `mock_socket.recv.return_value` which caused infinite loop in `read_raw()`
968
+ - Changed to `side_effect` to return data once then raise timeout to signal end of data
969
+ - **Python 3.8 Compatibility**
970
+ - Fixed `pyproject.toml` license field to use PEP 621 compliant format
971
+ - Changed `license = "MIT"` to `license = {text = "MIT"}` for Python 3.8 compatibility
972
+ - Resolved build errors in older setuptools versions
973
+
974
+ ## [0.2.4] - 2025-12-29
975
+
976
+ ### Added
977
+ - **Vector Graphics / XY Mode Features** (requires `[fun]` extras)
978
+ - New `vector_graphics.py` module for generating waveforms for XY mode display
979
+ - `VectorDisplay` class for managing XY mode and waveform generation
980
+ - `Shape` factory with generators for:
981
+ - Basic shapes: circle, rectangle, polygon, star, line
982
+ - Lissajous figures for classic oscilloscope patterns
983
+ - Text rendering (experimental)
984
+ - `VectorPath` class with transformation methods (rotate, scale, translate, flip)
985
+ - Waveform export to CSV, NumPy, and binary formats for AWG upload
986
+ - **GUI Integration**: New "Vector Graphics 🎨" tab in GUI application
987
+ - Shape selection with dynamic parameter controls (Circle, Rectangle, Star, Triangle, Lissajous, Line)
988
+ - XY mode enable/disable directly from GUI
989
+ - Waveform generation with sample rate and duration controls
990
+ - Export to CSV, NumPy, or Binary format for AWG upload
991
+ - Works even without scope connection (offline waveform generation)
992
+ - Graceful degradation: shows installation instructions if `[fun]` extras not installed
993
+ - Example script: `examples/vector_graphics_xy_mode.py` with animations
994
+ - Optional dependency group `[fun]` in pyproject.toml:
995
+ - shapely>=2.0.0 (geometric operations)
996
+ - Pillow>=10.0.0 (text rendering)
997
+ - svgpathtools>=1.6.0 (SVG path support)
998
+
999
+ ### Changed
1000
+ - Updated README.md with comprehensive Vector Graphics / XY Mode section
1001
+ - Added GUI tab documentation with step-by-step usage instructions
1002
+ - Added example use cases (calibration, education, pattern testing)
1003
+ - Updated installation instructions to include `[fun]` extras option
1004
+ - Added `[fun]` to Optional Extras requirements section
1005
+ - Updated `siglent/gui/main_window.py` to integrate Vector Graphics tab
1006
+ - Updated `siglent/gui/widgets/__init__.py` with import note for optional panel
1007
+
1008
+ ## [0.2.3] - 2025-12-29
1009
+
1010
+ ### Changed
1011
+ - project.toml version number due to pypi version number conflict
1012
+
1013
+ ## [0.2.2] - 2025-12-29
1014
+
1015
+ ### Changed
1016
+ - **GitHub Workflow Updates**
1017
+ - Simplified PyPI publishing workflow
1018
+ - Removed TestPyPI publishing step for streamlined releases
1019
+ - Workflow now publishes directly to PyPI on releases or manual trigger
1020
+
1021
+ ## [0.2.1] - 2025-12-29
1022
+
1023
+ ### Changed
1024
+ - **Project Structure Reorganization** to follow Python packaging best practices
1025
+ - Moved all test files to `tests/` directory
1026
+ - Moved development utilities to `scripts/` directory
1027
+ - Consolidated documentation into `docs/` directory
1028
+ - Created `docs/development/` for build and deployment documentation
1029
+ - Updated MANIFEST.in to properly exclude development files from distribution
1030
+ - Updated .gitignore to properly exclude build artifacts
1031
+ - Added `docs/development/PROJECT_STRUCTURE.md` documenting the project layout
1032
+
1033
+ ### Fixed
1034
+ - Improved .gitignore to properly exclude dist/, build/, and egg-info directories
1035
+
1036
+ ## [0.2.0] - 2025-12-29
1037
+
1038
+ ### Added
1039
+ - **High-Performance Live View** with PyQtGraph
1040
+ - 100x faster real-time plotting (1000+ fps capability vs 5-10 fps)
1041
+ - Replaced matplotlib with PyQtGraph for live waveform display
1042
+ - Non-blocking threaded data acquisition
1043
+ - Smooth updates at 5-20 fps with responsive GUI
1044
+ - Supports all 4 channels simultaneously
1045
+ - **Interactive Visual Measurement System**
1046
+ - Click-and-drag measurement markers directly on waveforms
1047
+ - 15+ measurement types with specialized visual markers:
1048
+ - Frequency/Period with auto-detection
1049
+ - Voltage measurements (Vpp, Amplitude, Max, Min, RMS, Mean)
1050
+ - Timing measurements (Rise Time, Fall Time, Pulse Width, Duty Cycle)
1051
+ - Real-time measurement updates as you adjust marker gates
1052
+ - Visual gates and markers with color-coded styling
1053
+ - Auto-placement with intelligent positioning
1054
+ - **Measurement Configuration Management**
1055
+ - Save measurement setups to JSON files
1056
+ - Load previously saved configurations
1057
+ - Configuration browser and management
1058
+ - Shareable measurement templates
1059
+ - **Measurement Export Functionality**
1060
+ - Export results to CSV format
1061
+ - Export to JSON with full configuration
1062
+ - Batch measurement support
1063
+ - Timestamp and metadata inclusion
1064
+ - **Background Worker Thread** (`LiveViewWorker`)
1065
+ - Prevents GUI freezing during SCPI queries
1066
+ - Thread-safe signal/slot communication
1067
+ - Configurable update intervals (default: 200ms)
1068
+ - Automatic error handling and reporting
1069
+ - **Visual Measurement Panel** (`visual_measurement_panel.py`)
1070
+ - Add/remove markers via UI
1071
+ - Enable/disable individual markers
1072
+ - Live measurement value display
1073
+ - Auto-update mode with 1-second refresh
1074
+ - Marker list with real-time results
1075
+ - **New Measurement Marker Classes**
1076
+ - Base `MeasurementMarker` abstract class
1077
+ - `FrequencyMarker` with period auto-detection
1078
+ - `VoltageMarker` with threshold visualization
1079
+ - `TimingMarker` with edge detection
1080
+ - **PyQtGraph-based Waveform Display** (`waveform_display_pg.py`)
1081
+ - Drop-in replacement for matplotlib display
1082
+ - Preserved all existing features (cursors, zoom, pan)
1083
+ - Optimized update performance
1084
+ - Configurable visual styling
1085
+ - **Measurement Data Models** (`measurement_config.py`)
1086
+ - `MeasurementMarkerConfig` dataclass
1087
+ - `MeasurementConfigSet` for collections
1088
+ - JSON serialization/deserialization
1089
+ - Configuration validation
1090
+
1091
+ ### Changed
1092
+ - Migrated live view from matplotlib to PyQtGraph for dramatic performance improvement
1093
+ - Replaced timer-based acquisition with threaded worker pattern
1094
+ - Enhanced waveform display with marker support methods
1095
+ - Updated main window to integrate visual measurement panel
1096
+ - Improved channel enabled detection to handle scope response format
1097
+
1098
+ ### Fixed
1099
+ - **Channel Detection Bug**: Fixed `channel.enabled` property failing to detect "C1:TRA ON" response format (channel.py:48)
1100
+ - **GUI Freezing**: Moved blocking SCPI queries to background thread to maintain GUI responsiveness
1101
+ - **Live View Startup**: Removed non-existent `refresh_state()` call that caused crashes
1102
+ - **Waveform Update Performance**: Eliminated unnecessary canvas redraws during live view
1103
+
1104
+ ### Dependencies
1105
+ - Added `pyqtgraph>=0.13.0` to GUI dependencies
1106
+ - Updated installation instructions for `[gui]` extra
1107
+
1108
+ ### Technical Improvements
1109
+ - Thread-safe Qt signal/slot architecture for live updates
1110
+ - Abstract base class pattern for extensible measurement markers
1111
+ - Dataclass-based configuration management
1112
+ - Separation of rendering and calculation logic
1113
+ - Optimized matplotlib blitting for fast partial updates (fallback mode)
1114
+ - Coordinate system handling for zoom/pan compatibility
1115
+
1116
+ ### Performance
1117
+ - Live view: 100x faster (5-10 fps → 1000+ fps capability)
1118
+ - SCPI queries: Moved to background thread (GUI unblocked)
1119
+ - Canvas updates: <1ms per frame vs 100-500ms previously
1120
+ - Measurement calculations: Real-time NumPy-based processing
1121
+
1122
+ ## [0.1.0] - 2025-12-25
1123
+
1124
+ ### Added
1125
+ - Initial release of Siglent oscilloscope control package
1126
+ - Complete programmatic API for controlling Siglent SD824x HD oscilloscopes
1127
+ - TCP/IP socket connection via SCPI protocol (port 5024)
1128
+ - Full channel control (all 4 channels)
1129
+ - Voltage scale and offset configuration
1130
+ - Coupling mode (DC/AC/GND)
1131
+ - Probe ratio settings
1132
+ - Bandwidth limiting
1133
+ - Comprehensive trigger control
1134
+ - Trigger modes (Auto, Normal, Single, Stop)
1135
+ - Edge trigger configuration
1136
+ - Source selection and level control
1137
+ - Slope and coupling settings
1138
+ - Waveform acquisition and processing
1139
+ - Binary waveform download
1140
+ - Automatic voltage conversion
1141
+ - NumPy array output
1142
+ - CSV and NPY export formats
1143
+ - Automated measurements
1144
+ - Frequency, period, Vpp, RMS, amplitude
1145
+ - Rise/fall time, duty cycle
1146
+ - Min/max/mean calculations
1147
+ - Cursor support
1148
+ - PyQt6-based GUI application
1149
+ - Connection management dialog
1150
+ - Acquisition controls (Run/Stop/Single)
1151
+ - Live waveform view with configurable update rate
1152
+ - Single waveform capture
1153
+ - Multi-channel matplotlib display with oscilloscope-style theming
1154
+ - Interactive zoom and pan
1155
+ - Waveform export to PNG/PDF/SVG
1156
+ - Console script entry point (`siglent-gui`)
1157
+ - Comprehensive example scripts
1158
+ - Basic usage and configuration
1159
+ - Waveform capture and export
1160
+ - Automated measurements
1161
+ - Live plotting
1162
+ - Full documentation
1163
+ - API documentation in README
1164
+ - PyPI deployment guide
1165
+ - Build instructions
1166
+ - Example scripts with explanations
1167
+
1168
+ ### Technical Details
1169
+ - Python 3.8+ support
1170
+ - Dependencies: PyQt6, NumPy, Matplotlib
1171
+ - MIT License
1172
+ - Type hints throughout codebase
1173
+ - Context manager support for oscilloscope connections
1174
+ - Comprehensive error handling with custom exceptions
1175
+
1176
+ [0.1.0]: https://github.com/siglent-control/siglent/releases/tag/v0.1.0