Skip to main content

Measurement code for condensed matter groups at UW based on QCoDeS.

Project description

MeasureIt Documentation Status

Measurement software based on QCoDeS, developed in University of Washington physics.

Community information

Join our slack channel!

High-Level Design

MeasureIt is a measurement software package built on top of QCoDeS for physics experiments. The architecture follows these key patterns:

Core Architecture

  • Sweep-based Measurement System: The core abstraction is the BaseSweep class with specialized implementations (Sweep0D, Sweep1D, Sweep2D) for different dimensional measurements
  • Qt-based Threading: Uses PyQt5 with separate threads for data acquisition (RunnerThread) and plotting (PlotterThread)
  • Driver Layer: Custom instrument drivers in the Drivers/ module that interface with various lab equipment
  • Notebook Workflow: Designed for Jupyter/CLI usage; PyQt5 powers background threading and signaling
  • Data Management: Integration with QCoDeS for data storage and experiment management

Key Components

  • Base Classes: BaseSweep provides the foundation with parameter following, measurement creation, and thread management
  • Measurement Types:
    • 0D (time-based measurements)
    • 1D (single parameter sweep)
    • 2D (dual parameter sweep)
  • Queue System: SweepQueue for batch experiment execution
  • Real-time Plotting: Live data visualization during measurements
  • Station Management: QCoDeS Station integration for instrument management

Package Structure

src/measureit/
    sweep/             # Measurement implementations
    base_sweep.py      # Core sweep functionality
    tools/             # Data utilities and sweep helpers
    Drivers/           # Instrument drivers
    visualization/     # Plotting helpers

Quick Start

Prerequisites

Installation

Using pip (recommended)

pip install qmeasure

Note: The package is installed as qmeasure, but you import it as measureit:

import measureit  # Import name stays the same

From source

git clone https://github.com/nanophys/MeasureIt.git
cd MeasureIt
pip install -e .

Data Directory Configuration

MeasureIt (installed as qmeasure) stores databases, logs, and configuration files. You have three options:

Option 1: Use defaults

Data is automatically stored in OS-appropriate locations:

  • Linux: ~/.local/share/measureit/
  • macOS: ~/Library/Application Support/measureit/
  • Windows: C:\Users\<username>\AppData\Local\measureit\

Option 2: Set environment variable (recommended)

export MEASUREIT_HOME="/path/to/your/data"  # Linux/macOS
set MEASUREIT_HOME="C:\path\to\data"        # Windows

Option 3: Programmatic configuration

import measureit
measureit.set_data_dir('/custom/path')

Updating MeasureIt (development version)

cd /path/to/MeasureIt
git pull
pip install -e . --upgrade

Known Issues

  • ipykernel 7.0.x has a dormant event-loop bug that prevents the Qt/pyqtgraph plotter from updating. Stick to ipykernel>=6.29 (or the newer 7.1+ series).

Installation & Updating

It is useful to first create a conda environment to manage all the required packages for this package to work. First, download some form of conda (Miniforge3 is strongly recommended since it comes with mamba):

Basic Usage

Programmatic Usage

import measureit
from qcodes import Station

# Create a station and add instruments
station = Station()
# ... add your instruments ...

# Choose where databases should be stored (optional)
measureit.set_data_dir("/path/to/measureit-data")

# Create a 1D sweep
sweep = measureit.Sweep1D(
    set_param=dac.voltage,
    start=0,
    stop=1,
    step=0.01,
    inter_delay=0.1
)

# Follow parameters to measure
sweep.follow_param(dmm.voltage, lockin.x)

# Start the measurement
sweep.start()

Sweep Logging

  • All sweeps and the SweepQueue now log status messages to timestamped files in the MeasureIt data directory's logs/ folder (see Data Directory Configuration above). Each run creates a file named sweeps_YYYYMMDD_HHMMSS.log that captures info/warning/error messages.

  • To mirror those messages inside Jupyter notebooks, attach the notebook handler once per kernel:

    from measureit import attach_notebook_logging
    
    attach_notebook_logging()
    

    The handler safely marshals log output from background Qt threads back into the notebook cell output, so database switches and sweep transitions are visible while the queue runs.

Documentation

Building Documentation

# Install documentation dependencies
uv pip install -e ".[docs]"  # or pip install -e ".[docs]"

# Build HTML documentation
cd docs/source
make html

The documentation is located in the docs/source directory. The built documentation will be in docs/source/_build/html/.

Online Documentation

Visit our online documentation for detailed guides and API reference.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for detailed information about:

  • Setting up a development environment
  • Code quality standards and tools
  • Testing guidelines
  • Documentation standards
  • Submitting pull requests

For quick development setup:

# Clone and set up development environment
git clone https://github.com/nanophys/MeasureIt
cd MeasureIt
uv pip install -e ".[dev,docs,jupyter]"  # or pip install -e ".[dev,docs,jupyter]"

External links and active known users

Seattle

David Cobden's lab

Xiaodong Xu's lab

Cambridge

Pablo Jarillo-Herrero's lab

Long Ju's lab

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qmeasure-1.1.0.tar.gz (129.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qmeasure-1.1.0-py3-none-any.whl (148.1 kB view details)

Uploaded Python 3

File details

Details for the file qmeasure-1.1.0.tar.gz.

File metadata

  • Download URL: qmeasure-1.1.0.tar.gz
  • Upload date:
  • Size: 129.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.14

File hashes

Hashes for qmeasure-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4a5c6b440cc0abed5299d885417c5c01089240495ea139cf5a91cf56fc4b215c
MD5 3ce4003d6cfa5480d225279574e31596
BLAKE2b-256 34e367c306381432a64af7985313b9178ecd3b1b4b5aa1754f00c7e60dafa01c

See more details on using hashes here.

File details

Details for the file qmeasure-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: qmeasure-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 148.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.14

File hashes

Hashes for qmeasure-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bba8330d80a87e33e8927e6ce1b6427c0b3d1588ba65887839c05f1811073886
MD5 e99e85dfb7415246d20894ea29863c05
BLAKE2b-256 84d86e21fe0a7d2a83b42afeb6c35e2efd3de78bff39de3d47af50af5520f305

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page