Skip to main content

WaveX Data Acquisition SDK

Project description

WaveX Python SDK

Python bindings for the WaveX acquisition system. The SDK provides access to EMG, IMU, insole, analog, and device state data through a callback-based API with NumPy array support.

Installation

pip install wavex

Quick Start

import time
import numpy
import matplotlib.pyplot as plt
import wavex

from wavex import *

buffer = []

def on_data(args):
    sample = args.EmgSamples[0, :].copy()
    buffer.append(sample)

daq = wavex.DaqSystem()

cfg = CaptureConfiguration()
cfg.set_emg_acq_x(enums.EmgAcqXType.Emg_2kHz)
cfg.set_emg_imu_acq_x(
    enums.EmgImuAcqXType.Emg_2kHz_RawAccGyroData_200Hz
)

daq.OnDataAvailable(on_data)
daq.ConfigureCapture(cfg)

daq.StartCapturing(0)
time.sleep(5)
daq.StopCapturing()

signal = numpy.concatenate(buffer)

plt.plot(signal)
plt.show()

Main Components

WaveX / DaqSystem

The main interface used to communicate with the acquisition hardware.

daq = wavex.DaqSystem()

daq.ConfigureSensor(sensor_cfg, 0)
daq.ConfigureCapture(capture_cfg)

daq.StartCapturing()
daq.StopCapturing()

CaptureConfiguration

Defines which data streams are enabled and their sampling rates. (p for WavePlus receivers, x for WaveX receivers)

cfg = CaptureConfiguration()

cfg.set_emg_acq_x(...)
cfg.set_imu_acq_p(...)
cfg.set_emg_imu_acq_x(...)

cfg.enable_insole(...)
cfg.enable_analog_channel(...)

SensorConfiguration

Configures sensor type, operating mode, and IMU full-scale ranges.

sensor_cfg = SensorConfiguration()

sensor_cfg.set_sensor_config(
    enums.SensorModel.Mini_EmgImu,
    enums.SensorMode.EMG_SENSOR,
    enums.AccelerometerFullScale.g_16,
    enums.GyroscopeFullScale.dps_2000,
)

Receiving Data

Data is delivered through a callback registered with OnDataAvailable.

def on_data(args):
    print(args.ScanNumber)
    print(args.EmgSamples.shape)

daq.OnDataAvailable(on_data)

The callback receives a DataAvailableEvent object containing NumPy arrays for all enabled channels.

Common fields include:

Field Description
EmgSamples EMG samples
AccelerometerSamples Accelerometer data
GyroscopeSamples Gyroscope data
MagnetometerSamples Magnetometer data
ImuSamples Fused IMU data
AnalogSamples Analog input channels
InsoleSamples Insole pressure data
ScanNumber Number of samples in the current callback

Loading Existing Configurations

Configurations exported from the EMGandMotionTools software can be loaded directly.

daq.LoadConfiguration("WaveXConfig.cfg")

Notes

  • Data arrays are provided as NumPy arrays.
  • Copy data inside callbacks if it must be stored after the callback returns.
  • Call ConfigureSensor() and ConfigureCapture() to configure before starting acquisition.
  • Sampling rates and available channels depend on the selected acquisition mode and connected hardware.
  • It's possible to change the data available period in StartCapturing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wavex-1.3.4.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wavex-1.3.4-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file wavex-1.3.4.tar.gz.

File metadata

  • Download URL: wavex-1.3.4.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for wavex-1.3.4.tar.gz
Algorithm Hash digest
SHA256 d53a9058438ac48700049262e3f3186089c5141562bb5edba7a87effb27aba8c
MD5 80a98ceb6d19f4be625991c0360dc0d2
BLAKE2b-256 384f692635dcdbfa81940b1f57bbad0ee9b708a1e8bc8d8ed177b1719e629522

See more details on using hashes here.

File details

Details for the file wavex-1.3.4-py3-none-any.whl.

File metadata

  • Download URL: wavex-1.3.4-py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for wavex-1.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 80f0a286a1bfbbc0996f9935cb421add3f2b10aed517274fb0fb8ad38f71d4c1
MD5 d4fd76e8990745254d692c8be7ff71df
BLAKE2b-256 7c3ecf7c412b0909e0667226dce0067bfa7a41eaa77d8f519b56de50e4cfb1e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page