UnfoldSim.jl

UnfoldSim.jl: Simulating continuous event-based time series data for EEG and beyond - Published in JOSS (2025)

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

Science Score: 100.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 13 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    2 of 11 committers (18.2%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

eeg erp julia simulation time-series

Keywords from Contributors

normalizing-flow
Last synced: 4 months ago · JSON representation ·

Repository

Simulate EEG / ERP data with overlap, non-linear effects, multiple regression

Basic Info
  • Host: GitHub
  • Owner: unfoldtoolbox
  • License: mit
  • Language: Julia
  • Default Branch: main
  • Homepage:
  • Size: 56.6 MB
Statistics
  • Stars: 13
  • Watchers: 4
  • Forks: 7
  • Open Issues: 44
  • Releases: 14
Topics
eeg erp julia simulation time-series
Created about 4 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Citation

README.md

logo_UnfoldSim jl_120px

Stable Dev Build Status Coverage DOI DOI

|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 Julia package to simulate multivariate time series, e.g. model-based ERPs, fMRI activity, pupil dilation etc. UnfoldSim.jl provides multi-channel support via EEG-forward models. Moreover, it is possible to simulate overlapping event-related activity and to add noise of a certain type e.g. Pink noise.

Many tutorials, guides, how-tos and references are available in the documentation!

unfoldsim_animation

Installation

Julia

Click to expand The recommended way to install julia is [juliaup](https://github.com/JuliaLang/juliaup). TL;DR: If you don't want to read the explicit instructions, just copy the following command: - Windows: `winget install julia -s msstore` - Mac/Linux: `curl -fsSL https://install.julialang.org | sh`

UnfoldSim.jl

julia using Pkg Pkg.add("UnfoldSim")

Quickstart

We offer some predefined (EEG) signals to get started.

julia using UnfoldSim data, events = UnfoldSim.predef_eeg(; n_repeats = 1, noiselevel = 0.8) Produces continuous "EEG" with PinkNoise and some overlap between 20 events (2 conditions * 10 levels of the continuous variable).

Slightly longer

All simulation ingredients (design, components, onsets, noise) can be easily modified and you can simply plugin your own!

```julia using UnfoldSim using Random

Start by defining the design / events data frame.

design = SingleSubjectDesign(; conditions = Dict(:condA => ["levelA", "levelB"])) |> d -> RepeatDesign(d, 10)

Next define a ground truth signal + relation to events/design with Wilkinson formulas.

signal = LinearModelComponent(; basis = [0, 0, 0, 0.5, 1, 1, 0.5, 0, 0], formula = @formula(0 ~ 1 + condA), β = [1, 0.5], )

Finally, define some inter-onset distance distribution and noise, and simulate data!

data, events = simulate( Random.MersenneTwister(1), design, signal, UniformOnset(; offset = 5, width = 4), PinkNoise(), )
```

Statement of need

EEG researchers often analyze data containing (temporally) overlapping events (e.g. stimulus onset and button press, or consecutive eye-fixations), non-linear effects, and complex experimental designs. For a multitude of reasons, we often need to simulate such kinds of data: Simulated EEG data is useful to test preprocessing and analysis tools, validate statistical methods, illustrate conceptual issues, test toolbox functionalities, and find limitations of traditional analysis workflows. For instance, such simulation tools allow for testing the assumptions of new analysis algorithms and testing their robustness against any violation of these assumptions.

Contributions

Contributions of any kind are very welcome. Please have a look at CONTRIBUTING.md for guidance on contributing to UnfoldSim.jl.

Contributors

Maanik Marathe
Maanik Marathe

📖 💻
Benedikt Ehinger
Benedikt Ehinger

🐛 💻 📖 🤔 🚇 🚧 👀 ⚠️
Luis
Luis

🐛 💻 📖 🤔
Judith Schepers
Judith Schepers

🤔 🐛 📖 💻 ⚠️
Vladimir Mikheev
Vladimir Mikheev

🐛
Manpa Barman
Manpa Barman

🚇
René Skukies
René Skukies

📖 💻 ⚠️ 🤔

This project follows the all-contributors specification. Please reach out, if you have contributed to UnfoldSim.jl but we have not listed you as a contributor yet.

Citation

If you use UnfoldSim.jl, please acknowledge and support our work by citing

1. Our JOSS paper:

Schepers et al., (2025). UnfoldSim.jl: Simulating continuous event-based time series data for EEG and beyond. Journal of Open Source Software, 10(107), 6641, https://doi.org/10.21105/joss.06641

BibTeX entry: ```bib @article{Schepers2025, doi = {10.21105/joss.06641}, url = {https://doi.org/10.21105/joss.06641}, year = {2025}, publisher = {The Open Journal}, volume = {10}, number = {107}, pages = {6641}, author = {Judith Schepers and Luis Lips and Maanik Marathe and Benedikt V. Ehinger}, title = {UnfoldSim.jl: Simulating continuous event-based time series data for EEG and beyond}, journal = {Journal of Open Source Software} } ```

and

2. The corresponding Zenodo DOI for the specific UnfoldSim.jl version that you are using in your work.

Acknowledgements

Funded by Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany's Excellence Strategy – EXC 2075 – 390740016. Furthermore, the authors thank the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for supporting Judith Schepers.

Owner

  • Name: unfoldtoolbox
  • Login: unfoldtoolbox
  • Kind: organization
  • Email: info@unfoldtoolbox.org

Unfold your potentials...

JOSS Publication

UnfoldSim.jl: Simulating continuous event-based time series data for EEG and beyond
Published
March 14, 2025
Volume 10, Issue 107, Page 6641
Authors
Judith Schepers ORCID
Institute for Visualisation and Interactive Systems, University of Stuttgart, Germany
Luis Lips
Institute for Visualisation and Interactive Systems, University of Stuttgart, Germany
Maanik Marathe
Institute for Visualisation and Interactive Systems, University of Stuttgart, Germany
Benedikt V. Ehinger ORCID
Institute for Visualisation and Interactive Systems, University of Stuttgart, Germany, Stuttgart Center for Simulation Science, University of Stuttgart, Germany
Editor
Beatriz Costa Gomes ORCID
Tags
EEG ERPs evoked potentials neuroimaging simulation time-series regression ERPs

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: >-
  UnfoldSim.jl: Simulating continuous event-based time
  series data for EEG and beyond
message: "If you use this package, please cite it as below."
type: software
authors:
  - given-names: Judith
    family-names: Schepers
    orcid: "https://orcid.org/0009-0000-9270-730X"
  - given-names: Luis
    family-names: Lips
  - given-names: Maanik
    family-names: Marathe
  - given-names: Benedikt
    family-names: Ehinger
    orcid: "https://orcid.org/0000-0002-6276-3332"
identifiers:
  - type: doi
    value: 10.5281/zenodo.7738651
    description: Zenodo
  - type: doi
    value: 10.21105/joss.06641
    description: JOSS paper
repository-code: "https://github.com/unfoldtoolbox/UnfoldSim.jl"
preferred-citation:
  authors:
    - family-names: Schepers
      given-names: Judith
      orcid: "https://orcid.org/0009-0000-9270-730X"
    - family-names: Lips
      given-names: Luis
    - family-names: Marathe
      given-names: Maanik
    - family-names: Ehinger
      given-names: Benedikt V.
      orcid: "https://orcid.org/0000-0002-6276-3332"
  date-published: "2025-03-14"
  doi: 10.21105/joss.06641
  issn: 2475-9066
  issue: 107
  journal: Journal of Open Source Software
  publisher:
    name: Open Journals
  start: 6641
  title: "UnfoldSim.jl: Simulating continuous event-based time series
    data for EEG and beyond"
  type: article
  url: "https://joss.theoj.org/papers/10.21105/joss.06641"
  volume: 10

GitHub Events

Total
  • Create event: 29
  • Release event: 2
  • Issues event: 21
  • Watch event: 5
  • Delete event: 16
  • Member event: 1
  • Issue comment event: 70
  • Push event: 256
  • Pull request review comment event: 315
  • Pull request review event: 103
  • Pull request event: 58
  • Fork event: 4
Last Year
  • Create event: 29
  • Release event: 2
  • Issues event: 21
  • Watch event: 5
  • Delete event: 16
  • Member event: 1
  • Issue comment event: 70
  • Push event: 256
  • Pull request review comment event: 315
  • Pull request review event: 103
  • Pull request event: 58
  • Fork event: 4

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 430
  • Total Committers: 11
  • Avg Commits per committer: 39.091
  • Development Distribution Score (DDS): 0.521
Past Year
  • Commits: 147
  • Committers: 5
  • Avg Commits per committer: 29.4
  • Development Distribution Score (DDS): 0.218
Top Committers
Name Email Commits
jschepers j****s@v****e 206
behinger (s-ccs 001) b****r@v****e 178
allcontributors[bot] 4****] 24
maanikmarathe 6****e 9
llips l****s@l****x 5
Manpa Barman m****c@g****m 2
CompatHelper Julia c****y@j****g 2
llips 3****s 1
Yanhong Xu y****u@g****m 1
Vladimir Mikheev 3****z 1
René Skukies 5****s 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 51
  • Total pull requests: 133
  • Average time to close issues: 5 months
  • Average time to close pull requests: 23 days
  • Total issue authors: 10
  • Total pull request authors: 11
  • Average comments per issue: 3.04
  • Average comments per pull request: 0.86
  • Merged pull requests: 95
  • Bot issues: 0
  • Bot pull requests: 15
Past Year
  • Issues: 21
  • Pull requests: 59
  • Average time to close issues: 3 months
  • Average time to close pull requests: about 1 month
  • Issue authors: 7
  • Pull request authors: 8
  • Average comments per issue: 2.76
  • Average comments per pull request: 0.58
  • Merged pull requests: 31
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • behinger (23)
  • jschepers (10)
  • ReneSkukies (5)
  • vladdez (4)
  • ssaket (2)
  • cbrnr (2)
  • roualdes (1)
  • Zooaal (1)
  • JuliaTagBot (1)
  • geigermartin (1)
Pull Request Authors
  • behinger (81)
  • jschepers (56)
  • allcontributors[bot] (11)
  • maanikmarathe (4)
  • ReneSkukies (4)
  • github-actions[bot] (3)
  • Zooaal (2)
  • xuyg16 (2)
  • vladdez (1)
  • ReboreExplore (1)
  • danielskatz (1)
Top Labels
Issue Labels
enhancement (6) bug (2) ideas (2) documentation (1)
Pull Request Labels
documentation (2) sync darus (1)

Packages

  • Total packages: 1
  • Total downloads:
    • julia 5 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 13
juliahub.com: UnfoldSim

Simulate EEG / ERP data with overlap, non-linear effects, multiple regression

  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 5 Total
Rankings
Dependent repos count: 9.9%
Average: 24.4%
Dependent packages count: 38.9%
Last synced: 4 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/checkout v2 composite
  • codecov/codecov-action v2 composite
  • julia-actions/cache v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-docdeploy v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/CompatHelper.yml actions
.github/workflows/darus-dataverse.yml actions
  • SimTech-Research-Data-Management/dataverse-sync v1 composite
  • actions/checkout v2 composite