Skip to content

Releases

0.3.0

Choose a tag to compare

@Gnpd Gnpd released this 30 Aug 20:59
b433905

First stable release of the 0.3 line, developed across five release candidates since June.

It turns PYVIUM from a single-instance wrapper into something that can drive several IviumSoft instances at once, manage their processes, and read measurement data straight off disk while a run is still going. The bundled driver is refreshed to IviumSoft 4.1247.

pip install pyvium

Highlights

Drive several IviumSoft instances safely

Selection is global in the DLL and has no getter, so concurrent calls used to be a hazard. on_instance / instance hold a process-wide driver lock across the selection and the commands that follow it, so calls from different threads never land on the wrong instance. The same applies to Ivium-n-Soft channel tabs through on_channel.

from pyvium import Pyvium

Pyvium.open_driver()

with Pyvium.on_instance(2):
    Pyvium.set_cell_on()
    print(Pyvium.get_potential())

device = Pyvium.instance(3)      # or a handle scoped to one instance
print(device.get_device_status())

Manage IviumSoft processes

Launch, adopt, reconcile and close IviumSoft instances, each mapped to the driver instance number it registered with. close() answers the "device is measuring" confirmation dialog itself, so an unattended close no longer times out and kills the process, and by default the measurement carries on running on the device.

from pyvium import Pyvium, IviumsoftInstanceManager

Pyvium.open_driver(verify_iviumsoft=False)   # cold start: no IviumSoft running yet
manager = IviumsoftInstanceManager()

record = manager.launch()
manager.close(record.instance_number)        # graceful; the run keeps going

Read measurements without the DLL

Read-only, WAL-safe readers for the SQLite files IviumSoft writes, so a run can be tailed while it is still being recorded. No DLL, no hardware, no IviumSoft.

from pyvium import MeasurementReader

with MeasurementReader(path) as reader:
    for point in reader.read_points(after_point_id=last_seen):
        ...

Supports incremental tailing, task and cycle scoping, per-task summaries, a curated whole-run preview, and export to CSV or pandas.

Requirements

  • Windows, with IviumSoft installed. Minimum release 4.1242; 4.1247 is bundled and is required for a reconnect to adopt a measurement already running on the device.
  • Python up to 3.13, cffi 2.x.
  • The SQLite readers and the IDF/CSV tools are the exception: they need neither the DLL nor hardware.

Upgrading from 0.2.x

Four behaviour changes worth reading before you upgrade:

  • get_current_trace, get_current_we2_trace and get_potential_trace return the list of samples instead of a raw (result_code, values) tuple. The DLL crash that made these unusable is fixed in 4.1242.
  • get_data_point and get_data_point_from_scan now raise instead of silently returning the previously read point when a read fails: IndexError past the end, ValueError below index 1. Both indices are 1-based, which was previously undocumented.
  • A DLL result code or device status outside the documented set is no longer reported as success. Both affect values nobody has observed in practice.

Full details in CHANGELOG.md.

Full Changelog: v0.2.2...v0.3.0

0.2.2

Choose a tag to compare

@Gnpd Gnpd released this 09 Jun 19:22

What's New

This release fixes two bugs: one in error handling for set_method_parameter and one in the FFI signature for IV_VersionDllFileStr.


Bug Fixes

  • set_method_parameter now correctly raises DeviceNotConnectedError when no device is connected, consistent with the rest of the high-level API's error handling contract.

  • IV_VersionDllFileStr FFI signature corrected from char* to char**, the DLL writes a pointer, not a buffer. The returned pointer is now dereferenced directly, fixing potential crashes or garbage output when retrieving the DLL version string.

0.2.1

Choose a tag to compare

@Gnpd Gnpd released this 29 May 06:04

What's new

Patch release fixing driver lifecycle and internal state bugs introduced in 0.2.0.


Bug fixes

  • IV_open() / IV_close() — flag set after DLL call: the internal is_driver_open flag was updated before the DLL call completed. If the call
    failed, the flag was left in an inconsistent state. It is now set only after a successful DLL return.

  • close_driver() — now idempotent: previously raised DriverNotOpenError when called on an already-closed driver, making it unsafe to use in
    finally blocks. It now returns silently if the driver is not open.

  • select_serial_number() — unambiguous return when already connected: previously returned 0, indistinguishable from a valid position index.
    Now returns None to clearly signal that no reselection was performed. Type signature updated to int | None.

  • IV_SelectSn — corrected return type: the Core wrapper incorrectly declared tuple[int, str] and returned the input serial number echoed back
    as if it were DLL output. Simplified to return only the result code (int).

  • save_method(), save_data(), save_dataset(), set_status_par() — result codes now verified: all four methods were discarding the DLL
    return code entirely, making failures silent. They now call verify_result_code() and raise typed exceptions on failure.

  • get_cell_status() — result code checked before processing bits: previously discarded with _, meaning a failed DLL call would process garbage
    bits as valid cell status.


Upgrade notes

If you call select_serial_number() and check its return value, update your code to handle None:

index = Pyvium.select_serial_number("SN12345")
if index is None:
    print("Device was already connected — no reselection needed")

0.2.0

Choose a tag to compare

@Gnpd Gnpd released this 28 May 09:24

What's new

DLL upgrade: 4.1221 → 4.1239

This release bundles the updated IviumSoft driver DLL (4.1239) and exposes all new commands it introduces, across both the Core and Pyvium layers.


New commands

General

