Skip to content

Getting Started with EegFun.jl

Installing Julia

EegFun.jl requires Julia 1.12.

The recommended way to install and manage Julia versions is with juliaup. Alternatively, download an installer directly from the Julia Downloads page.

The Julia REPL

Julia is an interactive language built around a Read-Eval-Print Loop (REPL). The REPL provides different modes accessed by special keys:

KeyModePurpose
(default)Julia modeExecute Julia code
]Package modeInstall and manage packages
?Help modeAccess inline documentation
;Shell modeRun shell commands

Press Backspace to return to Julia mode from any other mode.

IDE Workflows

Most users pair the REPL with an editor that adds syntax highlighting and — most importantly — lets you send code directly into the live Julia REPL session. See IDE Workflows for a comparison of VS Code/VSCodium, Positron, JetBrains, and the Neovim + Iron.nvim terminal workflow.

Installing EegFun

You can install EegFun.jl through the standard Julia package manager.

Standard Installation

From the Julia REPL, enter Pkg mode by pressing ] and run:

julia
add EegFun

Or using Pkg in the code:

julia
using Pkg
Pkg.add("EegFun")

Development Version (vía GitHub)

To install the latest development version directly from GitHub:

julia
using Pkg
Pkg.add(url="https://github.com/igmmgi/EegFun.jl")

Then load the package in any Julia REPL session:

julia
using EegFun

First Steps

All EegFun functions are called with the EegFun. prefix. A minimal session could look something like this:

julia
using EegFun

# Load a raw BioSemi recording
dat = EegFun.read_raw_data("participant1.bdf")

# Attach an electrode layout
layout = EegFun.read_layout("biosemi72.csv")
EegFun.polar_to_cartesian_xy!(layout)
dat = EegFun.create_eegfun_data(dat, layout)

# Browse the raw data interactively
EegFun.plot_databrowser(dat)

Functions ending with `!` (e.g. `filter!`) mutate their input in-place. Functions without `!` return a new copy. Functions starting with `_` are internal helpers and not part of the public API.

EegFun Philosophy

EegFun.jl is designed with ease-of-use as a core principle, making it accessible even for those without extensive programming experience. However, whilst EegFun provides many interactive GUIs for data visualization and exploration, it is not a full GUI application — the package emphasises a code-based workflow that is intended to be simple and intuitive.

The package offers a mix of high-level and lower-level functions, including complete analysis pipelines that take you from raw data through to ERP analyses, while still allowing fine-grained control when needed. In practice, a complete EEG analysis can be accomplished with little to zero traditional "coding" — simply typing commands in the Julia REPL and/or combining them into small, readable/runnable scripts.

Supported Data Formats

FormatExtension(s)Notes
BioSemi.bdfvia BiosemiDataFormat.jl
BrainVision.vhdr / .eeg / .vmrkvia BrainVisionDataFormat.jl
EEGLAB.set / .fdtbasic support
FieldTrip.matbasic support

Additional file format support is planned for future releases. The format-specific packages are automatically installed as dependencies of EegFun.jl.

Next Steps and Resources

ResourceLink
EegFun.jl GitHubgithub.com/igmmgi/EegFun.jl
Manual Preprocessing tutorialManual Preprocessing
All how-to guidesHow-to Guides
Julia learning resourcesjulialang.org/learning
Julia cheat sheetcheatsheet.juliadocs.org
MATLAB–Python–Julia cheat sheetcheatsheets.quantecon.org
Makie.jl (plotting)docs.makie.org
DataFrames.jldataframes.juliadata.org