Skip to content
Snippets Groups Projects
Commit 6479b3f9 authored by Tibor Auer's avatar Tibor Auer
Browse files

ENH - practice

parent 4503e90c
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,9 @@ if __name__ == '__main__': ...@@ -43,7 +43,9 @@ if __name__ == '__main__':
('match type', ['single','multi']), # match type ("single" - ~Alekseichuk or "multi" - ~Berger) ('match type', ['single','multi']), # match type ("single" - ~Alekseichuk or "multi" - ~Berger)
('match number',1), # number of matches per sample ('match number',1), # number of matches per sample
('dedicated response period "?"', False), ('dedicated response period "?"', False),
('scanner mode', False), # Is it inside the scanner ('practice "?"', False), # practice run
('wait for scanner', False), # waits for scanner pulse
('button box', False), # uses button box
('stimulation', False), # Run tES ('stimulation', False), # Run tES
('trigger port', ['none']+listSerial()), ('trigger port', ['none']+listSerial()),
('stimulation intensity [mA]', 1) # desired intensity (mA) ('stimulation intensity [mA]', 1) # desired intensity (mA)
...@@ -57,14 +59,17 @@ if __name__ == '__main__': ...@@ -57,14 +59,17 @@ if __name__ == '__main__':
# Settings # Settings
Monitor = 'testMonitor' Monitor = 'testMonitor'
EMUL = not(expInfo['scanner mode']) # Is it outside the scanner EMUL = not(expInfo['wait for scanner']) # Is it outside the scanner
EMUL_BUTTONS = EMUL EMUL_BUTTONS = not(expInfo['button box'])
doSTIMULATION = expInfo['stimulation'] # Run tES doSTIMULATION = expInfo['stimulation'] # Run tES
# - timings # - timings
nDummies = 5 # [5] nDummies = 5 # [5]
conditionBlockJitterRange = [9, 11]# duration of rest between condition blocks conditionBlockJitterRange = [9, 11]# duration of rest between condition blocks
nConditionBlock = 12 # number of condition blocks [12] if expInfo['practice']:
nConditionBlock = 2
else:
nConditionBlock = 12 # number of condition blocks [12]
trialBlockJitterRange = [5, 7] # duration of rest between trialblocks trialBlockJitterRange = [5, 7] # duration of rest between trialblocks
nTrialBlock = 3 # number of trial blocks per condition block nTrialBlock = 3 # number of trial blocks per condition block
...@@ -271,7 +276,7 @@ if __name__ == '__main__': ...@@ -271,7 +276,7 @@ if __name__ == '__main__':
# - for multimonitor: # - for multimonitor:
# - set the external screen to primary # - set the external screen to primary
# - set screen=1 # - set screen=1
win = visual.Window([1280,1024],winType='pyglet',screen=1,monitor=mon,units='pix',fullscr=False, autoLog=False, gammaErrorPolicy='ignore') win = visual.Window([1280,1024],winType='pyglet',screen=1,monitor=mon,units='pix',fullscr=True, autoLog=False, gammaErrorPolicy='ignore')
win.mouseVisible = False win.mouseVisible = False
gridForm = visual.ElementArrayStim(win=win, name='gridForm', nElements=(gridXY+1)*2, sizes=[gridSize,2], xys = gridCoordinates, oris=gridAngles, units='pix', gridForm = visual.ElementArrayStim(win=win, name='gridForm', nElements=(gridXY+1)*2, sizes=[gridSize,2], xys = gridCoordinates, oris=gridAngles, units='pix',
elementTex=ones([16,16]), elementMask=ones([16,16]), colors=colour, colorSpace='rgb', autoLog=False) elementTex=ones([16,16]), elementMask=ones([16,16]), colors=colour, colorSpace='rgb', autoLog=False)
...@@ -295,8 +300,8 @@ if __name__ == '__main__': ...@@ -295,8 +300,8 @@ if __name__ == '__main__':
img = visual.ImageStim(win, image=infoImg[i], pos=[0, -325], size=[int(i*0.7) for i in [1280, 530]]) img = visual.ImageStim(win, image=infoImg[i], pos=[0, -325], size=[int(i*0.7) for i in [1280, 530]])
img.draw() img.draw()
win.flip() win.flip()
if EMUL == EMUL_BUTTONS: SSO.wait_for_button(timeout=inf) if not(EMUL_BUTTONS): SSO.wait_for_button(timeout=inf)
else: sleep(2) # EMUL but not EMUL_BUTTONS else: sleep(2)
######## WAIT FOR SYNCH ######## ######## WAIT FOR SYNCH ########
msg = visual.TextStim(win, text="Wait for scanner...", height=gridSize*0.1, wrapWidth=win.size[0], autoLog=False) msg = visual.TextStim(win, text="Wait for scanner...", height=gridSize*0.1, wrapWidth=win.size[0], autoLog=False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment