Download PsychoPyManual v1.81.03
Transcript
PsychoPy - Psychology software for Python, Release 1.81.03 fileName: if extension is not specified, ‘.csv’ will be appended if the delimiter is ‘,’, else ‘.txt’ will be appended. Can include path info. delim: allows the user to use a delimiter other than the default tab (”,” is popular with file extension ”.csv”) matrixOnly: outputs the data with no header row. appendFile: will add this output to the end of the specified file if it already exists. setExp(exp) Sets the ExperimentHandler that this handler is attached to Do NOT attempt to set the experiment using: trials._exp = myExperiment because it needs to be performed using the weakref module. 8.3.3 StairHandler class psychopy.data.StairHandler(startVal, nReversals=None, stepSizes=4, nTrials=0, nUp=1, nDown=3, extraInfo=None, method=‘2AFC’, stepType=’db’, minVal=None, maxVal=None, originPath=None, name=’‘, autoLog=True) Class to handle smoothly the selection of the next trial and report current values etc. Calls to nextTrial() will fetch the next object given to this handler, according to the method specified. See Demos >> ExperimentalControl >> JND_staircase_exp.py The staircase will terminate when nTrials AND nReversals have been exceeded. If stepSizes was an array and has been exceeded before nTrials is exceeded then the staircase will continue to reverse. nUp and nDown are always considered as 1 until the first reversal is reached. The values entered as arguments are then used. Parameters startVal: The initial value for the staircase. nReversals: The minimum number of reversals permitted. If stepSizes is a list then there must also be enough reversals to satisfy this list. stepSizes: The size of steps as a single value or a list (or array). For a single value the step size is fixed. For an array or list the step size will progress to the next entry at each reversal. nTrials: The minimum number of trials to be conducted. If the staircase has not reached the required number of reversals then it will continue. nUp: The number of ‘incorrect’ (or 0) responses before the staircase level increases. nDown: The number of ‘correct’ (or 1) responses before the staircase level decreases. extraInfo: A dictionary (typically) that will be stored along with collected data using saveAsPickle() or saveAsText() methods. stepType: specifies whether each step will be a jump of the given size in ‘db’, ‘log’ or ‘lin’ units (‘lin’ means this intensity will be added/subtracted) method: Not used and may be deprecated in future releases. 8.3. psychopy.data - functions for storing/saving/analysing data 85