Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NeuroPype-Pipeline
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Group 92
NeuroPype-Pipeline
Commits
7271a1e2
Commit
7271a1e2
authored
2 years ago
by
William G. Tresselt
Browse files
Options
Downloads
Patches
Plain Diff
Commiting prev version to pull
parent
af6957a2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
jitter/ BCISpeller/BCISpellerV2.py
+5
-5
5 additions, 5 deletions
jitter/ BCISpeller/BCISpellerV2.py
jitter/ BCISpeller/BCISpellerV3.py
+6
-6
6 additions, 6 deletions
jitter/ BCISpeller/BCISpellerV3.py
with
11 additions
and
11 deletions
jitter/ BCISpeller/BCISpellerV2.py
+
5
−
5
View file @
7271a1e2
...
...
@@ -112,9 +112,9 @@ inlet_2 = StreamInlet(streams_eeg[0])
fs
=
250
# Sampling frequency
delay
=
0
.061
delay
=
0
fragment_duration
=
4
+
delay
# Fragment duration in seconds
fragment_duration
=
6
+
delay
# Fragment duration in seconds
print
(
fragment_duration
)
fragment_samples
=
round
(
fs
*
fragment_duration
)
pre_trigger_samples
=
fs
*
1
...
...
@@ -183,9 +183,9 @@ while True:
X_c
,
Y_c
=
ca
.
transform
(
X
,
Y
)
# Uses two coefficients pk = sqrt(p1**2+p2*'2)
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
]
freqs
.
append
(
np
.
sqrt
(
p1
**
2
+
p2
**
2
))
freqs
.
append
(
p1
)
#
p2 = np.corrcoef(X_c[:, 1], Y_c[:, 1])[0][1]
#
freqs.append(np.sqrt(p1 ** 2 + p2 ** 2))
cca
=
freqs
# print("CCA single: " + str(perform_cca(df,1)))
print
(
cca
)
...
...
This diff is collapsed.
Click to expand it.
jitter/ BCISpeller/BCISpellerV3.py
+
6
−
6
View file @
7271a1e2
...
...
@@ -191,9 +191,9 @@ inlet = StreamInlet(streams_counter[0]) #LSL Eyetracker data
inlet_2
=
StreamInlet
(
streams_eeg
[
0
])
# LSL EEG data
fs
=
250
# Sampling frequency
delay
=
0
.061
#Occular delay
fragment_duration
=
4
+
delay
# Fragment duration in seconds
delay
=
0
#Occular delay
#delay = 0.00 #Occular delay
fragment_duration
=
6
+
delay
# Fragment duration in seconds
fragment_samples
=
round
(
fs
*
fragment_duration
)
...
...
@@ -276,9 +276,9 @@ while True:
X_c
,
Y_c
=
ca
.
transform
(
X
,
Y
)
# Uses two coefficients pk = sqrt(p1**2+p2*'2)
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
]
freqs
.
append
(
np
.
sqrt
(
p1
**
2
+
p2
**
2
))
freqs
.
append
(
p1
)
#
p2 = np.corrcoef(X_c[:, 1], Y_c[:, 1])[0][1]
#
freqs.append(np.sqrt(p1 ** 2 + p2 ** 2))
cca
=
freqs
#print("CCA single: " + str(perform_cca(df,1)))
print
(
cca
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment