def init(self):
        MostBasicPsychopyFeedback.init(self)
        self.caption = "EEG - fMRI Localizer"
        self.color = [0, 0, 0]
        self.fontheight = 200

        self.MONITOR_PIXWIDTH = 1440
        self.MONITOR_PIXHEIGHT = 900
        self.MONITOR_WIDTH = 40.  # width of screen
        self.MONITOR_HEIGHT = 30.  # height of screen
        self.MONITOR_DISTANCE = 70.  # distance to screen
        self.MONITOR_GAMMA = 1.
        self.MONITOR_FPS = 60.
        self.MONITOR_USEDEGS = True
        self.MONITOR_DEGS_WIDTHBASE = 25
        self.MONITOR_DEGS_HEIGHTBASE = 20
        self.MONITOR_FLIPHORIZONTAL = False
        self.MONITOR_FLIPVERTICAL = False

        self.MONITOR_NSCREENS = 1
        self.MONITOR_DISPLAYONSCREEN = 1
        self.MONITOR_FULLSCR = False
        self.MONITOR_ALLOWGUI = True

        self.LOGDIR = 'log'  # for if you want to change this...
        self.LOGFILEBASE = 'efl'  # how to call our logfile --> it adds a number each time
        self.IPADDRESS = 'localhost'  # port and ip to send codes towards to
        self.PORT = 6050  # which port is nice?
        self.BUTTONS = ['lctrl', 'rctrl'
                        ]  # the button codes coming out of event.getStim()
        self.tooSoonTime = 0.0  # if it's pressed before this time --> discard + error
        self.LPT_TRIGGER_WAIT = 0.005  # how long are the LPT port pulses?
        self.RECORDFRAMEINTERVALS = True  # for debugging..
        self.DO_VISUAL = True
        self.DO_AUDIO = True
        self.DO_GNG = True
        self.GNGSPEED = 1.0
        self.GNG_ARROWGOESRED = False
        self.AUDIOTONE_ERROR_COMMISSION = False
        self.AUDIOTONE_STOP = True
        self.VIS_SHOWOPPOSITE = False
        self.VIS_radialFreq = 6
        self.VIS_angleFreq = 6
        self.VIS_checkerSize = 1.5
        self.VIS_checkerSpeedMultiplier = 1.0
        self.EYESCLOSED_TIME = 25.

        self.EVENT_destip = '127.0.0.1'
        self.EVENT_destport = 6050
        self.EVENT_LPTAddress = 0x0378
        self.EVENT_LPTTrigWaitTime = 0.005
        self.EVENT_TRIGLOG = 'log/triggerlog.log'
        self.EVENT_sendParallel = True
        self.EVENT_sendTcpIp = True
        self.EVENT_sendLogFile = True
        self.EVENT_printToTerminal = True
        self.EVENT_printToTerminalAllowed = range(
            256)  # only allow the stops, which are < 40.

        self.INSTR = 'Remember, respond as FAST as you can once you see the arrow.\n\n' + 'However, if you hear a beep, your task is to STOP yourself ' + 'from pressing.\n\n' + 'Stopping and Going are equally important.'
