Evidence package#

BreakResponse class#

class CFSVM.Element.Evidence.BreakResponse(kwargs)#

Bases: CFSVM.Element.ResponseElement

Initiating and recording break data.

Constructor Summary
BreakResponse(kwargs)#
Parameters:
  • keyskeys. Defaults to {'LeftArrow', 'RightArrow'}.

  • is_break_trial – Whether to break a trial when the key is pressed. Defaults to true.

Property Summary
RESULTS = {'response_time','response_choice','response_kbname'}#

Parameters to parse into the processed results table.

Method Summary
create_kbqueue()#

Creates PTB KbQueue.

For more information, check the PTB documentation.

get(pressed, first_press)#

Processes response properties from the PTB KbQueue.

Parameters:
  • pressed – Bool, whether any key was pressed.

  • first_press – PTB timing of presses.

ImgMAFC class#

class CFSVM.Element.Evidence.ImgMAFC(kwargs)#

Bases: CFSVM.Element.Evidence.ScaleEvidence, CFSVM.Element.Stimulus.Stimulus

Initiating and recording image mAFC data.

Constructor Summary
ImgMAFC(kwargs)#
Parameters:
Property Summary
RESULTS = {'response_time','response_choice','response_kbname','onset','img_indices'}#

Parameters to parse into the processed results table.

img_indices#

Char array with images indices separated by spaces.

rects#

Cell array of two arrays with size {[n_options,4]; [n_options,4]}.

Method Summary
load_parameters(screen, ptb_textures_indices, shown_texture_index)#

Loads parameters for mAFC screen for the trial.

Parameters:
  • screenCustomScreen object.

  • ptb_textures_indicesCell array of ints representing loaded PTB textures.

  • shown_texture_indexInt representing PTB texture shown as a stimulus.

show(experiment)#

Draws and shows mAFC images, waits for the subject response and records it.

See also record_response().

Parameters:

experiment – An experiment object.

PAS class#

class CFSVM.Element.Evidence.PAS(kwargs)#

Bases: CFSVM.Element.Evidence.ScaleEvidence

Initiating and recording PAS data.

Constructor Summary
PAS(kwargs)#
Parameters:
  • keyskeys. Defaults to {'0)', '1!', '2@', '3#'}.

  • titletitle. Defaults to 'How clear was the experience?'.

  • options

    options Defaults to:

    {'0: No experience', ...
     '1: A weak experience', ...
     '2: An almost clear experience', ...
     '3: A clear experience'}
    

Property Summary
RESULTS = {'response_time','response_choice','response_kbname','onset'}#

Parameters to parse into the processed results table.

left_text_start#

Nonnegative int for the left screen.

right_text_start#

`Nonnegative int for the right screen.

spacing#

Nonnegative int round(text_size/2).

text_size#

Nonnegative int

Method Summary
load_parameters(screen)#

Loads PAS parameters for the trial.

Parameters:

screenCustomScreen object.

show(experiment)#

Shows PAS screen, waits for the subject response and records it.

See also record_response().

Parameters:

experiment – An experiment object.

ScaleEvidence class#

class CFSVM.Element.Evidence.ScaleEvidence#

Bases: CFSVM.Element.ResponseElement, CFSVM.Element.TemporalElement

A base class for description of scale-based evidence classes like PAS and ImgMAFC.

Property Summary
n_options#

Int length of keys

options#

Cell array

title = ''#

Char array representing title or question shown on screen.

title_size#

Int

Method Summary
record_response()#

Waits for a keypress specified in keys and records response properties.

TextMAFC class#

class CFSVM.Element.Evidence.TextMAFC(kwargs)#

Bases: CFSVM.Element.Evidence.ScaleEvidence

Initiating and recording text mAFC data.

Constructor Summary
TextMAFC(kwargs)#
Parameters:
  • keyskeys. Defaults to {'LeftArrow', 'RightArrow'}.

  • titletitle. Defaults to 'Which one have you seen?'.

  • optionsoptions. Defaults to {'Option_1', 'Option_2'}.

Property Summary
RESULTS = {'response_time','response_choice','response_kbname','onset'}#

Parameters to parse into the processed results table.

text_size#

Nonnegative int

Method Summary
show(experiment)#

Shows text version of mAFC, waits for the subject response and records it.

See also CFSVM.Element.Evidence.ScaleEvidence.record_response().

Parameters:

experiment – An experiment object.