Trial

class Trial(sma=None)[source]

Bases: BaseMessage

Variables:
  • trial_start_timestamp (float) – None

  • sma (StateMachine) – sma

  • states_occurrences (list(StateOccurrence)) – list of state occurrences

  • events_occurrences (list(EventOccurrence)) – list of event occurrences

__init__(sma=None)[source]

Methods

__init__([sma])

check_type(typestr)

Returns True if the typestr represents the class

export()

fromlist(row)

Returns True if the typestr represents the class

get_all_timestamps_by_event()

Create a dictionary whose keys are events names and values are corresponding timestamps

get_events_names()

Get events names without repetitions

get_timestamps_by_event_name(event_name)

Get timestamps by event name

pformat()

tolist()

Attributes

MESSAGE_COLOR

MESSAGE_TYPE_ALIAS

classmethod check_type(typestr)

Returns True if the typestr represents the class

classmethod fromlist(row)[source]

Returns True if the typestr represents the class

get_all_timestamps_by_event()[source]

Create a dictionary whose keys are events names and values are corresponding timestamps

Example:

{
    '_Tup': [429496.7295, 429496.7295],
    'Port3In': [429496.7295, 429496.7295],
    'Port2In': [429496.7295, 429496.7295],
    'Port2Out': [429496.7295, 429496.7295],
    'Port3Out': [429496.7295],
    'Port1Out': [429496.7295]
}
Return type:

dict

get_events_names()[source]

Get events names without repetitions

Return type:

list(str)

get_timestamps_by_event_name(event_name)[source]

Get timestamps by event name

Parameters:

event_name – name of the event to get timestamps

Return type:

list(float)