Pyvium Core Description
get_max_device_number() IV_MaxDevices Returns the maximum number of devices IviumSoft can manage
get_version_host() IV_VersionHost Returns the DLL version required by the active IviumSoft
check_dll_version() IV_VersionCheck Returns True if the DLL version matches the IviumSoft requirement
get_host_handle() IV_HostHandle Returns the host handle
get_dll_version_string() IV_VersionDll Returns the DLL build number as a string
select_serial_number(str) IV_SelectSn Selects a device by serial number, ready to connect

Direct Mode

Pyvium Core Description
set_device_current(int, float) IV_selectdevicesetvalue Set current on a specific IviumSoft instance
set_device_potential(int, float) IV_selectdevicesetvalue Set potential on a specific IviumSoft instance
set_digital_output(int) IV_setdigout Set digital output lines on the external port (bitmask)
get_digital_input() IV_getdigin Read digital input lines on the external port (bitmask)
set_we32_channel(int) IV_we32setchannel Select the active WE32 channel
set_we32_offset(int, float) IV_we32setoffset Set WE32 offset for a single channel
set_we32_offsets(int, list) IV_we32setoffsets Set WE32 offsets for multiple channels at once
get_we32_offsets(int) IV_we32getoffsets Read current WE32 offset values for N channels
read_we32_currents() IV_we32readcurrents Read all 32 WE32 currents simultaneously
get_current_trace(int, float) IV_getcurrenttrace Capture a current sample sequence at a defined rate
get_current_we2_trace(int, float) IV_getcurrentWE2trace Capture a WE2 current sample sequence
get_potential_trace(int, float) IV_getpotentialtrace Capture a potential sample sequence

Method Mode

Pyvium Core Description
get_db_file_name() IV_getDbFileName Returns the path of the last created SQL database file
update_temperature(float) IV_UpdateTemperature Updates the shared temperature across all channels (beta)
save_dataset(str) IV_savedataset Saves the full measurement list to disk

Batch Mode (new category)

Pyvium Core Description
set_status_par(int) IV_StatusParSet Sets the global synchronisation variable
get_status_par() IV_StatusParGet Reads the global synchronisation variable

Bug fixes

  • IV_selectdevice — ffi.cdef declared return type as long; DLL actually returns void. Was reading garbage as return code on every instance switch.
  • IV_we32setoffsets / IV_we32getoffsets / IV_we32readcurrents — all three allocated a single double* instead of a double[N] array. Only the first channel value was written or read; remaining channels silently ignored.
  • Trace functions — IV_getcurrenttrace, IV_getcurrentWE2trace, IV_getpotentialtrace had the same single-element array bug. Now return the full sample list.
  • IV_getDbFileName buffer overflow — buffer was 16 bytes; any real filesystem path would overflow it. Increased to 260 bytes.
  • get_active_iviumsoft_instances off-by-one — range(1, 32) silently excluded instance 32. Fixed to range(1, 33).
  • get_device_status wrong label — status code 0 was labelled 'connected'; DLL defines it as 'not connected'.
  • Trace functions missing state guards — get_current_trace, get_current_we2_trace, get_potential_trace called Core directly without verifying driver/device state.
  • IV_getDbFileName in wrong module — was in GenericFunctions; moved to MethodModeFunctions to match DLL documentation.

Documentation

Nine Jupyter notebooks covering the full pyvium API from first connection to multi-device synchronization:

Notebook Topic
01_getting_started Installation, driver lifecycle, error handling reference
02_device_and_instance_management Connecting devices, switching instances, serial number selection
03_direct_mode_basics Potential/current control, cell on/off, current ranges
04_direct_mode_signals DAC/ADC, digital I/O, AC signal, MUX channel
05_bipotentiostat_and_we32 BiStat WE2 channel and 32-channel WE32 array
06_method_mode Load, parameterize, run, monitor, and save experiments
07_data_processing Parse IDF files and export to CSV (no hardware needed)
08_batch_and_synchronization Multi-device setpoints, parallel runs, synchronized channel start
09_trigger_reference Complete reference for all Python–IviumSoft trigger mechanisms

feedback welcome via GitHub Issues.


Full method list

See docs/method_list.md for the complete mapping of all Pyvium and Core methods.

0.1.21

Choose a tag to compare

@Gnpd Gnpd released this 18 Dec 10:00
2cd8b60

Upgrade to IviumSoft version 4.1221

0.1.19b0

Choose a tag to compare

@Gnpd Gnpd released this 09 Oct 12:39
fbef244

Upgrade to IviumSoft version 4.1170

0.1.4beta

Choose a tag to compare

@raulmarindev raulmarindev released this 13 Feb 12:53
b0df689

What's Changed

Full Changelog: v0.1.3-beta.0...0.1.4beta

v0.1.3-beta.0

Choose a tag to compare

@raulmarindev raulmarindev released this 02 Jan 13:44
6d69b9a

What's Changed

  • chore(pyvium): fix some typos by @Gnpd in #35

Full Changelog: v0.1.2b0...v0.1.3-beta.0

v0.1.2-beta.0 🚀

Choose a tag to compare

@raulmarindev raulmarindev released this 22 Dec 18:07
98e3241

What's Changed

Full Changelog: v0.1.1a9-alpha...v0.1.2b0

v0.1.1a9-alpha

v0.1.1a9-alpha Pre-release
Pre-release

Choose a tag to compare

@Gnpd Gnpd released this 13 Dec 13:33

What's Changed

  • doc(pyvium): update links for pypi by @Gnpd in #27
  • chore(pyvium): upgrade DLL version for Iviumsoft 4.1093 by @Gnpd in #29
  • Feat/add get iviumsoft version by @Gnpd in #28

Full Changelog: v0.1.1a6-alpha...v0.1.1a9-alpha