S3 plotting method for objects of class eyeris
. Plots a single-panel
timeseries for a subset of the pupil timeseries at each preprocessing step.
The intended use of this function is to provide a simple method for
qualitatively assessing the consequences of the preprocessing recipe and
parameters on the raw pupillary signal.
Usage
# S3 method for class 'eyeris'
plot(
x,
...,
steps = NULL,
num_previews = NULL,
preview_duration = NULL,
preview_window = NULL,
seed = NULL
)
Arguments
- x
An object of class
eyeris
derived fromload()
.- ...
Additional arguments to be passed to
plot
.- steps
Which steps to plot; defaults to
all
(i.e., plot all steps). Otherwise, pass in a vector containing the index of the step(s) you want to plot, with index1
being the original raw pupil timeseries.- num_previews
Number of random example "epochs" to generate for previewing the effect of each preprocessing step on the pupil timeseries.
- preview_duration
Time in seconds of each randomly selected preview.
- preview_window
The start and stop raw timestamps used to subset the preprocessed data from each step of the
eyeris
workflow for visualization. Defaults to NULL, meaning random epochs as defined bynum_examples
andexample_duration
will be plotted. To override the random epochs, setexample_timelim
here to a vector with relative start and stop times (e.g.,c(5000, 6000)
to indicate the raw data from 5-6 seconds on data that were recorded at 1000 Hz). Note, the start/stop time values indicated here relate to the raw index position of each pupil sample from 1 to n (which will need to be specified manually by the user depending on the sampling rate of the recording; i.e., 5000-6000 for the epoch positioned from 5-6 seconds after the start of the timeseries, sampled at 1000 Hz).- seed
Random seed for current plotting session. Leave NULL to select
num_previews
number of random preview "epochs" (ofpreview_duration
) each time. Otherwise, choose any seed-integer as you would normally select forbase::set.seed()
, and you will be able to continue re-plotting the same random example pupil epochs each time – which is helpful when adjusting parameters within and acrosseyeris
workflow steps.