flashing stimuli

Lindsey Glickfeld's Avatar

Lindsey Glickfeld

03 Apr, 2014 03:50 PM

Hi Chris,

I'd like to create a drifting grating that can repeatedly change contrast for variable durations. The ultimate goal is to create a task with a flashing stimulus that changes properties (orientation, contrast, etc), on a random cycle.

Is there a stimulus type or property of the drifting grating stimulus that we could use to do this? Or would we be better off setting timers to queue and dequeue the stimulus at regular intervals?

Thanks,
Lindsey.

  1. Support Staff 1 Posted by Christopher Sta... on 03 Apr, 2014 06:43 PM

    Christopher Stawarz's Avatar

    Hi Lindsey,

    Here's how you can make this work:

    1. When defining your drifting grating, set each of the parameters you want to change dynamically to the name of a variable (rather than a literal value).
    2. To put the grating on screen, live queue it (with the live_queue_stimulus action).
    3. When you want to change a grating parameter, simply assign a new value to the corresponding variable. The change will be reflected on screen immediately, with no need for dequeue/queue or display update actions.

    To vary the contrast, you'll need to change the "alpha_multiplier" parameter. For this to work correctly, be sure that the grating is drawn on a 50% gray background.

    I've attached an example experiment that sets up and displays a grating as I've described. Once it's running, you can alter the grating's appearance by changing parameters in the variables window. (In a real experiment, the changes would be made programmatically in the XML, but the variables window is nice for testing things out interactively.)

    If you need more assistance, please let me know.

    Cheers,
    Chris

  2. 2 Posted by Lindsey Glickfe... on 03 Apr, 2014 07:37 PM

    Lindsey Glickfeld's Avatar

    Chris- Perhaps this would be easier to discuss on the phone- is there a
    phone number where I can reach you? Thanks, Lindsey.

  3. Christopher Stawarz closed this discussion on 15 May, 2014 01:31 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac