Skip to main content

This is a python interface to the SMARTChem Ion3 ion-selective electrode instrument.

It requires the device to be connected to the host computer using a RS232 style serial port, such as through a USB-to-serial converter, and then provides a basic wrapper around the device’s control capabilities. See the device’s user manual for details on its capabilities.

Source code at https://gitlab.com/ptapping/smartchem-ion3.

Documentation online at https://smartchem-ion3.readthedocs.io/.

Basic Usage

import smartchem_ion3

# Make a function to pretty print data obtained from the device
def handle_data(d):
    """Handle receipt of spontaneous data sent from the instrument."""
    print(f"Reading #{d.n} at {d.timestamp.isoformat()}")
    print(f"  Channel 1, {d.ch1.unit.description} = {d.ch1.value}{d.ch1.unit.suffix}")
    print(f"  Channel 2, {d.ch2.unit.description} = {d.ch2.value}{d.ch2.unit.suffix}")
    print(f"  Channel 3, {d.ch3.unit.description} = {d.ch3.value}{d.ch3.unit.suffix}")
    print(f"  Temperature, {d.cht.unit.description} = {d.cht.value}{d.cht.unit.suffix}")

# With no parameters, will use the first detected serial port at 38400 baud.
ion3 = smartchem_ion3.Ion3()

# Get a reading of the current state of the data channels and print it out
handle_data(ion3.current_data())

# Get the logged data and print them out
for d in ion3.logged_data():
  handle_data(d)

Metadata

Release files for smartchem-ion3 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smartchem-ion3 1.0.0
File Size Uploaded
smartchem_ion3-1.0.0.tar.gz 21.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for smartchem-ion3 1.0.0
File Interpreter ABI Platform
smartchem_ion3-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.1 kB

Release files / smartchem_ion3-1.0.0.tar.gz

Download URL smartchem_ion3-1.0.0.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
02918f6b9efaad570f20088b21d8dd79f22ebfe435d00c060ca9bd33340ef61f
BLAKE2b-256 checksum
How to use checksums
9b2bcd43a7117dec27145ef951248fbaaccc52e0bf17032240c53426e23e9afe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

Release files / smartchem_ion3-1.0.0-py3-none-any.whl

Download URL smartchem_ion3-1.0.0-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3e592550dc93dfb57ebfb9ffe40e5037983206fb1deb688433d7d8f054a3162
BLAKE2b-256 checksum
How to use checksums
d55db95d0ccdb39bc28fe5ae531ef42c8f07c3d44fb861d9f48a254765af9450
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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