Download PsychoPy - Psychology software for Python

Transcript
PsychoPy - Psychology software for Python, Release 1.83.02
saveAsPickle(fileName, fileCollisionMethod=’rename’)
Basically just saves a copy of self (with data) to a pickle file.
This can be reloaded if necess and further analyses carried out.
Parameters fileCollisionMethod: Collision method passed to handleFileCollision()
saveAsText(fileName,
delim=None,
encoding=’utf-8’)
Write a text file with the data
matrixOnly=False,
fileCollisionMethod=’rename’,
Parameters
fileName: a string The name of the file, including path if needed. The extension .tsv will
be added if not included.
delim: a string the delimitter to be used (e.g. ‘ ‘ for tab-delimitted, ‘,’ for csv files)
matrixOnly: True/False If True, prevents the output of the extraInfo provided at initialisation.
fileCollisionMethod: Collision method passed to handleFileCollision()
encoding: The encoding to use when saving a the file. Defaults to utf-8.
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.4 MultiStairHandler
class psychopy.data.MultiStairHandler(stairType=’simple’,
method=’random’,
conditions=None, nTrials=50, originPath=None, name=’‘,
autoLog=True)
A Handler to allow easy interleaved staircase procedures (simple or QUEST).
Parameters for the staircases, as used by the relevant StairHandler or QuestHandler (e.g. the startVal,
minVal, maxVal...) should be specified in the conditions list and may vary between each staircase. In particular,
the conditions /must/ include the a startVal (because this is a required argument to the above handlers) a label to
tag the staircase and a startValSd (only for QUEST staircases). Any parameters not specified in the conditions
file will revert to the default for that individual handler.
If you need to custom the behaviour further you may want to look at the recipe on Coder - interleave staircases.
Params
stairType: ‘simple’ or ‘quest’ Use a StairHandler or QuestHandler
method: ‘random’ or ‘sequential’ The stairs are shuffled in each repeat but not randomised
more than that (so you can’t have 3 repeats of the same staircase in a row unless it’s the only
one still running)
conditions: a list of dictionaries specifying conditions Can be used to control parameters
for the different staicases.
Can be imported from an Excel file using psychopy.data.importConditions MUST include keys providing, ‘startVal’, ‘label’ and ‘startValSd’ (QUEST only). The ‘label’ will be used in data file saving so should be unique. See
Example Usage below.
8.3. psychopy.data - functions for storing/saving/analysing data
149