This is a home of NeuroAnalyzer.jl documentation and tutorials.

NeuroAnalyzer is a Julia toolbox for analyzing neurophysiological data. Currently it allows importing, editing, processing and analyzing EEG and NIRS data. Preliminary functionality is also available for ECoG and SEEG recordings. Future versions will also support MEG recordings and source localization techniques. Various methods for modelling non-invasive brain stimulation protocols (tDCS/tACS/tRNS/tPCS/TMS/TUS/INS) will also be implemented.

NeuroAnalyzer contains a set of separate (high-level) functions, it does not have a graphical user interface (although one could built it upon these). NeuroAnalyzer functions can be combined into an analysis pipeline, i.e. a Julia script containing all steps of your analysis. This, combined with processing power of Julia language and easiness of distributing calculations across computing cluster, will make NeuroAnalyzer particularly useful for processing large amounts of research data.

NeuroAnalyzer is a collaborative, non-commercial project, developed for researchers in psychiatry, neurology and neuroscience.

This software is licensed under The 2-Clause BSD License.

DOIs for specific version numbers are provided by Zenodo. To cite the current stable version, use:

```
@software{adam_wysokinski_2023_7372648,
author = {Adam Wysokiński},
title = {NeuroAnalyzer},
month = jun,
year = 2023,
publisher = {Zenodo},
version = {0.23.8},
doi = {10.5281/zenodo.7372648},
url = {https://doi.org/10.5281/zenodo.7372648}
}
```

Currently NeuroAnalyzer is focused on resting-state analysis. Some ERP functions are already available, while other type of analyses will be developed in future versions. The goal is to make a powerful, expandable and flexible environment for processing neurophysiological data.

- Load neurophysiological recordings:
- EEG (EDF, EDF+, BDF, BDF+, GDF, Alice4, DigiTrack, BrainVision, CSV, EEGLAB)
- NIRS (SNIRF, NIRS, NIRX)
- electrode positions (CED, LOCS, ELC, TSV, SFP, CSD, GEO, MAT)

- Edit:
- edit channel data
- edit location data
- trim (remove part of the signal)
- resample
- delete channels/epochs
- divide into epochs (fixed and by event markers)
- auto-detect bad channels/epochs
- interpolate channels (planar/linear regression)

- Process:
- reference (channel/common average/auricular/mastoid/planar Laplacian/custom)
- filter (FIR/IIR/Remez/moving average/moving median/polynomial/convolution filters), all types (HP, LP, BP, BS); with preview of filter response
- remove power line noise
- auto-detect and remove electrode pops
- ICA decompose/reconstruct
- PCA
- convolution (in time and frequency domain)
- create ERP (event-related potentials)
- NIRS: convert raw light intensity to optical density and HbO/HbR/HbT concentrations

- Analyze:
- signal comparison
- stationarity
- frequency analysis: total power, band power (both absolute and relative)
- time-frequency analysis: various spectrogram methods (FFT-based, short-time Fourier transform, multi-tapered periodogram, Morlet wavelet convolution, Gaussian and Hilbert transform, continuous wavelet transformation)
- coherence (in time and frequency domain)
- mutual information
- entropy, negentropy
- envelopes (amplitude, power, spectrogram, Hilbert coefficients)
- power spectrum slope
- PLI/ISPC/ITPC
- ERP: detect peaks, analyze amplitude and average amplitude
- EROs (event-related oscillations): spectrogram, power spectrum
- HRV (heart rate variability): time-domain analysis (MENN, MDNN, VNN, SDNN, RMSSD, SDSD, NN50, pNN50, NN20, pNN20)

- Plot:
- signal (single-/multi-channel)
- power spectrum (single-/multi-channel, 2D/3D)
- spectrogram (single-/multi-channel)
- topographical maps
- weights at channel locations
- inter-channel connections
- matrices (channel × channel)
- channel/epoch data (histogram/bar plot/dot plot/box plot/violin plot/polar plot/paired data)
- ERPs: amplitude, topographical distribution
- EROs: spectrogram, power spectrum

All computations are performed using the double-precision 64-bit floating point format. NeuroAnalyzer data is stored using standard Julia Array and can be easily exported as DataFrame. Thus, external processing of those data using Julia packages is readily available.

There are many excellent MATLAB and Python based EEG/MEG/NIRS software (e.g. EEGLAB, Fieldtrip, Brainstorm, MNE). They have been developed for many years and are well established in the scientific community. Many state-of-the-art papers were published using data prepared using these programs.

However, compared with Python and MATLAB, there are many advantages of Julia, which underlie my decision to start developing such a toolbox in Julia.

