Closed caisdosodre closed 6 months ago
Thanks for bringing this issue to our attention!
In PR #47, we've updated the module to provide greater flexibility in adapting the EDA events' minimum amplitude and filter size to better align with different user objectives. To take advantage of these new features, you might want to try the following configuration or similar:
from biosppy import storage
from biosppy.signals import eda
import matplotlib.pyplot as plt
# load raw eda signal
signal2, mdata2 = storage.load_txt('signal.txt')
# process it and plot
out2 = eda.eda(signal=signal2, sampling_rate=200, show=True, min_amplitude=0.01, size=0.1)
# plot peaks and onsets
plt.figure()
plt.plot(out2['ts'], out2['filtered'], 'b')
plt.plot(out2['ts'][out2['onsets']], out2['filtered'][out2['onsets']], 'ro', label='onsets')
plt.plot(out2['ts'][out2['peaks']], out2['filtered'][out2['peaks']], 'go', label='peaks')
plt.legend()
plt.show()
Hey, During EDA analysis, with some datasets, I noticed that a specific error was raised:
My code is below:
The input file is attached (the sampling frequency is 200Hz): raw_data.txt
I tried to debug the error, and until where I discovered, the error is related to the onsets' determination, using "emotiphai" method, where the onsets array returns empty (onsets=[]), causing the error. The workaround I found to determine the onsets and complete the analysis was to set the EDA events determination method to "basic".