A PyMoDAQ 5.x compliant plugin package for μRASHG (micro Rotational Anisotropy Second Harmonic Generation) microscopy systems. This package provides complete hardware control and experimental automation for polarimetric SHG measurements with a fully functional unified GUI interface.
- GUI Interface: Fully working unified 5-panel interface for complete system control
- Mock Device Support: Comprehensive simulation for GUI testing without hardware
- PyMoDAQ 5.x Compliance: All compliance tests passing
- Plugin Discovery: All 5 plugins are discoverable by the PyMoDAQ framework
- Measurement System: Functional calibration and measurement workflows
This is an UNOFFICIAL plugin package developed independently. While it follows PyMoDAQ 5.x standards and is fully functional, it is not officially endorsed or maintained by the PyMoDAQ team.
- Repository: https://github.com/TheFermiSea/pymodaq_plugins_urashg
- Author: TheFermiSea ([email protected])
- PyMoDAQ Compatibility: 5.x
- Support: Community-driven
The URASHG plugin package enables sophisticated polarimetric second harmonic generation measurements through PyMoDAQ's modular framework:
- Standards-compliant architecture: Follows PyMoDAQ 5.x plugin development guidelines.
- Multi-device coordination: Integrated control for lasers, polarization optics, cameras, and power meters.
- Unified extension: A single, comprehensive extension for complete system control.
- Hardware abstraction: Works with real hardware or in a simulation mode.
- DAQ_Move_Elliptec: Thorlabs ELL14 rotation mount control for polarization optics.
- DAQ_Move_MaiTai: MaiTai Ti:Sapphire laser wavelength and power control.
- DAQ_Move_ESP300: Newport ESP300 multi-axis motion controller for optical delay line (in progress).
- DAQ_2DViewer_PrimeBSI: Photometrics Prime BSI sCMOS camera control.
- DAQ_0DViewer_Newport1830C: Newport 1830-C optical power meter.
- URASHGMicroscopyExtension: Comprehensive microscopy control interface.
- Photometrics Prime BSI: sCMOS camera with PyVCAM integration. Full control of exposure, gain, ROI, and readout modes.
- Thorlabs ELL14 Rotation Mounts: Polarization control (QWP, HWP).
- MaiTai Laser: Wavelength control and EOM power modulation.
- Newport ESP300: Precision positioning stages.
- Newport 1830-C Power Meter: Optical power monitoring for power calibration and stabilization.
It is recommended to use uv, a modern Python package manager.
# Install uv with pip
pip install uv# Clone the repository
git clone https://github.com/TheFermiSea/pymodaq_plugins_urashg.git
cd pymodaq_plugins_urashg
# Create a virtual environment and install dependencies
uv pip install -e .
# To include optional hardware dependencies
uv pip install -e .[hardware]
# For development
uv pip install -e .[dev]After installation, the plugins will be automatically discovered by PyMoDAQ.
# Launch PyMoDAQ Dashboard
python -m pymodaq.dashboardThe URASHG extension will be available in the Extensions menu.
Launch the standalone URASHG interface directly:
uv run python src/pymodaq_plugins_urashg/applications/urashg_unified_app.pyGUI Features:
- 5-Panel Layout: Control, Camera Data, Analysis Plots, Device Status, and Elliptec Control.
- Mock Device Support: Test the interface with simulated hardware.
- Real-time Feedback: Live status updates and measurement progress.
- Integrated Workflow: Complete measurement and calibration sequences.
The application includes a comprehensive mock device simulation for GUI testing without hardware.
- Launch the GUI:
uv run python src/pymodaq_plugins_urashg/applications/urashg_unified_app.py
- Initialize Mock Devices:
- Click the "Initialize Devices" button in the toolbar. Mock devices will be created automatically.
- Test Features:
- The status panel will show all devices as "Connected".
- The camera view will display simulated data with realistic patterns.
- Calibrations and measurements can be run using mock data.
# Install all dependencies for development
uv pip install -e .[dev,hardware]# Run all tests
uv run pytest
# Run compliance tests
uv run pytest tests/test_pymodaq_compliance.py -v
# Run specific test categories
uv run pytest tests/unit/ -v
uv run pytest tests/hardware/ -v -m hardware# Format code
uv run black src/
uv run isort src/
# Linting
uv run flake8 src/This package is fully compliant with PyMoDAQ 5.x standards. It correctly implements all required plugin structures, initialization methods, import patterns, and entry points.
Compliance Test Results: 16/16 tests passing.
pymodaq_plugins_urashg/
├── src/pymodaq_plugins_urashg/
│ ├── daq_move_plugins/ # Motion control plugins
│ ├── daq_viewer_plugins/ # Detection plugins
│ ├── extensions/ # PyMoDAQ extensions
│ ├── hardware/urashg/ # Hardware abstraction layer
│ ├── utils/ # Utilities and configuration
│ └── resources/ # Configuration templates
├── tests/ # Test suite
│ ├── unit/ # Unit tests
│ ├── hardware/ # Hardware integration tests
│ └── mock_modules/ # Mock hardware for testing
├── docs/ # Documentation
├── pyproject.toml # Project packaging and configuration
└── README.md # This file
Contributions are welcome. Please ensure that any changes adhere to PyMoDAQ 5.x development patterns, include tests for new functionality, and are documented. Code should be formatted with black and isort.
This project is licensed under the MIT License - see the LICENSE file for details.