NeuroAnalyzer tutorials: Edit EEG (3)

Detect bad channels and epochs:

bad_m, bad_epochs = detect_bad(e10, method=[:flat, :p2p, :var])
detect_bad!(e10, method=[:flat, :p2p, :var])
p = NeuroAnalyzer.plot(e10, ch=1:19, ep=2, bad=true)
plot_save(p, file_name="images/bad_epoch.png")
delete_epoch!(e10, ep=bad_epochs)

See detect_bad() for the list of available methods and parameters use to tune auto-detection.

Remove parts of the signal:

plot(e10, ep=1)
# remove one second
trim!(e10, seg=(1, 2), keep_epochs=false)
# plot again
plot(e10, ep=1)

plot(e10, ep=2)
# remove segment [16, 17] s
trim!(e10, seg=(16, 17), keep_epochs=false)