-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using UnfoldSim, DataFrames, Random | ||
using GeometryBasics | ||
function gen_data() | ||
d1, evts = UnfoldSim.predef_eeg(n_repeats = 120, noiselevel = 25; return_epoched = true) | ||
dataS = permutedims(repeat(d1, 1, 1, 64), (3, 1, 2)) | ||
dataS = dataS .+ rand(dataS) | ||
|
||
evts = insertcols( | ||
evts, | ||
:saccade_amplitude => rand(nrow(evts)) .* 15, | ||
:luminance => rand(nrow(evts)) .* 100, | ||
:contrast => rand(nrow(evts)), | ||
:string => shuffle( | ||
repeat( | ||
["stringsuperlong", "stringshort", "stringUPPERCASE", "stringEXCITED!!!!"], | ||
outer = div(nrow(evts), 4), | ||
), | ||
), | ||
:animal => shuffle(repeat(["cat", "dog"], outer = div(nrow(evts), 2))), | ||
:fruit => shuffle(repeat(["orange", "banana"], outer = div(nrow(evts), 2))), | ||
:color => shuffle(repeat(["black", "white"], outer = div(nrow(evts), 2))), | ||
) | ||
|
||
positions = rand(Point2f, size(dataS, 1)) | ||
return dataS, evts, positions | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# ERPExplorer Highlights | ||
|
||
# Hello World! | ||
# ERPExplorer.jl allows interactive exploration of regression-ERPs. | ||
# You can switch on and off formula terms, term values, row and column faceting, line colours and style, marker style. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
dataS, evts, pos2d = gen_data() | ||
formulaS = @formula(0 ~ 1 + luminance + fruit + animal) | ||
times = range(0, length = size(dataS, 2), step = 1 ./ 100) | ||
model = Unfold.fit(UnfoldModel, formulaS, evts, dataS, times) | ||
_, positions = TopoPlots.example_data() | ||
|
||
@testset "basic test" begin | ||
explore(model; positions = positions) | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
using ERPExplorer | ||
using Test | ||
|
||
path = dirname(Base.current_project()) | ||
include(path * "/docs/gen_data.jl") | ||
|