I believe that Julia is the future of scientific computing and scientific data analysis. Major advantages of Julia are listed in Julia documentation.

- Julia is fast. In many situations Julia is considerably faster than Python (without having to use numba/cython) and MATLAB. Moreover, Julia provides unlimited scalability. Julia programs can easily be ran on a large cluster or across distributed computers.
- Julia is open-source and free. Increasing MATLAB licensing costs are prohibitive to individual researchers and many research institutions.
- From its very beginning Julia is being focused on scientific computations. Currently only Julia, C, C++ and Fortran belong to the HPC (High Performance Computing) Petaflop Club. Julia is designed for distributed and parallel computations, making it great for distributed analyzes of large data sets.
- Most of the Julia packages are written in pure Julia. It’s easier to understand and modify their code if you already know Julia.
- Julia is beautifully designed, making programming in Julia a pure pleasure. This elegant design makes Julia easy to learn. In my opinion, for non-professional programmers (which most scientists are) Julia, which falls into the functional programming paradigm, is easier to learn, read and write than object-oriented programming with Python.

Benchmarks against MNE and EEGLAB are available here.

Changelog and commit details are here.

This roadmap of the future developments of NeuroAnalyzer is neither complete, nor in any particular order. You are encouraged to add new functions required for your study. You may also submit a feature request using Codeberg NeuroAnalyzer.jl repository page.

See https://neuroanalyzer.org/requirements.html for more details.

List of know, reported and fixed bugs is here.

If you are new to Julia, please take a look at some resources for Getting Started with Julia.

In Julia REPL, each NeuroAnalyzer function documentation is available
via `?<function_name>`

, e.g. `?plot_psd`

.
Since some funtion names are exported by other packages
(e.g. `filter`

is exported by the Base Julia package, while
`plots`

by the Plots package), their use must be qualified:
`NeuroAnalyzer.filter()`

.

Glossary of terms specific for NeuroAnalyzer is here.

- Using NeuroAnalyzer
- Load data and electrode positions
- Edit
- Process
- Process (1): reference (channel/CAR/A/M/Laplacian/custom)
- Process (2): filtering (FIR/IIR/Remez/moving average/median/polynomial/convolution)
- Process (3): demean, normalize, taper, convolution, PCA
- Process (4): remove electrode pops
- Process (5): ICA

- Analyze
- Analyze (1): components
- Analyze (2)

- Plot
- Plot (1): plot multi-/single-channel signal, compare two signals
- Plot (2): plot frequency analysis (PSD: single-/multi-channel, Welch’s periodogram/multi-tapered/Morlet wavelet, 2d/3d)
- Plot (3): plot spectrogram (single-/multi-channel, regular/STFT/Morelet wavelet)
- Plot (4): complex plots (signal + PSD + spectrogram)
- Plot (5): filter response
- Plot (6): band powers
- Plot (7): auto/cross-correlation/covariance

- Misc
- Pipelines
- Study
- Tiled plots
- Calculate and plot PSD slope
- Stationarity
- Remove power line noise
- Interactive plots: interactive preview and edit
- Animate
- HRV

- ERPs
- NIRS
- ECoG

Every contribution (bug reports, fixes, new ideas, feature requests or additions, documentation improvements, etc.) to the project is highly welcomed.

Bugs, suggestions and questions should be reported using the NeuroAnalyzer.jl issues page.

You may also follow NeuroAnalyzer on Mastodon.

NeuroAnalyzer forum is located here.

Only people who are subscribed to the discussion list will be able to receive and post messages.

To subscribe to the NeuroAnalyzer mailing list, please send an empty email to neuroanalyzer-list-subscribe@neuroanalyzer.org or register here. To unsubscribe, send an empty email to neuroanalyzer-list-unsubscribe@neuroanalyzer.org or use the form here.

To send a message to the list, send an email to neuroanalyzer-list@neuroanalyzer.org. All messages are moderated for appropriateness. Messages that are not be related to NeuroAnalyzer/EEG/MEG/NIRS/NIBS, contain commercial advertisements or personal attacks and messages with attachments will be withhold from the list.

Mailing list archive is located here.

If you have used NeuroAnalyzer in your research, please add references to your paper below.

- Wysokiński A, Szczepocka E, Szczakowska A. Improved cognitive performance, increased theta, alpha, beta and decreased delta powers after cognitive rehabilitation augmented with tDCS in a patient with post-COVID-19 cognitive impairment (brain-fog). Psychiatry Research Case Reports. 2023 DOI: 10.1016/j.psycr.2023.100164

If you would like to support the project financially, we have the Liberapay account:

This website was created by Adam Wysokiński https://orcid.org/0000-0002-6159-6579