From 01e0c6c53bccc1cf4033966734e79252df017556 Mon Sep 17 00:00:00 2001 From: Prohurtz <48768484+RedHawk989@users.noreply.github.com> Date: Fri, 24 Nov 2023 19:10:10 -0600 Subject: [PATCH] fix: bug fix in pupil dia --- EyeTrackApp/ellipse_based_pupil_dilation.py | 4 +++- EyeTrackApp/osc_calibrate_filter.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/EyeTrackApp/ellipse_based_pupil_dilation.py b/EyeTrackApp/ellipse_based_pupil_dilation.py index 3bb8839..adc324f 100644 --- a/EyeTrackApp/ellipse_based_pupil_dilation.py +++ b/EyeTrackApp/ellipse_based_pupil_dilation.py @@ -362,7 +362,9 @@ class EllipseBasedPupilDilation: if maxp != 0 and not (np.isnan(pupil_area) or np.isnan(maxp)): eyedilation = (pupil_area - maxp) / ( minp - maxp - ) # for whatever reason when input and maxp are too close it outputs high + ) + else: + eyedilation = 0.5 except: eyedilation = 0.5 eyedilation = 1 - eyedilation diff --git a/EyeTrackApp/osc_calibrate_filter.py b/EyeTrackApp/osc_calibrate_filter.py index 2378847..7629694 100644 --- a/EyeTrackApp/osc_calibrate_filter.py +++ b/EyeTrackApp/osc_calibrate_filter.py @@ -87,7 +87,7 @@ def center_overlay_calibrate(self): if var.overlay_active != True: dirname = os.getcwd() - overlay_path = os.path.join(dirname, "center.bat") + overlay_path = os.path.join(dirname, "Eyetrackapp/center.bat") os.startfile(overlay_path) var.overlay_active = True sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)