示例#2
0
    def init(self):
        MostBasicPsychopyFeedback.init(self)
        self.caption = "EEG - fMRI Localizer"
        self.color = [0, 0, 0]
        self.fontheight = 200

        self.STARTKEYS = ['return', 't']  # handy for the fmri

        self.EX_THRLINEWIDTH = 2
        self.EX_COLORGAP = 1
        self.EX_TVSP = 0.4
        self.EX_TPAUSE = 0.5
        self.EX_NREGULATE = 30
        self.EX_NTRANSFER = 10

        self.EX_SHOWCHECKORCROSS = True
        self.EX_SHOWCHECKORCROSSTRANSFER = True
        self.EX_SHOWPOINTS = True

        self.EX_SQUARESIZE = 0.25
        self.EX_UPREGTEXT = 'regulate up'
        self.EX_TESTSIGNALUPDATEINTERVAL = 0.01
        self.EX_NREST = 10
        self.EX_SCALING = [0.75, 0.75]  # scaling for X and Y
        self.EX_INTERACTIONMODE = 'master'  # the stimulus does already quite a lot
        self.EX_NOBSERVE = 10
        self.EX_NOREGTEXT = 'do not regulate'
        self.EX_TINSTR = 2.0
        self.EX_THERMOCLIMS = ['c4572e', '4fc42e']
        self.EX_GRAPHICSMODE = 'line'
        self.EX_STAIRCASEMANIPULATION = 'offset'
        self.EX_POINTS_PENALTY = -2
        self.EX_TESTSIGNALPERIOD = 4
        self.EX_TMARK = 1.5
        self.EX_TESTNFNOISE = True
        self.EX_PATCHCOLOR = 'green'
        self.EX_TJITT = [0.8, 1.3]
        self.EX_TFB = 12.0
        self.EX_POINTS_REWARD = 10
        self.EX_PR_SLEEPTIME = 0.01
        self.EX_TESTSIGNALTYPE = 'sin'
        self.EX_BUTTONS = ['lctrl', 'rctrl'
                           ]  # the button codes coming out of event.getStim()
        self.EX_INSTR = 'Upregulate: Focus on moving upwards / more green'
        self.EX_RUNS = 5  # how many runs-of-6?
        self.EX_EV_IGNORE_KEYS = ['5', 't']

        self.EX_SND_LOWESTTONE = 27
        self.EX_SND_HIGHESTTONE = 48
        self.EX_EMG_THERMOWIDTH = 0.075
        self.EX_EMG_THERMOHEIGHT = 0.2
        self.EX_EMG_THERMOEDGE = 0.05
        self.EX_TXT_COUNTER = [0]

        # so these are NOW control parameters:
        self.EX_TUNING_TYPE = 'thr'  # alternatives are 'linear', and maybe 'fancy'
        self.EX_TUNING_PARAMS = [
            1.0, 0.0
        ]  # linear requires a slope and offset. - eill not be used if it's not 'linear'
        self.EX_WIN_CONDITION = 'time_above_thr'
        self.EX_WIN_PARAMS = [
            0.25
        ]  # 25 % of the time, it needs to be above the threshold...
        self.EX_NUMBEROFSETS = 6  # how long (sets of 6) do we wish our experiment to have?? Determines also our staircases.
        self.EX_MIXOFSETS = {
            'train': 3,
            'transfer': 1,
            'observe': 1,
            'rest': 1
        }
        self.EX_STAIRIDENTIFIER = '0001'  # needed to keep track of the staircases.
        self.EX_XorV_RESET_POINTS = False  # at the start of the day --> this should be True.

        self.LOG_PATHFILE = 'log/bwt.log'  # for if you want to change this...
        self.LOG_PATHFILE_EVENT = 'log/evsbwt.log'  # for if you want to change this...

        # take care of our monitor-screen-display...
        self.MONITOR_PIXWIDTH = 1280
        self.MONITOR_PIXHEIGHT = 1024
        self.MONITOR_WIDTH = 40.  # width of screen
        self.MONITOR_HEIGHT = 30.  # height of screen
        self.MONITOR_DISTANCE = 70.  # distance to screen
        self.MONITOR_GAMMA = 1.
        self.MONITOR_FPS = 60.
        self.MONITOR_USEDEGS = True
        self.MONITOR_DEGS_WIDTHBASE = 12
        self.MONITOR_DEGS_HEIGHTBASE = 10
        self.MONITOR_FLIPHORIZONTAL = False
        self.MONITOR_FLIPVERTICAL = False
        self.MONITOR_RECORDFRAMEINTERVALS = True  # for debugging..
        self.MONITOR_NSCREENS = 2
        self.MONITOR_DISPLAYONSCREEN = 1
        self.MONITOR_FULLSCR = False
        self.MONITOR_ALLOWGUI = False

        self.SND_LOWESTTONE = 27
        self.SND_HIGHESTTONE = 48

        # self.LOG_FILEBASE='efl'  # how to call our logfile --> it adds a number each time
        # self.IPADDRESS='localhost'  # port and ip to send codes towards to
        # self.PORT=6050  # which port is nice?

        # self.tooSoonTime=0.0  # if it's pressed before this time --> discard + error

        self.EVENT_LPT_TRIGGER_WAIT = 0.005  # how long are the LPT port pulses?
        self.EVENT_destip = '127.0.0.1'
        self.EVENT_destport = 6050
        self.EVENT_LPTAddress = 0x0378
        self.EVENT_LPTTrigWaitTime = 0.005
        self.EVENT_TRIGLOG = 'log/triggerlog.log'
        self.EVENT_sendParallel = True
        self.EVENT_sendTcpIp = True
        self.EVENT_sendLogFile = True
        self.EVENT_printToTerminal = True
        self.EVENT_printToTerminalAllowed = [
            0, 255
        ]  # only allow the stops, which are < 40.

        # Control Parameters
        CP = dict()
        CP['nfsignalContainer'] = [0]
        CP['thrContainer'] = [0.5]
        CP['TJITT'] = [1]
        CP['CURRENTPART'] = [None]
        CP['instruction'] = 'arrowup'  # choose between 'arrowup' and 'donotreg'
        CP['corr_incorr'] = [
            None
        ]  # chooose between 'st_correct' and 'st_incorrect'
        CP['TUNING_TYPE'] = self.EX_TUNING_TYPE  # ']  # copy/paste into CP, to be (changed) later during the experiment...
        CP['TUNING_PARAMS'] = self.EX_TUNING_PARAMS  #']  # same here -- but, it is a list.
        CP['TrialType'] = [None]
        CP['WIN_CONDITION'] = self.EX_WIN_CONDITION
        CP['WIN_PARAMS'] = self.EX_WIN_PARAMS
        CP['EX_TXT_COUNTER'] = self.EX_TXT_COUNTER

        CP['hitError'] = []
        CP['hit'] = []
        CP['emgThrContainer'] = [None]
        CP['emgContainer'] = [None]

        self.CP = CP
    def init(self):
        MostBasicPsychopyFeedback.init(self)
        self.caption = "EEG - fMRI Localizer"
        self.color = [0, 0, 0]
        self.fontheight = 200

        self.STARTKEYS = ['return', 't']  # handy for the fmri

        self.EX_THRLINEWIDTH = 2
        self.EX_COLORGAP = 1
        self.EX_TVSP = 0.4
        self.EX_TPAUSE = 0.5
        self.EX_NREGULATE = 30
        self.EX_NTRANSFER = 10
        self.EX_SHOWCHECKORCROSSTRANSFER = True
        self.EX_SQUARESIZE = 0.25
        self.EX_UPREGTEXT = 'regulate up'
        self.EX_TESTSIGNALUPDATEINTERVAL = 0.05
        self.EX_NREST = 10
        self.EX_SCALING = [0.75, 0.75]  # scaling for X and Y
        self.EX_INTERACTIONMODE = 'master'  # the stimulus does already quite a lot
        self.EX_NOBSERVE = 10
        self.EX_NOREGTEXT = 'do not regulate'
        self.EX_TINSTR = 2.0
        self.EX_THERMOCLIMS = ['c4572e', '4fc42e']
        self.EX_GRAPHICSMODE = 'line'
        self.EX_SHOWCHECKORCROSS = True
        self.EX_STAIRCASEMANIPULATION = 'offset'
        self.EX_POINTS_PENALTY = -2
        self.EX_TESTSIGNALPERIOD = 4
        self.EX_TMARK = 1.5
        self.EX_TESTNFNOISE = True
        self.EX_PATCHCOLOR = 'green'
        self.EX_TJITT = [0.8, 1.3]
        self.EX_TFB = 12.0
        self.EX_POINTS_REWARD = 10
        self.EX_PR_SLEEPTIME = 0.01
        self.EX_TESTSIGNALTYPE = 'sin'
        self.EX_BUTTONS = ['lctrl', 'rctrl'
                           ]  # the button codes coming out of event.getStim()
        self.EX_INSTR = 'Upregulate: Focus on moving upwards / more green'
        self.EX_RUNS = 5  # how many runs-of-6?

        self.LOG_PATHFILE = 'log/bwt.log'  # for if you want to change this...
        self.LOG_PATHFILE_EVENT = 'log/evsbwt.log'  # for if you want to change this...

        # take care of our monitor-screen-display...
        self.MONITOR_PIXWIDTH = 1280
        self.MONITOR_PIXHEIGHT = 1024
        self.MONITOR_WIDTH = 40.  # width of screen
        self.MONITOR_HEIGHT = 30.  # height of screen
        self.MONITOR_DISTANCE = 70.  # distance to screen
        self.MONITOR_GAMMA = 1.
        self.MONITOR_FPS = 60.
        self.MONITOR_USEDEGS = True
        self.MONITOR_DEGS_WIDTHBASE = 12
        self.MONITOR_DEGS_HEIGHTBASE = 10
        self.MONITOR_FLIPHORIZONTAL = False
        self.MONITOR_FLIPVERTICAL = False
        self.MONITOR_RECORDFRAMEINTERVALS = True  # for debugging..
        self.MONITOR_NSCREENS = 2
        self.MONITOR_DISPLAYONSCREEN = 1
        self.MONITOR_FULLSCR = False
        self.MONITOR_ALLOWGUI = False

        # self.LOG_FILEBASE='efl'  # how to call our logfile --> it adds a number each time
        # self.IPADDRESS='localhost'  # port and ip to send codes towards to
        # self.PORT=6050  # which port is nice?

        # self.tooSoonTime=0.0  # if it's pressed before this time --> discard + error

        self.EVENT_LPT_TRIGGER_WAIT = 0.005  # how long are the LPT port pulses?
        self.EVENT_destip = '127.0.0.1'
        self.EVENT_destport = 6050
        self.EVENT_LPTAddress = 0x0378
        self.EVENT_LPTTrigWaitTime = 0.005
        self.EVENT_TRIGLOG = 'log/triggerlog.log'
        self.EVENT_sendParallel = True
        self.EVENT_sendTcpIp = True
        self.EVENT_sendLogFile = True
        self.EVENT_printToTerminal = True
        self.EVENT_printToTerminalAllowed = [
            0, 40
        ]  # only allow the stops, which are < 40.

        # Control Parameters
        CP = dict()
        CP['nfsignalContainer'] = [0]
        CP['thrContainer'] = [0.5]
        CP['TJITT'] = [1]
        CP['CURRENTPART'] = [None]
        CP['instruction'] = 'arrowup'  # choose between 'arrowup' and 'donotreg'
        CP['corr_incorr'] = 'st_incorrect'  # chooose between 'st_correct' and 'st_incorrect'

        self.CP = CP