Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions neuroshare/EventEntity.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

from .Entity import Entity


class EventEntity(Entity):
"""Event entities represent specific timepoints with associated data,
e.g. trigger events. Data can be binary (8, 16 or 32 bit) values, text
or comma separated values (cvs).
"""
Event entities represent specific timepoints with associated data,
e.g. trigger events. Data can be binary (8, 16 or 32 bit) values,
text or comma separated values (cvs).
"""
EVENT_TEXT = 1
EVENT_CSV = 2
Expand All @@ -18,11 +17,11 @@ def __init__(self, nsfile, eid, info):

@property
def event_type(self):
"""The type of the event:

* binary (8, 16, 32 bit) [``EVENT_BYTE, EVENT_WORD, EVENT_DWORD``]
* text [``EVENT_TEXT``]
* comma separated values (csv) [``EVENT_CSV``]
"""
The type of the event:
* binary (8, 16, 32 bit) [EVENT_BYTE, EVENT_WORD, EVENT_DWORD]
* text [EVENT_TEXT]
* comma separated values (csv) [EVENT_CSV]
"""
return self._info['EventType']

Expand All @@ -42,7 +41,8 @@ def min_data_length(self):
return self._info['MinDataLength']

def get_data(self, index):
"""Retrieve the data at ``index``. Returns a 2-tuple with the
"""
Retrieve the data at ``index``. Returns a 2-tuple with the
timestamp of the data at the first position (``[0]``) and the
actual data a the second position (``[1]``)).
Example use: ``timestamp, data = event.get_data(0)``"""
Expand Down