From 95b9ad4823571234fa658469c28247046e06b826 Mon Sep 17 00:00:00 2001 From: Thomas de boer Date: Thu, 15 Jul 2021 17:27:29 +0200 Subject: [PATCH] removed mistake where recording frequency was not parsed to plotting function --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 992eb74..59fea54 100644 --- a/main.py +++ b/main.py @@ -42,8 +42,8 @@ v = classifiedgazedata['data']['v'] # [deg/s] e = classifiedgazedata['data']['EYE_MOVEMENT_TYPE'] # ('UNKNOWN', 'FIX', 'SACCADE', 'SP', 'NOISE', 'BLINK', 'NOISE_CLUSTER', 'PSO') - dt = 1000 / np.mean(np.diff(classifiedgazedata['data']['time'])) - print("Gaze data recorded at: {} Hz".format(dt)) + hz = 1000 / np.mean(np.diff(classifiedgazedata['data']['time'])) + print("Gaze data recorded at: {} Hz".format(hz)) # Analyzing gaze event measures -------------------------------------------------------------------------------------- Fixations = calculators.fixation(x, y, t, e, printresults) @@ -67,7 +67,7 @@ csvdata.to_csv(outputpath + "/classified_data.csv") # Plotting and saving------------------------------------------------------------------------------------------------ - plotters.detection(x, y, t, v, Fixations, Saccades, Pursuits, Blinks, trials, trial, axs) + plotters.detection(x, y, t, v, Fixations, Saccades, Pursuits, Blinks, trials, trial, axs, hz) plotters.calculation(Fixations, Saccades, Pursuits, Blinks, trial, participant) outputpath = trialpath + "calculation-p{}-t{}.png".format(participant, trial, participant, trial) if savefig: plt.savefig(outputpath, bbox_inches='tight')