[open] ISI with fixed intervals
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
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.choicelike so:Everything else stays the same. In case that you need counterbalanced ISIs, it might also be an option to multiply the list
ISI_optionswith the amount of trials you need, shuffle it, and pop items from that list until it is empty:I hope this is helpful.
Good luck,
Eduard
Dear Eudard
Do apologize for the readability problem first. Thanks for the kind advice. Will do it now.
Masoud
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