function ret = sacanalysis %************ loads sample eye traces and calls the %************ main routine for saccade analysis x = 1; x = input('Choose Datafile (1-monkeyA ok, 2-monkeyA(more noise), 3-monkeyB(bad)): '); if (x == 1) load('eyetrace_monkey_a_mnar4'); disp(' '); disp('OK datafile, discretization about 0.07 degrees. Can detect relatively small saccades'); end if (x == 2) load('eyetrace_monkey_a_mzir9'); disp(' '); disp(['Still OK datafile, discretization about 0.07 degrees. Worse noise on one channel,', ... '\n but can still detect small saccades']); end if (x == 3) load('eyetrace_monkey_b_mbsync7'); disp(' '); disp('Bad datafile, discretization about 0.20 degrees. Can NOT detect small saccades!'); disp('This file was recorded in CIRCLE_MODE in i-scan'); disp('Circle mode fits a circle to the pupil, but has poor resolution'); end disp(' '); input('Ready to process data.'); %*********now take velocity threshold to hunt top 10 percent for trial = 1:size(eyetrace.xtrace,1) trial %*********** sangnum = 8; micthresh = 0.0; RFx = 1.0; RFy = -5.0; plotit = 1; %********************************************* msac = detect_iscan_saccades2(eyetrace.xtrace(trial,:),... eyetrace.ytrace(trial,:),... micthresh,sangnum,RFx,RFy,plotit); end return;