expyriment.misc.Buffer¶
-
class
expyriment.misc.
Buffer
(name='Buffer', clock=None)¶ A class implementing a general event buffer.
-
__init__
(name='Buffer', clock=None)¶ Create an event buffer.
Parameters: - namestr
the name of the buffer
- clockexpyriment.Clock object (optional)
an experimental clock
-
add_event
(event)¶ Add an event to the buffer.
Parameters: - eventanything
the event to add
-
add_events
(events)¶ Add a list of events to the buffer.
All events get the same time stamp!
Parameters: - eventslist
the event list to add
-
clear
()¶ Clear the buffer.
-
property
clock
¶ Getter for clock
-
get_element
(position)¶ Get an element (code, rt) from the buffer.
Parameters: - positionint
the position to get the element from
Returns: - element(anything, float)
The element to get from the buffer
-
get_last_event
()¶ Get the last event (code, rt) in the buffer.
Returns: - element(anything, float)
the last element of the buffer
-
get_size
()¶ Return the number of elements in the buffer.
Returns: - sizeint
the size of the buffer
-
get_whole_buffer
()¶ Get a copy of the buffer.
Returns: - copylist
the copy of the buffer
-
property
memory
¶ Getter for memory [list of tuples (code, rt)]
-
property
name
¶ Getter for name
-