Python library for the Artifex Engineering TZA500
Project description
pytza500
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
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
pytza500-1.0.1.tar.gz
(9.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytza500-1.0.1.tar.gz.
File metadata
- Download URL: pytza500-1.0.1.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6aca4f47fa39365ae01dd405fec5b57d308798f0f77f09ed6711a9904193c9e9
|
|
| MD5 |
502c501b96fa7a04c6224243fa59c297
|
|
| BLAKE2b-256 |
2d6267e4a29d794b5327661ef04634dafa2331c854f2e10504b0f2a661666ed9
|
File details
Details for the file pytza500-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pytza500-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51bc446d291333d39985e5aaac9f231715ddd8c4be28837b65bb11391db0c095
|
|
| MD5 |
513b8d7ef3eae239d9ee4e4e4ddfd5d3
|
|
| BLAKE2b-256 |
eef4842a618444ed5802a559e19a3ebb59b4e0029210ac87031fc47de3593a9f
|