diff --git a/EStiMo_GUI.py b/EStiMo_GUI.py index 90fe5bd..ef3128f 100644 --- a/EStiMo_GUI.py +++ b/EStiMo_GUI.py @@ -5,6 +5,9 @@ Created on Tue Nov 23 11:11:41 2021 @author: adamr """ +import sys, os +sys.path.append(os.path.dirname(os.path.abspath(__file__))) + from connection import NeurOne, RDA # import RDA @@ -215,7 +218,7 @@ def acquire_data(q, size, run, speed, downsample, sleep_time, ip = '192.168.200. run: Value class from multiprocessing library. That value can be changed in main process downsample: boolean value. Says if data will be downsampled to 1000 Hz sleep_time: int, set how often function should refresh. Usually it takes a bit more that that""" - offline = 'offline' + # offline = 'offline' #import NeurOne_v3 if offline=="offline": NO = NeurOneOffline() @@ -247,7 +250,7 @@ class AppForm(QMainWindow): def __init__(self, passed_params = None, parent=None): super().__init__() #self.setStyleSheet("background: whitesmoke") - self.offline = "offline" #'NeurOne' #"BrainProducts"#False + self.offline = None #"offline" #'NeurOne' #"BrainProducts"#False self.time_start = time.time() QMainWindow.__init__(self, parent) self.montage_file_path = 'montage_18ch.csv' @@ -416,12 +419,13 @@ class AppForm(QMainWindow): self.remove_outliers = passed_params['remove_outliers'] self.ip = passed_params['ip'] self.port = passed_params['port'] - self.offline = self.offline if not None else passed_params['offline'] + self.offline = self.offline if not self.offline==None else passed_params['offline'] self.exp_trig = passed_params['exp_trig'] self.exp_time = passed_params['exp_time'] self.if_percentage = passed_params['percentages'] self.received_thr_values = passed_params['thr_values'] self.plot_len = passed_params['plot_len'] + print(self.offline) else: self.montage_file_path = 'montage_18ch.csv' self.time_between_bursts = int(settings_file[settings_file[0]=='time_between_trains'].values[0][1]) @@ -445,6 +449,7 @@ class AppForm(QMainWindow): self.offline = False self.plot_len = 4 #length of data to plot (last seconds of data array) + self.unit_label = np.array(self.unit_label)[self.used_features] self.log_file_writer.writerow(['time', 'state', self.used_features]) @@ -743,7 +748,7 @@ class AppForm(QMainWindow): self.timer.setInterval(int(self.speed_general*1.03)) times = time.time() - self.offline='offline' #remove this! + # self.offline='offline' #remove this! if self.offline=="offline": incl = [0,2,6,7,8,10,13,16,18,22,25,28,31,34,41,43,-3,-2,-1] # For offline only loaded_temp = self.q.get()[incl]/10 # Load data diff --git a/Electrode_selection.txt b/Electrode_selection.txt new file mode 100644 index 0000000..af376a5 --- /dev/null +++ b/Electrode_selection.txt @@ -0,0 +1,2 @@ +full_cap_file_path: C:/Users/Basics/Desktop/new_super_important_study/TMS Trains/Up to date version/estimo-master (1)/estimo-master/settings/easycap-M10_63_NO.txt +cap_file_path: C:/Users/Basics/Desktop/new_super_important_study/TMS Trains/Up to date version/estimo-master (1)/estimo-master/settings/easycap-M10_16_NO.txt \ No newline at end of file diff --git a/README.md b/README.md index a8cea76..2ef0811 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,6 @@ EStiMo is a sophisticated software developed for the purpose of real-time monitoring during Transcranial Magnetic Stimulation (TMS) sessions. This is accomplished by conducting a real-time analysis of Electroencephalography (EEG) signals. Its operational mechanics are contingent on a suite of features that are computed online and visually represented on the display interface. The computation of these values takes place in between the trains of TMS. ## Installation -To install all required library use: - -``` -pip install -r requirements.txt -``` - EStiMo is designed to be conveniently portable and as such, does not necessitate a typical installation procedure. However, the pre-requisite for running this software smoothly is a Python 3 environment, ideally version 3.8. Alongside Python, several other libraries are necessary for full functionality, including: time, matplotlib, mne, inspect, sys, os, random, scipy, PyQt5, multiprocessing, pandas, json, cycler, traceback, and csv. The EStiMo package is comprised of 6 distinct Python script files namely: FirstWindow.py, Functions.py, NeurOne.py, RDA.py, and EStiMo_GUI.py. Additionally, there are certain auxiliary files that facilitate the running of the software. The 'TMS_protocol.txt' file includes the default settings for the application. The 'electrode_selection.txt' file contains the directories for files related to electrode placement. Lastly, the package also includes a csv file that possesses a square matrix, which is integral for defining the relationships between the various channels. diff --git a/connection/__init__.py b/connection/__init__.py index e69de29..da00392 100644 --- a/connection/__init__.py +++ b/connection/__init__.py @@ -0,0 +1,3 @@ +import sys, os +# sys.path.append("..") +sys.path.append(os.path.dirname(os.path.abspath(__file__))) diff --git a/connection/__pycache__/NeurOne.cpython-38.pyc b/connection/__pycache__/NeurOne.cpython-38.pyc index ae586c6..465cd50 100644 Binary files a/connection/__pycache__/NeurOne.cpython-38.pyc and b/connection/__pycache__/NeurOne.cpython-38.pyc differ diff --git a/connection/__pycache__/RDA.cpython-38.pyc b/connection/__pycache__/RDA.cpython-38.pyc index 1d7c382..c16abde 100644 Binary files a/connection/__pycache__/RDA.cpython-38.pyc and b/connection/__pycache__/RDA.cpython-38.pyc differ diff --git a/connection/__pycache__/__init__.cpython-38.pyc b/connection/__pycache__/__init__.cpython-38.pyc index 494ef4b..0d96a45 100644 Binary files a/connection/__pycache__/__init__.cpython-38.pyc and b/connection/__pycache__/__init__.cpython-38.pyc differ diff --git a/settings/Electrode_selection.txt b/settings/Electrode_selection.txt index 2fe9b3b..bc31696 100644 --- a/settings/Electrode_selection.txt +++ b/settings/Electrode_selection.txt @@ -1,2 +1,2 @@ -full_cap_file_path: /home/adamr/Documents/PYTHON/TMS TV/EStiMo/settings/easycap-M10_63_NO.txt -cap_file_path: /home/adamr/Documents/PYTHON/TMS TV/EStiMo/settings/easycap-M10_16_NO.txt +full_cap_file_path: settings/easycap-M10_63_NO.txt +cap_file_path: settings/easycap-M10_16_NO.txt \ No newline at end of file diff --git a/utils/__pycache__/FirstWindow.cpython-38.pyc b/utils/__pycache__/FirstWindow.cpython-38.pyc index c2318e4..f058d16 100644 Binary files a/utils/__pycache__/FirstWindow.cpython-38.pyc and b/utils/__pycache__/FirstWindow.cpython-38.pyc differ diff --git a/utils/__pycache__/Functions.cpython-38.pyc b/utils/__pycache__/Functions.cpython-38.pyc index d63512c..9848719 100644 Binary files a/utils/__pycache__/Functions.cpython-38.pyc and b/utils/__pycache__/Functions.cpython-38.pyc differ diff --git a/utils/__pycache__/Waiting.cpython-38.pyc b/utils/__pycache__/Waiting.cpython-38.pyc index 8014d83..961d161 100644 Binary files a/utils/__pycache__/Waiting.cpython-38.pyc and b/utils/__pycache__/Waiting.cpython-38.pyc differ diff --git a/utils/__pycache__/__init__.cpython-38.pyc b/utils/__pycache__/__init__.cpython-38.pyc index 3873aa1..ba7cdae 100644 Binary files a/utils/__pycache__/__init__.cpython-38.pyc and b/utils/__pycache__/__init__.cpython-38.pyc differ diff --git a/utils/features.py b/utils/features.py old mode 100755 new mode 100644