Closed kaushik-l closed 7 years ago
There were two problems:
There were some spurious "end" markers in some of the nev files. They always occured within 500ms of the original end event, so they were easy to detect:
iti = diff(t_end); duplicates = find(iti < 0.5); % trials cannot be less than 500ms long t_end(duplicates + 1) = [];
The first trial was missing the "beg" marker in some nev files. This probably resulted from staring the CED recordings before neural recordings. I just created an artificial "beg" event at t=0 in such cases:
if t_beg(1) > t_end(1), t_beg = [0 t_beg]; end % put the missing event at t=0
This should be okay since the first 2-3 trials generally have no behaviour anyway.
The above fixes are integrated in GetEvents_nev.m
Not quite a bug, but prevents us from analysing some datasets.