Skip to main content

pytza500

License PyPI - Status PyPI - Version

Python library for the Artifex Engineering TZA500

Installation

Install via pip:

pip install pytza500

Install manually:

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

Usage

from pytza500 import TZA500, GAIN, UNITS, BANDWITH

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

# Create TZA500 instance
tza = TZA500()

# Connect to first TZA500 device in list
tza.connect(devices[0])

tza.tza_set_polarity(False) # Set polarity to not inverted

tza.tza_set_auto_zero() # Set initial auto zero

# Or set initial auto zero reset
tza.tza_set_auto_zero_reset()


tza.tza_set_bandwith(BANDWITH.KHZ_10) # Set bandwith to 100 kHz

# Set wavelength
tza.tza_set_wavelength(660)

# Set gain
tza.tza_set_gain(GAIN.X1)

tza.sensitivity = 1.0 # Set sensitivity (only for watt units)

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

# Print single measurement
print(format(tza.tza_get_measurement(), '.8f'))

tza.disconnect()

Query current states and device informations

print("Firmware version: {}".format(tza.tza_firmware_version))
print("Serial number: {}".format(tza.tza_serial_number))
print("Date of manufacturing: {}".format(tza.tza_date_of_manufacturing))

print("Device info:\n{}\n\n".format(tza.tza_get_info()))

print("Polarity inverted: {}\n\n".format(tza.tza_is_polarity_inverted()))
print("Initial auto zero: {}".format(tza.initial_auto_zero))
print("Current sensitivity: {}\n\n".format(tza.sensitivity))
print("Current bandwith: {}".format(tza.tza_get_bandwith()))
print("Current wavelength: {}".format(tza.tza_get_wavelength()))
print("Current gain: {}".format(tza.tza_get_gain()))
print("Current Unit: {}".format(tza.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

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 pytza500 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 pytza500 1.0.1
File Size Uploaded Provenance Actions
pytza500-1.0.1.tar.gz 9.1 kB Without provenance Details for pytza500-1.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 17.7 kB

Release files / pytza500-1.0.1.tar.gz

Download URL pytza500-1.0.1.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6aca4f47fa39365ae01dd405fec5b57d308798f0f77f09ed6711a9904193c9e9
BLAKE2b-256 checksum
How to use checksums
2d6267e4a29d794b5327661ef04634dafa2331c854f2e10504b0f2a661666ed9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

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

Download URL pytza500-1.0.1-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51bc446d291333d39985e5aaac9f231715ddd8c4be28837b65bb11391db0c095
BLAKE2b-256 checksum
How to use checksums
eef4842a618444ed5802a559e19a3ebb59b4e0029210ac87031fc47de3593a9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for pytza500 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