Skip to content

Commit

Permalink
Readme update - Acknowledgement
Browse files Browse the repository at this point in the history
  • Loading branch information
xmival00 committed Mar 13, 2024
1 parent d97c05a commit 8a18eab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
17 changes: 9 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ This toolbox was developed during multiple projects we appreciate you acknowledg
The toolbox as a whole was developed during the following projects:

| F. Mivalt et V. Kremen et al., “Electrical brain stimulation and continuous behavioral state tracking in ambulatory humans,” J. Neural Eng., vol. 19, no. 1, p. 016019, Feb. 2022, doi: 10.1088/1741-2552/ac4bfd.
|
| V. Sladky et al., “Distributed brain co-processor for tracking spikes, seizures and behaviour during electrical brain stimulation,” Brain Commun., vol. 4, no. 3, May 2022, doi: 10.1093/braincomms/fcac115.
For different modules, please see below.
|
For individual modules, please see below.

Sleep classification and feature extraction
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

| F. Mivalt et V. Kremen et al., “Electrical brain stimulation and continuous behavioral state tracking in ambulatory humans,” J. Neural Eng., vol. 19, no. 1, p. 016019, Feb. 2022, doi: 10.1088/1741-2552/ac4bfd.
|
| F. Mivalt et V. Sladky et al., “Automated sleep classification with chronic neural implants in freely behaving canines,” J. Neural Eng., vol. 20, no. 4, p. 046025, Aug. 2023, doi: 10.1088/1741-2552/aced21.
|
| Gerla, V., Kremen, V., Macas, M., Dudysova, D., Mladek, A., Sos, P., & Lhotska, L. (2019). Iterative expert-in-the-loop classification of sleep PSG recordings using a hierarchical clustering. Journal of Neuroscience Methods, 317(February), 61?70. https://doi.org/10.1016/j.jneumeth.2019.01.013
|
| Kremen, V., Brinkmann, B. H., Van Gompel, J. J., Stead, S. (Matt) M., St Louis, E. K., & Worrell, G. A. (2018). Automated Unsupervised Behavioral State Classification using Intracranial Electrophysiology. Journal of Neural Engineering. https://doi.org/10.1088/1741-2552/aae5ab
|
| Kremen, V., Duque, J. J., Brinkmann, B. H., Berry, B. M., Kucewicz, M. T., Khadjevand, F., G.A. Worrell, G. A. (2017). Behavioral state classification in epileptic brain using intracranial electrophysiology. Journal of Neural Engineering, 14(2), 026001. https://doi.org/10.1088/1741-2552/aa5688

Expand All @@ -71,7 +71,8 @@ Evoked Response Potential Analysis
Acknowledgement
"""""""""""""""""""

BEST was developed under projects supported by NIH Brain Initiative UH2&3 NS095495 Neurophysiologically-Based Brain State Tracking & Modulation in Focal Epilepsy, DARPA HR0011-20-2-0028 Manipulating and Optimizing Brain Rhythms for Enhancement of Sleep (Morpheus).
BEST was developed under projects supported by NIH Brain Initiative UH2&3 NS095495 Neurophysiologically-Based Brain State Tracking & Modulation in Focal Epilepsy, NIH U01-NS128612 An Ecosystem of Techmology and Protocols for Adaptive Neuromodulation Research in Humans, DARPA HR0011-20-2-0028 Manipulating and Optimizing Brain Rhythms for Enhancement of Sleep (Morpheus).

Filip Mivalt was also partially supported by the grant FEKT-K-22-7649 realized within the project Quality Internal Grants of the Brno University of Technology (KInG BUT), Reg. No. CZ.02.2.69/0.0/0.0/19_073/0016948, which is financed from the OP RDE.


Expand Down
12 changes: 4 additions & 8 deletions best/cloud/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from datetime import datetime



class DatabaseHandler:
__version__ = '0.0.1'
def __init__(self, sql_db_name, sql_host=None, sql_user=None, sql_pwd=None, sql_port=None, ssh_host=None, ssh_user=None, ssh_pwd=None, ssh_port=None):
Expand Down Expand Up @@ -131,17 +130,16 @@ def db_name(self, name):
self.check_connection()



class SessionFinder(DatabaseHandler):
#TODO: Enable searching for signals between multiple session
__version__ = '0.0.1'
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

def find_mef_session(self, patient_id, uutc_start, uutc_stop):
if not isinstance(uutc_start, (int, float, np.int64, np.float)):
if not isinstance(uutc_start, (int, float, np.int64, np.float32, np.float16, np.float64)):
raise TypeError('uutc_start has to be of a number type - int or float. Data type ' + type(uutc_start) + ' found instead.')
if not isinstance(uutc_stop, (int, float, np.int64, np.float)):
if not isinstance(uutc_stop, (int, float, np.int64, np.float32, np.float16, np.float64)):
raise TypeError('uutc_stop has to be of a number type - int or float. Data type ' + type(uutc_stop) + ' found instead.')

uutc_start = int(round(uutc_start*1e6))
Expand All @@ -162,9 +160,9 @@ def find_mef_session_bulk(self, patient_id, df):

for row in tqdm(list(df.iterrows())):
row = row[1]
if not isinstance(row['start'], (int, float, np.int64, np.float)):
if not isinstance(row['start'], (int, float, np.int64, np.float32, np.float16, np.float64)):
raise TypeError('start column has to be of a number type - int or float. Data type ' + type(row['start']) + ' found instead.')
if not isinstance(row['end'], (int, float, np.int64, np.float)):
if not isinstance(row['end'], (int, float, np.int64, np.float32, np.float16, np.float64)):
raise TypeError('end column has to be of a number type - int or float. Data type ' + type(row['end']) + ' found instead.')

uutc_start = int(round(row['start']*1e6))
Expand Down Expand Up @@ -194,7 +192,6 @@ def data_range(self, patient_id):
return unique_ids.values[0]



class SleepClassificationModelDBHandler(DatabaseHandler):
keys_pickle = ['classifier']
keys_unalter = ['pid', 'kappa_score', 'name', 'class_name', 'package', 'package_version']
Expand Down Expand Up @@ -684,7 +681,6 @@ def get_spike_n_detections(self, patient_id=None, channel=None, start_timestamp
self._close_sql()
return df['COUNT(start_uutc)'][0]


def get_spike_detections(self, patient_id=None, channel=None, start_timestamp=None, stop_timestamp=None):
if isinstance(start_timestamp, type(None)):
start_timestamp = 0
Expand Down

0 comments on commit 8a18eab

Please sign in to comment.