Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coherence Analysis for non-Emotiv EEG data #3

Open
biceroni opened this issue Jul 16, 2020 · 0 comments
Open

Coherence Analysis for non-Emotiv EEG data #3

biceroni opened this issue Jul 16, 2020 · 0 comments

Comments

@biceroni
Copy link
Contributor

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"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant