psychopy.iohub.util.ExperimentVariableProvider

class psychopy.iohub.util.ExperimentVariableProvider(fileNameWithPath, blockingVariableLabel, practiceBlockValues=None, randomizeBlocks=False, randomizeTrials=True, randSeed=None)

Bases: object

__init__(fileNameWithPath, blockingVariableLabel, practiceBlockValues=None, randomizeBlocks=False, randomizeTrials=True, randSeed=None)

Methods

__init__(fileNameWithPath, blockingVariableLabel)
getData()
getExperimentBlocks() Blocks are simply returned as a numpy ndarray of ndarrays.
getPracticeBlocks()
recycleTrial()
getExperimentBlocks()

Blocks are simply returned as a numpy ndarray of ndarrays. Blocks are grouped based on the value of the blocking variable column. The top level is the block set, the second level within each block is a ndarray of trial condition variable. Each trial is an nd array of the condition variable values for that iteration. Supported variable types are:

  • unicode
  • color ( a string in an xls file of format [r,g,b,a] or (r,g,b,a). a is optional. It is converted to a
  • ndarray for the cell [(r,’u8’),(g,’u8’),(b,’u8’),(a,’u8’)]
  • int
  • float