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()

#load a configuration file created in EMG and Motion Tools enabled = daq.LoadConfiguration(r"C:\YourPath.cfg") print(enabled)

daq.OnDataAvailable(on_data)

daq.StartCapturing(wavex.enums.DataAvailableEventPeriod.ms_100) 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.5.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.5-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wavex-1.3.5.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.5.tar.gz
Algorithm Hash digest
SHA256 5631d2fedadae7a05f49aa0a0314daef2004d625e32f7dc5750e84bdb162912b
MD5 f1b505a0d1df850d5ec2dc2a6470d15d
BLAKE2b-256 d7bdd52d55ecc3e4b60f94573e6628823400f6c7f6751838df6883fff4b53491

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wavex-1.3.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 30ac86f8fc0cf78a4671fb35ffc3f54f643d3288c38d1dfbdc9f6d1d14ccf2d3
MD5 645ae8596853524a3bcffdec75804e46
BLAKE2b-256 ae52f0b3c1508318db21f78988426a6477a2bbaad78f44f6766d65eaa3dfef68

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