Howdy, Stranger!

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

Supported by

[solved] Manage ISI in fixed duration

edited October 2015 in OpenSesame

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

  • edited 10:00AM

    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_options variable, 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 move exp.set("ISI", ISI) to after the line ISI = random.choice(ISI_options).

    Cheers,

    Josh

  • edited 10:00AM

    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

  • edited 10:00AM

    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

  • edited 10:00AM

    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

  • edited 10:00AM

    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

  • edited 10:00AM

    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

  • edited 10:00AM

    Hi Masoud, yes that would be possible.

    Right now you have set space as correct response in the keyboard item. What you have to do, is go to the loop item, and create a new variable named correct_response. Then, you have to indicate the correct response for each condition, i.e., conditions with a distractor to which correct_response should be none, and conditions without a distractor to which it should be space. 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 space from correct_response; just leave it empty.

    Let me know if it works!

    Josh

  • edited October 2015

    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

  • edited 10:00AM

    Hi Masoud,

    try changing "[correct_response]=space into "[correct_response]='space' (note the quotation marks around the space).

    Also, I think you should change [response]=none into [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

    Buy Me A Coffee

  • edited 10:00AM

    Thousands of thanks Eduard.
    Adding the quotation marks and capitalising the first letter of "None" worked eventually.
    Cheers,
    Masoud

Sign In or Register to comment.