Skip to main content

A collection of control and analysis code for experiments

Project description

PIEC logo

PIEC — Python Integrated Experimental Control

Documentation Status PyPI version PyPI license

Example ferroelectric PUND current traces and polarization hysteresis loop collected and analyzed with piec

PIEC is an open-source Python library that provides infrastructure for laboratory experiment design and operation through a standardized, hierarchical, object-oriented framework. Originally developed at Brown University as a fork of the ferroelectric testing-focused EKPY Python suite, PIEC is designed to be extended to any experimental domain that requires programmable instrument control.


Installation

PIEC requires python 3.9 or higher. To install PIEC, run the following command in the terminal:

pip install piec

After this, decide whether you would like to run a specific measurment with a GUI or notebook (in which case you'll need to download the appropriate files from the Measurements folder). Otherwise, see below for information on how to start scripting. Depending on your instruments, you may also need:

Requirement When needed Download
NI-488.2 GPIB instruments ni.com
NI-VISA USB-TMC / Ethernet / GPIB via NI-VISA ni.com
MCC Universal Library + mcculw Digilent/MCC DAQ boards mccdaq.com

Overview

Instrument drivers in PIEC follow a type-first architecture with three layers of abstraction:

Layer Role Examples
Level 1 — Instrument Base connection management and parameter validation (wraps PyVISA) Instrument, Scpi
Level 2 — Category Defines required methods and parameter standards for each instrument type Awg, Oscilloscope, Lockin, Sourcemeter
Level 3 — Model Implements hardware-specific logic for a particular instrument Keysight81150a, RigolDS1000Z, Keithley2400

Measurement code targets the Level 2 interface, so instruments are interchangeable without code changes. Each category also provides a Virtual Instrument that returns simulated responses, enabling development and testing without physical hardware.

On top of this driver layer, Measurement classes coordinate multiple instruments to execute complete experiment protocols — configuring waveforms, triggering acquisition, processing data, and saving results — in a single method call. Pre-built GUIs and Jupyter notebooks are also provided for routine tasks.


Quick Start

Virtual mode — no hardware required:

from piec.drivers.awg.virtual_awg import VirtualAwg

awg = VirtualAwg()
awg.set_waveform(1, 'sin')
awg.set_frequency(1, 1000)
awg.set_amplitude(1, 1.0)
awg.output(1, on=True)

Autodetection — connect and go:

from piec.drivers.autodetect import autodetect

awg   = autodetect('awg')
scope = autodetect('scope')

For a complete walkthrough, see the User Guide.


Supported Instruments

Category Models
Arbitrary Waveform Generator Keysight 81150A, Agilent 33220A, Agilent 33500, Rigol DG1000, Rigol DG4000, Siglent SDG2000X
Oscilloscope Keysight DSOX3024A, Agilent DSOX5000, Rigol DS1000Z, Tektronix TDS2000, Tektronix TDS6604, LeCroy SDA6020
Source Meter Keithley 2400
Lock-in Amplifier Stanford Research SR830
Digital Multimeter Agilent 34410A, Keithley 2000, Keithley 193A
Pulser Berkeley Nucleonics BNC 765
DAQ MCC USB-231
DC Calibrator EDC 522
Stepper Motor Arduino Stepper (custom serial)

Full instrument list →


Contributing

New drivers can be added by implementing a driver subclass alongside its Virtual Instrument, following the Driver Development Guide. New experiment types require implementing a Measurement subclass without modifying existing code.

For general guidelines, see the Contributing Guide.


Support

Issues, bug reports, and feature requests: Issue Tracker

Maintainer: Geo Fratian — geo_fratian@brown.edu


Citation

Please cite this software following the CITATION.cff.

Fratian, G., Qualls, A., Phan, J., Pankaj, R., & Caretta, L. (2026).
PIEC: A Python Library for Integrated Experimental Control [Software].
https://github.com/TransluSci/piec

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

piec-0.1.11.tar.gz (125.7 kB view details)

Uploaded Source

Built Distribution

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

piec-0.1.11-py3-none-any.whl (156.9 kB view details)

Uploaded Python 3

File details

Details for the file piec-0.1.11.tar.gz.

File metadata

  • Download URL: piec-0.1.11.tar.gz
  • Upload date:
  • Size: 125.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for piec-0.1.11.tar.gz
Algorithm Hash digest
SHA256 2e2159bf6fab63e2901d9f9f574c770240685e2a2594acbe5197fdaa74b52a50
MD5 bb12e073106e3efe27f15ae47adbe433
BLAKE2b-256 6eee278f2f27931005211ec27a5c34d0ad6e7dafb4789950c1c4936b24424d51

See more details on using hashes here.

File details

Details for the file piec-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: piec-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 156.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for piec-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 bad66334d0647796e115ac10dc71f979c8553bb8094513757c307ad5d30e7feb
MD5 5c7ab997f1c21b72b71983b3a7455e3f
BLAKE2b-256 f0984cdc4b1ca46f2f159ac43d23d9a0a958f7234c30c6822a1573625941634e

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