# \[ANN\] NeuroJ.jl

**URL:** https://discourse.julialang.org/t/ann-neuroj-jl/82665
**Category:** Biology, Health, and Medicine
**Tags:** package
**Created:** [June 13, 2022, 8:36am UTC](https://discourse.julialang.org/t/ann-neuroj-jl/82665 "2022-06-13T08:36:19Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![AdamWysokinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamwysokinski/32/206422_2.png) [@AdamWysokinski](https://discourse.julialang.org/u/AdamWysokinski)
#### Post date: [June 13, 2022, 8:36am UTC](https://discourse.julialang.org/t/ann-neuroj-jl/82665/1 "2022-06-13T08:36:19Z")

</div>

Hi,

This is the first public release, I’m kinda nervous and excited 🙂

[NeuroJ.jl](https://codeberg.org/AdamWysokinski/NeuroJ.jl) is a Julia package for analyzing of EEG data. Future versions will also process MEG and NIRS data and use MRI data for source localization techniques. Also, various methods for modelling non-invasive brain stimulation protocols (tDCS/tACS/tRNS/tPCS/TMS) will be included.

The stable version (currently 0.26.0) will be released on a monthly basis.

Any feedback, remarks, bug reports, feature requests, pull requests, documentation improvements are highly welcomed.

Regards,  
Adam

---

<div class="post-metadata">

### Author: ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)
#### Post date: [June 13, 2022, 1:17pm UTC](https://discourse.julialang.org/t/ann-neuroj-jl/82665/2 "2022-06-13T13:17:38Z")

</div>

Hi Adam - this is great to see! Nice work. There are a couple of others that have been working in a similar vein, but I’m not sure if any efforts are planning to be quite so comprehensive.

A couple of possibly trivial non-code points I thought I’d mention, in case you were unfamiliar:

1. Regarding the name - is the ‘J’ of `NeuroJ` for “julia”? If so, this is generally discouraged (see point 2 in the [package naming guidelines](https://pkgdocs.julialang.org/v1/creating-packages/#Package-naming-guidelines)). Because of the `.jl` suffix, `Neuro.jl` would make it clear this is a julia package, for example.
2. It looks like you’re using date-based versioning, but the julia ecosystem, particularly `Pkg`, expects [SemVer](https://semver.org), so it you use this kind of versioning, it will be hard for the ecosystem to reason about version compatibility.

Neither of these points really matter unless / until you intend to register the package in the general registry, but I thought I’d mention them.

---

<div class="post-metadata">

### Author: ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)
#### Post date: [June 13, 2022, 1:20pm UTC](https://discourse.julialang.org/t/ann-neuroj-jl/82665/3 "2022-06-13T13:20:31Z")

</div>

Additionally, the section in your readme about installing the packages manually is a red herring. Packages may release new versions and incompatibilities may emerge.

Tell users to activate the `Project.toml` in a clean environment instead.

---

<div class="post-metadata">

### Author: ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)
#### Post date: [June 13, 2022, 1:29pm UTC](https://discourse.julialang.org/t/ann-neuroj-jl/82665/4 "2022-06-13T13:29:42Z")

</div>

I was going to open an issue for this, but having some issues making a codeberg account. I noticed in your readme that you have functions like `eeg_keep_epoch()`, presumably as a way to distinguish from something like `mri_keep_epoch()`. I’d encourage you to take advantage of julia dispatch instead. That is, you can define `keep_epoch()` methods for your different types, and let julia do the work chosing based on which type is passed.

For example:

```julia
julia> abstract type BrainScan end

julia> struct EEG <: BrainScan
           # fields...
       end

julia> struct MRI <: BrainScan
           # ... fields
       end

julia> keep_epoch(x::BrainScan) = "keep_epoch not defined for $(typeof(x))" # fallback
keep_epoch (generic function with 1 method)

julia> keep_epoch(x::EEG) = "Hi, I'm keeping an epoch for EEG"
keep_epoch (generic function with 2 methods)

julia> keep_epoch(x::MRI) = "Do MRIs have epochs? I don't know"
keep_epoch (generic function with 3 methods)

julia> e = EEG(); m = MRI();

julia> keep_epoch(e)
"Hi, I'm keeping an epoch for EEG"

julia> keep_epoch(m)
"Do MRIs have epochs? I don't know"

```

---

<div class="post-metadata">

### Author: ![AdamWysokinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamwysokinski/32/206422_2.png) [@AdamWysokinski](https://discourse.julialang.org/u/AdamWysokinski)
#### Post date: [June 13, 2022, 9:00pm UTC](https://discourse.julialang.org/t/ann-neuroj-jl/82665/5 "2022-06-13T21:00:08Z")

</div>

Hi Kevin!  
Thanks for the input.  
I’ve change the versioning scheme to SymVer.  
I’ll consider changing the name, but there already exists Julia Neuro and this might be confusing.  
Regards, Adam

---

<div class="post-metadata">

### Author: ![AdamWysokinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamwysokinski/32/206422_2.png) [@AdamWysokinski](https://discourse.julialang.org/u/AdamWysokinski)
#### Post date: [June 13, 2022, 9:00pm UTC](https://discourse.julialang.org/t/ann-neuroj-jl/82665/6 "2022-06-13T21:00:50Z")

</div>

Hi Peter!  
Thanks, I’ll deal with it tomorrow.  
Regards, Adam

---

<div class="post-metadata">

### Author: ![AdamWysokinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamwysokinski/32/206422_2.png) [@AdamWysokinski](https://discourse.julialang.org/u/AdamWysokinski)
#### Post date: [June 13, 2022, 9:04pm UTC](https://discourse.julialang.org/t/ann-neuroj-jl/82665/7 "2022-06-13T21:04:45Z")

</div>

Kevin, I’m using multiple dispatch in many places, mostly in the low level functions. The purpose of eeg\_ functions is to make clear distinction from low level functions. Also, for named arguments multiple dispatch does not work.

---

<div class="post-metadata">

### Author: ![AdamWysokinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamwysokinski/32/206422_2.png) [@AdamWysokinski](https://discourse.julialang.org/u/AdamWysokinski)
#### Post date: [September 1, 2022, 11:15am UTC](https://discourse.julialang.org/t/ann-neuroj-jl/82665/8 "2022-09-01T11:15:35Z")

</div>

Just to let you know, I’ve just released a new version (0.22.9) of [NeuroAnalyzer](https://codeberg.org/AdamWysokinski/NeuroAnalyzer.jl) (formely NeuroJ).

---

<div class="post-metadata">

### Author: ![AdamWysokinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamwysokinski/32/206422_2.png) [@AdamWysokinski](https://discourse.julialang.org/u/AdamWysokinski)
#### Post date: [September 30, 2022, 10:04pm UTC](https://discourse.julialang.org/t/ann-neuroj-jl/82665/9 "2022-09-30T22:04:13Z")

</div>

v0.22.10 is out: [https://codeberg.org/AdamWysokinski/NeuroAnalyzer.jl](https://codeberg.org/AdamWysokinski/NeuroAnalyzer.jl)

---

<div class="post-metadata">

### Author: ![AdamWysokinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamwysokinski/32/206422_2.png) [@AdamWysokinski](https://discourse.julialang.org/u/AdamWysokinski)
#### Post date: [October 31, 2022, 2:00pm UTC](https://discourse.julialang.org/t/ann-neuroj-jl/82665/10 "2022-10-31T14:00:50Z")

</div>

Thread moved to: [[ANN] NeuroAnalyzer.jl](https://discourse.julialang.org/t/ann-neuroanalyzer-jl/89574)

To moderators - please lock the thread if possible, thank you.
