Skip to main content

matterlab_shakers

matterlab_shakers provides serial drivers for the shakers used in the Matter Lab. It includes a shared shaker interface and a driver for Torrey Pines temperature-controlled shakers.

Supported Devices

  • Shaker: shared abstract base class
  • TorreyPinesShaker

Installation

Install the package:

pip install matterlab_shakers

For development:

pip install -e .[dev]

The package depends on matterlab_serial_device.

Quick Start

from matterlab_shakers import TorreyPinesShaker

shaker = TorreyPinesShaker(com_port="COM5")

print("Current temperature:", shaker.temp)
print("Current speed level:", shaker.speed)

shaker.temp = 40
shaker.speed = 3
shaker.idle = True

Core API

The shared Shaker interface exposes:

  • temp
  • target_temp
  • speed
  • idle

The Torrey Pines driver adds:

  • device_model
  • serial_number
  • connect()
  • error_reporting(...)

Testing

Simulation Tests

Simulation tests are the default validation layer and are safe for CI.

One-click run:

python examples/test_sim.py

Direct pytest run:

pytest tests/test_base_shaker.py tests/test_torrey_pines_sim.py

Hardware Tests

Hardware tests are opt-in because real shakers may not be connected in every environment.

Available hardware test files:

  • tests/test_torrey_pines_real.py

They are marked with @pytest.mark.real and are skipped unless --run-real is supplied.

Example:

pytest tests/test_torrey_pines_real.py --run-real --com-port COM5

You can also provide hardware configuration through an environment variable:

  • SHAKER_COM_PORT

Examples

The examples/ directory contains the recommended entry points:

  • examples/test_sim.py: one-click simulation-only test runner
  • examples/real_devices.py: readable examples for real Torrey Pines hardware
  • examples/README.md: short guide to the examples directory

Development

Useful commands:

pytest
ruff check .
ruff format .

The default pytest configuration includes retries, timeouts, coverage output, and uses src as the import root for local development.

Package Layout

src/matterlab_shakers/
  base_shaker.py
  torrey_pines_shakers.py
tests/
examples/

License

This project is distributed under the MIT License. See LICENSE for details.

Metadata

Release files for matterlab-shakers 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matterlab-shakers 1.2.1
File Size Uploaded
matterlab_shakers-1.2.1.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for matterlab-shakers 1.2.1
File Interpreter ABI Platform
matterlab_shakers-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.0 kB

Release files / matterlab_shakers-1.2.1.tar.gz

Download URL matterlab_shakers-1.2.1.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8f2c41472d4e55a833404b4f092e3adca8037a98d94b96261391e4ff4ad06b70
BLAKE2b-256 checksum
How to use checksums
a2010b9b9a6e255c7d14a4e4ca804e02d36b5e2eb7daf724efea8239fec0bc43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.13

Release files / matterlab_shakers-1.2.1-py3-none-any.whl

Download URL matterlab_shakers-1.2.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ac424c7166c1cc35f14fba7c9c36532a82e352bf7343316e4cc5a647514d4d8
BLAKE2b-256 checksum
How to use checksums
f14bfbf7b7217ef8f68ef4683f968134dd5d160c6cd4394a28172c75c9e80cbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.13

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.1.0

2 release files

1.0.6

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page