Skip to main content

A package to control PhoQis Labs various pieces of measurement equipment.

Project description

Measurement Software

By Mary Grace D'Avanzo

Overview

Measurement Software is a Python package for controlling and automating a variety of laboratory measurement instruments. It provides a unified interface for experiment setup, data acquisition, and instrument management, enabling users to streamline workflows and automate repetitive tasks. The package version can be downloaded by running pip install phoqis-measurement-instruments

Features

  • Modular instrument control via SCPI commands
  • Easy integration of new instruments with guided automated coding pipeline
  • Reuseable experiments
  • Data auto-saving and management
  • Network manager for multi-instrument setups
  • Opens and closes supporting programs automatically

Instruments Supported

  • Vector Network Analyzer (Copper Mountain)
  • Oscilloscope (Rigol)
  • Spectrum Analyzer (Signal Hound)
  • RF Switch (Vasta)
  • DC Power Supply (Siglent)
  • Signal Generator (Signal Core)
  • Digital Attenuator (Vanuix)
  • Flow Meter (Keyence)
  • Additional instruments can be added using provided jupyter notebook AddANewInstrument.ipynb

How to Use

Each instrument contains two components: helper and a main. Helper consists of user made automated functions while the most commonly used commands are kept in the main class. Within the main classes, functions are categorized by what primary command they fall under.

Along with the instrument classes the api contains the classes NetworkHandler for connecting and managing instrument connections and DataHandler for saving and processing raw instrument data.

Getting Started

If you plan to just use the library and not modify it in any way, instead of cloning the repository use the published version of the library and use the pip install at the link for latest version. See ExperimentScripts for a template experiments on how to use this library. Full documentation can be found at readthedocs.

If this is a new PC, ensure NI-VISA is downloaded along with the following instrument specfic applications for all instruments you plan to use:

  1. Clone the repository
    git clone <https://github.com/phoqis-lab/Measurement_Software>

  2. Install dependencies
    See requirements.txt for required Python packages.

  3. Add a new instrument
    Follow the instructions in Instruments/AddANewInstrument.ipynb to integrate new hardware. You may also modify any of the helper .py files to add prebuilt subroutines you may want to frequencyly call in multiple experiments.

  4. Updating public library instance Official PyPi distirbution instructions can be found here: https://packaging.python.org/en/latest/tutorials/packaging-projects/

First log on to the PyPi account. The PhoQis account can be found in the lab's notion on the measurement software page.

Next go into the pyproject.toml file and the setup.py file and change the version number. For small changes like adding functions to a helper file, increment the third number by one (1.0.0 -> 1.0.1) and for larger changes like adding a new instrument increment the second number (1.0.0 -> 1.1.0)

First ensure setuptools and build is upgraded and then use it to build the python library: python3 -m pip install setuptools

python3 -m pip install --upgrade build

python3 -m build

This will package the library to prepare it for distribution. To then publish the update to PyPi, use twine and the following terminal commands.

python3 -m pip install --upgrade twine

python3 -m twine upload dist/*

The second command will ask for an api token. The current api token can be found in the PhoQis Labs secure passwords repository. With a log in to PyPi, you may also generate a new api token.

The updates should be reflected on the PhoQis PyPi account and the it will automatically update the pip install needed to downloaded. Ensure you run a pip --upgrade for the library in whatever python enviroment you are using for your experiments.

  1. Updating the public documentation

The current documentation is published on ReadtheDocs It is connected to the PhoQis Quantum Developer github so it should automatically rebuild when changes are pushed to the main branch.

Contributing

Contributions are welcome! Please update the read me if you add a new instrument.

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

phoqis_measurement_instruments-1.0.2.tar.gz (153.5 kB view details)

Uploaded Source

Built Distribution

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

phoqis_measurement_instruments-1.0.2-py3-none-any.whl (151.2 kB view details)

Uploaded Python 3

File details

Details for the file phoqis_measurement_instruments-1.0.2.tar.gz.

File metadata

File hashes

Hashes for phoqis_measurement_instruments-1.0.2.tar.gz
Algorithm Hash digest
SHA256 50ebd3850270e31622d98fffaf973d897d92b0e3a77571496a3284ec4769ad16
MD5 c00db7acc63038b26fc42ab329348e16
BLAKE2b-256 86ee6c78d15008c86a68c6c5828af30f87252bbaee1015aa3955e6bb58db512c

See more details on using hashes here.

File details

Details for the file phoqis_measurement_instruments-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for phoqis_measurement_instruments-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9af24977144b8131caf467bc15dd8b0b4a4c0bb4328337299000b21e4d88c289
MD5 70d49ac4d06fff51267e4345e70de557
BLAKE2b-256 3a5421cf443d0824d07f73a7c7b4d06c43be92c4a0fb4fbc5ad11cf3db94e2fe

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