Hello everyone,
I am trying to use Psychtoolbox version 1.0.1 with OS X on matlab 6.5. Earlier I was working with matlab 5.2. The ‘GetClut’ and ‘SetClut’ preferences seem to be missing from the new version. I have gone through all possible documentation I was aware of and also looked at sample code, but I am unable to figure out what preferences to use which would satisfy this functionalilty in the new version. This also raises the generic question for me as to whether there is any documentation for the way in which Screen preferences are changing across versions and the new syntax to be used. I found some people’s code (on the forum and other places) in specific contexts that was not applicable to me, so I thought I would ask you. Below is a sample of my code…
% screenInits.m
%
% Initiate some lookup tables (CLUTs) and variabless for PsychToolbox SCREEN calls.
% This is the matlab 5.2 version code
if doExperiment == 0 % Do nothing if not running an experiment
gammaClut = (0:255)'*[1 1 1]; % Default color LUT
% Open the experiment screen
whichScreen = 0;
[window,screenRect] = SCREEN(whichScreen,'OpenWindow',0,[]);
offClut = whiteLum * ones(256,3); % Off means white screen
% offClut = blackLum * ones(256,3); % Off means black screen
if gammaCorrection==1
if color==0
load LTProjector; % Loading the luminance values for the experimental projector
luminance=interpolate(lum,16);
theClut=gammaCorrect(luminance);
onClut=theClut; % This is the color look up table that I desire to use while running the experiment
end
matlabClut = SCREEN(whichScreen,'GetClut'); %
SCREEN(window,'SetClut',offClut);
% Set up text style for user interface.
SCREEN(window,'TextFont','Helvetica');
SCREEN(window,'TextSize',20);
SCREEN(window,'TextStyle',0);
SCREEN(window,'TextMode','srcOr');
………………………..
[cmdDx,cmdDy,bufferWindow] = CmdWinToUpperLeft(window,matlabClut);
% Bring up screen window to show images.
SCREENWinToFront(window,bufferWindow,cmdDx,cmdDy,offClut);
HideCursor;
SCREEN(window,'SetClut',onClut);
Ask(window,'Click mouse to proceed', 255, 0);
respString = ' ';
abort = 0;
HideCursor;
SCREEN(window,'FillRect',[170 170 170],screenRect) % this is the intensity of the padding area of stimChar, also the max of input E.
End
……………
It would be great if you could give me some pointers to a place where there is an API in reference to earlier-version syntaxes.
Thank you
Sowmya Ravikumar,
Graduate student, School of optometry, Indiana University .