layering stimuli

Lindsey Glickfeld's Avatar

Lindsey Glickfeld

03 Feb, 2020 03:18 PM

Hi Chris,

I've been using MWorks 0.8 (I think it's from a nightly around Nov 2017) to present plaid stimuli by sequentially queuing two orthogonal gratings ("stimOne" and "maskOne") and then updating the stimulus display:

<action tag="Queue Stimulus" type="live_queue_stimulus" stimulus="stimOne"></action>
<action type="play_dynamic_stimulus" stimulus="stimOne" tag="StimOn"></action>
<action type="if" condition="doMask">
<action tag="Queue Stimulus" type="live_queue_stimulus" stimulus="maskOne"></action>
<action type="play_dynamic_stimulus" stimulus="maskOne" tag="StimOn"></action>
<action type="update_stimulus_display"></action>

The stimuli look fine to me but I've noticed some asymmetries in the data. At first I thought they were biological, but now I'm starting to wonder if they're due to the stimuli. Is it possible that the final contrast of each stimulus depends on the order that the stimuli are queued? If so, do more recent versions of MWorks handle this more symmetrically?

Here is the code defining the stimulus properties if that's useful (the one for the "mask" is comparable):
<stimulus type="drifting_grating" tag="stimOne" direction="0" starting_phase="tStimOneGratingPhaseDeg"
grating_type="sinusoid" mask="gaussian" std_dev="0.3" mean="0.1"
x_size="tStimOneGratingDiameterDeg" y_size="tStimOneGratingDiameterDeg"
x_position="tStimOneGratingAzimuthDeg" y_position="tStimOneGratingElevationDeg"


Showing page 2 out of 2. View the first page

  1. Support Staff 31 Posted by Christopher Sta... on 07 Aug, 2020 08:45 PM

    Christopher Stawarz's Avatar

    Hi Lindsey,

    I was wrong. It is totally possible and not very difficult. See the attached example, which I believe implements what you're after.

    Note that this is a distinct construction from the plaid you wanted previously. There's not a way to define a single pair of gratings that can sometimes combine, sometimes not. If you want both types of stimuli in the same experiment, you'll need to define two separate pairs of gratings.


  2. 32 Posted by Lindsey Glickfe... on 07 Aug, 2020 09:21 PM

    Lindsey Glickfeld's Avatar

    Thanks! I'll try it out.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? 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