Replies: 1 comment 10 replies
-
Hi,
|
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Excellent work!
Extracting sleep EEG data from the sleep EDF file and converting it to the npz format, I obtained very low values for the first five elements. What could be the cause of this outcome?
F4-M1: [-3.05180438e-08 -3.05180438e-08 -3.05180438e-08 -3.05180438e-08
-3.05180438e-08]
C4-M1: [-3.05180438e-08 -3.05180438e-08 -3.05180438e-08 -3.05180438e-08
-3.05180438e-08]
O2-M1: [-3.05180438e-08 -3.05180438e-08 -3.05180438e-08 -3.05180438e-08
-3.05180438e-08]
F3-M2: [-3.05180438e-08 -3.05180438e-08 -3.05180438e-08 -3.05180438e-08
-3.05180438e-08]
C3-M2: [-3.05180438e-08 -3.05180438e-08 -3.05180438e-08 -3.05180438e-08
-3.05180438e-08]
O1-M2: [-3.05180438e-08 -3.05180438e-08 -3.05180438e-08 -3.05180438e-08
-3.05180438e-08]
The spectrogram values obtained from my overnight sleep data are lower compared to the example data. This raises the question of what could be causing this discrepancy.
I initially converted the overnight hypnogram from txt format to npz format, which resulted in 1308 arrays. However, when converting the entire overnight EEG to npz format, it resulted in 10049536 arrays, causing a data mismatch. How can this issue be resolved?
Below is my code.
Stage2 = np.loadtxt('2.txt')
print(Stage2)
np.savez('Stage2.npz', data=Stage2)
f = np.load('data.npz')
data= f['data']
chan = ['F4-M1', 'C4-M1', 'O2-M1', 'F3-M2', 'C3-M2', 'O1-M2']
sf = 256.
hypno = np.load('Stage2.npz').get('data')
times = np.arange(data.size) / sf
print(data.shape)
print(chan)
print(np.round(data[:, 0:5], 3))
data.shape, hypno.shape
---output--
[0. 0. 0. ... 0. 0. 0.]
(6, 10049536)
['F4-M1', 'C4-M1', 'O2-M1', 'F3-M2', 'C3-M2', 'O1-M2']
[[-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.]]
((6, 10049536), (1308,))
Beta Was this translation helpful? Give feedback.
All reactions