Data package#

Instructions class#

class CFSVM.Element.Data.Instructions(dirpath, kwargs)#

Presenting the instruction screens.

Constructor Summary
Instructions(dirpath, kwargs)#
Parameters:
  • dirpath – Path to the folder containing specific subfolders with images: introduction, block_introduction_1, …, block_introduction_n, rest, farewell.

  • backward_key – Key to press to move to the previous image of the instruction. Defaults to ‘LeftArrow’.

  • forward_key – Key to press to move to the next image of the instruction. Defaults to ‘RightArrow’.

  • proceed_key – Key to press to proceed from instruction to the next stage. Defaults to ‘Return’.

Property Summary
backward_key#

Key to press to move to the previous image of the instruction.

dirpath#

Path to the folder containing specific subfolders with images: introduction, block_introduction_1, …, block_introduction_n, rest, farewell.

forward_key#

Key to press to move to the next image of the instruction.

proceed_key#

Key to press to proceed from instruction to the next stage.

textures#

Struct containing PTB textures for different instruction types.

Method Summary
import_images(window, n_blocks)#

Imports instruction images from the dirpath subfolders.

Parameters:
  • window – PTB window pointer.

  • n_blocks – Number of subfolders with block introductions.

show(experiment, type)#

Shows the instruction by type. If type==’rest’, saves the trial data.

Parameters:
  • experiment – An object derived from the Experiment subclass.

  • type – Type of the instruction. One of introduction, block_introduction_1, …, block_introduction_n, rest, farewell.

wait_for_keypress()#

Waits until the provided key is pressed, then continue.

Interrupts the experiment if esc was pressed.

SubjectData class#

class CFSVM.Element.Data.SubjectData(kwargs)#

Inquiry about and recording of the subject info.

Constructor Summary
SubjectData(kwargs)#

Inquires subject info and puts it into table.

Parameters:
  • dirpath – Char array for path to directory in which to save the data. Defaults to ‘./SubjectInfo’.

  • file_extenstion – Char array. Defaults to ‘.csv’.

Property Summary
code#

Char array for subject code.

dirpath#

Char array for path to directory in which to save the data.

file_extension#

Info table extension.

is_left_suppression#

Bool, whether to suppress the left eye in CFS.

table#

A table storing subject info.

Method Summary
write()#

Writes table to the dirpath.

TrialsData class#

class CFSVM.Element.Data.TrialsData(kwargs)#

Storing and manipulating trial parameters.

Constructor Summary
TrialsData(kwargs)#
Parameters:

filepath – Char array, path to the .mat file.

Property Summary
RESULTS = {'block_index','trial_index','start_time','end_time'}#

Parameters to parse into the processed results table.

block_index#

Int, current block.

end_time#

Float, trial offset.

filepath#

Char array, path to the .mat file.

matrix#

Nested cell array for trial matrix.

n_blocks#

Int, number of blocks in trial matrix.

start_time#

Float, trial onset.

trial_index#

Int, current trial.

Method Summary
import()#

Loads .mat file.

load_trial_parameters(experiment)#

Updates parameters for the current trial.

Parameters:

experiment – An object derived from the Experiment subclass.

update(experiment)#

Updates every trial with initialized experiment parameters.

Parameters:

experiment – An object derived from the Experiment subclass.