Cleaning up the repository

Esse commit está contido em:
Mahdad Jafarzadehesfahani
2023-08-25 14:15:00 +02:00
commit 064323c28f
26 arquivos alterados com 0 adições e 9098 exclusões
-57
Ver Arquivo
@@ -1,57 +0,0 @@
import mne
import numpy as np
import matplotlib.pyplot as plt
import yasa
from mne.time_frequency import tfr_morlet, tfr_multitaper
%matplotlib qt
data_path = "P:\\3013102.01\\Data\\"
participant_session = ['NL_DNDRS_0004__ses-2']
for idx, c_subj in enumerate(participant_session):
participant_number = c_subj.split('__')[0]
session_number = c_subj.split('__')[1]
# Reading EEG data
path_EEG_L = data_path + participant_number +'\\' + session_number + '\\eeg\\EEG L.edf'
path_EEG_R = data_path + participant_number +'\\' + session_number + '\\eeg\\EEG R.edf'
# Load the EDF file
raw_EEG_L = mne.io.read_raw_edf(path_EEG_L, preload=True)
raw_EEG_R = mne.io.read_raw_edf(path_EEG_R, preload=True)
raw_EEG_L.filter(l_freq=.3, h_freq=30)
raw_EEG_R.filter(l_freq=.3, h_freq=30)
raw_EEG_L_get_data = np.ravel(raw_EEG_L.get_data(units="uV"))
raw_EEG_R_get_data = np.ravel(raw_EEG_R.get_data(units="uV"))
loc = raw_EEG_L_get_data[7190*256:]
roc = raw_EEG_R_get_data[7190*256:]
plt.plot(loc)
plt.plot(roc)
REM_events = yasa.rem_detect(loc = loc, roc = roc, sf=256, hypno=None, include=4, amplitude=(30, 325), duration=(0.1, 1.2), freq_rem=(0.2, 8), remove_outliers=True, verbose=False)
REM_events.summary()
REM_events.plot_average(time_before=1, time_after=1);
# Let's get a boolean mask of the REMs in data
mask = REM_events.get_mask()
loc_highlight = loc * mask[0, :]
roc_highlight = roc * mask[1, :]
loc_highlight[loc_highlight == 0] = np.nan
roc_highlight[roc_highlight == 0] = np.nan
plt.figure(figsize=(16, 4.5))
plt.plot(loc, 'slategrey', label='LOC')
plt.plot(roc, 'grey', label='ROC')
plt.plot( loc_highlight, 'indianred')
plt.plot( roc_highlight, 'indianred')
plt.xlabel('Time (seconds)')
plt.ylabel('Amplitude (uV)')
plt.title('REM sleep EOG data')
plt.legend()
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
-232
Ver Arquivo
@@ -1,232 +0,0 @@
2021-07-19 18:40:14 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-10896
2021-07-19 18:40:14 [INFO ] Loading ...
2021-07-19 18:40:14 [INFO ] Signal file: C:\Users\mahjaf\Downloads\
2021-07-19 18:40:14 [INFO ] Start datetime: 2021-07-17 03:32:42
2021-07-19 18:40:14 [INFO ] File duration: 22710 sec
2021-07-19 18:40:14 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-07-19 18:40:15 [INFO ] Selected channel: EEG L - EEG R
2021-07-19 18:40:15 [INFO ] Select channel samples: 757 epochs
2021-07-19 18:40:15 [INFO ] Sampling rate: 256.0 Hz
2021-07-19 18:40:15 [INFO ]
=======================================
2021-07-19 18:40:15 [INFO ] Autoscoring file: Left ...
2021-07-19 18:40:15 [INFO ] Test set (n_night_sleeps=1)
2021-07-19 18:40:15 [INFO ] (757, 7680, 1, 1)
2021-07-19 18:45:08 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-07-19 18:45:08 [INFO ] Loading ...
2021-07-19 18:45:08 [INFO ] Signal file: C:/Users/mahjaf/Downloads/
2021-07-19 18:45:08 [INFO ] Start datetime: 2021-07-17 03:32:42
2021-07-19 18:45:08 [INFO ] File duration: 22710 sec
2021-07-19 18:45:08 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-07-19 18:45:09 [INFO ] Selected channel: EEG L - EEG R
2021-07-19 18:45:09 [INFO ] Select channel samples: 757 epochs
2021-07-19 18:45:09 [INFO ] Sampling rate: 256.0 Hz
2021-07-19 18:45:09 [INFO ]
=======================================
2021-07-19 18:45:09 [INFO ] Autoscoring file: 1 ...
2021-07-19 18:45:09 [INFO ] Test set (n_night_sleeps=1)
2021-07-19 18:45:09 [INFO ] (757, 7680, 1, 1)
2021-07-19 18:45:22 [INFO ] Loading ...
2021-07-19 18:45:22 [INFO ] Signal file: C:/Users/mahjaf/Downloads/
2021-07-19 18:47:55 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-07-19 18:47:55 [INFO ] Loading ...
2021-07-19 18:47:55 [INFO ] Signal file: C:/Users/mahjaf/Downloads/
2021-07-19 18:47:55 [INFO ] Start datetime: 2021-07-17 03:32:42
2021-07-19 18:47:55 [INFO ] File duration: 22710 sec
2021-07-19 18:47:55 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-07-19 18:47:56 [INFO ] Selected channel: EEG L - EEG R
2021-07-19 18:47:56 [INFO ] Select channel samples: 757 epochs
2021-07-19 18:47:56 [INFO ] Sampling rate: 256.0 Hz
2021-07-19 18:47:56 [INFO ]
=======================================
2021-07-19 18:47:56 [INFO ] Autoscoring file: 1 ...
2021-07-19 18:47:56 [INFO ] Test set (n_night_sleeps=1)
2021-07-19 18:47:56 [INFO ] (757, 7680, 1, 1)
2021-07-29 18:22:16 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-07-29 18:22:16 [INFO ] Loading ...
2021-07-29 18:22:16 [INFO ] Signal file: C:/Users/mahjaf/Downloads/
2021-07-29 18:22:16 [INFO ] Start datetime: 2021-07-29 14:14:33
2021-07-29 18:22:16 [INFO ] File duration: 5530 sec
2021-07-29 18:22:16 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-07-29 18:22:16 [INFO ] Selected channel: EEG L - EEG R
2021-07-29 18:22:16 [INFO ] Select channel samples: 184 epochs
2021-07-29 18:22:16 [INFO ] Sampling rate: 256.0 Hz
2021-07-29 18:22:16 [INFO ]
=======================================
2021-07-29 18:22:16 [INFO ] Autoscoring file: 1 ...
2021-07-29 18:22:16 [INFO ] Test set (n_night_sleeps=1)
2021-07-29 18:22:16 [INFO ] (184, 7680, 1, 1)
2021-08-05 12:37:38 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-08-05 12:37:38 [INFO ] Loading ...
2021-08-05 12:37:38 [INFO ] Signal file: C:/Users/mahjaf/Downloads/
2021-08-05 12:38:38 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-08-05 12:38:38 [INFO ] Loading ...
2021-08-05 12:38:38 [INFO ] Signal file: C:/Users/mahjaf/Downloads/
2021-08-05 12:38:38 [INFO ] Start datetime: 2021-08-05 10:43:50
2021-08-05 12:38:38 [INFO ] File duration: 6320 sec
2021-08-05 12:38:38 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-08-05 12:38:39 [INFO ] Selected channel: EEG L - EEG R
2021-08-05 12:38:39 [INFO ] Select channel samples: 210 epochs
2021-08-05 12:38:39 [INFO ] Sampling rate: 256.0 Hz
2021-08-05 12:38:39 [INFO ]
=======================================
2021-08-05 12:38:39 [INFO ] Autoscoring file: 1 ...
2021-08-05 12:38:39 [INFO ] Test set (n_night_sleeps=1)
2021-08-05 12:38:39 [INFO ] (210, 7680, 1, 1)
2021-08-05 12:40:48 [INFO ] Best model restored from ./out_QS/train/10\best_ckpt\best_model.ckpt-6601
2021-08-05 12:40:48 [INFO ] Loading ...
2021-08-05 12:40:48 [INFO ] Signal file: C:/Users/mahjaf/Downloads/
2021-08-05 12:40:48 [INFO ] Start datetime: 2021-08-05 10:43:50
2021-08-05 12:40:48 [INFO ] File duration: 6320 sec
2021-08-05 12:40:48 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-08-05 12:40:48 [INFO ] Selected channel: EEG L - EEG R
2021-08-05 12:40:48 [INFO ] Select channel samples: 210 epochs
2021-08-05 12:40:48 [INFO ] Sampling rate: 256.0 Hz
2021-08-05 12:40:48 [INFO ]
=======================================
2021-08-05 12:40:48 [INFO ] Autoscoring file: 1 ...
2021-08-05 12:40:48 [INFO ] Test set (n_night_sleeps=1)
2021-08-05 12:40:48 [INFO ] (210, 7680, 1, 1)
2021-08-09 13:15:34 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-08-09 13:15:34 [INFO ] Loading ...
2021-08-09 13:15:34 [INFO ] Signal file: C:\Users\asus\Desktop\dr. dresler\zmax\code\ZmaxDonders\Testing\recording-date-2021-08-05-time-10-43-53 Pilot 2\
2021-08-09 13:15:34 [INFO ] Start datetime: 2021-08-05 10:43:50
2021-08-09 13:15:34 [INFO ] File duration: 6320 sec
2021-08-09 13:15:34 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-08-09 13:15:34 [INFO ] Selected channel: EEG L - EEG R
2021-08-09 13:15:34 [INFO ] Select channel samples: 210 epochs
2021-08-09 13:15:34 [INFO ] Sampling rate: 256 Hz
2021-08-09 13:15:34 [INFO ]
=======================================
2021-08-09 13:15:34 [INFO ] Autoscoring file: 1 ...
2021-08-09 13:15:34 [INFO ] Test set (n_night_sleeps=1)
2021-08-09 13:15:34 [INFO ] (210, 7680, 1, 1)
2021-08-09 13:29:20 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-08-09 13:29:20 [INFO ] Loading ...
2021-08-09 13:29:20 [INFO ] Signal file: C:\Users\asus\Desktop\dr. dresler\zmax\code\ZmaxDonders\Testing\recording-date-2021-08-05-time-10-43-53 Pilot 2\
2021-08-09 13:29:20 [INFO ] Start datetime: 2021-08-05 10:43:50
2021-08-09 13:29:20 [INFO ] File duration: 6320 sec
2021-08-09 13:29:20 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-08-09 13:29:20 [INFO ] Selected channel: EEG L - EEG R
2021-08-09 13:29:20 [INFO ] Select channel samples: 210 epochs
2021-08-09 13:29:20 [INFO ] Sampling rate: 256 Hz
2021-08-09 13:29:20 [INFO ]
=======================================
2021-08-09 13:29:20 [INFO ] Autoscoring file: 1 ...
2021-08-09 13:29:20 [INFO ] Test set (n_night_sleeps=1)
2021-08-09 13:29:20 [INFO ] (210, 7680, 1, 1)
2021-08-09 13:30:45 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-08-09 13:30:45 [INFO ] Loading ...
2021-08-09 13:30:45 [INFO ] Signal file: C:\Users\asus\Desktop\dr. dresler\zmax\code\ZmaxDonders\Testing\recording-date-2021-08-05-time-10-43-53 Pilot 2\
2021-08-09 13:30:45 [INFO ] Start datetime: 2021-08-05 10:43:50
2021-08-09 13:30:45 [INFO ] File duration: 6320 sec
2021-08-09 13:30:45 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-08-09 13:30:45 [INFO ] Selected channel: EEG L - EEG R
2021-08-09 13:30:45 [INFO ] Select channel samples: 210 epochs
2021-08-09 13:30:45 [INFO ] Sampling rate: 256 Hz
2021-08-09 13:30:45 [INFO ]
=======================================
2021-08-09 13:30:45 [INFO ] Autoscoring file: 1 ...
2021-08-09 13:30:45 [INFO ] Test set (n_night_sleeps=1)
2021-08-09 13:30:45 [INFO ] (210, 7680, 1, 1)
2021-08-09 13:32:30 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-08-09 13:32:30 [INFO ] Loading ...
2021-08-09 13:32:30 [INFO ] Signal file: C:\Users\asus\Desktop\dr. dresler\zmax\code\ZmaxDonders\Testing\recording-date-2021-08-05-time-10-43-53 Pilot 2\
2021-08-09 13:32:30 [INFO ] Start datetime: 2021-08-05 10:43:50
2021-08-09 13:32:30 [INFO ] File duration: 6320 sec
2021-08-09 13:32:30 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-08-09 13:32:30 [INFO ] Selected channel: EEG L - EEG R
2021-08-09 13:32:30 [INFO ] Select channel samples: 210 epochs
2021-08-09 13:32:30 [INFO ] Sampling rate: 256 Hz
2021-08-09 13:32:30 [INFO ]
=======================================
2021-08-09 13:32:30 [INFO ] Autoscoring file: 1 ...
2021-08-09 13:32:30 [INFO ] Test set (n_night_sleeps=1)
2021-08-09 13:32:30 [INFO ] (210, 7680, 1, 1)
2021-08-09 13:53:26 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-08-09 13:53:26 [INFO ] Loading ...
2021-08-09 13:53:26 [INFO ] Signal file: C:\Users\asus\Desktop\dr. dresler\zmax\code\ZmaxDonders\Testing\recording-date-2021-08-05-time-10-43-53 Pilot 2\
2021-08-09 13:53:26 [INFO ] Start datetime: 2021-08-05 10:43:50
2021-08-09 13:53:26 [INFO ] File duration: 6320 sec
2021-08-09 13:53:26 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-08-09 13:53:26 [INFO ] Selected channel: EEG L - EEG R
2021-08-09 13:53:26 [INFO ] Select channel samples: 210 epochs
2021-08-09 13:53:26 [INFO ] Sampling rate: 256 Hz
2021-08-09 13:53:26 [INFO ]
=======================================
2021-08-09 13:53:26 [INFO ] Autoscoring file: 1 ...
2021-08-09 13:53:26 [INFO ] Test set (n_night_sleeps=1)
2021-08-09 13:53:26 [INFO ] (210, 7680, 1, 1)
2021-08-09 13:55:07 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-08-09 13:55:07 [INFO ] Loading ...
2021-08-09 13:55:07 [INFO ] Signal file: C:\Users\asus\Desktop\dr. dresler\zmax\code\ZmaxDonders\Testing\recording-date-2021-08-05-time-10-43-53 Pilot 2\
2021-08-09 13:55:07 [INFO ] Start datetime: 2021-08-05 10:43:50
2021-08-09 13:55:07 [INFO ] File duration: 6320 sec
2021-08-09 13:55:07 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-08-09 13:55:07 [INFO ] Selected channel: EEG L - EEG R
2021-08-09 13:55:07 [INFO ] Select channel samples: 210 epochs
2021-08-09 13:55:07 [INFO ] Sampling rate: 256 Hz
2021-08-09 13:55:07 [INFO ]
=======================================
2021-08-09 13:55:07 [INFO ] Autoscoring file: 1 ...
2021-08-09 13:55:07 [INFO ] Test set (n_night_sleeps=1)
2021-08-09 13:55:07 [INFO ] (210, 7680, 1, 1)
2021-08-09 14:02:37 [INFO ] Loading new array for prediciton...
2021-08-09 14:02:37 [INFO ]
=======================================
2021-08-09 14:02:37 [INFO ] Initializing the model ...
2021-08-09 14:02:45 [INFO ] Loading new array for prediciton...
2021-08-09 14:02:45 [INFO ]
=======================================
2021-08-09 14:02:45 [INFO ] Initializing the model ...
2021-08-11 11:11:32 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-08-11 11:11:58 [INFO ] Loading ...
2021-08-11 11:11:58 [INFO ] Signal file: C:\Users\asus\Desktop\dr. dresler\zmax\code\ZmaxDonders\Testing\recording-date-2021-08-05-time-10-43-53 Pilot 2\
2021-08-11 11:11:58 [INFO ] Start datetime: 2021-08-05 10:43:50
2021-08-11 11:11:58 [INFO ] File duration: 6320 sec
2021-08-11 11:11:58 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-08-11 12:45:06 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-08-11 12:45:44 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-08-11 12:45:44 [INFO ] Loading ...
2021-08-11 12:45:44 [INFO ] Signal file: C:\Users\asus\Desktop\dr. dresler\zmax\code\ZmaxDonders\Testing\recording-date-2021-08-05-time-10-43-53 Pilot 2\
2021-08-11 12:45:44 [INFO ] Start datetime: 2021-08-05 10:43:50
2021-08-11 12:45:44 [INFO ] File duration: 6320 sec
2021-08-11 12:45:44 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-08-11 12:45:44 [INFO ] Selected channel: EEG L - EEG R
2021-08-11 12:45:44 [INFO ] Select channel samples: 210 epochs
2021-08-11 12:45:44 [INFO ] Sampling rate: 256 Hz
2021-08-11 12:45:44 [INFO ]
=======================================
2021-08-11 12:45:44 [INFO ] Autoscoring file: 1 ...
2021-08-11 12:45:44 [INFO ] Test set (n_night_sleeps=1)
2021-08-11 12:45:44 [INFO ] (210, 7680, 1, 1)
2021-08-11 12:47:18 [INFO ] Best model restored from ./out_QS/train/4\best_ckpt\best_model.ckpt-16140
2021-08-11 12:47:18 [INFO ] Loading ...
2021-08-11 12:47:18 [INFO ] Signal file: C:\Users\asus\Desktop\dr. dresler\zmax\code\ZmaxDonders\Testing\recording-date-2021-08-05-time-10-43-53 Pilot 2\
2021-08-11 12:47:18 [INFO ] Start datetime: 2021-08-05 10:43:50
2021-08-11 12:47:18 [INFO ] File duration: 6320 sec
2021-08-11 12:47:18 [INFO ] Epoch duration: 30.0 sec (changed from 1 sec)
2021-08-11 12:47:18 [INFO ] Selected channel: EEG L - EEG R
2021-08-11 12:47:18 [INFO ] Select channel samples: 210 epochs
2021-08-11 12:47:18 [INFO ] Sampling rate: 256 Hz
2021-08-11 12:47:18 [INFO ]
=======================================
2021-08-11 12:47:18 [INFO ] Autoscoring file: 1 ...
2021-08-11 12:47:18 [INFO ] Test set (n_night_sleeps=1)
2021-08-11 12:47:18 [INFO ] (210, 7680, 1, 1)
Arquivo binário não exibido.
Arquivo binário não exibido.
-2
Ver Arquivo
@@ -1,2 +0,0 @@
model_checkpoint_path: "best_model.ckpt-6603"
all_model_checkpoint_paths: "best_model.ckpt-6603"
-2
Ver Arquivo
@@ -1,2 +0,0 @@
model_checkpoint_path: "model.ckpt-8690"
all_model_checkpoint_paths: "model.ckpt-8690"
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.1 MiB

-8597
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
-208
Ver Arquivo
@@ -1,208 +0,0 @@
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
0
0
0
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
2
2
0
0
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
4
0
0
0
0
4
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4
4
4
4
4
4
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
0
0
0
0
0
0
0
0
1