ExperimentInfo class (number-to-position)

This object keeps all the experiment data:

  • The configuration (Config) ;
  • TrajTracker objects such as number line, the “start” point, the movement validators, etc. ;
  • The data from the CSV file ;
  • Expyriment’s active_experiment object ; and
  • The experiment results.
class trajtrackerp.num2pos.ExperimentInfo(config, xpy_exp, subject_id, subject_name)
__init__(config, xpy_exp, subject_id, subject_name)
config

The program’s configuration parameters

Type:trajtrackerp.num2pos.Config
get_default_target_y()

Get the y coordinate where the target should be presented by default :return: tuple: (y coordinate, target height)

numberline

The number line

Type:trajtracker.stimuli.NumberLine
sounds_ok_max_ep_err = None

Specify, for each entry in sounds_ok, the maximal endpoint error acceptable for this sound.

speed_validation_end_y_coord()

Get the y coordinate where speed validation should end

target_pointer

A stimulus that directly indicates the target location on the number line (in the default implementation, this is a down-pointing arrow)

The ExperimentInfo class is an extension of BaseExperimentInfo so it contains all its properties too, as detailed below:

class trajtrackerp.common.BaseExperimentInfo(config, xpy_exp, subject_id, subject_name)

All objects relevant to this experiment

add_event_sensitive_object(obj)

Add an object to event_sensitive_objects

add_trajectory_sensitive_object(obj)

Add an object to trajectory_sensitive_objects

add_validator(validator, name)

Add a validator to the experiment’s set of validators. The validator will also be registered in trajectory_sensitive_objects

Parameters:
  • validator – The validator object
  • name – The validator will also be saved as “exp_info.validator_<name>”
confidence_slider = None

A Slider for measuing subjective confidence rating

errmsg_textbox

A text box for showing error messages (expyriment.stimuli.TextBox or an equivalent stimulus)

event_manager = None

An EventManager object (responsible for handling the app’s events)

event_sensitive_objects

A list of objects that need to be registered to the EventManager

exp_data = None

A dict with the experiment-level results

exported_trial_result_fields = None

Fields from trial.results that should be exported to the CSV file :type: dict: field name => default value

fixation

The fixation (a cross / symbol / etc)

generic_target

The target non-text stimuli

Type:trajtracker.stimuli.MultiStimulis
return_unused_trial_to_pool(trial)

If a trial was not completed for any reason (e.g., failed, aborted), use this function to return it to the pool of trials.

Parameters:trial – The trial object (previously popped from exp_info.trials)
screen_size

The screen size (width, height) :type: tuple

session_out_filename = None

Name of session.xml results file

session_start_localtime = None

Time when the session started, as string

session_start_time = None

Time when the session started.

sound_err = None

Sound to play on trial failure (expyriment.stimuli.Audio)

sounds_ok = None

Sound/s to play when the trial succeeded (expyriment.stimuli.Audio)

This has more than one entry in case you used several sounds (configured by Config.sound_by_accuracy)

start_point

The start point (a StartPoint or RectStartPoint )

stimuli = None

A StimulusContainer object, containing all stimuli.

subject_id = None

Subject ID (As entered in Expyriment’s welcome screen)

subject_name = None

Subject name (as entered in the number-to-position app’s welcome screen)

text_target

The target text stimuli

Type:trajtracker.stimuli.MultiTextBox
traj_out_filename = None

Name of trajectory.csv results file

trajectory_sensitive_objects

A list of all objects that need to know about the finger movement (e.g. TrajectoryTracker and the validators). For each of these objects, obj.reset(0) will be called when the trial is initialized (finger touches screen) and obj.update_xyt(position, time_in_trial, time_in_session) will be called on each frame when the finger moves (between the FINGER_STARTED_MOVING and FINGER_STOPPED_MOVING events).

trajtracker

A TrajectoryTracker object for tracking the finger trajectory

trials = None

The list of trials (loaded from the CSV file)

trials_file_writer = None

a DictWriter for the trials.csv file

trials_out_filename = None

Name of trials.csv results file

xpy_exp = None

Expyriment’s “Experiment” object