Experiment package#

Experiment class#

class CFSVM.Experiment.Experiment(kwargs)#

Base for CFS and VM classes.

Describes very basic methods fomr initiation of PTB-3 window to comments containing screens shown to the subject.

Constructor Summary
Experiment(kwargs)#
CFSVM.Experiment.addprop(obj, prop_name)#

Adds new dynamic property and records its name.

Parameters:

prop_name – Name of new property.

CFSVM.Experiment.get_dyn_props(obj)#

Returns a list of dynamic properties.

CFSVM.Experiment.initiate_window(obj)#

Calls basic Psychtoolbox settings.

Adopted and modified from Peter Scarfe’s Psychtoolbox tutorial.

Here we call some default settings for setting up Psychtoolbox

CFSVM.Experiment.show_preparing_screen(obj)#

Flips screen to inform that the experiment is being prepared.

CFS class#

class CFSVM.Experiment.CFS#

Base for BCFS and VPCFS classes.

Describes common methods for CFS experiments, e.g. initiate() for initiating CFS properties.

Derived from Experiment.

Property Summary
flips#

An array for Screen(‘Flip’) outputs from flash method.

CFSVM.Experiment.initiate(obj)#

Makes all the preparations for the CFS experiment to run.

CFSVM.Experiment.preload_stim_and_masks_args(obj, stim_props)#

Precalculates DrawTexture args for stimuli and masks for a trial.

Parameters:

stim_props – A cell array of chars with names for stimuli properties.

BCFS class#

class CFSVM.Experiment.BCFS#

Breaking continuous flash suppression.

Derived from CFS.

Property Summary
breakthrough#

BreakResponse object.

fixation#

Fixation object.

frame#

CheckFrame object.

instructions#

Instructions object.

masks#

Mondrians object.

screen#

CustomScreen object.

subject_info#

SubjectData object.

trials#

TrialsData object.

CFSVM.Experiment.flash(obj, vbl)#

Flashes stimuli, masks, fixations and checkframe.

This is the main method for flashing CFS and recording its timings.

Parameters:

vbl – An integer for vertical retrace timing from the fixation.show().

Returns:

bool and array:

  • pressed: a boolean indicating whether a key has been pressed

  • first_press: an array indicating the time that each key was first pressed.

Return type:

[pressed, first_press]

CFSVM.Experiment.load_parameters(obj)#

Precalculates and updates parameters for every oncoming trial.

Loads parameters from trial matrix and then precalculates other parameters that depend on initialised window, i.e. masks, stimulus, fixation parameters.

CFSVM.Experiment.run(obj)#

Executes the breaking CFS experiment.

First initiates the experiment, then for every trial update parameters, shows fixation crosses, flashes masks and stimuli, records responses, writes results and shows rest screen.

VPCFS class#

class CFSVM.Experiment.VPCFS#

Visual priming continuous flash suppression.

Derived from CFS.

Property Summary
fixation#

Fixation object.

frame#

CheckFrame object.

instructions#

Instructions object.

mafc = CFSVM.Element.Evidence.ImgMAFC()#

Either ImgMAFC or TextMAFC object.

masks#

Mondrians object.

pas#

PAS object.

screen#

CustomScreen object.

subject_info#

SubjectData object.

target#

TargetStimulus object.

trials#

TrialsData object.

CFSVM.Experiment.flash(obj, vbl)

Flashes stimuli, masks, fixations and checkframe.

This is the main method for flashing CFS and recording its timings.

Parameters:

vbl – An integer for vertical retrace timing from the fixation.show().

CFSVM.Experiment.load_parameters(obj)

Precalculates and updates parameters for every oncoming trial.

Loads parameters from trial matrix and then precalculates other parameters that depend on initialised window, i.e. masks, stimuli, fixation, pas and mafc parameters.

CFSVM.Experiment.run(obj)

Executes the visual priming CFS experiment.

First initiates the experiment, then for every trial loads parameters, fixation cross, flashes masks and stimuli, shows PAS and mAFC questions, records responses, writes results and shows rest screen.

VM class#

class CFSVM.Experiment.VM#

Base for VTM and VSM classes.

Describes common methods for visual masking experiments, e.g. initiate() for initiating VM properties or run() for running the experiment.

Derived from Experiment.

CFSVM.Experiment.draw(obj, parameters)#

Optionally draws fixation, stimulus and mask.

Parameters:
CFSVM.Experiment.initiate(obj)

Makes all the preparations for the VM experiment to run.

CFSVM.Experiment.load_parameters(obj)

Precalculates and updates parameters for every oncoming trial.

Loads parameters from trial matrix and then precalculates other parameters that depend on initialised window, i.e. masks, stimulus, fixation parameters.

CFSVM.Experiment.run(obj)

Executes the visual masking experiment.

First initiates the experiment, then for every trial update parameters, shows fixation crosses, flashes masks and stimuli, records responses, writes results and shows rest screen.

VSM class#

class CFSVM.Experiment.VSM#

Visual sandwich masking.

Contains forward and backward masks - f_mask and b_mask, respectively.

Derived from VM.

Property Summary
b_mask#

Mask object.

f_mask#

Mask object.

fixation#

Fixation object.

instructions#

Instructions object.

mafc = CFSVM.Element.Evidence.ImgMAFC()#

Either ImgMAFC or TextMAFC object.

pas#

PAS object.

screen#

CustomScreen object.

subject_info#

SubjectData object.

trials#

TrialsData object.

CFSVM.Experiment.flash(obj)

Flashes stimuli, masks, fixations and checkframe.

This is the main method for flashing CFS and recording its timings.

Parameters:

vbl – An integer for vertical retrace timing from the fixation.show().

VTM class#

class CFSVM.Experiment.VTM#

Visual temporal masking.

Depending on soa either forward, simultaneous or backward masking.

Derived from VM.

Property Summary
fixation#

Fixation object.

flash#

Handler for either forward, sim or backward masking flashing.

instructions#

Instructions object.

mafc = CFSVM.Element.Evidence.ImgMAFC()#

Either ImgMAFC or TextMAFC object.

mask#

Mask object.

pas#

PAS object.

screen#

CustomScreen object.

subject_info#

SubjectData object.

trials#

TrialsData object.

CFSVM.Experiment.b_flash(obj)#

Flashes stimuli, masks, fixations.

This is the main method for flashing backward VM and recording its timings.

CFSVM.Experiment.f_flash(obj)#

Flashes stimuli, masks, fixations.

This is the main method for flashing forward VM and recording its timings.

CFSVM.Experiment.s_flash(obj)#

Flashes stimuli, masks, fixations.

This is the main method for flashing simulatenous VM and recording its timings.