Skip to content
Snippets Groups Projects
Commit 50ac8cfd authored by William G. Tresselt's avatar William G. Tresselt
Browse files

Resolved merge conflict

parent f54222fe
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,8 @@ channels = ['Fp1', 'Fz', 'F3', 'F7', 'F9', 'FC5', 'FC1', 'C3', 'T7', 'CP5', 'CP1 ...@@ -10,7 +10,8 @@ channels = ['Fp1', 'Fz', 'F3', 'F7', 'F9', 'FC5', 'FC1', 'C3', 'T7', 'CP5', 'CP1
, 'P9', 'O1', 'Oz', 'O2', 'P10', 'P8', 'P4', 'CP2', 'CP6', 'T8', 'C4', 'Cz' , 'P9', 'O1', 'Oz', 'O2', 'P10', 'P8', 'P4', 'CP2', 'CP6', 'T8', 'C4', 'Cz'
, 'FC2', 'FC6', 'F10', 'F8', 'F4', 'Fp2', 'ACC_X', 'ACC_Y', 'ACC_Z'] , 'FC2', 'FC6', 'F10', 'F8', 'F4', 'Fp2', 'ACC_X', 'ACC_Y', 'ACC_Z']
removed_channels = ['Fp1', 'F8', 'F7', 'Fp2', 'F3', 'F4'] removed_channels = ['Fp1', 'F8', 'F7', 'Fp2', 'F3', 'F4']
frequencies_main = [4,5,6,7,9,11] #frequencies_main = [4,5,6,7,9,11]
frequencies_main = [4,5,5.5,6,7,7.4]
frequencies = ['8.18_sin_h1','8.18_cos_h1','8.18_sin_h2','8.18_cos_h2','8.18_sin_h3','8.18_cos_h3', frequencies = ['8.18_sin_h1','8.18_cos_h1','8.18_sin_h2','8.18_cos_h2','8.18_sin_h3','8.18_cos_h3',
'9_sin_h1', '9_cos_h1','9_sin_h2', '9_cos_h2','9_sin_h3', '9_cos_h3', '9_sin_h1', '9_cos_h1','9_sin_h2', '9_cos_h2','9_sin_h3', '9_cos_h3',
'10_sin_h1','10_cos_h1','10_sin_h2','10_cos_h2','10_sin_h3','10_cos_h3', '10_sin_h1','10_cos_h1','10_sin_h2','10_cos_h2','10_sin_h3','10_cos_h3',
...@@ -110,6 +111,7 @@ inlet_2 = StreamInlet(streams_eeg[0]) ...@@ -110,6 +111,7 @@ inlet_2 = StreamInlet(streams_eeg[0])
fs = 250 # Sampling frequency fs = 250 # Sampling frequency
delay = 0.061 delay = 0.061
fragment_duration = 4+delay # Fragment duration in seconds fragment_duration = 4+delay # Fragment duration in seconds
print(fragment_duration) print(fragment_duration)
fragment_samples = round(fs * fragment_duration) fragment_samples = round(fs * fragment_duration)
...@@ -176,6 +178,7 @@ while True: ...@@ -176,6 +178,7 @@ while True:
X_c, Y_c = ca.transform(X, Y) X_c, Y_c = ca.transform(X, Y)
# Uses two coefficients pk = sqrt(p1**2+p2*'2) # Uses two coefficients pk = sqrt(p1**2+p2*'2)
p1 = np.corrcoef(X_c[:, 0], Y_c[:, 0])[0][1] p1 = np.corrcoef(X_c[:, 0], Y_c[:, 0])[0][1]
#freqs.append(p1)
p2 = np.corrcoef(X_c[:, 1], Y_c[:, 1])[0][1] p2 = np.corrcoef(X_c[:, 1], Y_c[:, 1])[0][1]
freqs.append(np.sqrt(p1 ** 2 + p2 ** 2)) freqs.append(np.sqrt(p1 ** 2 + p2 ** 2))
cca = freqs cca = freqs
......
...@@ -15,7 +15,8 @@ channels = ['Fp1', 'Fz', 'F3', 'F7', 'F9', 'FC5', 'FC1', 'C3', 'T7', 'CP5', 'CP1 ...@@ -15,7 +15,8 @@ channels = ['Fp1', 'Fz', 'F3', 'F7', 'F9', 'FC5', 'FC1', 'C3', 'T7', 'CP5', 'CP1
removed_channels = ['Fp1', 'F8', 'F7', 'Fp2', 'F3', 'F4'] removed_channels = ['Fp1', 'F8', 'F7', 'Fp2', 'F3', 'F4']
#The frequencies used for the SSVEP speller #The frequencies used for the SSVEP speller
frequencies_main = [4,5,6,7,9,11] #frequencies_main = [4,5,6,7,9,11]
frequencies_main = [4,5,5.5,6,7,7.4]
#The channels used for the BCI Speller combined with CCA #The channels used for the BCI Speller combined with CCA
occ_channels = ['O1', 'O2', 'Oz', 'P3', 'P4', 'Pz', 'P7', 'P8'] occ_channels = ['O1', 'O2', 'Oz', 'P3', 'P4', 'Pz', 'P7', 'P8']
...@@ -190,6 +191,7 @@ inlet_2 = StreamInlet(streams_eeg[0])# LSL EEG data ...@@ -190,6 +191,7 @@ inlet_2 = StreamInlet(streams_eeg[0])# LSL EEG data
fs = 250 # Sampling frequency fs = 250 # Sampling frequency
delay = 0.061 #Occular delay delay = 0.061 #Occular delay
fragment_duration = 4+delay # Fragment duration in seconds fragment_duration = 4+delay # Fragment duration in seconds
fragment_samples = round(fs * fragment_duration) fragment_samples = round(fs * fragment_duration)
...@@ -269,6 +271,7 @@ while True: ...@@ -269,6 +271,7 @@ while True:
X_c, Y_c = ca.transform(X, Y) X_c, Y_c = ca.transform(X, Y)
# Uses two coefficients pk = sqrt(p1**2+p2*'2) # Uses two coefficients pk = sqrt(p1**2+p2*'2)
p1 = np.corrcoef(X_c[:, 0], Y_c[:, 0])[0][1] p1 = np.corrcoef(X_c[:, 0], Y_c[:, 0])[0][1]
#freqs.append(p1)
p2 = np.corrcoef(X_c[:, 1], Y_c[:, 1])[0][1] p2 = np.corrcoef(X_c[:, 1], Y_c[:, 1])[0][1]
freqs.append(np.sqrt(p1 ** 2 + p2 ** 2)) freqs.append(np.sqrt(p1 ** 2 + p2 ** 2))
cca = freqs cca = freqs
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment