expyriment.misc.Buffer

class expyriment.misc.Buffer(name='Buffer', clock=None)

A class implementing a general event buffer.

Methods

__init__(name='Buffer', clock=None)

Create an event buffer.

Parameters name – the name of the buffer (str) clock – an experimental clock (expyriment.Clock object) (optional)

add_event(event)

Add an event to the buffer.

Parameters event – the event to add (anything)

add_events(events)

Add a list of events to the buffer.

All events get the same time stamp!

Parameters events – the event list to add (list)

clear()

Clear the buffer.

clock

Getter for clock

get_element(position)

Get an element (code, rt) from the buffer.

Parameters position – the position to get the element from (int)

get_last_event()

Get the last event (code, rt) in the buffer.

get_size()

Return the number of elements in the buffer.

get_whole_buffer()

Get a copy of the buffer.

memory

Getter for memory [list of tuples (code, rt)]

name

Getter for name

Previous topic

expyriment.misc.statistics

Next topic

expyriment.misc.ByteBuffer

This Page