diff --git a/docs/src/literate/HowTo/multichannel.jl b/docs/src/literate/HowTo/multichannel.jl index 5e0c109..b201b1c 100644 --- a/docs/src/literate/HowTo/multichannel.jl +++ b/docs/src/literate/HowTo/multichannel.jl @@ -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] diff --git a/src/headmodel.jl b/src/headmodel.jl index e8e736d..e046de1 100644 --- a/src/headmodel.jl +++ b/src/headmodel.jl @@ -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