spkit.data
.ecg_sample_12leads¶
- spkit.data.ecg_sample_12leads(sample=1)¶
Load 12 lead ECG sample.
- Parameters:
- sampleint, {1,2,3,-1}
sample number
if -1, return all three samples
- Returns:
- X: 2d-array, (n,ch)
- fs: int, sampling frequency
- lead_names: list of names for leads
See also
eda_sample
Electrodermal activity (EDA)
gsr_sample
Galvanic Skin Response (GSR)
eeg_sample_14ch
Electroencephalography (EEG) - 14-channel
eeg_sample_1ch
Electroencephalography (EEG) - 1-channel
eeg_sample_artifact
Electroencephalography (EEG) processed
ecg_sample
Electrocardiogram (ECG) - 1-lead
optical_sample
Optical Mapped Signal
ppg_sample
Photoplethysmogram (PPG)
egm_sample
Electrogram (EGM)
Examples
import numpy as np import matplotlib.pyplot as plt import spkit as sp X,fs,lead_names = sp.data.ecg_sample_12leads(sample=3) t = np.arange(X.shape[0])/fs plt.figure(figsize=(6,8)) plt.plot(t,X + np.arange(X.shape[1])*5) plt.xlim([t[0],t[-1]]) plt.grid() plt.yticks(np.arange(X.shape[1])*5, lead_names) plt.xlabel('time (s)') plt.ylabel('ECG Leads') plt.show()
Examples using spkit.data.ecg_sample_12leads
¶
Release Highlights for spkit 0.0.9.7
Release Highlights for spkit 0.0.9.7