Integrated Tools for Electronic, Cryogenic and Magnetic Measurements
Project description
pyflexlab 🔬
pyflexlab is an integrated package based on PyMeasure and QCoDeS, designed for collecting, processing, and plotting experimental data.
Why pyflexlab instead of QCoDeS/PyMeasure? While QCoDeS/PyMeasure provides excellent out-of-box experience for experiments, pyflexlab offers a more flexible, lower-level interface that enables direct control over instruments, as if sitting right beside them. This approach allows researchers to implement highly customized experimental workflows. More to mention, the drivers of QCoDeS or PyMeasure alone are not complete. It's often the case one needs to assemble different versions of drivers.
Brief Summary of What it does: Utilize the basic interface of PyMeasure & QCoDeS to manipulate instruments and encapsulate similar instruments with unified interface, thus providing basic modules for measurement workflow.
📋 Table of Contents
✨ Key Features
- 🔧 Flexible Architecture: Lower-level interface and modularized components, enabling flexible composition of complex functionalities
- 🎛️ Unified Control: Seamless interface for instruments control
- 💾 Automatic File Organization: Structured data storage with automatic file organization
- 📊 Live Visualization: Real-time visualization and data recording (Jupyter / Dash web interface)
- 📈 Data Analysis: Comprehensive tools for data analysis and processing
🚀 Installation
Ensure you have Python 3.11 or higher installed. Virtual environment is recommended. You can install it through pypi or local package downloaded here (add [gui] option for using GUI):
# local package installation
cd ${PACKAGE_DIR} # replace with folder path
python -m pip install .
# pypi installation
python -m pip install pyflexlab
📖 Usage
Set Environmental Variables
PYLAB_DB_LOCAL: the path to the local database, storing rarely changing data likemeasure_type.jsonPYLAB_DB_OUT: the path to the out database, storing the main experimental data and records
(set them via os.environ or directly in the system setting, the suffixes of the env vars do not matter, like PYLAB_DB_OUT and PYLAB_DB_OUT_User are the same. The package will automatically choose the first one found in alphabetic order)
Configure Local Setting Files
measure_types.json is used for automatically naming data files. This highly depends on personal preferences and research needs. A template is provided.
assist_measure.ipynb and assist_post.ipynb are jupyter notebook files used for convenience of measurements. The program will automatically retrieve them from local database path and paste them to the measurement directory.
These files should be placed in the local database directory specified by PYLAB_DB_LOCAL.
Also, templates for them are provided with the package, run follow command to initialize the local database folder:
import pyflexlab
pyflexlab.initialize_with_templates()
Start Measurement
Detailed examples of a few typical measurements have been demonstrated in assist_measure.ipynb. But just as the reason why this package exists, the measurement workflow can be easily established via basic python knowledge and understanding of instruments.
Provided GUIs
- 🔄 gui-coor-trans: A GUI for coordinate transformation used to locate objects using two reference points on a flat surface (linear transform solver)
- 🎨 gui-pan-color: A color palette for choosing colors
⚠️ Known Issues
- The memory management of plotly drawing remains a problem for long-time measurement. (be careful when number of points exceeds 50k)
- The driver of the rotator is not working properly due to weird interaction between C++ dll and python
- Currently no keyboard interruption actions implemented, if the measurement is interrupted, the meters would be left in the last state (data is saved in real-time, interruption won't affect data)
- The
dashapp in Chrome would crash from time to time. (won't affect anything, just refresh the page)
📦 Dependencies
- Python >= 3.11 (earlier version is not tested)
- Required packages:
- numpy
- pandas
- matplotlib
- plotly >= 5.24.1
- kaleido == 0.1.0.post1
- pyvisa
- pyvisa-py
- pymeasure >= 0.14.0
- qcodes >= 0.47.0
- jupyter
- dash
- Optional packages:
- PyQt6
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyflexlab-1.0b0.tar.gz.
File metadata
- Download URL: pyflexlab-1.0b0.tar.gz
- Upload date:
- Size: 106.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
367ef6d32409d7a9118b0e0d7baee853a8307bc39de10e33b082fcb0721d1a0e
|
|
| MD5 |
241e8d01b69a1a55bfe914186a30e4a3
|
|
| BLAKE2b-256 |
b30b85913a42fcafffbf9ec164052fce79ccf5cccbcb1be9f940bdb39ac39247
|
File details
Details for the file pyflexlab-1.0b0-py3-none-any.whl.
File metadata
- Download URL: pyflexlab-1.0b0-py3-none-any.whl
- Upload date:
- Size: 109.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a1ee231d4bc0d8b9d5cd7b8cdf9675f28a5a4d3435caf2d6f3e31360fdfd788
|
|
| MD5 |
4396f3c4fc6f77a3b4a20fd6108a65d5
|
|
| BLAKE2b-256 |
265fba2227088951c10fda892467d611c71a4bbdc44b27fff2543cac97927be2
|