detecting when gaze goes off fixation point December 08, 2023 10:46PM | Registered: 3 years ago Posts: 10 |
%target image target_img = ImageGraphic(null_); target_img.List = {target_image, [Info.X, Info.Y]}; %measure time since leaving fix leave_fix = SingleTarget(eye_); leave_fix.Target = fix_dot; leave_fix.Threshold = center_fix_window; not_fixing = NotAdapter(leave_fix); leave_timer = TimeCounter(not_fixing); leave_timer.Duration = target_limit_time; % >> success and stop if too late since fix %find target target_look = SingleTarget(eye_); target_look.Target = target_img; target_look.Threshold = target_window; target_capture = WaitThenHold(target_look); target_capture.WaitTime = target_wait_time; target_capture.HoldTime = 0; %only wait to capture, hold dealt wih lh_target in another scene % >> stop if found target or if overtime % >> success if found target %combine finding the target and testing time from leaving fix find_target_and_leave_fix = AllContinue(target_capture); find_target_and_leave_fix.add(leave_timer); % >> stop if found target or overtime or too late since fix % >> success if any of the above happened target_search_scene = create_scene(find_target_and_leave_fix); run_scene(target_search_scene, target_start_mk); if leave_timer.Success %too much time since left fix trialerror(0); %considered correct for the purpose of trial counting, %only trials in which fixation failed are to be repeated eventmarker(target_too_slow_mk); trial_result = result_target_too_slow; %looking for target for too long since leaving fix else if ~target_capture.Success %timeout of target search trialerror(0); %considered correct for the purpose of trial counting, %only trials in which fixation failed are to be repeated eventmarker(target_acq_failed_mk); trial_result = result_target_not_found; %failed to find target else %target found, now hold eventmarker(target_acquired_mk); run_scene(target_hold_scene, target_hold_start_mk); %that's scene 3
Re: detecting when gaze goes off fixation point December 09, 2023 11:22AM | Admin Registered: 5 years ago Posts: 931 |
leave_fix = SingleTarget(eye_); not_fixing = NotAdapter(leave_fix); leave_timer = WaitThenHold(not_fixing); leave_timer.WaitTime = target_wait_time; leave_timer.HoldTime = target_limit_time;
Re: detecting when gaze goes off fixation point December 09, 2023 04:32PM | Registered: 3 years ago Posts: 10 |
The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.