Commit 456aba50 authored by Jesse Heckman's avatar Jesse Heckman
Browse files

update store stim or 'block'

parent a682c9f9
......@@ -24,7 +24,7 @@ function pb_vRunExp(handles)
% set block information
block = handles.block;
nblocks = handles.cfg.Blocks;
Dat(nblocks) = struct('VS',[],'EV',[],'PL_Gaze',[],'PL_Python',[],'PL_Primitive',[],'OT_Rigid',[]);
Dat(nblocks) = struct('VS',[],'EV',[],'PL_Gaze',[],'PL_Python',[],'PL_Primitive',[],'OT_Rigid',[],'BlockInfo',[]);
% initialize recordings
rc = pb_runPupil;
......@@ -99,6 +99,7 @@ function pb_vRunExp(handles)
Dat(iBlck).PL_Gaze = streams(3).read;
Dat(iBlck).PL_Primitive = streams(4).read;
Dat(iBlck).OT_Rigid = streams(5).read;
Dat(iBlck).BlockInfo = handles.block(iBlck);
% update block information
handles.cfg = updateCount(handles.cfg,'block','count');
......
......@@ -13,6 +13,7 @@ function VIS = pb_vFixLed(VIS,fixled,varargin)
x = pb_keyval('x',varargin,0);
y = pb_keyval('y',varargin,0);
dur = pb_keyval('dur',varargin,500);
ps = pb_keyval('pause',varargin,200);
VIS(end+1) = VIS;
......@@ -28,7 +29,7 @@ function VIS = pb_vFixLed(VIS,fixled,varargin)
for i = length(VIS)-1
if VIS(c).EventOn == VIS(c+1).EventOn
stimdur = VIS(c+1).Offset-VIS(c+1).Onset;
VIS(c+1).Onset = VIS(c).Onset + dur;
VIS(c+1).Onset = VIS(c).Onset + dur + ps;
end
if VIS(c).EventOff == VIS(c+1).EventOff
VIS(c+1).Offset = VIS(c+1).Onset + stimdur;
......
......@@ -29,7 +29,7 @@ function pb_vGenVisExp(varargin)
%% Desired azimuth and elevation
% Select target ranges
maxAbsAz = 5;
maxAbsAz = 45;
maxAbsEl = 0;
% Possible targets
......@@ -79,7 +79,7 @@ function pb_vGenVisExp(varargin)
modality = 2; % 2=VISUAL
int = [50]; % w/ [i1, i2, i3...]
dur = [1 3 5 10 30]; % stim duration in ms
dur = [1]; % stim duration in ms
col = [1]; % w/ [R,G]
[X,~,~] = ndgrid(X,0,col,int,dur);
......@@ -100,7 +100,7 @@ function pb_vGenVisExp(varargin)
block(1).Horizontal = struct('Amplitude',15,'Signal',1,'Duration',60,'Frequency',.1);
block(1).Vertical = struct('Amplitude',25,'Signal',2,'Duration',60,'Frequency',.1);
block(2).Horizontal = struct('Amplitude',50,'Signal',2,'Duration',30,'Frequency',.1);
block(2).Vertical = struct('Amplitude',15,'Signal',1,'Duration',60,'Frequency',.5);
block(2).Vertical = struct('Amplitude',15,'Signal',1,'Duration',60,'Frequency',.1);
%% Save data somewhere
writeexp(expfile,datdir,X,Y,int,dur,block,fixled);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment