|
|
|
@ -3,6 +3,8 @@ Clock = 1;
@@ -3,6 +3,8 @@ Clock = 1;
|
|
|
|
|
%%%%%%%%%%%%%%%% |
|
|
|
|
% ARDUINO and CAMERA settings |
|
|
|
|
|
|
|
|
|
a = '/Users/mike/Documents/AfterImage/002 After Image GUI Project'; |
|
|
|
|
|
|
|
|
|
Cam_freq = 240 ; % square waves freq |
|
|
|
|
Cam_RECduration = 30; %in seconds. (30secs is the maximal time allowed by Matlab to play tone in arduino board) |
|
|
|
|
ard = arduino; % open arduino |
|
|
|
@ -29,7 +31,7 @@ hfpBG = bg_avg;
@@ -29,7 +31,7 @@ hfpBG = bg_avg;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
% cd(a); % return to program folder. |
|
|
|
|
cd(a); % return to program folder. |
|
|
|
|
load('colorCalFile1.mat'); |
|
|
|
|
fprintf('\nLast calibration was %s\n', describe.date) |
|
|
|
|
pix = pix/1001; |
|
|
|
@ -90,7 +92,7 @@ PsychImaging('PrepareConfiguration');
@@ -90,7 +92,7 @@ PsychImaging('PrepareConfiguration');
|
|
|
|
|
expScreen = 1; |
|
|
|
|
%create white LUT |
|
|
|
|
|
|
|
|
|
% cd(a); |
|
|
|
|
cd(a); |
|
|
|
|
|
|
|
|
|
% % % wLMS(1,1) = white(1,1)*maxLum; |
|
|
|
|
% % % wLMS(1,2) = (1-white(1,1))*maxLum; |
|
|
|
@ -397,6 +399,13 @@ WaitSecs(AdaptTime)
@@ -397,6 +399,13 @@ WaitSecs(AdaptTime)
|
|
|
|
|
else |
|
|
|
|
Screen('FillArc', window, rampLeft(iFrames,:), tstCircleLeft, 0, 180); |
|
|
|
|
Screen('FillArc', window, rampRight(iFrames,:), tstCircleRight, 180, 180); |
|
|
|
|
Screen('FillArc', window, wRGB.*.7, tstCircleRight, 0, 180); |
|
|
|
|
Screen('FillArc', window, wRGB.*.7, tstCircleLeft, 180, 180); |
|
|
|
|
|
|
|
|
|
% if iFrames<nFrames |
|
|
|
|
% Screen('FillArc', window, mean(rampRight), tstCircleLeft, 180, 180); |
|
|
|
|
% Screen('FillArc', window, mean(rampLeft), tstCircleRight, 0, 180); |
|
|
|
|
% end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
Screen('DrawText', window, TrialCountStr, 20, 20, redLut, wRGB); |
|
|
|
@ -455,9 +464,10 @@ WaitSecs(AdaptTime)
@@ -455,9 +464,10 @@ WaitSecs(AdaptTime)
|
|
|
|
|
end |
|
|
|
|
Priority(0); |
|
|
|
|
|
|
|
|
|
WaitSecs(18); % to tell the subject to blink normally |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ~Clock |
|
|
|
|
WaitSecs(18); % to tell the subject to blink normally |
|
|
|
|
flatSound; |
|
|
|
|
% else |
|
|
|
|
% Speak('Report Time') |
|
|
|
@ -534,7 +544,7 @@ end
@@ -534,7 +544,7 @@ end
|
|
|
|
|
|
|
|
|
|
if strcmp('DELETE',kbName)==1 %-si es el backspace --limpiar numero |
|
|
|
|
kbName = []% ; |
|
|
|
|
userRes = kbName |
|
|
|
|
userRes = kbName; |
|
|
|
|
firstDigit = []; |
|
|
|
|
Digit = 0; |
|
|
|
|
DrawFormattedText(window, kbName, 400, 512, redLut); |
|
|
|
@ -571,7 +581,7 @@ Screen('TextSize', window, 14);
@@ -571,7 +581,7 @@ Screen('TextSize', window, 14);
|
|
|
|
|
|
|
|
|
|
%aa = cd('/Users/clemente/Desktop/AfterImage Programs/A Outputs'); |
|
|
|
|
% aa = cd('D:\Dropbox\Luminotecnia\2017\Chicago Lab files\2 Experiments\Color AfterImage_Exp_Room_150\2nd\1 Programs\A Outputs') |
|
|
|
|
%cd |
|
|
|
|
cd(a); |
|
|
|
|
WaitSecs(.2) |
|
|
|
|
|
|
|
|
|
time = clock; |
|
|
|
@ -584,8 +594,8 @@ WaitSecs(.2)
@@ -584,8 +594,8 @@ WaitSecs(.2)
|
|
|
|
|
% a = cd('/Users/clemente/Dropbox/Luminotecnia/2018/Experiments/Color Background Afterimage/1 Programs/4 ColBackg AI'); % |
|
|
|
|
% a = cd('D:\Dropbox\Luminotecnia\2017\Chicago Lab files\2 Experiments\Color AfterImage_Exp_Room_150\2nd\1 Programs\4 AfterImage'); % |
|
|
|
|
|
|
|
|
|
cd |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd(a); |
|
|
|
|
WaitSecs(.2) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|