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")

Note for plotting: EegFun.jl uses Makie.jl for visualizations. To display plots or use the interactive GUIs, you must also install a Makie backend of your choice:

  • add GLMakie (Recommended for interactive GUIs and the Data Browser)

  • add CairoMakie (Recommended for static, publication-quality plots or headless servers)

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. The fastest way to get started is to use our built-in tutorial datasets:

julia
using EegFun
using GLMakie # Required for interactive plotting

# 1. Automatically download the tutorial datasets
data_dir = download_eegfun_datasets()
file_path = joinpath(data_dir, "participant1.bdf")

# 2. Load the raw recording
dat = EegFun.read_raw_data(file_path)

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

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

When you are ready to load your own data, simply replace `file_path` with the string path to your own file on disk (e.g., `EegFun.read_raw_data("C:/EEG/participant1.bdf")`).

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