utils contains the python package with all functions. It contains settings and helpers files, where the settings contain constants and helpers contain methods. From the "subpackages", they contain constants / functions for
- aoi settings: aoi category definition, color mapping, aoi position markers, aoi padding
- aoi helpers
- detecting aoi markers from image
- comparing aoi definitions per snippet pair between conditions (sanity check that identical aoi categories defined in pair)
- get optimal aoi (smallest possible aoi) from multiple categories for snippet pair
- position check to aoi for fixations for comb approach
- behavioral settings: lower boundary for correctness, size of Tukey interval (*sigma)
- behavioral helpers:
- extracting behavioral data from hdf file
- extracting all behavioral information from event log data within hdf data
- combine data and prepare for EEG synchronization
- manage and check trials
- check overall trial data for exclusion (correctness and duration)
- metrics and visualization to aggregate behavioral results per group and condition, contrast results
- eeg settings: frequency, channels, ica files, stimlus definition EEG/ERP and FRP marker, ERP & permutation test constants
- eeg helpers:
- get eeg files
- anonymize data, load eeg data, check impedance, save as BV
- get annotation data, crop
- check ICA reasoning files
- assign trials from behavioral data to EEG for synchronization
- extract eeg segment per trial
- check artefacts via voltage constraints
- erp (frp) calculation including eeg loading, epoch creation, plotting
- plot distribution of frp-related metrics
- load erp (frp) averages / epochs
- calculate frp marker position and add frp marker
- file settings: columns of files (snippet description, gaze, behavioral, fixation, eeg annotation, hdf file)
- file helpers:
- determine participants for file type, get file paths of raw data for participant
- manage exclusion for preprocessing
- I2MC settings: settings for I2MC algorithm
- I2MC helpers: functions implementing I2MC algorithm
- json helpers:
- EncoderClass for encoding non-native types into json
- file buffer for perm test results
- LMEM settings: constants for LMEM family and error constants, conversion of R types to JSON
- LMEM helpers (jupyter notebook): function to create LMEM via python call from jupyter notebook
- path settings:
- base paths for raw, eval, screenshot folders etc.
- constant file paths
- path helpers: methods to generate file paths with given paramaters, extract all file paths of a given structure
- snippet settings: variants, condition, snippet numbers, condition coloring, default correctness and rating, agg functions
- snippet helpers: snippet base (without variant), version, variant and number extractor, get snippet of other variant within pair
- statistics settings:
- alternative hypotheses, test categorization and function assignment, effect size and strength, permutation test constants
- statistics helpers:
- subjectwise average calculation and statistical testing
- normal distribution test, statistiacl test wrapper
- effect size calculation
- statistical test for average amplitude in eeg window
- cluster permutation tests, max step calculation, cluster significance analysis, permutation count calculation, plotting
- test statistical distribution for frp-related statistics
- textconstants: all constants required in multiple files (e.g., PARTICIPANT, SNIPPET, ...)
- utils: imports all other files as interface
- validation settings and validation helpers: constants and functions to extract eye gaze from validation and calibration if given.
- visual settings:
- screen size, pixels, psychopy screen definition
- fixation radius in pixels and plot size
- constants for fixation exclusion due to na values
- eye-tracking frequency
- manual accuracy evaluation and fixation correction algorithm
- fixation selection algorithms
- visual helpers:
- get eye-tracking data from hdf file
- anonymize
- get and prepare relevant eye-events (including transformation from psychopy to pixel coordinates)
- check gaze data for na values
- calculate fixations, eliminate fixations stemming from fixation cross view
- plot accuracy images for fixation cross and snippet view
- perform fixation correction, add x offset
- calculate and plot refixation
- manage manual accuracy evaluation, including verification of structure and answer possibilities, snippets to rework, outlier and offset specification
- calculate statistics
- identify special fixation for FRP calculation, implement fixation selection algorithms
- create scanpath image