Howdy, Stranger!

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

Supported by

Tracking movements with Advanced Dummy in Visual World Experiment

Hi everyone,

I'm building a Visual World Experiment in OpenSesame (4.1.0) with a coroutine that plays a sound and shows 5 images, but i'm interested to test whether the participants looks at PIC4 at [160, –160] or PIC5 at [160, 96]), or both of them. I want to save this info in my final CSV file (I would love to see whether the PIC4 is watched (value = 1) or not (value = 0) in the columns of the CSV, every 100 ms (so I would like to have several columns, for ex. look_ROI1_000, look_ROI1_010 ecc...).

I'm using the Advanced Dummy tracker to simulate gaze, but I can’t manage to log gaze positions (or ROIs) every 100 ms — the CSV only shows the final ROI per trial.

Questions:

  1. Where exactly should I place the inline script that defines roi_analysis()?
  2. How can I make the dummy tracker log gaze every 100 ms instead of just once?
  3. Could the coroutine duration (default 5000 ms) interfere with gaze logging?

Here you find my experiment attached


Thanks a lot for your help!😍

Comments

  • edited October 18

    Hi @irenetognon

    I'm guessing you are building your experiment based on this page and this example experiment ?

    Honestly I’m not entirely sure what’s happening here; I have a few ideas, but I’d need to take a closer look to be sure.

    Could you share your full experiment file (with a few dummy images/audio files if needed)? That way, I can try running it on my side and see what’s going on.

    If you can't, I just have a quick question. If you comment out the code in your 'store_rois' inline script, does it still only log the final ROI per trial? I couldn't find a 'store_rois' inline script in the example experiment and I'm wondering whether it's overwriting what you previously did with the 'roi_analysis' inline script or whether it's the only source of data logging and whether the roi_analysis() function is never called at all...

    Let me know!

    Claire

  • edited October 19

    Hi @cvanbuck ! Thanks for replying <3 :) I went on with the experiment and in the meanwhile I found out this way of recording my cursor (Advanced Dummy mode), inserting one inline immediately before and one inline immediately after the coroutine... now it saves a CSV file, plus one final excel table (one is attached to give you an example, 'subj_1_trial_00_roi.csv'). Now, the problem is another... as you can see, in the excel there is 1 in every line of the column roi pic 5, while in reality I was moving the cursor all over the screen, so at least there should be 0 sometimes, and also 1 in roi pic 4. Do you have some idea of what's going on? I'm interested in detecting the gaze during the coroutine (which lasts 25000ms), so that i set the trial_duration in the firts inline at 25000ms. The experiment will have 15 trials per participant, so the recording + logging should happen 15 times... I don't know if I'm having a problem with the dummy, or with the moment in which the code starts recording...

    My intuition is that what appears in the file excel is JUST the very first gaze, it seems like the recorder is only recording and logging it in the output: in fact, my cursor during trial 00 (the one attached) was on roi pic5 at the very beginning, and then I started moving it durintg the trial, but in the final file only the value 1 appears and it just appears under the column 'roi pic5' cause it was the one on which the cursor was, but only at the very beginning...

  • Hi @cvanbuck

    Thanks a lot for replying, really <3 In the meanwhile, I went on with the experiment and I ended up preferring this setting: one inline script right before the coroutine that I want to record, and one inline script right after the coroutine. In this way, the result is one CSV file, and 1 excel for each trial, shwing which roi has been watched every 50ms.

    The problem now is another... it seems to me that the experiment is just recording where the cursor is at the VERY BEGINNING of the trial (let's say, the very first gaze). In fact, the excel file that you find attached here shows that apparently my cursor was on roi pic 5 for the whole trial, while it was on pic 5 just at the VERY VERY beginning, and after a few seconds I started moving it, but this is not shown in the final output. Any idea? Here you find some scripts and an example of excel file that I have after one trial. I really have no idea what's going on, and if once fixed the problem (if it's possible), it can also work with a real Tobii, not the Advanced Dummy I'm using now.


    Thanks a million!!!

    Irene

    ...


  • edited October 21

    Hi @irenetognon,

    Maybe try adding a few print() statements inside your custom functions to see where the issue might come from? (e.g. print(s), print(gx_c, gy_c), print("Inside second 'if' "), print(now, next_sample), etc. and inside your coroutine sequence as well (e.g. tracking the onset/offset of a stim) to know when and where everything is happening). That may help identify whether the recording function is running as expected.

    If you upload your experiment file (not just screenshots) here, I can try to reproduce the issue on my side and have a better chance of figuring out what’s going wrong.

    Let us know how it goes!

    Claire

  • Dear @cvanbuck ,

    thanks for reaching out :) I've finally found a way out, it was a problem of position of the inlines with respect to the coroutine + an issue of the coroutine duration. Unfortunately, I cannot upload the experiment here, it's too big :(

    I really appreciate your help,

    Irene 😀

  • Hi @irenetognon

    Glad it is working now! Thanks for the update.

    Cheers,

    Claire

Sign In or Register to comment.