Avatar

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

eduard

About

Username
eduard
Joined
Visits
505
Last Active
Roles
Member, Moderator

Comments

  • That is what I meant with "there is no other delay". If you have a keyboard response following your stimulus you don't need to sleep. In fact, you can specify the duration inside they response item (the timeout field). Suppose you have a …
  • Hi Lena, I think so. clock.sleep just halts the experiment for as many milliseconds as you specified in the brackets. If you wouldnt include it (and there is no other delay in your experiment),your experiment would instantly continue and present t…
  • Hi, What have you tried. If you need help, please provide the code that causes the problem. Otherwise I can't really do much. (And please also a little video that I can try running!) Eduard
  • Hi Hannah, Yes, I am afraid you need to do some inline scripting. Following advice: 1) For video presentation, use OpenCV2: https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_gui/py_video_display/py_video_display.html It is a …
  • I suppose the reason is the run/prepare strategy of Opensesame: https://osdoc.cogsci.nl/3.2/manual/prepare-run/ I don't know what your code does, but some things take time, such as drawing onto a canvas. The more you draw the longer it takes. To fin…
  • Hi, Yes, for single keypress, use the the keyboard_response item. The response is stored in the variable var.response which you can then use to set conditions. If you have multi-character responses you should use the text input form: https://osdo…
  • Hi, You better test it directly like this: t0=clock.time() DlPortWritePortUchar(port,trigger) t1 = clock.time() var.duration = t1-t0 Otherwise there might be other processes that run in the background or things that also occur in these two inline_…
  • Hi Letizia, All the logger does is writing one line to the logfile with all variables that exist at that point. Therefore, you should add the logger there, where a trial ends in your design, so that you capture every response. Does that make sense?…
  • Hi, the dummy code could indeed cause these issues. Hard to tell though... But when you say the problem occurs only if an eyelink is installed on the machine, do you actually track the eyes or do you use the dummy mode? If dummy mode, does the prob…
  • Hi Georgia, You can put this inline_script as the first item into your trial loop (or last item). You can also just drag a sketchpad/feedback item in there, and set its run if field, to the count of the loop (similar to what you proposed above): […
  • Hi Ram, There are quite a few questions on co-routines on the forum. Some of which have working examples in them. You can use that for inspiration. The documentation that Daniel shared should also help a little. However, rereading your first post…
  • Hi, Are you sure the delay doesn't come from code before or after that line? How did you measure the delay? Normally sending things via the port is not taking a lot of time. Eduard
  • Hi Gilberto, I don't know whether this causes the issue that you describe, but you have basically a nested design: If the first question is answered with left, then ask a follow up on that, if that is answered with left again, ask another follow up…
  • Hi, I upload a file that shows an example block for one genre. So in a sequence, you can have multiple items. Start with the playback (duration =0!) and then add a sequence for all the stroop trials that you want to show. Does that make sense? Edu…
  • Hi, Try to make a separate loop for the third phase. So, something like this: Prime loop 1) Prime 2) fixdot 3) Lexical loop a) first word b) second word ... 4) Control Does that make sense? Eduard
  • Hi, The first problem is difficult to fix for several reasons. First, if python crashes, there is usually no informative error message, making debugging quite complicated. Second, the problem doesn't occur systematically. So, it is unlikely to be …
  • Hi Lena, The problem is in these lines: if var.subject_parity == 'even':    s.text(var.screen_dict['welcome'][var.sex])    s.show() resp, time = s_keyboard.get_key() s.clear() That you have in each block as first code executed. Specifically, Whet…
  • Hi Paul, Can you be a little more specific? What is the problem? The experiment you describe is quite simple in its basic set up (in fact not different from the beginner's tutorial on the Opensesame documentation. The only added element is the sam…
  • You can PM here in the forum.
  • Hi, I think the reason is that your while loop has a timeout of 3000 ms, but your response collection as well. Therefore, it could happen that the response collection finishes running, but the while loop has not yet finished, and the next response c…
  • Hi Paul, Without having seen your experiment, I think, the solution could be to start playing the music before you enter the loop that presents the words. Like that, the music is only started once, and plays until the block is over. trying to upl…
  • Hi, If your keyboard item runs as long as a keypress, then having the trigger sent right after, should be pretty accurate. If you want to make really sure that there is no delay, you can use Python code in an inline_script and sample response and s…
  • Hi Lena, does it mean that any variable defined in python script is accessible from other scripts? Yes, the var thing is only necessary to make variables available for Opensesame items (like a sketchpad), and for adding a variable to the logger. Bu…
  • Hi Syna, Opensesame has a function to measure the width and height of a text item. See here: https://osdoc.cogsci.nl/3.2/manual/python/canvas/#function-canvas46text95size40text-centertrue-max95widthnone-4242style95args41 So, if you measure your te…
  • Hi Elien, Your code used a little outdated syntax of Opensesame, by now things can be done a little easier (see my code below). Also, it is somewhat better to present the sketchpad in the inline_script itself, basically the same way you show the re…
  • Hi, My general advice is to take things step by step and break things up as far as possible. If you followed the tutorials you should get an idea of how Opensesame structures experiments (loop-sequence blocks). Every phase in your experiment seems…
  • Hi, The error message is a little hard to link to a particular part of script. I'm just guessing something here, but could it be that you shouldn't call pyaudio.PyAudio().terminate() before the end of the script? Could you try to figure out which p…
  • Hi, Can you share your experiment? I am very surprised that having a logger after every mouse response doesn't lead to different behaviour than having it only once at the end of the sequence. I would have expected this to have solved the issue. Bu…
  • Hi Greg, I am not sure how it works with forms, but what you describe sounds a lot like the typical issue of a prepare-run strategy mess up. Certain items are drawn during the prepare phase of a sequence, others during the run phase. The updating o…
  • Hi, You have to move the folders into the plugin folder of the Opensesame installation. Did you already do that? Have you followed the guidelines: https://osdoc.cogsci.nl/3.2/manual/environment/? Eduaard