Howdy, Stranger!

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

Supported by

Fixation duration + response collection

Hello (again)

I made an experiment a month back and have received great help. The experiment consists of phrases shown on a sketchpad (and inline scripts permitting me to measure individual reading time per phrase) followed by a multiple choice form (see CodeCB). I have read and reread the manuals and tutorials but I cannot find the answers to the questions below!

Firstly, I still do not have answers as to how to measure average response time, accuracy etc without a keyboard response item.
I understand that my logger doesn't actually log anything, but how is it possible, by means of Python, to add the response variables I so desperately need?

Secondly, after inserting the inline script measuring reading time,

my sketchpad item containing the fixation dot no longer stops after 500 ms! I have to press a key in order to remove it. It probably has something to do with the inline scripts, but I do not know how to change it.

And lastly, I would like to measure response time on the multiple choice form. I have set the duration to 10000ms (as the readers are non native) but afterwards it does not collect reaction time (beyond being able to respond within the limit).

I understand that there is a massive demand on your help, but I'll rather try my luck!

All the best,
Cat

Comments

  • I understand that my logger doesn't actually log anything, but how is it possible, by means of Python, to add the response variables I so desperately need?

    To make OpenSesame aware of Python variables, you have to assign them as properties of the var object, like so:

    var.RT_Syntagme_2 =t-t_on_Syntagme_2
    

    See also:

    my sketchpad item containing the fixation dot no longer stops after 500 ms! I have to press a key in order to remove it. It probably has something to do with the inline scripts, but I do not know how to change it.

    You say only what you don't want to happen! But what exactly do you want to happen?

    And lastly, I would like to measure response time on the multiple choice form. I have set the duration to 10000ms (as the readers are non native) but afterwards it does not collect reaction time (beyond being able to respond within the limit).

    Forms don't record response times. But you can simply insert another item after the form (say a blank sketchpad) and then determine the response time by subtracting the onset time of the form from the onset time of the sketchpad. Does that make sense?

    Cheers!
    Sebastiaan

  • Hello!

    Thank you! So far, I have understood the logic of python coding (I already tried the var.) but the problem was that I didn't know where to insert it! I tried to do like you said and just type var. before the code such as : It appears to be working!

    I still do not know where to type var.acc nor var.avg_rt though... This doesn't seem to work.

    As to the fixation dot, I would like it to last 500 ms! But as I have an inline script directly after (image below), I think it no longer acknowledges the duration of the sketchpad!

    And lastly, I do not really understand what you meant but this is what I tried to do:

    I created a sketchpad (named Time) after the multiple choice form (named Form) followed by an inline script and typed an approximative code : It obviously doesn't work..
    Programming is not my forte!

    Thanks again for the replies, you are all lifesavers!
    Cat

  • edited December 2016

    As to the fixation dot, I would like it to last 500 ms! But as I have an inline script directly after (image below), I think it no longer acknowledges the duration of the sketchpad!

    Right, because you first present a sketchpad for 500 ms, and then collect a key press in an inline_script (which will pause the experiment until a key is pressed). But if all you want is for the sketchpad to be shown for 500 ms, then you can just remove the inline_script altogether.

    I created a sketchpad (named Time) after the multiple choice form (named Form) followed by an inline script and typed an approximative code : It obviously doesn't work..

    No programming is required! If you look in the logfile, you will see time_[item name] columns with the timestamps of all items. And you can use those to subtract the onset of Form from the onset of Time.

    As a more general point, though: I think it's a good idea to take a step back, and first learn the basics of OpenSesame and Python code. Otherwise you will just go from question to question, getting stuck at each step along the way!

    The intermediate tutorial may be a good fit for you:

  • edited December 2016

    Hello,

    And thanks again!

    The Fixation dot sketchpad is stopped by the inline script, but one of your colleagues advised me to create this in order to measure reading times on each sketchpad named Syntagme_ 1, _2, _3 etc. How can I then remove it?
    But I seem to have plenty of reading/reaction times however...

    I do have the onset time for the sketchpad Time but not for the multiple choice form named Form

    Thanks for the advise regarding the tutorial ; I have read it all. But I am more of a "Python for dummies" kind of gal...

    Tusen takk!
    Cat

  • Hello again,

    I tried to create a sketchpad item (duration 0) before the Form just as I did after the Form and got this :

    If that is possible, it means that 8137ms - 5896ms = 2241ms represents reaction time on the first multiple choice form?

  • The Fixation dot sketchpad is stopped by the inline script, but one of your colleagues advised me to create this in order to measure reading times on each sketchpad named Syntagme_ 1, _2, _3 etc. How can I then remove it?

    The inline_script should follow an item if and only you want to collect a key press after it. So you can just delete the item (right click → delete) the inline_script after the Fixation item, because after the Fixation item you just want to wait 500 ms and then move on. Right? Does that make sense?

    If that is possible, it means that 8137ms - 5896ms = 2241ms represents reaction time on the first multiple choice form?

    Exactly.

  • Hello,

    And happy Christmas to all! I tried to remove the inline script under like you said (which I have put back in order to illustrate)
    but the test won't even run afterwards. When you say "delete it", do you mean the entire inline script or just part of the code?

    Thanks again for all your help! I'm nearly there :-)

  • Hi,

    You should remove that part of the code that is used to measure response times. If the inline_script does not do anything else than measuring response times, you can of course delete it entirely.

    but the test won't even run afterwards.

    What do you mean? Do you get an error message? Does nothing happen?

    Eduard

    Buy Me A Coffee

  • Hello!

    I have tried everything possible but I keep getting the error message
    The first inline script thus appears to be quite important. I also tried to remove individual codes ;
    kb = keyboard()
    k,t = kb.get_key()
    t_on_Syntagme_1 = clock.time()

    but I keep getting the same type of error message "___ is not defined". I understand that I can't just remove things without knowing the basics of Python, but I just don't get what I'm supposed to do!
    Sorry again!

    And happy new year :-)

    Cat

  • Hi Cat,

    Also to you a happy new year.

    The error message you see says that the variable kb does not exist. I don't know exactly how you wrote your code, but I suppose this line:

    kb = keyboard()
    

    you only use once in the first inline_script that you removed by now. Can you confirm? This line is important, because it initializes a connection to the keyboard which you need to make your experiment react to keypresses. If kb does not exist, every time you call kb.get_key(), or any other keyboard functions, Opensesame is not able to find the keyboard and crashes.

    So, probably you should restore the first inline_script and remove all the lines, except kb = keyboard(), or add this line to the next inline_script (new_inline_script_3, I believe).

    Good luck,

    Eduard

    Buy Me A Coffee

  • edited January 2017

    Hello,

    Yes, this was the code you helped me with earlier this year. "kb = keyboard()" is used only in the first script as shown under (code used in the first two inline scripts).

    define inline_script new_inline_script_2
        set description "Executes Python code"
        ___run__
        kb = keyboard()
        k,t = kb.get_key()
        t_on_Syntagme_1 = clock.time()
        __end__
        set _prepare ""
    
    define inline_script new_inline_script_3
        set description "Executes Python code"
        ___run__
        k,t = kb.get_key()
        var.RT_Syntagme_1 =t-t_on_Syntagme_1
        t_on_Syntagme_2 = clock.time()
        __end__
        set _prepare 
    

    I have already tried all of the above and I always get an error message. I get that you have to command the use of the keyboard for all the other sketchpads, but that doesn't count for the first which is supposed to last only for 500 ms.

    What I am trying to do is simply to get the sketchpad Fixation to last only 500 ms and to ignore the inline script directly after which includes the codes "kb = keyboard()" and "k,t = kb.get_key()". Whichever way I try to fix it, it just won't work without the first inline script.

    If all else fails, I'll just remove the fixation mark all together!

    Cat

  • Hi cat,

    the thing that causes the halt of the experiment is not kb = keyboard(), but k,t = kb.get_key(). You have to remove only the latter to avoid the experiment from pausing, or replace it with a clock.sleep(500), if you want it to sleep for 500 ms. Does this make sense?

    Eduard

    Buy Me A Coffee

  • Yeeeeeeeeeeeesss!! Eureka!!!!

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games