diff --git a/three-back.psyexp b/three-back.psyexp index cefca3d4460ac2ae42b14e9a773f86b63c633946..3ff4c84ddd10e601ee809d136039300ac6b92b42 100644 --- a/three-back.psyexp +++ b/three-back.psyexp @@ -1,5 +1,5 @@ <?xml version="1.0" ?> -<PsychoPy2experiment encoding="utf-8" version="3.2.0"> +<PsychoPy2experiment encoding="utf-8" version="3.2.4"> <Settings> <Param name="Audio latency priority" updates="None" val="use prefs" valType="str"/> <Param name="Audio lib" updates="None" val="use prefs" valType="str"/> @@ -8,11 +8,11 @@ <Param name="Enable Escape" updates="None" val="True" valType="bool"/> <Param name="Experiment info" updates="None" val="{'participant': '', 'session': '001', 'backN': '3', 'probability': '0.2'}" valType="code"/> <Param name="Force stereo" updates="None" val="True" valType="bool"/> - <Param name="Full-screen window" updates="None" val="False" valType="bool"/> + <Param name="Full-screen window" updates="None" val="True" valType="bool"/> <Param name="HTML path" updates="None" val="html" valType="str"/> <Param name="Incomplete URL" updates="None" val="" valType="str"/> <Param name="JS libs" updates="None" val="packaged" valType="str"/> - <Param name="Monitor" updates="None" val="Alienware Laptop Monitor" valType="str"/> + <Param name="Monitor" updates="None" val="testMonitor" valType="str"/> <Param name="Save csv file" updates="None" val="False" valType="bool"/> <Param name="Save excel file" updates="None" val="False" valType="bool"/> <Param name="Save log file" updates="None" val="True" valType="bool"/> @@ -23,7 +23,7 @@ <Param name="Show mouse" updates="None" val="False" valType="bool"/> <Param name="Units" updates="None" val="deg" valType="str"/> <Param name="Use version" updates="None" val="" valType="str"/> - <Param name="Window size (pixels)" updates="None" val="[1600, 900]" valType="code"/> + <Param name="Window size (pixels)" updates="None" val="[1366, 768]" valType="code"/> <Param name="blendMode" updates="None" val="avg" valType="str"/> <Param name="color" updates="None" val="$[1,1,1]" valType="str"/> <Param name="colorSpace" updates="None" val="rgb" valType="str"/> @@ -191,7 +191,7 @@ <Param name="endPoints" updates="None" val="[0, 1]" valType="num"/> <Param name="isTrials" updates="None" val="True" valType="bool"/> <Param name="loopType" updates="None" val="sequential" valType="str"/> - <Param name="nReps" updates="None" val="20" valType="code"/> + <Param name="nReps" updates="None" val="150" valType="code"/> <Param name="name" updates="None" val="loop" valType="code"/> <Param name="random seed" updates="None" val="" valType="code"/> </LoopInitiator> diff --git a/three-back.py b/three-back.py index ee5549b27d43b15ff12c2ed98217ac2a92a9773d..3da3ce464f2e6e29713f4cb77ad6ee494bd14b13 100644 --- a/three-back.py +++ b/three-back.py @@ -1,8 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- """ -This experiment was created using PsychoPy3 Experiment Builder (v3.2.0), - on November 12, 2019, at 15:31 +This experiment was created using PsychoPy3 Experiment Builder (v3.2.4), + on November 15, 2019, at 12:50 If you publish work using this script the most relevant publication is: Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, Lindeløv JK. (2019) @@ -33,7 +33,7 @@ _thisDir = os.path.dirname(os.path.abspath(__file__)) os.chdir(_thisDir) # Store info about the experiment session -psychopyVersion = '3.2.0' +psychopyVersion = '3.2.4' expName = 'three-back' # from the Builder filename that created this script expInfo = {'participant': '', 'session': '001', 'backN': '3', 'probability': '0.2'} dlg = gui.DlgFromDict(dictionary=expInfo, sortKeys=False, title=expName) @@ -49,7 +49,7 @@ filename = _thisDir + os.sep + u'data/%s_%s_%s' % (expInfo['participant'], expNa # An ExperimentHandler isn't essential but helps with data saving thisExp = data.ExperimentHandler(name=expName, version='', extraInfo=expInfo, runtimeInfo=None, - originPath='D:\\Projects\\three-back\\three-back.py', + originPath='C:\\Users\\User\\Documents\\PROJECT_FOLDER\\three-back\\three-back.py', savePickle=True, saveWideText=True, dataFileName=filename) # save a log file for detail verbose info @@ -63,9 +63,9 @@ frameTolerance = 0.001 # how close to onset before 'same' frame # Setup the Window win = visual.Window( - size=[1600, 900], fullscr=False, screen=0, - winType='pyglet', allowGUI=True, allowStencil=False, - monitor='Alienware Laptop Monitor', color=[1,1,1], colorSpace='rgb', + size=[1366, 768], fullscr=True, screen=0, + winType='pyglet', allowGUI=False, allowStencil=False, + monitor='testMonitor', color=[1,1,1], colorSpace='rgb', blendMode='avg', useFBO=True, units='deg') # store frame rate of monitor if we can measure it @@ -117,6 +117,7 @@ globalClock = core.Clock() # to track the time since experiment started routineTimer = core.CountdownTimer() # to track time remaining of each (non-slip) routine # ------Prepare to start Routine "Instructions"------- +continueRoutine = True # update component parameters for each repeat instructions_key.keys = [] instructions_key.rt = [] @@ -134,7 +135,6 @@ t = 0 _timeToFirstFrame = win.getFutureFlipTime(clock="now") InstructionsClock.reset(-_timeToFirstFrame) # t0 is time of first possible flip frameN = -1 -continueRoutine = True # -------Run Routine "Instructions"------- while continueRoutine: @@ -206,7 +206,7 @@ for thisComponent in InstructionsComponents: routineTimer.reset() # set up handler to look after randomisation of conditions etc -loop = data.TrialHandler(nReps=20, method='sequential', +loop = data.TrialHandler(nReps=150, method='sequential', extraInfo=expInfo, originPath=-1, trialList=[None], seed=None, name='loop') @@ -225,6 +225,7 @@ for thisLoop in loop: exec('{} = thisLoop[paramName]'.format(paramName)) # ------Prepare to start Routine "trial"------- + continueRoutine = True routineTimer.add(2.000000) # update component parameters for each repeat if (currentLoop.thisN < int(expInfo['backN'])) or (np.random.uniform() > float(expInfo['probability'])): @@ -251,7 +252,6 @@ for thisLoop in loop: _timeToFirstFrame = win.getFutureFlipTime(clock="now") trialClock.reset(-_timeToFirstFrame) # t0 is time of first possible flip frameN = -1 - continueRoutine = True # -------Run Routine "trial"------- while continueRoutine and routineTimer.getTime() > 0: @@ -360,7 +360,7 @@ for thisLoop in loop: loop.addData('trial_resp.stopped', trial_resp.tStopRefresh) thisExp.nextEntry() -# completed 20 repeats of 'loop' +# completed 150 repeats of 'loop' # Flip one final time so any remaining win.callOnFlip()