LumiPy is a Python interface for controlling and acquiring data from PicoQuant's Luminosa microscope systems. This library provides a high-level API to interact with various components of the Luminosa system, including confocal imaging, point scanning, and data onliine analyses. The Python interface allows for feedback adaptive workflows for smart microscopy and for connecting open source software projects to the microscope.
- Control of Luminosa microscope hardware at high and low level. Move actuators (mirrors, filter wheels, etc.)
- Define ROIs and positions in a “global” coordinate system
- Set measurement parameters for image and point measurements
- Start & Stop measurements
- Access online results
- Visualization tools
- Use the Python environment of your choice
- A small build-in Python 3.13 Environment
- Any Python installation recognized by Windows as Python Environment
- Use the editor of your choice
- Small integrated Python editor
- Any modern external Python editor
- Ensure you have Python 3.9 or later installed
- Install the required dependencies:
pip install numpy
# Import the measurement instance
from pqlumi import measurement
import pqtool
# Set up scan parameters
measurement.img_conf.stop_on_num_frames = True
measurement.img_conf.num_frames = 1
# Start an image measurement
measurement.start_meas('image')
print('Measurement started')
# Check measurement status
while measurement.meas_status():
elapsed = measurement.get_elapsed_meas_time()
print(f"Measurement running: {elapsed:.1f} seconds")
pqtool.gui_sleep(500)
print('Measurement stopped')
# Access live analysis data
analysis_names = measurement.get_analysis_names()
for name in analysis_names:
print(f"Available analysis: {name}")Note:
When using Luminosas integrated Python editor on a real system, all necessary PQ libraries can be imported directly (as shown above).
If you want to develop on a remote PC without HW you need to make sure that the libraries can be found (e.g. by including the path to the libs/ directory; copying the libs to your project path; etc.)
The demos/ directory contains various example scripts demonstrating different functionalities:
Demo_pqlumi_*.py- Basic Luminosa operationsDemo_pqdc_*.py- Device control examplesDemo_pqharp.py- TCSPC control examplesDemo_pqharp_CountMeter.py- A simple countmeter chartDemo_pqharp_LevelScan.py- A script for scanning the trigger level of an input channelDemo_pqcam.py- Camera control examplesDemo_pqscan.py- Scanner control examplesUC_*.py- Use case examples (FRAP, FCS, etc.)
pqlumi.py- Main interface for Luminosa controlMeasurement- Main class for controlling measurementsImgConf- Configuration class for image scanningPointConf- Configuration class for point scanning
pqtool.py- Helper functions for plotting, logging, etc.pqdc.py- Device control module (all devices except cameras, TCSPC (Harp) & scanner)pqcam.py- Camera control modulepqharp.py- Time-correlated single photon counting (TCSPC) modulepqscan.py- Scanner control module
This project is licensed under the MIT License - see the LICENSE file for details.
Currently, support is handled exclusively via github Issues/Discussions.
Contributions are welcome! Please feel free to submit a Pull Request.
Use LumiPy at your own risk. We are not responsible for any damages or losses resulting from the use of this software.
