Beispiel #1
0
 def __init__(self, parent, blockData, pics):
     self.myParent = parent
     self.myBlockData = blockData
     self.myPics = pics
     self.myBlockData['block_num'] = self.myBlockData['block_num'] + 1
     self.blockLabelText = ("Block #: " + str(self.myBlockData['block_num']) + " of 2")
     self.container1 = Frame(parent, style="Card.TFrame")
     self.container1.rowconfigure(0, minsize = misc.getHeight(parent) * 0.8)
     self.container1.rowconfigure(1, minsize = misc.getHeight(parent) * 0.2)
     self.container1.grid()
     self.blockLabel = Label(self.container1, text=self.blockLabelText, style="Card.TLabel")
     self.blockLabel.grid(column=0, row=0)
     self.toChoice = Button(self.container1, text="Press to start block", width=misc.getButtonWidth(parent))
     self.toChoice.bind("<Button-1>", self.toChoiceCallback)
     self.toChoice.grid(column=0, row=1, sticky=(N, E, W, S))
Beispiel #2
0
 def __init__(self, parent, blockData, pics, trialNum, possibleTimes=[], picQueue = []):
     self.myParent = parent
     self.myBlockData = blockData
     self.currTrialData = {"exp_id" : self.myBlockData["exp_id"], "block_num" : self.myBlockData["block_num"]} #and then insert everything else afterwards
     self.currTrialData['pic_id'] = -1 #to catch mistakes
     self.myPics = pics
     self.numTrials = 49 #it always does one more than this number
                         #everything else works fine, so go with 49
     self.numSixes = 18
     self.numOthers = 7 
     self.picqueue = []
     if (not picQueue):
         self.picqueue = self.formPicQueue(self.myPics)
     else:
         self.picqueue = picQueue
     self.possibleTimes = possibleTimes 
     self.thisTrial = trialNum
     self.visState = 0
     self.currAfter = None
     self.container1 = Frame(parent)
     self.container1.rowconfigure(1, minsize=misc.getHeight(parent))
     self.container1.grid()
     self.picLabel = Label(self.container1)
     self.feedbackLabel = Label(self.container1, style="Inversed.TLabel")
     self.choice1 = Button(self.container1, text="Yes", width=misc.getButtonWidth(parent) / 2)
     self.choice2 = Button(self.container1, text="No", width=misc.getButtonWidth(parent) / 2)
     self.cycleVis()
Beispiel #3
0
 def __init__(self, parent, blockData, pics):
     self.myParent = parent
     self.myBlockData = blockData
     self.myPics = pics
     self.container1 = Frame(parent, style="Card.TFrame")
     self.container1.rowconfigure(0, minsize=misc.getHeight(parent) * 0.75)
     self.container1.rowconfigure(1, minsize=misc.getHeight(parent) * 0.05)
     self.container1.rowconfigure(2, minsize=misc.getHeight(parent) * 0.2)
     self.container1.grid()
     self.container2 = Frame(self.container1, style="Card.TFrame")
     self.container2.configure(padding = (misc.getWidth(parent) * 0.12, misc.getHeight(parent) * 0.12, 0, 0))
     self.container2.grid()
     self.mainLabel = Label(self.container2, text="Welcome to the experiment.\n\nThis is a change detection task. You will see two images presented one after another.\n\nIn each image, there will be several colored squares scattered over the entire image.\n\nSometimes one of the squares will change in color from the 1st image to the 2nd image.\n\nPress the YES button if there is such a change, and press the NO button if there is no change.\n\nYou will receive feedback on whether your judgement is correct or incorrect. Try to be as accurate as possible.\n\nAfter the feedback, the next trial will start immediately. There will be 100 such trials, broken into two blocks. You can take a break\n\nafter the first block.\n\n\nEnter your Mechanical Turk ID below.", style='MainLabel.TLabel')
     self.mainLabel.grid(column=0, row=0, sticky=(N, W, E))
     self.mTurkText = Entry(self.container1)
     self.mTurkText.grid(column = 0, row=1)
     self.toBlock = Button(self.container1, text="Press to start game", width=misc.getButtonWidth(parent))
     self.toBlock.focus_force()
     self.toBlock.bind("<Button-1>", self.toBlockClick)
     self.toBlock.grid(column=0, row=2, sticky=(N, W, E, S))