3/4/2023 0 Comments Psychopy not defined(( Tip! - You can include other columns and PsychoPy will record this data with each repetition in the output. Since we’re randomizing the words, the order of the rows does not matter. For each of the values of word, we’ll pick the corresponding correctAns: real words = 4 and fake words = 2. Open an excel document (or csv formatted text file) and make two columns: word and correctAns. Right now our PsychoPy experiment has no information about what to use when filling the variables, so we’ll have to give it that information. 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. Before the experiment I define in a code routine in the Begin experiment tab the following. 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”. The issue I am having lies in a variable not being recognized. 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. I’ve read on this forum cases of global versus local variable issues in PsychoJS but I haven’t found a solution.Next we’ll discuss using loops and trials with a practical example by making a lexical decision task. I’ve tried adding the code in my experimental loop. I’ve tried putting the JS code in the Before Experiment, Begin Routine, End Routine tabs of the initializing code routine. When I sync the experiment online to pavlovia, same thing, the experiment runs until the experimental loop, then i get the error: ReferenceError: listInput is not defined NameError: name 'listInput' is not defined When I use the JS code, the experiment runs until I get to my experimental loop, and then it crashes and I get the error trialList=data.importConditions(listInput), But after a while when click Sync, I receive this error: Traceback (most recent call last): File C:\Program. This works on Builder great, ONLY when I use the Python code. Hello all, When I change thisExp to psychoJS.experiment one by one in my custom code and sync, until a certain point can sync. e.g., participant 1m gets 1m.csv and so forth. This is so that based on the participant, a different. Later, in my experimental loop, in conditions I write $listInput. In JS: listInput = ((expInfo expInfo) ".csv") In python: listInput = expInfo expInfo '.csv' Before the experiment I define in a code routine in the Begin experiment tab the following: The issue I am having lies in a variable not being recognized. Hello all, I have an experiment I am doing in Builder and that I am subsequently putting online. Pavlovia run from Google Chrome v.141 (x86_64) In particular, in your first error message, it fails to find /Users/bencline/Desktop/Psychexp/Trials2095.xlsx. PsychoPy v2020.2.8, running on MacOS big sur v11.1. It reads your ExcelList in the outer loop but fails to find the filenames in ExcelList on your filesystem.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |