An open API service indexing awesome lists of open source software.

https://github.com/unfoldtoolbox/unfoldmakie.jl

Plotting and visualization tools for EEG data, with additional Unfold.jl regression ERP methods. Based on the visualization libraries Makie.jl and AlgebraOfGraphics.jl
https://github.com/unfoldtoolbox/unfoldmakie.jl

butterfly eeg eeg-visualization electroencephalography erp event-related-potentials julia makie plots plotting topoplots visualization

Last synced: 5 months ago
JSON representation

Plotting and visualization tools for EEG data, with additional Unfold.jl regression ERP methods. Based on the visualization libraries Makie.jl and AlgebraOfGraphics.jl

Awesome Lists containing this project

README

          

# ![UnfoldMakie - Advanced EEG and ERP Plotting](https://github.com/unfoldtoolbox/UnfoldMakie.jl/assets/57703446/26b770b3-afa0-4652-b654-82d2f737f42f)

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://unfoldtoolbox.github.io/UnfoldDocs/UnfoldMakie.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://unfoldtoolbox.github.io/UnfoldDocs/UnfoldMakie.jl/dev)
[![Build Status](https://github.com/unfoldtoolbox/UnfoldMakie.jl/workflows/CI/badge.svg)](https://github.com/unfoldtoolbox/UnfoldMakie.jl/actions)
[![Coverage](https://codecov.io/gh/behinger/UnfoldMakie.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/behinger/UnfoldMakie.jl)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14500860.svg)](https://doi.org/10.5281/zenodo.14192333)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.07560/status.svg)](https://doi.org/10.21105/joss.07560)

[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)

[![Downloads](https://img.shields.io/badge/dynamic/json?url=http%3A%2F%2Fjuliapkgstats.com%2Fapi%2Fv1%2Fmonthly_downloads%2FUnfoldMakie&query=total_requests&suffix=%2Fmonth&label=Downloads)](https://juliapkgstats.com/pkg/UnfoldMakie)
[![Downloads](https://img.shields.io/badge/dynamic/json?url=http%3A%2F%2Fjuliapkgstats.com%2Fapi%2Fv1%2Ftotal_downloads%2FUnfoldMakie&query=total_requests&suffix=%2Ftotal&label=Downloads)](https://juliapkgstats.com/pkg/UnfoldMakie)

|Estimation|Visualisation|Simulation|BIDS pipeline|Decoding|Statistics|MixedModelling|
|---|---|---|---|---|---|---|
| Unfold.jl Logo | UnfoldMakie.jl Logo|UnfoldSim.jl Logo|UnfoldBIDS.jl Logo|UnfoldDecode.jl Logo|UnfoldStats.jl Logo|UnfoldMixedModels.jl logo|

A toolbox for visualizations of EEG/ERP data and Unfold.jl models.



Based on two libraries:
- [Makie.jl](https://makie.juliaplots.org/stable/) - very flexible visualisation library ([Maki-e](https://en.wikipedia.org/wiki/Maki-e) means "visualisation" on Japanese);
- [AlgebraOfGraphics.jl](https://github.com/MakieOrg/AlgebraOfGraphics.jl) - Makie-based grammar of graphics visualisation library, allowing flexible mapping.

Additionally we provide some specific plots for:
- [Unfold.jl](https://github.com/unfoldtoolbox/unfold.jl/) - for performing rERP analyses;
But `Unfold.jl` is not a dependency and all plotting functions are **agnostic** to any specific analysis package.

This package offers users high performance, and highly customizable plots.

We currently support 9 general ERP plots:
- ![icon_erpplot_20px](https://github.com/unfoldtoolbox/UnfoldMakie.jl/assets/10183650/22c8472d-df78-46d7-afe8-e1e4e7b04313)
ERP plots
- ![icon_butterfly_20px](https://github.com/unfoldtoolbox/UnfoldMakie.jl/assets/10183650/30b86665-3705-4258-bffa-97abcd308235)
Butterfly plots
- ![icon_topoplot_20px](https://github.com/unfoldtoolbox/UnfoldMakie.jl/assets/10183650/ea91f14f-30df-4316-997b-56bc411c9276)
Topography plots
- ![icon_toposeries_20px](https://github.com/unfoldtoolbox/UnfoldMakie.jl/assets/10183650/eceab5d6-88c7-41ae-b0d8-5ca652e83b40)
Topography time series
- ![icon_erpgrid_20px](https://github.com/unfoldtoolbox/UnfoldMakie.jl/assets/10183650/83b42a21-439a-49fd-80bc-cd82872695e9)
ERP grid
- ![icon_erpimage_20px](https://github.com/unfoldtoolbox/UnfoldMakie.jl/assets/10183650/b45b0547-7333-4d28-9ac8-33a989b7c132)
ERP images
- ![icon_channelimage_20px](https://github.com/unfoldtoolbox/UnfoldMakie.jl/assets/10183650/7ea16a7a-879a-4dcc-aaab-bc97211910ba)
Channel images
- ![icon_parallel_20px](https://github.com/unfoldtoolbox/UnfoldMakie.jl/assets/10183650/dab097c3-bcd6-4405-a44b-71cbe3e5fac9)
Parallel coordinates
- Circular topoplots

And 2 Unfold-specific plots:
- Design matrices
- Splines plot

### Installing Julia

Click to expand

The recommended way to install julia is [juliaup](https://github.com/JuliaLang/juliaup).
It allows you to, e.g., easily update Julia at a later point, but also to test out alpha/beta versions etc.

TLDR: If you don't want to read the explicit instructions, just copy the following command

#### Windows

AppStore -> JuliaUp, or `winget install julia -s msstore` in CMD

#### Mac & Linux

`curl -fsSL https://install.julialang.org | sh` in any shell

### Installing UnfoldMakie.jl

```julia
using Pkg
Pkg.add("UnfoldMakie")
```

## Quickstart

```julia
using UnfoldMakie
using CairoMakie # backend
using Unfold, UnfoldSim # Fit / Simulation

data, evts = UnfoldSim.predef_eeg(; noiselevel = 12, return_epoched = true)
data = reshape(data, 1, size(data)...) # simulate a single channel

times = range(0, step = 1 / 100, length = size(data, 2))
m = fit(UnfoldModel, @formula(0 ~ 1 + condition), evts, data, times)

plot_erp(coeftable(m))
```

## Contributions

Contributions are very welcome. These can be typos, bug reports, feature requests, speed improvements, new solvers, better code, better documentation.

### How to Contribute

You are very welcome to submit issues and start pull requests!

### Adding Documentation

1. We recommend to write a Literate.jl document and place it in `docs/literate/FOLDER/FILENAME.jl` with `FOLDER` being `HowTo`, `Explanation`, `Tutorial` or `Reference` ([recommended reading on the 4 categories](https://documentation.divio.com/)).
2. Literate.jl converts the `.jl` file to a `.md` automatically and places it in `docs/src/generated/FOLDER/FILENAME.md`.
3. Edit [make.jl](https://github.com/unfoldtoolbox/Unfold.jl/blob/main/docs/make.jl) with a reference to `docs/src/generated/FOLDER/FILENAME.md`.

## Citation

If you use these visualizations, please cite:

[![DOI](https://joss.theoj.org/papers/10.21105/joss.07560/status.svg)](https://doi.org/10.21105/joss.07560) - this is our publication in *Journal of Open Source Software* on version 0.5.11. We recommend to cite this paper.

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14500860.svg)](https://doi.org/10.5281/zenodo.14192333) - this is DOI of the last version of UM.jl. Cite this or others DOIs if you need to mention specific version of the package.

## Contributors



Benedikt Ehinger
Benedikt Ehinger

πŸ› πŸ’» πŸ“– πŸ€” πŸš‡ 🚧 πŸ’¬ πŸ‘€ ⚠️ βœ…
Vladimir Mikheev
Vladimir Mikheev

πŸ› πŸ’» πŸ“– πŸ€” 🚧 πŸ‘€ ⚠️ βœ…
Quantum
Daniel Baumgartner

πŸ’» πŸ“–
NiklasMGaertner
Niklas GΓ€rtner

πŸ’» πŸ“–
SorenDoring
Soren Doring

πŸ’» πŸ“–
lokmanfl
Fadil Furkan Lokman

πŸ’» πŸ“–
Judith Schepers
Judith Schepers

πŸ› πŸ€” πŸ“–


RenΓ© Skukies
RenΓ© Skukies

πŸ“–

## Acknowledgements

Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project-ID 251654672 – TRR 161” / β€œGefΓΆrdert durch die Deutsche Forschungsgemeinschaft (DFG) – Projektnummer 251654672 – TRR 161.

Funded by Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under GermanyΒ΄s Excellence Strategy – EXC 2075 – 390740016