-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
85 lines (63 loc) · 2.82 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
output: github_document
---
<!-- README.md is generated from README.Rmd-->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# `eyeris`: flexible reproducible pupil preprocessing pipelines in R <a href="http://shawnschwartz.com/eyeris/" title="eyeris website"><img src="man/figures/logo.png" align="right" height="139" alt="eyeris website" /></a>
<!-- badges: start -->
<a href="LICENSE.md" alt="MIT License"><img src="https://badgen.net/static/license/MIT/blue?icon=github" alt="MIT License Badge"/></a>
<a href="https://github.com/shawntz/eyeris/actions/workflows/build.yml/badge.svg" alt="R Package Build Status"><img src="https://github.com/shawntz/eyeris/actions/workflows/build.yml/badge.svg" alt="Package Build Status Badge" /></a>
<a href="https://github.com/shawntz/eyeris/actions/workflows/linter.yml/badge.svg" alt="R Package Linter Status"><img src="https://github.com/shawntz/eyeris/actions/workflows/linter.yml/badge.svg" alt="Package Linter Status Badge" /></a>
<!-- badges: end -->
<!-- The goal of eyeris is to ... -->
## Installation
You can install the development version of eyeris from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("shawntz/eyeris")
```
or
``` r
# install.packages("pak")
pak::pak("shawntz/eyeris")
```
## Example
### the `glassbox()` "prescription" function
This is a basic example of how to use `eyeris` out of the box with our very
*opinionated* set of steps and parameters that one should start out with when
preprocessing pupillometry data. Critically, this is a "glassbox" -- as opposed
to a "blackbox" -- since each step and parameter implemented herein is fully
open and accessible to you. We designed each pipeline step / function to be like
legos -- they are intentionally and carefully designed in a way that allows you
to flexibly construct and compare different pipelines.
We hope you enjoy! -shawn
```{r glassbox-example, fig.dpi=300}
set.seed(32)
library(eyeris)
demo_data <- system.file("extdata", "memory.asc", package = "eyeris")
eyeris_preproc <- glassbox(
demo_data,
detrend_data = F,
lpfilt = list(plot_freqz = T)
)
```
### step-wise correction of pupillary signal
```{r glassbox-plot, echo=TRUE, fig.width=12, fig.height=5, fig.dpi=300}
plot(eyeris_preproc)
```
### final pre-post correction of pupillary signal (raw ➡ preprocessed)
```{r timeseries-plot, echo=TRUE, fig.width=8, fig.height=5, fig.dpi=300}
plot(eyeris_preproc,
steps = c(1, 5),
preview_window = c(0, nrow(eyeris_preproc$timeseries)))
```
---
# Comments, suggestions, questions, issues?
Please use the issues tab (https://github.com/shawntz/eyeris/issues) to make note of any bugs, comments, suggestions, feedback, etc... all are welcomed and appreciated, thanks!