Howdy, Stranger!

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

Supported by

[open] Help is needed on the inline script for ISI

edited October 2015 in OpenSesame

Hi I am using the following script to present picture stimuli with different ISI but it not works. Can you please help on this issue. I supposed to have ISIs = 1000,1500,2000, and 2500.
The script is as follows:

import random minimum = 1000 maximum = 2500
ISI_options = [1000,1500,2000,2500]
ISI = random.choice(ISI_options)
exp.set("ISI", ISI)

Thanks in advance,
Masoud

Comments

  • edited 9:09AM

    Hi Masoud,

    This script should not give any problems. Do you get an error window? What does it say?

    And what are you trying to do? Where do you use ISI?

    Cheers,

    Josh

  • edited October 2015

    I have this inline script then a sketchpad included with the stimuli and a logger. This runs well when I add a # before minimum = 1000 maximum = 2500, but there is no difference in the ISIs as I can see the presentation of the trials.
    I need to know what to add to the Duration section in the Sketchpad. Shall I add a second sketchpad as a blank screen?
    When I have the # removed before minimum = 1000 maximum = 2500 the error windows says:
    Failed to compile inline script, code import random minimum=1000 maximum=2500

    Masoud

  • edited October 2015

    Hi Masoud, make sure that all your commands are on seperate lines when you use code. That means:

      import random
      minimum = 1000
      maximum = 2500
    

    instead of:

      import random minimum = 1000 maximum = 2500
    

    Also, I don't think you're using the variables minimum and maximum, so why not delete them entirely?

    Another reason that your problem arose is that when placing a '#' before that line, it's not used. Hence you haven't imported random, and therefore it can't pick a random choice from ISI_options. This is what you want:

       import random
       ISI_options = [1000,1500,2000,2500]
       ISI = random.choice(ISI_options)
       exp.set('ISI', ISI)
    

    In order to have ISI function as the duration of your sketchpad, insert [ISI] in the duration box (so with '[' and ']'!). Make sure that the sketchpad is placed after the inline_script; (because of course you have to create the variable before you use it). Let me know if there's still problems!

    Cheers,

    Josh

  • edited 9:09AM

    Thanks very much indeed! Works very well.
    One more thing is that I set the logger to collect all the possible data but it still not showing he RTs for keypress and the pressed key by participant. Is there anything I have to do care about?
    Masoud

  • edited 9:09AM

    Hi Masoud, good to hear that it works well. Everything that is created by the keyboard_response item should automatically be logged by the logger. Did you place the logger in the sequence? (for example right below to the keyboard response item).

    Cheers,

    Josh

  • edited 9:09AM

    Hi Josh
    I used the logger as the last item. I made a slight change in the design. Earlier, I used an inline script to randomize trials in terms of ISI (i.e., 1000, 1500, 2000 and 2500). As the number of presentation for a target (say red square) is not equal to the distractors (i.e., yellow circle) then it is hard to use the inline_script. Instead I added a column as presentation_time in the loop along with all the possible trials with necessary cycles (repeatations). Now the problem is that the logger cannot save the RTs maybe because the Timeout is set to 0. The order in the Loop is Stim (fixed 100 ms), a skechpad called ISI with the Duration=[presentation_time], a keyboard response and a logger. Can you please help to answer this request too?
    Masoud

  • edited 9:09AM

    Hi Masoud,

    This is actually quite a clever solution, you came up with.

    However, the problem with the logger is quite weird, though. Based on your description, it should work. How does the output look like? Are there no values at all, or missing data points? Are other variables saved properly? Could you maybe share the file with us?

    Thanks,

    Eduard

    Buy Me A Coffee

  • edited 9:09AM

    Thanks Eduard
    Please could you kindly see the afile in the following link?
    https://drive.google.com/file/d/0B8_DC1KRNsnQY19fcTJWWFNSVEU/view?usp=sharing
    Masoud

  • edited 9:09AM

    Alright, I am not entirely sure whether this will solve everything, but what you could do, is removing the ISI sketchpad and instead setting the duration of the keyboard_response to the value of [presentation_time]. Also, you might have to capitalize the nones and decapitalize the spaces in your loop table. Try it out and let us know whether this does the trick. Btw. on the opensesame documentation website, there are multiple example experiments. A few of them are quite a bit similar to yours. If you browse through them, you might find something that will help you with your experiment.

    Eduard

    Buy Me A Coffee

  • edited October 2015

    Hi Eduard
    Thanks for the advice on the capitalizing the words.
    By removing the ISI from the sketchpad, the 100 ms duration of the stimuli to be replaced by the ISI duration (i.e., 1000,1500, 2000 and 2500).
    I guess I still need more help to deal with this issue.

    Masoud

  • edited 9:09AM

    What do you mean by that? The duration of the stimuli should not be changed. They will still be shown for 100ms. Removing the ISIsketchpad and set the duration of the keyboard_response to the desired ISI, should also not change the appearance of the sequence, because in both cases the display stays empty for the same duration.
    Could you clarify what exactly the problem is now?

    Thanks,

    Eduard

    Buy Me A Coffee

  • edited 9:09AM

    Thanks Eduard
    This is the conjunctive performance test . After each trial, the screen must be changed into black and that is why a blank sketchpad was added with the name of ISI. Otherwise the 100 ms duration of the stimuli would be extended to the mentioned ISI in the loop for the keyboard_response, i.e., 1000, 1500, 2000 or 2500.
    Is there any method to have the stimulus presented exactly for 100 ms and then a blank screen with the duration changing in 1000, 1500, 2000 or 2500 ms. Of course adding a sketchpad with the mentioned ISI works well but the RTs are not logged after two consequent skethpads.

  • edited 9:09AM

    Ah. I see. Sorry for the misunderstanding. Well, in this case, you can leave the blank sketchpad but set its duration to 100ms or some arbitrary number smaller than 1000ms. Then in the duration of the keyboard_response you can set the time of it to the respective ISI minus 100. Alternatively, you can set those new values right away in the loop_table. So, instead of [1000,1500,2000,2500], you'll have [900,1400,1900,2400]. Does this make sense?

    Best,
    Eduard

    Buy Me A Coffee

  • Hello,

    I am trying to create an experiment where I have to vary the duration of multiple sketchpads which are being presented in a sequence under a loop. I used the the solution above and it worked. However, I do not know how to prevent a duration value used in one sketchpad from being repeated in the next sketchpad. Please help! :(

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