Skip to content

Commit

Permalink
Updated doc examples for N170, P300 and SSVEP after Experiment Class …
Browse files Browse the repository at this point in the history
…Refactor (#218)

* major update: merging develop to master (#217)

* example test commit (#182)

* example test commit

* example edit

* ci: run test workflow on develop branch

* ci: add develop branch to job triggers

* ci: fix syntax issue in workflow

* fix: fixed import (brainflow updated API)

* build(deps): locked pylsl==1.10.5 (#187)

* Experiment Class Refactor (update to #183), converting specific experiments to subclasses (#184)

* First commit

* Second commit

* Modifications

* Lol

* Lol

* Incorporated N170 and p300, looking good for a PR

* ssvep update

* Implementing subclasses instead of loose functions

* fix: fixed import (brainflow updated API)

* Playing around still

* Fixing import errors

* Adding abstractmethod decorators

* Still working on the import error

* Guess what's finally working

* Comments and naming ticks

* More comments

* Live coding demonstration

* ssvep adapted

* Adapting Auditory Oddball

* changing save_fn to self.save_fun

* This maybe the last big change

* utils file changed, changes work through cli

Co-authored-by: Erik Bjäreholt <[email protected]>

* Submodule added for gsoc

* Adding pipelines for cli analysis (#202)

* started pipelines function

* almost working simple function equivalents of nb scripts

* fix: fixed import (brainflow updated API)

* sqc fixes for unicorn (#176)

* Ignore pushes

* Trying to create a cli

* Stepping through the problem

* First commit

* Fixing pause in signal quality check

* Fixing Signal quality check problem

* fix the technical debt

* Save path done for automated saving pdf

* I feel amazing

* Almost through

* Update eegnb/cli/__main__.py

Co-authored-by: Erik Bjäreholt <[email protected]>

* Trying to create cli but it's being really painful

* Extra word cli error

* Changed example handling

* Pain

* Adding whole datapath

* Finally fixed cli

* hmm

* Looking good

* added hyperlink

* Having some issues with detecting css and image deltetion

* Just the css now

* Fixed the css linking problem though it's a weird soln

* Automated running, still fnames problem

* Hahahah embedded images in html

* Improving code

* Okay now

* Look at that

* Almost there just the two figures now

* Now

* Added attrdict to do with cli error

Co-authored-by: John Griffiths <[email protected]>
Co-authored-by: Erik Bjäreholt <[email protected]>
Co-authored-by: John Griffiths <[email protected]>

* added more options for site args; improved function names; removed some redundant lines (#209)

* fix subject num parsing bug

* analysis report function improvements for openbci cyton and gtec unicorn devices

* run exp fix

* Update requirements.txt

* fixes to get docs building by github action (#210)

* fixes to get docs building by github action

* reverted some changes

* Update 01r__ssvep_viz.py

Co-authored-by: John Griffiths <[email protected]>

* Update README.rst

small commit to test doc build workflow on this branch

* removing gsoc submodule

Co-authored-by: Erik Bjäreholt <[email protected]>
Co-authored-by: Parv Agarwal <[email protected]>
Co-authored-by: Parvfect <[email protected]>
Co-authored-by: Ben Pettit <[email protected]>

* Updated doc examples

* Update 00x__n170_run_experiment.py

fix: typo in func param

---------

Co-authored-by: John Griffiths <[email protected]>
Co-authored-by: Erik Bjäreholt <[email protected]>
Co-authored-by: Ben Pettit <[email protected]>
Co-authored-by: Ore O <[email protected]>
  • Loading branch information
5 people authored Mar 10, 2023
1 parent d0715cf commit 53154c2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
26 changes: 13 additions & 13 deletions examples/visual_n170/00x__n170_run_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@
# ---------------------
#
# Imports
from eegnb import generate_save_fn
from eegnb.devices.eeg import EEG
from eegnb.experiments import VisualN170

# Define some variables
board_name = "muse2" # board name
experiment_name = "visual_n170" # experiment name
subject_id = 0 # test subject id
session_nb = 0 # session number
record_duration = 120 # recording duration

# Experiment type
experiment = VisualN170()

# EEG device
experiment.eeg = EEG(device="cyton") # "muse")
# generate save path
save_fn = generate_save_fn(board_name, experiment_name, subject_id, subject_nb)

# Test subject id
subject_id = 0
# create device object
eeg_device = EEG(device=board_name)

# Session number
session_nb = 0

# Experiment recording duration
experiment.duration = 120
# Experiment type
experiment = VisualN170(duration=record_duration, eeg=eeg_device, save_fn=save_fn)

###################################################################################################
# Run experiment
Expand All @@ -39,4 +39,4 @@
experiment.run()

# Saved csv location
print(experiment.save_fn)
print("Recording saved in", experiment.save_fn)
10 changes: 6 additions & 4 deletions examples/visual_p300/00x__p300_run_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
import os
from eegnb import generate_save_fn
from eegnb.devices.eeg import EEG
from eegnb.experiments.visual_p300 import p300
from eegnb.experiments import VisualP300

# Define some variables
board_name = "muse"
board_name = "muse2"
experiment = "visual_p300"
subject_id = 0
session_nb = 0
Expand All @@ -38,5 +38,7 @@
###################################################################################################
# Run experiment
# ---------------------
#
p300.present(duration=record_duration, eeg=eeg_device, save_fn=save_fn)
#
# Create Experiment Object
p300 = VisualP300(duration=record_duration, eeg=eeg_device, save_fn=save_fn)
p300.run()
7 changes: 4 additions & 3 deletions examples/visual_ssvep/00x__ssvep_run_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
import os
from eegnb import generate_save_fn
from eegnb.devices.eeg import EEG
from eegnb.experiments.visual_ssvep import ssvep
from eegnb.experiments import VisualSSVEP

# Define some variables
board_name = "muse"
board_name = "muse2"
experiment = "visual_ssvep"
subject_id = 0
session_nb = 0
Expand All @@ -39,4 +39,5 @@
# Run experiment
# ---------------------
#
ssvep.present(duration=record_duration, eeg=eeg_device, save_fn=save_fn)
ssvep = VisualSSVEP(duration=record_duration, eeg=eeg_device, save_fn=save_fn)
ssvep.run()

0 comments on commit 53154c2

Please sign in to comment.