Closed cll008 closed 4 years ago
Please also see https://github.com/sccn/xdf/pull/14
What does this change do when streams have no nominal_rate? (Sorry I don't have Matlab).
Not sure how it affects other downstream functions, but this change does not affect eeg_load_xdf.m
since load_xdf.m
is called with default options, where opts.HandleJitterRemoval = 1
. This change is only relevant when opts.HandleJitterRemoval = 0
.
Regardless of the change, a stream without a nominal_srate
should crash eeg_load_xdf.m
somewhere here since nominal_srate
is empty (and effective_srate == 0
).
sccn/xdf#14 is actually better though since Jérémy added some warning messages.
Do you mind testing those changes for me and seeing if it (a) works and (b) fixes your problem? I'd like to merge it but unfortunately I can't test. Actually merging in that repo won't work since we split up the repos, so a new pull request is needed here.
I used xdfBrowser to change a 'healthy' stream's nominal_srate to 0. This file actually did not crash eeg_load_xdf.m
since division by 0 in MATLAB results in Inf. eeg_checkset.m
addresses nominal_srate ==0
here by changing the sampling rate to 1 and recomputing the timestamps.
I'm not sure the proper git workflow for copying someone's commit when a repo has been split...
Currently empty streams crash load_xdf when
opts.HandleJitterRemoval = 0
, sincetemp(k).time_stamps
is empty and the index is out of range.