We need to teach it to handle nan values: write an error or process them somehow.
Code below could be used for current problem solving.
begin
indices_notnan = findall(<(1), isnan.(evts.sac_amplitude)) # find indices where events.column is not NaN
f = Figure()
plot_erpimage!(
f[1, 1],
dat[:, indices_notnan]; # only rows of dat where evts.column is not NaN
sortvalues = evts[indices_notnan, :].sac_amplitude,
axis = (; title = "One-sided fan; sorted by duration"),
)
f
end
We need to teach it to handle nan values: write an error or process them somehow. Code below could be used for current problem solving.