![]() Make sure to use a button box for your actual experiment! However, you cannot capture reliable reaction time data with these inputs because of their inherent latency. NOTE: If you don’t have access to the button boxes in the lab, you can use a keyboard or mouse component instead for testing purposes. To do this, check the “Store correct” box and add “$rrectAns” to the Correct Answer $ field. We also want to store information about whether or not the participant responded correctly. Make sure that “Force end of routine” is checked. On our button boxes, 2 references the red button and 4 references the green button. Change Stop – duration (s) field to blank and change the Allowed keys $ field to “2,4”. Next, we’ll add a Cedrus Button Box component to measure the response time (Make sure you’ve followed the instructions for adding the Button Box extension if you’re running it for the first time!). Strings beginning with a “$” are variables and since we’ve changed “constant” to “set every repeat”, the variable will be updated every repeat. The important step in this process is to add “$word” to the text field and change the “constant” in the drop-down window beside the text field to “set every repeat”. In the trial routine, add a text component with a blank stop duration. This is the template that each of the individual repetitions will be made from. Instead, we’ll utilize loops.įirst, we’ll make the baseline routine which we’ll call “trial”. In theory we could randomize the list ourselves and then create individual routines for each word, but that would quickly become tedious and not easily replicable. Let’s also imagine that we only have 10 test words: 5 real (blue, green, yellow, red, orange) and 5 fake (thorpt, rairn, coan, flatch, meeg). In most cases, the task of reacting to the fake words is actually a ruse, and what the investigator is interested in is actually the differences in response time among the real world stimuli.įor the current example, let’s just imagine that we’re only interested in the difference between reaction time for the real and fake words. In a lexical decision task, participants are often presented written word stimuli and asked to determine if they are real words or fake words. This seems more indicative of the underlying problem, but I'm still not sure how to proceed from here.Next we’ll discuss using loops and trials with a practical example by making a lexical decision task. TrialList=data.importConditions(eval(ExcelList)), File "", line 1, in NameError: name 'Trials_20_95' is not If I try instead writing $eval(ExcelList) I am presented with the following error: It would appear that the inner loop is not finding the condition in the outer loop (or not reading the outer loop altogether). Users/bencline/Desktop/Psychexp/Trials_20_95.xlsx Raise ImportError('Conditions file not found: %s' %os.path.abspath(fileName)) ImportError: Conditions file not found: TrialList=data.importConditions(ExcelList), File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/data.py", However, I am instead presented with the following error:įile "/Users/bencline/Desktop/Psychexp/NegPriming2080_lastrun.py", ![]() As I understand it, the command for $ExcelList should access the conditions file in the outer loop and pull one of the files containing stimuli positions for that trial. The inner loop, which dictates each trial, attempts to call these files at random by entering $ExcelList into the space asking for a conditions file. My outer loop has a variable, ExcelList, which has the previously mentioned file names listed under it. In my task, I have a number of files that dictate the position of stimuli. I am a bit new to PsychoPy and Python coding, so please excuse my question if it is basic. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |