Skip to contents

This function builds upon the eyelinker::read.asc() function to parse the messages and metadata within the EyeLink .asc file. After loading and additional processing, this function returns an S3 eyeris class for use in all subsequent eyeris pipeline steps and functions.

Usage

load_asc(file)

Arguments

file

An SR Research EyeLink .asc file generated by the official EyeLink edf2asc command.

Value

An object of S3 class eyeris with the following attributes:

  1. file: Path to the original .asc file.

  2. timeseries: Dataframe of all raw timeseries data from the tracker.

  3. events: Dataframe of all event messages and their timestamps.

  4. blinks: Dataframe of all blink events.

  5. info: Dataframe of various metadata parsed from the file header.

  6. latest: eyeris variable for tracking pipeline run history.

See also

eyelinker::read.asc() which this function wraps.

Examples

system.file("extdata", "memory.asc", package = "eyeris") |>
  eyeris::load_asc()
#> $file
#> [1] "/opt/homebrew/lib/R/4.4/site-library/eyeris/extdata/memory.asc"
#> 
#> $timeseries
#> # A tibble: 20,767 × 7
#>    time_orig eye_x eye_y eye      hz type     pupil_raw
#>        <int> <dbl> <dbl> <chr> <dbl> <chr>        <dbl>
#>  1  11334491  982.  555. R      1000 diameter      6198
#>  2  11334492  981.  554. R      1000 diameter      6201
#>  3  11334493  981   553. R      1000 diameter      6201
#>  4  11334494  981.  554. R      1000 diameter      6202
#>  5  11334495  981.  554. R      1000 diameter      6202
#>  6  11334496  981.  553  R      1000 diameter      6200
#>  7  11334497  982.  551. R      1000 diameter      6198
#>  8  11334498  983   550. R      1000 diameter      6196
#>  9  11334499  984.  551. R      1000 diameter      6196
#> 10  11334500  983.  552. R      1000 diameter      6199
#> # ℹ 20,757 more rows
#> 
#> $events
#> # A tibble: 67 × 3
#>    block     time text                      
#>    <dbl>    <dbl> <chr>                     
#>  1     1 11242177 !MODE RECORD CR 1000 2 1 R
#>  2     1 11334491 EXP_START                 
#>  3     1 11334491 TRIALID 22                
#>  4     1 11334491 START_TRIAL_22            
#>  5     1 11334491 CUE_START_22              
#>  6     1 11335466 CUE_STOP_22               
#>  7     1 11335467 DELAY_START_22            
#>  8     1 11336473 DELAY_STOP_22             
#>  9     1 11336474 PROBE_START_22            
#> 10     1 11337158 RESPONSE_22               
#> # ℹ 57 more rows
#> 
#> $blinks
#> # A tibble: 1 × 5
#>   block    stime    etime   dur eye  
#>   <dbl>    <dbl>    <dbl> <dbl> <fct>
#> 1     1 11348253 11348308    56 R    
#> 
#> $info
#>                  date        model version sample.rate   cr  left right mono
#> 1 2009-01-11 02:40:47 EyeLink 1000   4.594        1000 TRUE FALSE  TRUE TRUE
#>   screen.x screen.y                                 mount filter.level
#> 1     1920     1080 Desktop / Monocular / Head Stabilized            2
#>   sample.dtype event.dtype pupil.dtype velocity resolution htarg input buttons
#> 1         GAZE        GAZE    DIAMETER    FALSE      FALSE FALSE  TRUE   FALSE
#> 
#> $latest
#> [1] "pupil_raw"
#> 
#> attr(,"class")
#> [1] "eyeris"