neurotechx / bci-workshop Goto Github PK
View Code? Open in Web Editor NEWMaterial for the BCI Workshop held at District 3 in May 2015 by BCI Montréal.
License: Other
Material for the BCI Workshop held at District 3 in May 2015 by BCI Montréal.
License: Other
I'm encountering this error when running lsl-viewer.py
on Ubuntu 18.04 (64 bit):
pylsl.pylsl.InternalError: an internal error has occurred.
I traced it back to self.inlet.pull_chunk()
method which for some reason is returning this error. Testing with a simple script using self.inlet.pull_sample()
works fine.
This seems to be caused by the latest pylsl library (1.12.0), and installing previous version resolves the issue:
pip install -I pylsl==1.10.5
Suggestion to edit the guide to fix pylsl version.
@rcassani test needed with openbci lsl (openbci_gui and openbci_python?)
related to this #10 but opening a separate issue as it will be useful to have a widget to show impedance
Hi, i am getting confuse, when i try to make multiclass classification using exercise two. How to make multiclass classification using binary classifier. Can i just add class, and feature_matrix in this code ?
def train_classifier(feature_matrix_0, feature_matrix_1, algorithm='SVM'):
"""Train a binary classifier.
Train a binary classifier. First perform Z-score normalization, then
fit
Args:
feature_matrix_0 (numpy.ndarray): array of shape (n_samples,
n_features) with examples for Class 0
feature_matrix_0 (numpy.ndarray): array of shape (n_samples,
n_features) with examples for Class 1
alg (str): Type of classifer to use. Currently only SVM is
supported.
Returns:
(sklearn object): trained classifier (scikit object)
(numpy.ndarray): normalization mean
(numpy.ndarray): normalization standard deviation
"""
# Create vector Y (class labels)
class0 = np.zeros((feature_matrix_0.shape[0], 1))
class1 = np.ones((feature_matrix_1.shape[0], 1))
# Concatenate feature matrices and their respective labels
y = np.concatenate((class0, class1), axis=0)
features_all = np.concatenate((feature_matrix_0, feature_matrix_1),
axis=0)
Hi,
i am trying to start exercize number 1, but when i run it returns me this error:
File "C:\Users\RoY\Desktop\VRscience\bci_workshop-master\mules.py", line 93, in sendcommand
self.client.send(command)
TypeError: a bytes-like object is required, not 'str'
I am not a coder, i have just started learning.
edit: I fixed it by adding a b in the line: self.client.send(b'command')
Now i get this message:
Attempting connection
Connection successful
Header request
But no windows showing signal pop up
Thanks in advance for the help.
Cheers,
V.
https://neurotechx.slack.com/files/U08SY292B/F8QDU3BK5/image.png
Probably due to filtering being handled differently
In a workshop environment, it's sometimes difficult for all electrodes to get good enough signal. It would be helpful to be able to select only certain channels to feed to the classifier.
It might also be helpful to have a signal quality indicator widget like in EEG 101
git is necessary to install pygatt
Hi,
when I try to setup the workshop files on a macbook pro, macos 10.13.5 I always get the following error, when starting the lsl-viewer:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/anaconda2/envs/py36/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/anaconda2/envs/py36/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "lsl-viewer.py", line 120, in update_plot
max_samples=12)
File "/anaconda2/envs/py36/lib/python3.6/site-packages/pylsl/pylsl.py", line 844, in pull_chunk
handle_error(errcode)
File "/anaconda2/envs/py36/lib/python3.6/site-packages/pylsl/pylsl.py", line 1134, in handle_error
raise InternalError("an internal error has occurred.")
pylsl.pylsl.InternalError: an internal error has occurred.
Any help is highly appreciated.
Best regards,
Thomas
This was noted as an issue after running the workshop in Toronto. We should test the data coming from muse-lsl on Mac and Linux/Windows to see if there is any platform-specific lag issues
Bleeps are not bleeping correctly
I am getting the following error even after making the 0.25 second delay fix in the pygatt file :
Traceback (most recent call last):
File "muse-lsl.py", line 44, in <module>
muse.connect()
File "...\bci-workshop-master\python\muse\muse.py", line 44, in connect
self.adapter.start()
File "...\pygatt\backends\bgapi\bgapi.py", line 204, in start
self._detect_device_port()
File "...\pygatt\backends\bgapi\bgapi.py", line 147, in _detect_device_port
raise BGAPIError("Unable to auto-detect BLED112 serial port")
pygatt.backends.bgapi.exceptions.BGAPIError: Unable to auto-detect BLED112 serial port
Any idea on how to solve this? Already tried resetting :(
Was wondering what the function was made of and what it consisted of as I am trying to implement some of this code into my own project but cannot access the BCIworkshop function in my own code.
https://github.com/NeuroTechX/bci-workshop/blob/master/INSTRUCTIONS.md
instructions say:
...
Then, add the following to line 191 of bgapi.py and save:
time.sleep(.25)
Please clarify what the correct code snippet should be. I already have that sleep code on line 187 so I'm not sure if my code already had the fix applied. Also including it at 191 seems fine so I'll add it anyway.
Hi, i am trying to get the alpha,beta,gamma,delta and tetta wave from MUSE EEG, using raspberry pi, can i use this code ? Thank you
In the INSTRUCTIONS.md
,
To install the SDK, download and execute the Muse SDK Tools 3.4.1 installer for Windows.
When open the link, it is automatically redirected to http://developer.choosemuse.com. Although it is not apparent, Research Tools > (Windows Logo) Download link is the SDK 3.4.1.
Hi Ray,
Is it possible to manually set command line arguments for muse-io? For example, this enables to get blink events in other apps (python, processing, etc). For now, I found a workaround: first, launch muse-io with
$ muse-io --device Muse-XXXX --osc 'osc.tcp://localhost:5000' --osc-bp-urls 'osc.udp://localhost:12000'
then launch MuLES, start device and close the command prompt opend by MuLES.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.