Skip to content
Jack Brookes edited this page Oct 31, 2020 · 9 revisions

UXF.Trial

The base unit of experiments. A Trial is usually a singular attempt at a task by a participant after/during the presentation of a stimulus.


Fields

status: Status of the trial (enum)

block: The block associated with this session

result: Dictionary of results in a order.

Properties

number: Returns non-zero indexed trial number. This is generated based on its position in the block, and the ordering of the blocks within the session.

numberInBlock: Returns non-zero indexed trial number for the current block.

session: The session associated with this trial

settings: Trial settings. These will override block settings if set.

Methods

UXF.Trial.UXF.Trial(UXF.Block)

Manually create a trial. When doing this you need to add this trial to a block with block.trials.Add(trial)

Parameters

None

UXF.Trial.SetReferences(UXF.Block)

Set references for the trial.

Parameters

  • trialBlock: The block the trial belongs to.

UXF.Trial.Begin()

Begins the trial, updating the current trial and block number, setting the status to in progress, starting the timer for the trial, and beginning recording positions of every object with an attached tracker

Parameters

None

UXF.Trial.End()

Ends the Trial, queues up saving results to output file, stops and saves tracked object data.

Parameters

None

UXF.Trial.SaveDataTable(UXF.UXFDataTable, string, UXF.UXFDataType)

Saves a DataTable to the storage locations(s) for this trial. A column will be added in the trial_results CSV listing the location(s) of these data.

Parameters

  • table: The data to be saved.

  • dataName: Name to be used in saving. It will be appended with the trial number.

  • dataType:

UXF.Trial.SaveJSONSerializableObject(System.Collections.Generic.List<object>, string, UXF.UXFDataType)

Saves a JSON Serializable Object to the storage locations(s) for this trial. A column will be added in the trial_results CSV listing the location(s) of these data.

Parameters

  • serializableObject: The data to be saved.

  • dataName: Name to be used in saving. It will be appended with the trial number.

  • dataType:

UXF.Trial.SaveJSONSerializableObject(System.Collections.Generic.Dictionary<string, object>, string, UXF.UXFDataType)

Saves a JSON Serializable Object to the storage locations(s) for this trial. A column will be added in the trial_results CSV listing the location(s) of these data.

Parameters

  • serializableObject: The data to be saved.

  • dataName: Name to be used in saving. It will be appended with the trial number.

  • dataType:

UXF.Trial.SaveText(string, string, UXF.UXFDataType)

Saves a string of text to the storage locations(s) for this trial. A column will be added in the trial_results CSV listing the location(s) of these data.

Parameters

  • text: The data to be saved.

  • dataName: Name to be used in saving. It will be appended with the trial number.

  • dataType:

UXF.Trial.SaveBytes(System.Byte[], string, UXF.UXFDataType)

Saves an array of bytes to the storage locations(s) for this trial. A column will be added in the trial_results CSV listing the location(s) of these data.

Parameters

  • bytes: The data to be saved.

  • dataName: Name to be used in saving. It will be appended with the trial number.

  • dataType:


Note: This file was automatically generated

๐Ÿง  Core topics

โ“ More help


๐Ÿ‘ฉโ€๐Ÿ’ป Programming reference

Unit tests

Clone this wiki locally