-
Notifications
You must be signed in to change notification settings - Fork 4
Coherence Analysis for non-Emotiv EEG data #3
Description
Basically, the script made the assumption that not all EEG data will have a “Blink” column (i.e., non-Emotiv EEG data), so for any data missing a blink column, it creates its own blink column filled with 0s. This works perfectly for the spectral.analysis. But the coherence.analysis function takes in series1 and series2 (not “series”), so the forming of the blink column wasn't working properly. The way it was:
if (is.null(blink)) {
blink <- rep(0, length(series))
}
if (is.null(quality1)) {
quality1 <- rep(5, length(series)) # Values of 5 are for "Information not available"
}
if (is.null(quality2)) {
quality2 <- rep(5, length(series)) # Values of 5 are for "Information not available"
}
Was fixed by simply changing it to:
if (is.null(blink)) {
blink <- rep(0, length(series1))
}
if (is.null(quality1)) {
quality1 <- rep(5, length(series1)) # Values of 5 are for "Information not available"
}
if (is.null(quality2)) {
quality2 <- rep(5, length(series2)) # Values of 5 are for "Information not available"
}