tjmahr / lookr

Scripts for looking-while-listening and visual-world eyetracking experiments
Other
7 stars 2 forks source link

implement a median filter #8

Closed tjmahr closed 6 years ago

tjmahr commented 9 years ago
library(lookr)
library(robfilter)
gaze <- Gazedata("inst/tests/data/Coartic_WFFArea_1a/001P00XS1/Coartic_Block1_001P00XS1.gazedata")
gaze4 <- gaze[gaze$TrialNo == 4, ]
# Filtering window of approximately 150 ms
smoothing_width <- floor(150 / lwl_constants$ms_per_frame)
xmean <- med.filter(gaze4$XMean, width = smoothing_width)
#> 27 out of 467 time series values in y are missing. 

# Plot raw x-gazes and median filtered values
plot(xmean)

image

How nice would this be...

tjmahr commented 9 years ago

for reference http://bugra.github.io/work/notes/2014-03-31/outlier-detection-in-time-series-signals-fft-median-filtering/

tjmahr commented 6 years ago

Do this instead in a dedicated package for working with eyetracking dataframes like fillgaze.