if true
PsychDefaultSetup(2);
screenNumber = max(Screen('Screens'));
white = WhiteIndex(screenNumber);
grey = white / 2;
Screen('Preference', 'SkipSyncTests', 2);
[window, windowRect] = PsychImaging('OpenWindow', screenNumber, grey, [], 32, 2,...
[], [], kPsychNeed32BPCFloat);
gaborDimPix = windowRect(4) / 2;
sigma = gaborDimPix / 7;
orientation = 0;
contrast = 0.8;
aspectRatio = 1.0;
phase = 0;
numCycles = 5;
freq = numCycles / gaborDimPix;
backgroundOffset = [0.5 0.5 0.5 0.0];
disableNorm = 1;
preContrastMultiplier = 0.5;
gabortex = CreateProceduralGabor(window, gaborDimPix, gaborDimPix, [],...
backgroundOffset, disableNorm, preContrastMultiplier);
propertiesMat = [phase, freq, sigma, contrast, aspectRatio, 0, 0, 0];
Screen('DrawTextures', window, gabortex, [], [], orientation, [], [], [], [],...
kPsychDontDoRotation, propertiesMat');
Screen('Flip', window);
KbWait;
sca;
end