I'm testing my stimuli to see if they behave as expected, and I've noticed something odd. If I read back via GetImage with 'drawBuffer', I get the values I expect, but if I use 'frontBuffer', I appear to get only 8 bits precision (e.g. values between 0 and 1/256 appear as 0). My understanding from the GetImage help is that 'drawBuffer' gives values before they have been processed by the Imaging Pipeline, while 'frontBuffer' gives the values as they actually appear on the screen. So frontBuffer would be the ones I want to get right! Are you aware of a reason why frontBuffer would not work?
Here's an example of what I mean
% Get started:
PsychImaging('PrepareConfiguration');
% I want 32-bit precision:
PsychImaging('AddTask', 'General', 'FloatingPoint32Bit');
% Am using my DATAPixx:
PsychImaging('AddTask', 'General', 'EnableDataPixxM16Output');
% - for testing, don't mess with my numbers!
PsychImaging('AddTask', 'FinalFormatting', 'DisplayColorCorrection', 'ClampOnly');
% Open our window.
w = PsychImaging('OpenWindow', 1,0);
% Fill the whole screen with gray:
Screen('FillRect', w, 0.5); Screen('Flip',w);
% Let's read back what got sent to the GPU:
im=Screen('GetImage',w,[],'drawBuffer',1,1);
% See what's in the middle of the screen (arbitrary location)
im(300,400)
% this returns 0.5000000000000000 as one would hope -- Hurrah!
im=Screen('GetImage',w,[],'frontBuffer',1,1);
im(300,400)
% this returns 0.498039215803146, i.e. it appears to be close to 127/255 -- Boo!
Am I right to be worried by this? It looks to me as if I must inadvertently be telling the imaging pipeline to do something that converts 0.500 into 0.498. But what???
I should add that this is with PTB revision 1799. Normally I would update before posting here, but my Linux machine is currently over in a hospital where it's not allowed to be connected to the network, and I don't have another machine running Centos over here to update and put on a memory stick. So if by any chance this is a known bug that was fixed, I apologise for wasting your time!
Many thanks,
Jenny
--
Jenny C. A. Read
Royal Society University Research Fellow Mobile 0756 151 6988
Institute of Neuroscience Office +44 191 222 7559
Newcastle University, NE2 4HH www.staff.ncl.ac.uk/j.c.a.read