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.3.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.3-py3-none-any.whl (151.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for phoqis_measurement_instruments-1.0.3.tar.gz
Algorithm Hash digest
SHA256 ab48d6b7c97be4a66414828ba3aa5809ed98d74f055afdb1f0d61338a51d37bb
MD5 e4850dc40022fb68d88a320d768ff3a0
BLAKE2b-256 a2ca196f63bbd94188e014c3f8826baf88ba41454afbd4c92dbbf31907c63f0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for phoqis_measurement_instruments-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 79507be4326676094a664b2d28b016312dc19d25ffed0cb89c85eef4d158d4b7
MD5 764e0481d925bea2aba9e7a7b9eb023a
BLAKE2b-256 1fccd628501d0078a49ee28c85ff68fb6cfb019f7aad00e9656731519618f61e

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