Skip to content

Commit

Permalink
removed mistake where recording frequency was not parsed to plotting …
Browse files Browse the repository at this point in the history
…function
  • Loading branch information
Thomahawkuru committed Jul 15, 2021
1 parent 3920296 commit 95b9ad4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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')
Expand Down

0 comments on commit 95b9ad4

Please sign in to comment.