Howdy, Stranger!

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

Supported by

[open] ISI with fixed intervals

edited September 2015 in OpenSesame

Hello
I want to present picture stimuli with different ISI. I used this inline script. The only thing is that I want the ISIs to be exactly 1000, 1500, 2000, and 2500.
Please could you kindly advice what on this case.

Thanks in advance,
Masoud

# Here we will determine the random duration between 1000 and 2500 ms:

# Import the Python module random:
# See also: http://docs.python.org/2/library/random.html
import random

# Use the function random.randint() to randomly draw
# an integer (i.e. a whole number) between a certain
# minimum and maximum.
# See also: http://docs.python.org/2/library/random.html#random.randint

# Set the minimum and maximum:
minimum = 1000
maximum = 2500

# Determine the ISI for the current trial like so:
ISI = random.randint(minimum, maximum)

# Set this variable for future use in the interface (and to log the variable
# in the logger item) like so:
# See also: http://osdoc.cogsci.nl/usage/variables-and-conditional-qifq-statements#inline
exp.set("ISI", ISI)

Comments

  • edited 12:50PM

    Hi Masoud,

    First of all, I took the liberty to edit your post a bit for better readability. I hope you don't mind.

    If you want the ISIs to be either 1000, 1500, 2000, or 2500, you better you use random.choice like so:

    ISI_options = [1000,1500,2000,2500]
    ISI = random.choice(ISI_options)
    

    Everything else stays the same. In case that you need counterbalanced ISIs, it might also be an option to multiply the list ISI_options with the amount of trials you need, shuffle it, and pop items from that list until it is empty:


    # assuming 28 trials ISI_options = [1000,1500,2000,2500]*7 random.shuffle(ISI_options) ISI =ISI_options.pop(0)

    I hope this is helpful.

    Good luck,

    Eduard

    Buy Me A Coffee

  • edited 12:50PM

    Dear Eudard
    Do apologize for the readability problem first. Thanks for the kind advice. Will do it now.

    Masoud

  • edited October 2015

    Hi again
    Thanks for your advice.
    Below is the amended inline script to set the ISI 1000, 1500, 2000 or 2500 ms.
    But there seems a problem in presenting stimulus in this stimuli intervals.

    I have added a sketchpad after the main one ( the one included the main stimuli) and the inline script but not sure if I need to specify the time in the Duration section.
    Please see the attached photos in the following link:
    http://img.cogsci.nl/?q=5612bfefc8f74

    Best,
    Masoud

    # Here we will determine the random duration between 400 and 600 ms:
    
    # Import the Python module random:
    # See also: http://docs.python.org/2/library/random.html
    import random
    
    # Use the function random.randint() to randomly draw
    # an integer (i.e. a whole number) between a certain
    # minimum and maximum.
    # See also: http://docs.python.org/2/library/random.html#random.randint
    
    # Set the minimum and maximum:
    minimum = 1000
    maximum = 2500
    
    # Determine the ISI for the current trial like so:
    ISI = random.randint(minimum, maximum)
    ISI_options = [1000,1500,2000,2500]
    ISI = random.choice(ISI_options)
    
    # Set this variable for future use in the interface (and to log the variable
    # in the logger item) like so:
    # See also: http://osdoc.cogsci.nl/usage/variables-and-conditional-qifq-statements#inline
    exp.set("ISI", ISI)
    
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