You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users have had issues with the order of textures in Signals. An example that uses inverted contrasts will hopefully make things clearer. Below is an example of a modulating plaid that takes into account the layer order:
%%% Create a modulating plaid
% Creates some sinewave gratings then modulates their contrasts, accounting
% for layer opacity.
%%%
% Setup playground
PsychDebugWindowConfiguration % Make our screen transparant
[t, setgraphic] = sig.test.playgroundPTB;
vs = StructRef; % This mimicks the fourth input arg of your expDef
% Create our stimuli
% This is a vertical sinewave grating
vertical = vis.grating(t, 'sine', 'none');
vertical.orientation = 0;
vertical.contrast = (sin(t) * 0.5) + 0.5;
% This is a horizontal sinewave grating
horizontal = vis.grating(t, 'sine', 'none');
horizontal.orientation = 90;
horizontal.contrast = sin(t);
[horizontal.show, vertical.show] = deal(true); % show both
vs.horizontal = horizontal;
vs.vertical = vertical;
% Render stimulus
setgraphic(vs)
% Programmatically press the play button
startstop = get(findobj(gcf, 'String', 'Play'), 'Callback');
startstop() % Play button callback
The text was updated successfully, but these errors were encountered:
Modulating plaids turns out to be more difficult than expected. I've implemented a new stimulus function that generates the plaid as a single array, instead of overlaying two sines: plaid = grating1*newelem.contrast(1) + grating2'*newelem.contrast(2);. This works better although the text must be re-loaded each time there's a change, which is less efficient.
Users have had issues with the order of textures in Signals. An example that uses inverted contrasts will hopefully make things clearer. Below is an example of a modulating plaid that takes into account the layer order:
The text was updated successfully, but these errors were encountered: