p.printhistogram = False # display on how many screens? p.nscreens = 2 # set up wheel encoder (NIDAQ Device, Vin, Vsig) p.encoder = Encoder(1,1,2) # set up terrain? [possible orientations], correct orientation] p.terrain = Terrain(['color','orientation']) # define terrain parameters p.terrain.oriarray = [0,45] p.terrain.oricorrect = 0 p.terrain.color = p.terrain.white #initial color state p.terrain.correctfreq = 1 #(0-1) p.terrain.orientation = 45 # starting orientation p.terrain.lapdistance = 1920 # distance in pixels between stimuli (should be wider than screen) p.terrain.windowwidth = 200 # size in pixels of "correct" region p.terrain.selectiontime = 30 # in frames p.terrain.speedgain = 5 # pixels/degree p.terrain.colorrandom = True #randomize the stimulus color p.terrain.colormatters = True #does the correct color matter p.terrain.colorcorrect = p.terrain.black #what is the correct color p.terrain.objectwidthDeg = 25 #width of the object in degrees #set up reward (NIDAQ device, port for DO, lines, rewardline) p.reward = Reward(1,1,4,0) #define reward paramters p.reward.rewardtime = 0.03 e = ManBar(script=__file__, # this script's file name params=p) # create a ManBar experiment e.run() # run it
# set up terrain? [trainingtypes] for example ["color"] s.terrain = Terrain(["color", "orientation"]) # define terrain parameters s.terrain.color = s.terrain.white #(0-1) starting color s.terrain.correctfreq = 1 #(0-1) s.terrain.orientation = 0 # starting orientation s.terrain.lapdistance = 3500 # distance in pixels between stimuli (should be wider than screen) s.terrain.windowwidth = 200 # size in pixels of "correct" region s.terrain.selectiontime = 5 # in frames s.terrain.speedgain = 4 # no units s.terrain.colorrandom = True #randomize the stimulus color s.terrain.colorcorrect = s.terrain.black #what is the correct color s.terrain.objectwidthDeg = 23 #width of the object in degrees #set up reward (NIDAQ device, port for Digital Out, number of lines, rewardline) s.reward = Reward('Dev2',1,0) #define reward paramters s.reward.rewardtime = 0.03 #=============================================================================== # Dynamic parameters can potentially vary from one sweep to the next. If a dynamic parameter # is assigned multiple values in a sequence, it's treated as a Variable, and has to be added to # this Experiment's Variables object #=============================================================================== # grating orientation relative to orioff (deg) d.ori = range(0, 360, 45) # grating x position relative to origin (deg) d.xposDeg = 0 # grating y position relative to origin (deg) d.yposDeg = 0