Skip to content

Commit

Permalink
Merge branch 'multichannel'
Browse files Browse the repository at this point in the history
  • Loading branch information
behinger committed Nov 13, 2023
2 parents b9ac5cc + ffe67ec commit 4287d5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/src/literate/HowTo/multichannel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ size(data)
# Let's plot using Butterfly & Topoplot
# first we convert the electrodes to positions usable in TopoPlots.jl
pos3d = hart.electrodes["pos"]
pos3d = pos3d ./ (4*maximum(pos3d,dims=1))#.+0.5 # standardize

pos2d = to_positions(pos3d')
pos2d = [Point2f(p[1]+0.5,p[2]+0.5) for p in pos2d]

Expand Down
4 changes: 3 additions & 1 deletion src/headmodel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ function headmodel(;type="hartmut")
x["leadfield"] = x["leadfield"][Not(remove_indices),:,:].*10e3 # this scaling factor seems to generate potentials with +-1 as max
else
x["label"] = x["label"][Not(remove_indices)]
x["pos"] = x["pos"][Not(remove_indices),:]
pos3d= x["pos"][Not(remove_indices),:]
pos3d = pos3d ./ (4*maximum(pos3d,dims=1))
x["pos"] = pos3d
end
return x
end
Expand Down

0 comments on commit 4287d5e

Please sign in to comment.