Menu

1 / 7

Engineering a High-Performance, Opinionated Pupillometry Preprocessing Framework in R

DEV Community: r·Shawn Schwartz·6 months ago
#bjpJ5nKE
#dev#class#code#eyeris#article
Reading 0:00
15s threshold

3,500+ Downloads Later: The Engineering Behind the eyeris R package

eyeris [1][2] – a CRAN-published R package for reproducible pupillometry preprocessing with BIDS compliance, automated QC reports, and scalable pipeline tools.

Building for Reproducibility and Scale

When designing eyeris , I faced a unique engineering challenge: create a system that's both user-friendly for researchers with minimal programming experience, yet powerful and extensible enough for advanced computational users. Here's how I solved several key technical problems.

Architecture: The Pipeline Pattern

Design Philosophy

The core architectural pattern in eyeris is a functional pipeline where each preprocessing operation:

Takes an eyeris object as input

Applies a transformation to the pupil timeseries data

Records its parameters and provenance

Returns the modified eyeris object

This enables both pipe-based workflows ( %>% or |> ) and function composition while maintaining full traceability.

Figure 1: Diagram showing eyeris…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.