systole.recording.BrainVisionExG#

class systole.recording.BrainVisionExG(ip, sfreq, port=51244)[source]#

Recording ECG signal through TCPIP.

Parameters
ip

The IP address of the recording computer.

sfreq

The sampling frequency.

port

The port to listen. Default is 51244 (32 bits). Change port to 51234 to connect to 16Bit RDA-port

Notes

This class is adapted from the RDA client for python made available by Brain Products on the following link: https://www.brainproducts.com/downloads.php?kid=2

Examples

This instance is then used to create an BrainVisionExG() instance that will be used for the recording.

>>> from ecg.recording import BrainVisionExG
>>> exg = BrainVisionExG(ip='xxx.xxx.xx', sfreq=1000).read(30)

Use the read() method to record some signal and save it in the exg dictionary.

Warning

The signals received fom the host are appened to a list. This process can require more time at each iteration as the signal length increase in memory. You should alway make sure that this will not interfer with other task and regularly save intermediate recording to save resources.

__init__(ip, sfreq, port=51244)[source]#

Methods

GetData(rawdata, channelCount)

Helper function for extracting eeg and marker data from a raw data array read from tcpip socket

GetProperties(rawdata)

Helper function for extracting ExG properties from a raw data array read from tcpip socket

RecvData(requestedSize)

Helper function for receiving whole message

SplitString(raw)

Helper function for splitting a raw array of zero terminated strings (C) into an array of python strings

__init__(ip, sfreq[, port])

close()

Close TCPIP connections

read(duration)

Read incoming signals.