Skip to content

Commit 6a04e6e

Browse files
Merge pull request #34 from SoftcodingForYou/devel
V2.91.4
2 parents 9bd9b92 + 4c898b8 commit 6a04e6e

10 files changed

Lines changed: 36 additions & 26 deletions

README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,28 @@ Watch the introduction on Youtube:
1616
## Compatible devices
1717

1818
- BioAmp EXG Pill by Upside Down Labs
19-
- Muse S by InteraXon Inc.
19+
- Muse S 2nd Gen by InteraXon Inc. (see statement below)
2020
- Neuri 1.x by Helment
2121
- Neuri-Lolin S3-PRO by Helment
2222

23+
24+
> ⚠️ **Warning:** Muse devices are best to be used with InteraXon Inc.'s own software packages such as Muse Lab, Muse Direct and the Muse mobile app. They have been refined and optimized over years and you will have a better time using those over the NeuriGUI!
25+
2326
## Setup
2427

25-
The GUI is distributed as a Python program. The GUI should work with **Python versions 3.9 or higher**.
28+
The GUI is distributed as a Python module and works with **Python versions 3.9 or higher**.
29+
30+
### Installing and running
31+
32+
The easiest way of setting up your environment is to install NeuriGUI via PiPy: `pip install neurigui`. You can then run it as follows:
33+
```
34+
import neuri.gui as ng
35+
ng.Run()
36+
```
37+
38+
The GUI can be run directly from an IDE by calling the `Run()` function found in "./neuri/gui.py".
39+
40+
> **ℹ️ Info:** Note that your settings are stored in a "settings.cfg" file inside the current workspace directory of the IDE or terminal.
2641
2742
### Preparing Python libraries
2843

@@ -51,17 +66,6 @@ The GUI is packageable into a **Python module**. For this, run inside the root f
5166
- Windows: `python -m build`
5267
- GNU/Linux: `python3 -m build`
5368

54-
### Installing and running
55-
56-
The GUI can be run directly from an IDE by calling the `Run()` function found in "./neuri/gui.py".
57-
You can also **install it as a Python module** pointing pip to the root folder of the project (NeuriGUI): `pip install ./path/to/NeuriGUI`. This will install the module found in "NeuriGUI/dist". You can then run the GUI from your own scripts such as:
58-
```
59-
import neuri.gui as ng
60-
ng.Run()
61-
```
62-
63-
Note that your settings are stored in a "settings.cfg" file inside the current workspace directory of the IDE or terminal.
64-
6569
## Troubleshooting
6670

6771
1. If the GUI seems to be stuck, check the following:
-595 KB
Binary file not shown.

dist/neurigui-2.91.2.tar.gz

-583 KB
Binary file not shown.
473 KB
Binary file not shown.

dist/neurigui-2.91.4.tar.gz

463 KB
Binary file not shown.

neuri/backend/io_manager.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
import socket
33
from threading import Thread
44
from datetime import datetime
5-
from pylsl import StreamInlet, resolve_stream
5+
from pylsl import StreamInlet
6+
try:
7+
from pylsl import resolve_stream
8+
except ImportError:
9+
from pylsl.resolve import resolve_stream
10+
611

712
class IOManager():
813

neuri/backend/signal_sampling_muse_s.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
from json import dumps
11-
from time import sleep, perf_counter
11+
from time import time
1212
from numpy import expand_dims, concatenate, append, array, zeros, reshape
1313
try:
1414
from io_manager import IOManager
@@ -74,9 +74,9 @@ def process_samples(self, transmitter, parameter, shared_buffer,
7474
receiver = receiver_ppg
7575

7676
# Prealloate values of loop ---------------------------------------
77-
start_time = int(perf_counter() * 1000)
78-
time_stamp_now = int(perf_counter() * 1000) # Do NOT copy from start_time (will generate pointer)
79-
time_reset = int(perf_counter() * 1000) # Do NOT copy from start_time (will generate pointer)
77+
start_time = int(time() * 1000)
78+
time_stamp_now = int(time() * 1000) # Do NOT copy from start_time (will generate pointer)
79+
time_reset = int(time() * 1000) # Do NOT copy from start_time (will generate pointer)
8080
sample_count = int(0)
8181

8282
buffer = zeros((parameter["max_chans"],
@@ -120,7 +120,7 @@ def process_samples(self, transmitter, parameter, shared_buffer,
120120
# require any additional changes from here
121121

122122
# Current timestamp -------------------------------------------
123-
time_stamp_now = int(perf_counter() * 1000) - start_time
123+
time_stamp_now = int(raw_message_eeg[1] / 1000) - start_time
124124
# This will generate unchanged time_stamps for all samples of
125125
# the incoming buffer (= 10 in case of bluetooth), but that is
126126
# not a problem

neuri/frontend/parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(self):
2121
self.frontend_path = os.path.dirname(__file__)
2222

2323
self.conf_file = os.path.join(".", "settings.cfg")
24-
self.version = '2.91.1' # TO-DO: Find a more elegant way to dynamically define the current version as this line here gets forgotten a lot
24+
self.version = '2.91.4' # TO-DO: Find a more elegant way to dynamically define the current version as this line here gets forgotten a lot
2525
self.ico_neuri = os.path.join(self.frontend_path, "Neuri_logo.ico")
2626

2727
self.set_defaults() # Necessary to execute first in case user

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "neurigui"
7-
version = "2.91.2"
7+
version = "2.91.4"
88
authors = [
99
{ name="David Marcel BAUM" },
10-
{ email="contact@davidbaum.org" },
10+
{ email="david.marcel.baum@gmail.com" },
1111
]
1212
maintainers = [
1313
{ name="SoftcodingForYou" },
14-
{ email="contact@davidbaum.org" },
14+
{ email="david.marcel.baum@gmail.com" },
1515
]
1616
description = "NeuriGUI is a modular, cross-platform and FOSS app for exploring electrophysiological signals in real-time"
1717
keywords = ["eeg", "visualization", "digital signal processing", "DSP", "neuroscience", "electrophysiology", "real-time"]
@@ -25,7 +25,7 @@ classifiers = [
2525
license = {file = "LICENSE"}
2626
dependencies = [
2727
"setuptools",
28-
"customtkinter==5.2.0",
28+
"customtkinter",
2929
"numpy",
3030
"oauthlib",
3131
"Pillow",

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
setuptools
2-
customtkinter==5.2.0
2+
customtkinter
33
numpy
44
oauthlib
55
Pillow
@@ -8,4 +8,5 @@ PyQt5
88
pyqtgraph
99
pyserial
1010
requests
11-
scipy
11+
scipy
12+
pylsl

0 commit comments

Comments
 (0)