visiomode.models.Trial

class visiomode.models.Trial(outcome: str, iti: float, response: ~visiomode.models.Response, timestamp: str = '2023-01-17T16:33:07.598859', correction: bool = False, response_time: int = -1, stimulus: dict = <factory>)

Bases: Base

Trial model class.

outcome

String descriptive of trial outcome, e.g. “correct”, “incorrect”, “no_response”, “precued”.

Type

str

iti

Float representing the “silent” time before the stimulus is presented in milliseconds.

Type

float

duration

Integer representing the duration of the touch in milliseconds.

pos_x

Float representing the touch position in the x-axis.

pos_y

Float representing the touch position in the y-axis.

dist_x

Float representing the distance travelled while touching the screen in the x-axis.

dist_y

Float representing the distance travelled while touching the screen in the y-axis.

timestamp

String trial date and time (ISO format). Defaults to current date and time.

Type

str

correction

Boolean indicating whether or not trial is a correction trial. Defaults to False.

Type

bool

response_time

Integer representing the time between stimulus presentation and response in milliseconds.

Type

int

__init__(outcome: str, iti: float, response: ~visiomode.models.Response, timestamp: str = '2023-01-17T16:33:07.598859', correction: bool = False, response_time: int = -1, stimulus: dict = <factory>) None

Methods

__init__(outcome, iti, response[, ...])

to_dict()

Returns class instance attributes as a dictionary.

to_json()

Returns class instance attributes as JSON.

Attributes

correction

response_time

timestamp

outcome

iti

response

stimulus

to_dict()

Returns class instance attributes as a dictionary.

to_json()

Returns class instance attributes as JSON.