You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EDF files can have channels with different sampling rates (e.g. https://physionet.org/pn4/sleep-edfx/). It's not clear how the data should be returned in such case. One possibility would be to return each channel as a separate vector (for example in a dictionary). Another approach, which is the one taken by both (FieldTrip)[https://github.com/fieldtrip/fieldtrip/blob/master/edf2fieldtrip.m] and (mne)[https://github.com/mne-tools/mne-python/blob/master/mne/io/edf/edf.py] is to resample the channels to the highest sampling rate used in the EDF file, so that the data can be returned in a matrix. I tried using this approach resampling with the resample function in the DSP module, but was unsuccessful because strangely that function didn't always return the number of samples I expected, e.g.:
using DSP
x = sin(collect(1:10))
y = resample(x, 10.0)
y has 96 elements rather than 100 as I would have expected. For the time being I'm just throwing an error if an EDF file with channels having different sampling rates are detected.
The text was updated successfully, but these errors were encountered:
EDF files can have channels with different sampling rates (e.g. https://physionet.org/pn4/sleep-edfx/). It's not clear how the data should be returned in such case. One possibility would be to return each channel as a separate vector (for example in a dictionary). Another approach, which is the one taken by both (FieldTrip)[https://github.com/fieldtrip/fieldtrip/blob/master/edf2fieldtrip.m] and (mne)[https://github.com/mne-tools/mne-python/blob/master/mne/io/edf/edf.py] is to resample the channels to the highest sampling rate used in the EDF file, so that the data can be returned in a matrix. I tried using this approach resampling with the
resample
function in theDSP
module, but was unsuccessful because strangely that function didn't always return the number of samples I expected, e.g.:y
has 96 elements rather than 100 as I would have expected. For the time being I'm just throwing an error if an EDF file with channels having different sampling rates are detected.The text was updated successfully, but these errors were encountered: