8.1. Real-world-Samples¶
Spkit includes various data samples from real world and a few simulation functions
8.1.1. EEG-Sample¶
8.1.1.1. 14-Channel¶
A sample of 14-channel EEG is taken from PhyAAt Dataset
import numpy as np
import matplotlib.pyplot as plt
import spkit as sp
X, fs, ch_names = sp.data.eeg_sample_14ch()
t = np.arange(X.shape[0])/fs
sep = 300
plt.figure(figsize=(10,6))
plt.plot(t,X + np.arange(X.shape[1])*sep)
plt.xlim([t[0],t[-1]])
plt.xlabel('time (s)')
plt.yticks(np.arange(X.shape[1])*sep,ch_names)
plt.grid()
plt.show()
8.1.1.2. Single-Channel¶
import numpy as np
import matplotlib.pyplot as plt
import spkit as sp
x,fs = sp.data.eeg_sample_1ch(ch=0)
8.1.1.3. Artifact-Sample¶
import numpy as np
import matplotlib.pyplot as plt
import spkit as sp
data = sp.data.eeg_sample_artifact()
X = data['X_raw']
fs = data['fs']
ch_names = data['ch_names']
8.1.2. ECG-Sample¶
8.1.2.1. 12-lead ECG¶
import numpy as np
import matplotlib.pyplot as plt
import spkit as sp
X,fs,lead_names = sp.data.ecg_sample_12leads(sample=3)
8.1.2.2. Single-lead ECG¶
import numpy as np
import matplotlib.pyplot as plt
import spkit as sp
x,fs = sp.data.ecg_sample(sample=1)
8.1.3. Optical Data¶
Data collected with optical devices
8.1.3.1. Single-lead ECG¶
import numpy as np
import matplotlib.pyplot as plt
import spkit as sp
x,fs = sp.data.optical_sample(sample=1)
8.1.3.2. Rabbit-Heart¶
Collected via two cameras
import numpy as np
import matplotlib.pyplot as plt
import spkit as sp
X,fs = sp.data.optical_sample(sample=1,species='rabbit')
t = np.arange(X.shape[0])/fs
8.1.4. PPG: Photoplethysmogram¶
import numpy as np
import matplotlib.pyplot as plt
import spkit as sp
x,fs = sp.data.ppg_sample(sample=1)
8.1.5. GSR/EDA: Galvanic Skin Response¶
Also known as Electrodermal activity (EDA)
import numpy as np
import matplotlib.pyplot as plt
import spkit as sp
x,fs = sp.data.gsr_sample(sample=1)
x,fs = sp.data.eda_sample(sample=1)