rofunc.devices.emg.src.pytrigno#

1.  Module Contents#

1.1.  Classes#

TrignoEMG

Delsys Trigno wireless EMG system EMG data.

TrignoAccel

Delsys Trigno wireless EMG system accelerometer data.

1.2.  API#

class rofunc.devices.emg.src.pytrigno.TrignoEMG(channel_range, samples_per_read, units='V', host='localhost', cmd_port=50040, data_port=50041, timeout=10)[source]#

Bases: rofunc.devices.emg.src.pytrigno._BaseTrignoDaq

Delsys Trigno wireless EMG system EMG data.

Requires the Trigno Control Utility to be running.

channel_rangetuple with 2 ints

Sensor channels to use, e.g. (lowchan, highchan) obtains data from channels lowchan through highchan. Each sensor has a single EMG channel.

samples_per_readint

Number of samples per channel to read in each read operation.

units{‘V’, ‘mV’, ‘normalized’}, optional

Units in which to return data. If ‘V’, the data is returned in its un-scaled form (volts). If ‘mV’, the data is scaled to millivolt level. If ‘normalized’, the data is scaled by its maximum level so that its range is [-1, 1].

hoststr, optional

IP address the TCU server is running on. By default, the device is assumed to be attached to the local machine.

cmd_portint, optional

Port of TCU command messages.

data_portint, optional

Port of TCU EMG data access. By default, 50041 is used, but it is configurable through the TCU graphical user interface.

timeoutfloat, optional

Number of seconds before socket returns a timeout exception.

rateint

Sampling rate in Hz.

scalerfloat

Multiplicative scaling factor to convert the signals to the desired units.

Initialization

set_channel_range(channel_range)[source]#

Sets the number of channels to read from the device.

channel_rangetuple

Sensor channels to use (lowchan, highchan).

read()[source]#

Request a sample of data from the device.

This is a blocking method, meaning it returns only once the requested number of samples are available.

datandarray, shape=(num_channels, num_samples)

Data read from the device. Each channel is a row and each column is a point in time.

class rofunc.devices.emg.src.pytrigno.TrignoAccel(channel_range, samples_per_read, host='localhost', cmd_port=50040, data_port=50042, timeout=10)[source]#

Bases: rofunc.devices.emg.src.pytrigno._BaseTrignoDaq

Delsys Trigno wireless EMG system accelerometer data.

Requires the Trigno Control Utility to be running.

channel_rangetuple with 2 ints

Sensor channels to use, e.g. (lowchan, highchan) obtains data from channels lowchan through highchan. Each sensor has three accelerometer channels.

samples_per_readint

Number of samples per channel to read in each read operation.

hoststr, optional

IP address the TCU server is running on. By default, the device is assumed to be attached to the local machine.

cmd_portint, optional

Port of TCU command messages.

data_portint, optional

Port of TCU accelerometer data access. By default, 50042 is used, but it is configurable through the TCU graphical user interface.

timeoutfloat, optional

Number of seconds before socket returns a timeout exception.

Initialization

set_channel_range(channel_range)[source]#

Sets the number of channels to read from the device.

channel_rangetuple

Sensor channels to use (lowchan, highchan).

read()[source]#

Request a sample of data from the device.

This is a blocking method, meaning it returns only once the requested number of samples are available.

datandarray, shape=(num_channels, num_samples)

Data read from the device. Each channel is a row and each column is a point in time.