Adding ISI variable by python scripts

I am trying to run an experiment called Useful Field of View. I have python scripts but I can not control frame’s duration (ISI); because the variable didn’t add on the original scripts. Someone can help me, please? I don’t have a long time. How can I describe the ISI variable, then I will control it? Should I make a .py file called ISI? what should I add in this .py file? Someone help me, please…

Hi There,

So that we can help more, please could you give us bit more detail.

By ‘ISI’ do you mean the Inter-Stimulus-Interval, rather than the frame duration (it is not possible to control your frames duration, because that is determined by the refresh rate of your monitor).

What code have you tried? (can you provide the URL - if it is online - or the code snippets here?)

What did you expect to happen and what exactly didn’t work?


Hello Becca,
I put here the link of where I get from this scripts:
I am trying to run ufov_final experiment. You can download this file to your computer from the link. ( please download this two .xlsx files to run smoothly)
I will apply this task to elderly sample, so the ISI should be longer than this. Stimulies are too fast for older peoples. I want to change the ISI.

Thank you so much really, I am searching that for days.

OK so as a first point, I can see that the .py file here is a code export of a builder script. Is there a reason you need to run from coder? or is it possible to source the original .psyexp builder file? The ISI will be easier to alter there.

Please can you tell us what you have already tried in order to manipulate the ISI variable.


I I tried by changing the ISI.strart variable in line 1888,
I tried by changing the frameDUR variable on line 55.
I understand ISI is set by default; A way was suggested, but I couldn’t: I’ve looked back in the code, and it looks like the ISI isn’t hard coded, so you’d need to adjust the timing of the onset for each trial component (or create an ISI variable and insert that into the timing structure for each trial component).

I was trying to find where ISI is coded even if it is default.

I’m not sure I can interface this complex test if I’m not going to run it from the encoder.


Since timing must be a multiple of screen refresh have you tried changing line 80 to read:

ISI = core.StaticPeriod(win=win, screenHz=expInfo['frameRate']*x, name='ISI')#

Where x is the multiple of screen rate you want setting it to 2 would double the ISI period.


I tried it; as 2 and as 5. I didn’t see any changing. I am wondering about “staticperiod” . İs that changable? This is written in many places.