spkit.data
.gsr_sample¶
- spkit.data.gsr_sample(sample=1)¶
Load sample(s) of Galvanic Skin Response (GSR) or
Widely known as Electrodermal activity (EDA)
Sample is recorded using copper plats at lower sampling rate (128)
Sample is part of PhyAAt Dataset [2]
- Parameters:
- sampleint, {1,2,-1}
sample number
if -1, return all two samples
- Returns:
- Xarray, (n,) or (n,2)
- fsint
See also
eda_sample
Electrodermal activity (EDA)
eeg_sample_14ch
Electroencephalography (EEG) - 14-channel
eeg_sample_1ch
Electroencephalography (EEG) - 1-channel
eeg_sample_artifact
Electroencephalography (EEG) processed
ecg_sample_12leads
Electrocardiogram (ECG) - 12-leads
ecg_sample
Electrocardiogram (ECG) - 1-lead
optical_sample
Optical Mapped Signal
ppg_sample
Photoplethysmogram (PPG)
egm_sample
Electrogram (EGM)
References
[1] wikipedia - https://en.wikipedia.org/wiki/Electrodermal_activity
[2] PhyAAt Dataset - https://phyaat.github.io/
Examples
#sp.data.gsr_sample #Example 1 import numpy as np import matplotlib.pyplot as plt import spkit as sp x,fs = sp.data.gsr_sample(sample=1) x = x[:int(fs*60)] t = np.arange(len(x))/fs plt.figure(figsize=(12,3)) plt.plot(t,x) plt.xlim([t[0],t[-1]]) plt.xlabel('time (s)') plt.ylabel('GSR Signal') plt.grid() plt.show()
############################ #sp.data.gsr_sample #Example 2 import numpy as np import matplotlib.pyplot as plt import spkit as sp x,fs = sp.data.gsr_sample(sample=2) x = x[:int(fs*60)] t = np.arange(len(x))/fs plt.figure(figsize=(12,3)) plt.plot(t,x) plt.xlim([t[0],t[-1]]) plt.xlabel('time (s)') plt.ylabel('GSR Signal') plt.grid() plt.show()