Skip to main content

WaveX Data Acquisition SDK

Reason this release was yanked:

bug on enums association

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.3.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.3-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wavex-1.3.3.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.3.tar.gz
Algorithm Hash digest
SHA256 45018d4b11fd3a044ec9a778f818ca670f5f714eb466aee9a79aac96bef4f759
MD5 861176ff49b32bcdacdce77d22ac64a5
BLAKE2b-256 eb4ac0b643adf5a2a71bf9ff0baf9580c0691cc5665361fb7bd8631c3502c8a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wavex-1.3.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 719ac2cd87710b31a978d29a9523d0845b5c1ffad324c7d142360507331e1734
MD5 7093ed2db9ef178fc10b954da8707e2a
BLAKE2b-256 2f836b5cb7e9f17d4a19476333c1a768a45dcd6421befdd99592437378e7d823

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