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

RC - multiblock

parent f6ca2d97
No related branches found
No related tags found
No related merge requests found
...@@ -90,7 +90,6 @@ if __name__ == '__main__': ...@@ -90,7 +90,6 @@ if __name__ == '__main__':
'frequency': 10, 'frequency': 10,
'phase': 0, 'phase': 0,
'duration': 'duration':
-array(trialBlockJitterRange).mean()+ # do not stimulate during first ISI_trialBlock
nTrialBlock*( nTrialBlock*(
array(trialBlockJitterRange).mean()-array(sampleJitterRange).mean()+ array(trialBlockJitterRange).mean()-array(sampleJitterRange).mean()+
nSample*( nSample*(
...@@ -109,7 +108,7 @@ if __name__ == '__main__': ...@@ -109,7 +108,7 @@ if __name__ == '__main__':
'samplingRate': 2000, 'samplingRate': 2000,
} }
phaseDiff = 0 # phase of thes second channel phaseDiff = 0 # phase of thes second channel
frequencies = [0,5,10,20,60] # x5 frequencies frequencies = [0,5,10] #,20,60] # x5 frequencies
gridSize = 600 # width and height of the grid gridSize = 600 # width and height of the grid
gridXY = expInfo['grid size'] # number of cells per axis -> number of cells = gridXY**2 gridXY = expInfo['grid size'] # number of cells per axis -> number of cells = gridXY**2
...@@ -259,7 +258,7 @@ if __name__ == '__main__': ...@@ -259,7 +258,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=True, autoLog=False, gammaErrorPolicy='ignore') win = visual.Window([1280,1024],winType='pyglet',screen=1,monitor=mon,units='pix',fullscr=False, 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)
...@@ -310,7 +309,7 @@ if __name__ == '__main__': ...@@ -310,7 +309,7 @@ if __name__ == '__main__':
for thisConditionBlock in loopConditionBlock: for thisConditionBlock in loopConditionBlock:
# Rest # Rest
if thisConditionBlock.thisTrialN == 0: trialClock.reset() if loopConditionBlock.thisTrialN == 0: trialClock.reset()
else: trialClock.reset(-interimClock.getTime()) else: trialClock.reset(-interimClock.getTime())
restStim.status = NOT_STARTED restStim.status = NOT_STARTED
...@@ -373,10 +372,12 @@ if __name__ == '__main__': ...@@ -373,10 +372,12 @@ if __name__ == '__main__':
win.logOnFlip(level=logging.EXP, msg='Rest - STOPPED') win.logOnFlip(level=logging.EXP, msg='Rest - STOPPED')
# Stimulation # Stimulation
if doSTIMULATION and thisTrialBlock.thisTrialN == 0: if doSTIMULATION and loopTrialBlock.thisTrialN == 0:
if thisConditionBlock['frequency']: if thisConditionBlock['frequency']:
wave1.frequency = thisConditionBlock['frequency'] wave1.frequency = thisConditionBlock['frequency']
wave2.frequency = thisConditionBlock['frequency'] wave2.frequency = thisConditionBlock['frequency']
wave1.duration = wave1.duration - thisTrialBlock['onsetTrialBlock'] # do not stimulate during first ISI_trialBlock
wave2.duration = wave2.duration - thisTrialBlock['onsetTrialBlock'] # do not stimulate during first ISI_trialBlock
BSO.initialize() BSO.initialize()
BSO.loadWaveform([wave1, wave2]) BSO.loadWaveform([wave1, wave2])
BSO.stimulate() BSO.stimulate()
......
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