Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Dev#14

Merged
caidish merged 15 commits intomasterfrom
Dev
Sep 29, 2025
Merged

Dev#14
caidish merged 15 commits intomasterfrom
Dev

Conversation

@caidish
Copy link
Collaborator

@caidish caidish commented Sep 29, 2025

This is a huge update:

  • Main plotter now uses pyqtgraph.
  • Many performance update.
  • Rebuild repo structure.

Replaces the main plotter_thread.py implementation with a high-performance PyQtGraph-based plotter for real-time plotting, improving speed and memory efficiency. The original matplotlib-based plotter is preserved as plotter_thread_matplotlib.py for fallback or reference. Updates pyproject.toml to add pyqtgraph as a dependency. Updates example notebooks and adds a detailed migration TODO.md for tracking progress and testing.
Replaces the matplotlib-based heatmap_thread.py with a new PyQtGraph-based implementation for improved real-time 2D visualization in Sweep2D. The original matplotlib version is preserved as heatmap_thread_matplotlib.py. Updates Sweep2D and Plotter to use a new data flow (get_plot_data and add_heatmap_data signal) for compatibility with the new plotting backend. Updates the quick start notebook and TODO to reflect these changes.
Refactored the heatmap visualization to use PyQtGraph's PlotWidget and ImageItem for better axis labeling and display. Increased the update frequency to 5 FPS (200ms interval), added batch processing for queued data to prevent UI blocking, and improved data mapping and refresh logic. Updated the quick start notebook outputs to reflect these changes.
Removes use of QThread for plotter and heatmap classes to improve compatibility with Qt/Jupyter environments and prevent crashes. Updates Heatmap to provide a more interactive UI with colormap selection, auto-levels, and reset view controls. Cleans up thread shutdown logic for backward compatibility and ensures QApplication is initialized where needed. Also updates the quick start notebook outputs and removes the obsolete TODO.md file.
Enhanced the heatmap UI to allow selection and visualization of multiple followed parameters in 2D sweeps. Refactored Sweep2D and Heatmap to support dynamic parameter selection, improved keyboard controls, and ensured proper parent linkage for sweep interruption. Added new pytest-based tests for headless sweep runs and database integration, and removed the legacy test_sweep.py script.
Centralizes MeasureItHome directory logic using a new get_measureit_home() utility, replacing direct environment variable access and hardcoded paths throughout the codebase. Updates file and directory operations to use pathlib for cross-platform compatibility. Adds a console entrypoint 'measureit-gui' for launching the GUI via pyproject.toml. Improves optional dependency management and organizes dependency groups in pyproject.toml.
Improved Sphinx documentation configuration and intro content, updated getting started instructions, and clarified installation and usage steps. Added an example database and related files. Cleared outputs and execution counts from the quick start Jupyter notebook for a cleaner example.
Updated example notebooks to include execution outputs and improved initialization steps. Added new database files and entry_points.txt. Updated package dependencies in PKG-INFO and SOURCES.txt, including new requirements and extras. Minor code and metadata changes in plotter_thread.py, runner_thread.py, and sweep1d.py.
Expanded the 'data processing.ipynb' notebook with a full tutorial, including database initialization, experiment listing, and plotting examples. Added 'helper.py' for metadata display and utility functions. Updated and removed example database files to reflect current tutorial content.
Refactored BaseSweep and all sweep subclasses to use a unified, extensible JSON export/import mechanism with subclass hooks. Now, parameter keys in exported JSON are instrument-qualified to avoid name collisions. Added from_json methods to sweep classes for robust deserialization. Introduced helper functions for pretty-printing metadata in Jupyter, and new tests to verify correct handling of duplicate parameter names. Also added a pandas stub for test environments.
Updated the data processing notebook to improve metadata display, including more detailed parameter names and attributes. Changed helper import to use MeasureIt package, updated dataset IDs, and removed the standalone helper.py file. Outputs and execution counts were refreshed to reflect new database and metadata structure. Also deleted a duplicate quick start notebook.
Updated sweep class attribute ordering and module references in example notebooks for consistency. Modified sweep1d.py, sweep2d.py, and related files to improve parameter handling. Added tests/test_metadata_write.py for metadata write functionality. Updated Example_database.db and removed associated -shm and -wal files.
Refactored the MeasureIt package into role-based subpackages: sweep, tools, visualization, legacy, and _internal, moving modules accordingly. Added compatibility stub modules at old import paths to preserve all existing imports, updated __init__.py to re-export the public API from new subpackages, and included a migration plan as immigaration_plan.md. Updated notebooks and tests to use new canonical imports, while ensuring all old imports continue to work without warnings.
Expanded .gitignore to cover common Python packaging artifacts such as *.egg-info, *.egg, dist/, and .eggs/. Also added a comment and entry for macOS .DS_Store files. This helps prevent accidental commits of build and OS-specific files.
Added Example_database.db-shm and Example_database.db-wal files. Updated Test_database.db and its associated SHM and WAL files, likely reflecting new data or schema changes.
@caidish caidish merged commit 2292581 into master Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant