Skip to main content

pyopm500

License PyPI - Status PyPI - Version

Python library for the Artifex Engineering OPM500

Installation

Install via pip:

pip install pyopm500

Install manually:

git clone https://github.com/artifex-engineering/pyopm500.git
cd pyopm500
pip install .

Usage

from pyopm500 import OPM500, GAIN, UNITS, BANDWITH

# List all available devices
devices = OPM500.find_devices() # Get all available devices
print("Available Devices: {}\n\n".format(", ".join(devices) if len(devices) > 0 else "None"))

# Create OPM500 instance
opm = OPM500()

# Connect to first OPM500 device in list
opm.connect(devices[0])

opm.opm_set_polarity(False) # Set polarity to not inverted

opm.opm_set_auto_zero() # Set initial auto zero

# Or set initial auto zero reset
opm.opm_set_auto_zero_reset()


opm.opm_set_bandwith(BANDWITH.KHZ_10) # Set bandwith to 100 kHz

# Set wavelength
opm.opm_set_wavelength(660)

# Set gain
opm.opm_set_gain(GAIN.X1)

# Set unit to use in measurements
opm.set_unit(UNITS.MICROAMPERE)

# Print single measurement
print(format(opm.opm_get_measurement(), '.8f'))

opm.disconnect()

Query current states and device informations

print("Firmware version: {}".format(opm.opm_firmware_version))
print("Serial number: {}".format(opm.opm_serial_number))
print("Date of manufacturing: {}".format(opm.opm_date_of_manufacturing))

print("Detector min wavelength: {}".format(opm.opm_detector_min_wavelength))
print("Detector max wavelength: {}".format(opm.opm_detector_max_wavelength))

print("Device info:\n{}\n\n".format(opm.opm_get_info()))

print("Polarity inverted: {}\n\n".format(opm.opm_is_polarity_inverted()))
print("Initial auto zero: {}".format(opm.initial_auto_zero))
print("Current bandwith: {}".format(opm.opm_get_bandwith()))
print("Current wavelength: {}".format(opm.opm_get_wavelength()))
print("Current gain: {}".format(opm.opm_get_gain()))
print("Current Unit: {}".format(opm.unit))
print("Current filter factor: {}\n\n".format(opm.filter))

nW/cm², µW/cm², mW/cm², W/cm²

opm.set_unit(UNITS.MICROWATTS_PER_SQUARE_CENTIMETER) # Set unit to use in measurements

opm.aperture_in_mm = 7.0 # Set aperture in mm
print("Current Aperture in mm: {}".format(opm.aperture_in_mm)) # Print aperture in mm

measurement_value = opm.opm_get_measurement() # Get measurement value in specified unit
print("Measurement Value: {}{}".format(measurement_value[0], measurement_value[1])) # measurement value in specified unit

Available Units

  • Nanoampere (nA): UNITS.NANOAMPERE
  • Microampere (µA): UNITS.MICROAMPERE
  • Milliampere (mA): UNITS.MILLIAMPERE
  • Ampere (A): UNITS.AMPERE
  • Nanowatts (nW): UNITS.NANOWATTS
  • Microwatts (µW): UNITS.MICROWATTS
  • Milliwatts (mW): UNITS.MILLIWATTS
  • Watts (W): UNITS.WATTS
  • Nanowatts per square centimeter (nW/cm²): UNITS.NANOWATTS_PER_SQUARE_CENTIMETER
  • Microwatts per square centimeter (µW/cm²): UNITS.MICROWATTS_PER_SQUARE_CENTIMETER
  • Milliwatts per square centimeter (mW/cm²): UNITS.MILLIWATTS_PER_SQUARE_CENTIMETER
  • Watts per square centimeter (W/cm²): UNITS.WATTS_PER_SQUARE_CENTIMETER
  • Decibel-milliwatts (dBm): UNITS.DECIBEL_MILLIWATTS

Gain levels:

  • x1: GAIN.X1
  • x10: GAIN.X10
  • x100: GAIN.X100
  • x1000: GAIN.X1000
  • x10000: GAIN.X10000
  • x100000: GAIN.X100000
  • Auto: GAIN.AUTO

Bandwiths

  • 10 kHz: BANDWITH.KHZ_10
  • 1 kHz: BANDWITH.KHZ_1
  • 100 Hz: BANDWITH.HZ_100
  • 10 Hz: BANDWITH.HZ_10

Release files for pyopm500 1.0.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 pyopm500 1.0.1
File Size Uploaded Provenance Actions
pyopm500-1.0.1.tar.gz 10.3 kB Without provenance Details for pyopm500-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyopm500 1.0.1
File Interpreter ABI Platform Actions
pyopm500-1.0.1-py3-none-any.whl Python 3 none any Details for pyopm500-1.0.1-py3-none-any.whl

Total release size: 19.8 kB

Release files / pyopm500-1.0.1.tar.gz

Download URL pyopm500-1.0.1.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e5a98dee274a9d73b3c30310e22090615cd6f06089e16f2cbc4e83739aa5a249
BLAKE2b-256 checksum
How to use checksums
eb13d290659bff1b69fca4f4c4eff65a38358146fa9543005b53e2b06f8e55a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / pyopm500-1.0.1-py3-none-any.whl

Download URL pyopm500-1.0.1-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
892b3cd988298220ad08e4347e89f38eae9f1439db2124775bc686ee13644625
BLAKE2b-256 checksum
How to use checksums
1b179e4c4dffd059d3c189d5af0f65eebe2395f92b5597bfe3e69f761ec23a37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for pyopm500 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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