-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update paper.md #30
Update paper.md #30
Changes from 125 commits
8c605f3
2e52583
a9060b2
4b90b92
b8207c4
433cc6c
8e05d42
bda44f5
58e502c
146bd0b
3aa7ad8
3cd06bc
cf04383
aa460dc
8694f52
1aacd9c
b9ac5cc
ffe67ec
4287d5e
dbd7b0c
ef87b5d
e65da17
8dc38bc
1e7cd9c
a2e4357
12f614e
1daaec8
34bab0e
8699198
2b9cd37
94829a6
008cfcf
d312d94
fa298c7
3fdb6e4
0ed00a3
ab86319
bb1f6f4
6342214
41bb21f
dca29b5
68f15c3
1aa531b
937c1a3
2b37642
39a0d98
0d22db9
d1acc78
9193454
b422394
2be2707
b21c1f3
30b1b51
17a5069
42b3ff1
505593b
6060446
eabc810
150a74d
3ce9907
a789487
5a3d545
c74937a
6a7e5cb
62964c3
cef481d
29317b9
88fd0c2
89f6f94
e2a20da
e86e89d
4f92c42
1dcd428
86c29e7
2a278d8
b8043ee
c943aec
0059b77
2b15dea
b2a9b0a
df145e6
529c28d
223b680
df7bc62
069e50e
12f5e44
cd8ae22
e2b0c3e
fc1adb2
c10d973
75d9449
fa743c7
791d328
e31d2b0
75e019c
7adf98b
604f020
2bf38da
2b64f93
4173741
3d033af
e54c979
b89fe54
6456ac3
c572436
23e716b
95024c9
4f75add
da6e04f
82d7d7d
5e44254
939c95a
9bea415
d32c962
e2b446d
b26df2a
fd592be
f8b603f
ba10ed0
5c12370
8951b47
8a860ba
7a9f273
a7d4d52
f6b4445
7fdce3b
ba7fe88
7674487
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{ | ||
"projectName": "UnfoldSim.jl", | ||
"projectOwner": "unfoldtoolbox", | ||
"files": [ | ||
"README.md" | ||
], | ||
"commitType": "docs", | ||
"commitConvention": "angular", | ||
"contributorsPerLine": 7, | ||
"contributors": [ | ||
{ | ||
"login": "maanikmarathe", | ||
"name": "Maanik Marathe", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/66105649?v=4", | ||
"profile": "https://github.com/maanikmarathe", | ||
"contributions": [ | ||
"doc", | ||
"code" | ||
] | ||
}, | ||
{ | ||
"login": "behinger", | ||
"name": "Benedikt Ehinger", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/10183650?v=4", | ||
"profile": "http://www.benediktehinger.de", | ||
"contributions": [ | ||
"bug", | ||
"code", | ||
"doc", | ||
"ideas", | ||
"infra", | ||
"maintenance", | ||
"review", | ||
"test", | ||
"tutorial" | ||
] | ||
}, | ||
{ | ||
"login": "llips", | ||
"name": "Luis", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/38983684?v=4", | ||
"profile": "https://github.com/llips", | ||
"contributions": [ | ||
"bug", | ||
"code", | ||
"doc", | ||
"ideas" | ||
] | ||
}, | ||
{ | ||
"login": "jschepers", | ||
"name": "Judith Schepers", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/22366977?v=4", | ||
"profile": "https://github.com/jschepers", | ||
"contributions": [ | ||
"ideas", | ||
"bug", | ||
"doc", | ||
"tutorial", | ||
"code" | ||
] | ||
}, | ||
{ | ||
"login": "vladdez", | ||
"name": "Vladimir Mikheev", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/33777074?v=4", | ||
"profile": "https://github.com/vladdez", | ||
"contributions": [ | ||
"bug" | ||
] | ||
}, | ||
{ | ||
"login": "ReboreExplore", | ||
"name": "Manpa Barman", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/43548330?v=4", | ||
"profile": "https://reboreexplore.github.io/", | ||
"contributions": [ | ||
"infra" | ||
] | ||
}, | ||
{ | ||
"login": "ReneSkukies", | ||
"name": "René Skukies", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/57703446?v=4", | ||
"profile": "https://reneskukies.de/", | ||
"contributions": [ | ||
"doc" | ||
] | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: DARUS dataverse sync | ||
|
||
on: | ||
pull_request: | ||
types: [labeled, opened, synchronize, reopened] | ||
|
||
|
||
jobs: | ||
dv-sync: | ||
runs-on: ubuntu-latest | ||
if: contains(github.event.pull_request.labels.*.name, 'sync darus') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Synchronize to DV | ||
uses: SimTech-Research-Data-Management/dataverse-sync@main | ||
with: | ||
dataverse_url: "https://darus.uni-stuttgart.de/" | ||
api_token: ${{ secrets.DV_API_TOKEN }} | ||
persistent_id: "doi:10.18419/darus-3804" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: Format suggestions | ||
on: | ||
pull_request: | ||
jobs: | ||
code-style: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: julia-actions/[email protected] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: JOSS generation | ||
on: [push] | ||
jobs: | ||
PDF-gen: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Open Journals PDF Generator | ||
uses: openjournals/[email protected] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
/docs/Manifest.toml | ||
/docs/build/ | ||
/docs/src/literate/*/*.md | ||
/docs/src/generated |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[hartmut] | ||
git-tree-sha1 = "07d7f285b4fed914b2ab5dc25dae3e108b8ce35e" | ||
|
||
[[hartmut.download]] | ||
sha256 = "8fa88ed124e2307ad757956fcdf4f670193a6c58974f3adb8473b56afeb995a7" | ||
url = "https://gist.github.com/behinger/96973aae77e56a73ddeea83792bc52ad/raw/07d7f285b4fed914b2ab5dc25dae3e108b8ce35e.tar.gz" |
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,58 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
using UnfoldSim | ||||||||||||||||||||||||||||||||||||||||||||||||||
using UnfoldMakie | ||||||||||||||||||||||||||||||||||||||||||||||||||
using CairoMakie | ||||||||||||||||||||||||||||||||||||||||||||||||||
using DataFrames | ||||||||||||||||||||||||||||||||||||||||||||||||||
using Random | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
# ## Specifying a design | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
# We are using a one-level design for testing here. | ||||||||||||||||||||||||||||||||||||||||||||||||||
design = SingleSubjectDesign(conditions=Dict(:condA=>["levelA"])) | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
# Next we generate two simple components at two different times without any formula attached (we have a single condition anyway) | ||||||||||||||||||||||||||||||||||||||||||||||||||
c = LinearModelComponent(;basis=p100(),formula = @formula(0~1),β = [1]); | ||||||||||||||||||||||||||||||||||||||||||||||||||
c2 = LinearModelComponent(;basis=p300(),formula = @formula(0~1),β = [1]); | ||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
# ## The multichannel component | ||||||||||||||||||||||||||||||||||||||||||||||||||
# next similar to the nested design above, we can nest the component in a `MultichannelComponent`. We could either provide the projection marix manually, e.g.: | ||||||||||||||||||||||||||||||||||||||||||||||||||
mc = UnfoldSim.MultichannelComponent(c, [1,2,-1,3,5,2.3,1]) | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
# or maybe more convenient: use the pair-syntax: Headmodel=>Label which makes use of a headmodel (HaRTmuT is currently easily available in UnfoldSim) | ||||||||||||||||||||||||||||||||||||||||||||||||||
hart = headmodel(type="hartmut") | ||||||||||||||||||||||||||||||||||||||||||||||||||
mc = UnfoldSim.MultichannelComponent(c, hart=>"Left Postcentral Gyrus") | ||||||||||||||||||||||||||||||||||||||||||||||||||
mc2 = UnfoldSim.MultichannelComponent(c2, hart=>"Right Occipital Pole") | ||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+24
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
# !!! hint | ||||||||||||||||||||||||||||||||||||||||||||||||||
# You could also specify a noise-specific component which is applied prior to projection & summing with other components | ||||||||||||||||||||||||||||||||||||||||||||||||||
# | ||||||||||||||||||||||||||||||||||||||||||||||||||
# finally we need to define the onsets of the signal | ||||||||||||||||||||||||||||||||||||||||||||||||||
onset = UniformOnset(;width=20,offset=4); | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
# ## Simulation | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
# Now as usual we simulate data. Inspecting data shows our result is now indeed ~230 Electrodes large! Nice! | ||||||||||||||||||||||||||||||||||||||||||||||||||
data,events = simulate(MersenneTwister(1),design, [mc,mc2], onset, PinkNoise(noiselevel=0.05)) | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
size(data) | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
# !!! hint | ||||||||||||||||||||||||||||||||||||||||||||||||||
# The noise declared in the `simulate` function is added after mixing to channels, each channel receives independent noise. It is also possible to add noise to each individual component+source prior to projection. This would introduce correlated noise. | ||||||||||||||||||||||||||||||||||||||||||||||||||
# | ||||||||||||||||||||||||||||||||||||||||||||||||||
# ## Plotting | ||||||||||||||||||||||||||||||||||||||||||||||||||
# Let's plot using Butterfly & Topoplot | ||||||||||||||||||||||||||||||||||||||||||||||||||
# first we convert the electrodes to positions usable in TopoPlots.jl | ||||||||||||||||||||||||||||||||||||||||||||||||||
pos3d = hart.electrodes["pos"]; | ||||||||||||||||||||||||||||||||||||||||||||||||||
pos2d = to_positions(pos3d') | ||||||||||||||||||||||||||||||||||||||||||||||||||
pos2d = [Point2f(p[1]+0.5,p[2]+0.5) for p in pos2d]; | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
# now plot! | ||||||||||||||||||||||||||||||||||||||||||||||||||
f = Figure() | ||||||||||||||||||||||||||||||||||||||||||||||||||
df = DataFrame(:estimate => data[:],:channel => repeat(1:size(data,1),outer=size(data,2)),:time => repeat(1:size(data,2),inner=size(data,1))) | ||||||||||||||||||||||||||||||||||||||||||||||||||
plot_butterfly!(f[1,1:2],df;positions=pos2d) | ||||||||||||||||||||||||||||||||||||||||||||||||||
plot_topoplot!(f[2,1],df[df.time .== 28,:];positions=pos2d,visual=(;enlarge=0.5,label_scatter=false),axis=(;limits=((0,1),(0,0.9)))) | ||||||||||||||||||||||||||||||||||||||||||||||||||
plot_topoplot!(f[2,2],df[df.time .== 48,:];positions=pos2d,visual=(;enlarge=0.5,label_scatter=false),axis=(;limits=((0,1),(0,0.9)))) | ||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+53
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
f | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