Beispiel #1
0
        #check for quit (the [Esc] key)
        if event.getKeys(["escape"]): core.quit()
        #refresh the screen
        if continueRoutine:#don't flip if this routine is over or we'll get a blank screen
            win.flip()

    #end of routine instructions
    for thisComponent in instructionsComponents:
        if hasattr(thisComponent,"setAutoDraw"): thisComponent.setAutoDraw(False)


    #Start of routine trigger
    t=0; triggerClock.reset()
    frameN=-1
    try:
        rt = RT(filename+'.json')
    except:
        raise Exception("Have you started MURFI yet??")
 
    #update component parameters for each repeat
    key_resp_2 = event.BuilderKeyResponse() #create an object of type KeyResponse
    key_resp_2.status=NOT_STARTED

    #keep track of which have finished
    triggerComponents=[]#to keep track of which have finished
    triggerComponents.append(text)
    triggerComponents.append(key_resp_2)
    for thisComponent in triggerComponents:
        if hasattr(thisComponent,'status'): thisComponent.status = NOT_STARTED
    #start the Routine
    continueRoutine=True
Beispiel #2
0
    #Initialise components for routine:baseline
    baselineClock=core.Clock()
    text_3=visual.TextStim(win=win, ori=0, name='text_3',
        text='Rest',
        font='Arial',
        pos=[0, 0], height=0.1,wrapWidth=None,
        color='white', colorSpace='rgb', opacity=1,
        depth=0.0)
    
    from scripts.graph_base import GraphBase
    from scripts.feedback import ThermBase, get_target, get_feedback
    from scripts.xmlparse import RT
    import numpy as np
    try:
        rt = RT(filename[:-5]+'_run_%s'%expInfo['session']+'.json')
    except:
        raise Exception("Have you started MURFI yet??")
    
    run_num = 1

    #Initialise components for routine:stimulus
    stimulusClock=core.Clock()
    patch=visual.PatchStim(win=win, name='patch',
        tex='sin', mask=None,
        ori=0, pos=[0, 0.75], size=[0.25, 0.25], sf=None, phase=0.0,
        color=[1,1,1], colorSpace='rgb', opacity=1,
        texRes=128, interpolate=False, depth=0.0)
    text_5_fake=visual.TextStim(win=win, ori=0, name='text_5_fake',
        text='nonsense',
        font='Arial',