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
c9c814f9
Commit
c9c814f9
authored
2 years ago
by
ofplarsen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed delay (61ms) and a validity checker
parent
dcc5b8a6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
jitter/ BCISpeller/BCISpellerV3.py
+3
-3
3 additions, 3 deletions
jitter/ BCISpeller/BCISpellerV3.py
with
3 additions
and
3 deletions
jitter/ BCISpeller/BCISpellerV3.py
+
3
−
3
View file @
c9c814f9
...
@@ -189,7 +189,7 @@ inlet = StreamInlet(streams_counter[0]) #LSL Eyetracker data
...
@@ -189,7 +189,7 @@ inlet = StreamInlet(streams_counter[0]) #LSL Eyetracker data
inlet_2
=
StreamInlet
(
streams_eeg
[
0
])
# LSL EEG data
inlet_2
=
StreamInlet
(
streams_eeg
[
0
])
# LSL EEG data
fs
=
250
# Sampling frequency
fs
=
250
# Sampling frequency
delay
=
0.0
1
#Occular delay
delay
=
0.0
60
#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
)
...
@@ -214,7 +214,7 @@ while True:
...
@@ -214,7 +214,7 @@ while True:
# If buffer is filled with data ready to be compared in CCA, and the start of the buffer is the start of
# If buffer is filled with data ready to be compared in CCA, and the start of the buffer is the start of
# the Eye Tracking data (Eye Tracking trigger)
# the Eye Tracking data (Eye Tracking trigger)
if
(
len
(
buffer
)
==
fragment_samples
)
and
buffer
[
0
][
0
]
==
1
:
if
(
len
(
buffer
)
==
fragment_samples
)
and
buffer
[
0
][
0
]
==
1
and
buffer
[
0
][
fragment_samples
]
<=
0
:
print
(
len
(
buffer
))
print
(
len
(
buffer
))
fragment
=
np
.
array
(
buffer
[:
fragment_samples
])
fragment
=
np
.
array
(
buffer
[:
fragment_samples
])
fragment_eeg
=
np
.
array
(
buffer_eeg
[:
fragment_samples
])
fragment_eeg
=
np
.
array
(
buffer_eeg
[:
fragment_samples
])
...
@@ -247,6 +247,7 @@ while True:
...
@@ -247,6 +247,7 @@ while True:
df
[
'
N
'
]
=
df
[
'
N
'
].
shift
(
round
(
delay
*
fs
))
df
[
'
N
'
]
=
df
[
'
N
'
].
shift
(
round
(
delay
*
fs
))
df
=
df
.
iloc
[
round
(
delay
*
fs
):]
df
=
df
.
iloc
[
round
(
delay
*
fs
):]
# Reset the index
# Reset the index
df
=
df
.
reset_index
(
drop
=
True
)
df
=
df
.
reset_index
(
drop
=
True
)
N
=
df
[
'
N
'
]
N
=
df
[
'
N
'
]
print
(
df
.
shape
)
print
(
df
.
shape
)
...
@@ -254,7 +255,6 @@ while True:
...
@@ -254,7 +255,6 @@ while True:
print
(
df
.
shape
)
print
(
df
.
shape
)
print
([(
index
,
row
[
'
O1
'
])
for
index
,
row
in
df
.
iterrows
()
if
pd
.
isna
(
row
[
'
O1
'
])])
print
([(
index
,
row
[
'
O1
'
])
for
index
,
row
in
df
.
iterrows
()
if
pd
.
isna
(
row
[
'
O1
'
])])
#N = np.arange(1, len(df['O1']) + 1)
N
=
df
[
'
N
'
]
N
=
df
[
'
N
'
]
frs
=
get_freqs
(
N
)
frs
=
get_freqs
(
N
)
X
=
df
[:][
occ_channels
]
X
=
df
[:][
occ_channels
]
...
...
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