WindowerInterface

Module: missions.support.WindowerInterface

This file defines the template AbstractStreamReader which is needed for all stream readers (e.g. eegreader) to work together with the Windower or any classes derived from the Windower Base-class.

Inheritance diagram for pySPACE.missions.support.WindowerInterface:

Inheritance diagram of pySPACE.missions.support.WindowerInterface

AbstractStreamReader

class pySPACE.missions.support.WindowerInterface.AbstractStreamReader[source]

Bases: object

Property and method definitions of any reader class to be able to interact with the windower.

Class Components Summary

__abstractmethods__
_abc_cache
_abc_negative_cache
_abc_negative_cache_version
_abc_registry
channelNames list of channel/sensor names
dSamplingInterval actually the sampling frequency
markerNames inverse mapping of markerids (dict)
markerids mapping of markers/events in stream and unique integer (dict)
read(nblocks) Read nblocks of the stream and pass it to registers functions
regcallback(func) register a function as consumer of the stream
stdblocksize standard block size (int)
__metaclass__

alias of ABCMeta

dSamplingInterval

actually the sampling frequency

stdblocksize

standard block size (int)

markerids

mapping of markers/events in stream and unique integer (dict)

The dict has to contain the mapping ‘null’ -> 0 to use the nullmarkerstride option in the windower.

channelNames

list of channel/sensor names

markerNames

inverse mapping of markerids (dict)

regcallback(func)[source]

register a function as consumer of the stream

read(nblocks)[source]

Read nblocks of the stream and pass it to registers functions

The callback function that is registered by the windower has the signature ‘func_name(self, ndsamples, ndmarkers)’ where ndsamples is a numpy 2d-array with shape (number_of_sensors x stdblocksize) and ndmarkerks is a numpy ndarray of length stdblocksize filled with the unique marker ids (ints) where the events occurred and -1 otherwise. The read function has to provide this two arrays and then pass it to the callback functions. It should in addition return the number of read blocks.

__abstractmethods__ = frozenset(['regcallback', 'dSamplingInterval', 'markerNames', 'read', 'stdblocksize', 'markerids', 'channelNames'])
__weakref__

list of weak references to the object (if defined)

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 33
_abc_registry = <_weakrefset.WeakSet object>