[solved] Manage ISI in fixed duration
Hi
I want to present picture stimuli with different ISI. I used an inline script to have the stimuli presented exactly at 1000, 1500, 2000, and 2500 ms. Yet it seems not working correctly.
The used script is as follows and the Sequence contents is presented in the following link.
http://img.cogsci.nl/?q=5616100abc59b
Please could you kindly advice what to do on this case.
Thanks,
Masoud
import random
minimum = 1000
maximum = 2500
ISI = random.randint(minimum, maximum)
exp.set("ISI", ISI)
ISI_options = [1000,1500,2000,2500]
ISI = random.choice(ISI_options)

Comments
Hi Masoud,
Based on the script you posted there, ISI would be a random number between 1000 and 2500. Note that you're doing nothing with the
ISI_optionsvariable, since the new value for ISI (random.choice(ISI_options)) isn't set with exp.set('ISI', ISI).You may want to delete the line
ISI = random.randint(minimum,maximum)and moveexp.set("ISI", ISI)to after the lineISI = random.choice(ISI_options).Cheers,
Josh
Many Thanks Josh
I made necessary changes in line with your comment. In addition, a keyboard_response is added to the program to collect the responses and to give a Correct or Incorrect feedback to the participant. The thing is that the the Correct feedback will be given to the space bar after the red squares stimuli and the Incorrect feedback will be given after no key response.
I have added the "SPACE" to correct_response in the keyboard and "Unknown" for the allowed responses.
In addition I have added to skectchpads, one is conditioned for correct and the the one for the incorrect responses but the feedback is not presented yet.
Please could you kindly advice more to sort the feedback issue out. I can send the file in the case you can have a look on it.
Thanks,
Masoud
Hi Masoud,
For the two feedback sketchpads, what run-if statement did you use? (When you click on the sequence item that they are in, you can see that items are run 'always' by default). In any case, the keyboard_response item automatically creates a variable
correct, which is set to 1 in case the response was correct, and 0 in case it was incorrect. Thus, for the positive feedback you could use run-if[correct] = 1, and for the negative feedback run-if[correct] = 0. Of course the sketchpads need to be placed after the keyboard_response item.Let me know if this helps. Good luck!
Josh
Dear Josh
Thanks a lot.
Please could you kindly have a look at the file attached with the following link:
https://drive.google.com/file/d/0B8_DC1KRNsnQc0x0blFYNXFUQzA/view?usp=sharing
I have done what you have said but it is not working yet.
Masoud
Hi Masoud, you didn't copy what I said correctly. I said
[correct] = 1, you used the line[correct = 1]. Can you see the difference?Cheers,
Josh
Great and thank you. It works well. You know when I have done that it gives feedback to keypress only. Is there any option to have a correct feedback for no keypress to distractors?
Masoud
Hi Masoud, yes that would be possible.
Right now you have set
spaceas correct response in the keyboard item. What you have to do, is go to the loop item, and create a new variable namedcorrect_response. Then, you have to indicate the correct response for each condition, i.e., conditions with a distractor to whichcorrect_responseshould benone, and conditions without a distractor to which it should bespace. So in the first column there is 'var1', and in the second column there is correct_response, and on each row the response should correspond to the var1.Lastly, in the keyboard_response item, you can delete
spacefrom correct_response; just leave it empty.Let me know if it works!
Josh
That does not work. I have made changes in the "run if" for correct and incorrect sketcpads as follows:
run stim "always"
run ISI "always"
run _keyboard_response "always"
run correct "[correct_response]=space and [response]=space or [correct_response]=none and [response]=none"
run incorrect "[correct_response]=none and [response]=space or [correct_response]=space and [response]=none"
run _logger "always"
But still no works.
Any more advice is much appreciated.
Masoud
Hi Masoud,
try changing
"[correct_response]=spaceinto"[correct_response]='space'(note the quotation marks around the space).Also, I think you should change
[response]=noneinto[response]=None. Although, I am not sure about this one.Do that for each of their occurrences and I think you should be good.
Let us know, if it doesn't work.
good luck,
Eduard
Thousands of thanks Eduard.
Adding the quotation marks and capitalising the first letter of "None" worked eventually.
Cheers,
Masoud