Skip to main content

WaveX Data Acquisition SDK

Reason this release was yanked:

Intermediate

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: wavex-1.3.2.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.2.tar.gz
Algorithm Hash digest
SHA256 bebd3a1ba8cd10da15659350558a02484318538e4656c4ceb6e7125a3d37f3fd
MD5 4e17850521b9cba46f844d9728584ed8
BLAKE2b-256 0bb78aade51f2fcec906adaa81782180097cd285349c109e44251855741194a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wavex-1.3.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c3f841293e936bf5b7fd2efe2bbfcd38fcaf118eaf106d8b96889613753baba0
MD5 81e5dbec9a6f8a6249300b80aadb695d
BLAKE2b-256 893da02585be538d1fc3020bd1aa986ea5a0f77762ba056ce37675da98e9365a

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