Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified dist/neurigui-2.91.0-py3-none-any.whl
Binary file not shown.
Binary file modified dist/neurigui-2.91.0.tar.gz
Binary file not shown.
11 changes: 8 additions & 3 deletions neuri/backend/compatible_boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@
# Set None where parameter is not required
COMPATIBLE_BOARDS = {
# Unique name: [
# 0: Start code (int),
# 0: Start code (int or None),
# 1: Main sampling rate (EEG for most boards) (Hz),
# 2: Baud rate (int),
# 3: Board_specific class (object),
# 4: Number of channels (int),
# 5: Uses lab streaming layer LSL (bool),
# 6: Possible to set PGA (bool),
# 7: Sampling rate of secondary data type applicable, ie PPG (int, None),
# 8: Amount of channels for secondary data type (ie PPG)
# 7: Sampling rate of secondary data type applicable, ie PPG (int or None),
# 8: Amount of channels for secondary data type (ie PPG) (int or None),
# 9: Default Programmable Gain Amplitude (int or None)
# ]
"Neuri V1 by Helment": [
2,
Expand All @@ -39,6 +40,7 @@
True,
None,
None,
24,
],
"Neuri-Lolin S3-PRO by Helment": [
2,
Expand All @@ -50,6 +52,7 @@
True,
None,
None,
24,
],
"BioAmp EXG Pill by Upside Down Labs": [
None,
Expand All @@ -61,6 +64,7 @@
False,
None,
None,
None,
],
"Muse S by InteraXon": [
None,
Expand All @@ -72,5 +76,6 @@
False,
64,
3,
None,
]
}
19 changes: 11 additions & 8 deletions neuri/frontend/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ def set_defaults(self):

#Signal arrays
self.sample_rate = COMPATIBLE_BOARDS["Neuri V1 by Helment"][1] #Hertz
self.max_chans = 8 #scalar (Max. amount of input channels of board)
self.max_chans = COMPATIBLE_BOARDS["Neuri V1 by Helment"][4] #scalar (Max. amount of input channels of board)
self.selected_chans = [True] * self.max_chans
self.buffer_length = 10 #scalar (seconds)
self.buffer_add = 4 #scalar (seconds), we add this to the buffer for filtering to avoid edge artifacts
self.saving_interval= 1 #scalar (seconds)
self.PGA = 24 #scalar
self.PGA = COMPATIBLE_BOARDS["Neuri V1 by Helment"][9] #scalar

#Signal reception
self.baud_rate = COMPATIBLE_BOARDS["Neuri V1 by Helment"][2] #scalar default baudrate for connection
Expand Down Expand Up @@ -252,7 +252,7 @@ def set_defaults(self):
'Sleep': (1, 30),
'Theta': (4, 8),
'Whole': (0.5, 45),
'Slow': (0.1, 6),
'Slow': (0.5, 6),
}


Expand Down Expand Up @@ -400,6 +400,7 @@ def get_board_features(self, board_name):
self.adjustable_pga = COMPATIBLE_BOARDS[board_name][6]
self.secondary_sampling_rate = COMPATIBLE_BOARDS[board_name][7]
self.secondary_max_chans = COMPATIBLE_BOARDS[board_name][8]
self.PGA = COMPATIBLE_BOARDS[board_name][9]


def display_board_version(self, master):
Expand Down Expand Up @@ -432,8 +433,12 @@ def set_menu_states(self):
self.portMenu.configure(state="disabled")
else:
ports = [port.device for port in list(serial.tools.list_ports.comports())]
self.portMenu.set(ports[0]) if len(ports) > 0 else self.portMenu.set('No port available')
self.portMenu.configure(state="enabled")
if self.port != "":
self.portMenu.set(self.port) if len(ports) > 0 else self.portMenu.set('No port available')
self.portMenu.configure(state="enabled")
else:
self.portMenu.set(ports[0]) if len(ports) > 0 else self.portMenu.set('No port available')
self.portMenu.configure(state="enabled")
except AttributeError:
pass

Expand All @@ -442,8 +447,6 @@ def set_menu_states(self):
self.gainMenu.set(self.PGA)
self.gainMenu.configure(state="enabled")
else:
self.PGA = 0
self.gainMenu.set(self.PGA)
self.gainMenu.configure(state="disabled")
except AttributeError:
pass
Expand Down Expand Up @@ -583,7 +586,7 @@ def select_data_type(self):

def display_gains(self, master):

gains = ['0', '1', '2', '4', '6', '8', '12', '24']
gains = ['1', '2', '4', '6', '8', '12', '24']
idx_def = [i for i in range(len(gains)) if int(gains[i]) == self.PGA]

labelGain = customtkinter.CTkLabel(master=master,
Expand Down
4 changes: 2 additions & 2 deletions neuri/frontend/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def fg_bandpass_filter(self):
rbtn3 = QtWidgets.QRadioButton('0.5 - 45')
rbtn4 = QtWidgets.QRadioButton('1 - 30')
rbtn5 = QtWidgets.QRadioButton('4 - 8')
rbtn6 = QtWidgets.QRadioButton('0.1 - 6')
rbtn6 = QtWidgets.QRadioButton('0.5 - 6')

if self.streamed_data_type == "EEG":
if self.bpass == -1:
Expand Down Expand Up @@ -517,7 +517,7 @@ def filt_bandpass(self, choice):
self.bPB = self.proc.b_theta
self.aPB = self.proc.a_theta
elif choice == 4:
print('Bandpass filter between 0.1 and 6 Hz')
print('Bandpass filter between 0.5 and 6 Hz')
self.bPB = self.proc.b_slow
self.aPB = self.proc.a_slow

Expand Down