Open anomalosepia opened 4 years ago
Thanks for reporting this bug with epoch2continuous.
I'll take a look at this.
Thank you! I just removed the requirement for unique latencies and it seems to be sorted out. Still checking though. A
Sent from my iPhone
On Feb 14, 2020, at 5:42 PM, Andrew X Stewart notifications@github.com wrote:
Thanks for reporting this bug with epoch2continuous.
I'll take a look at this.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Description
I don't think that this has been raised yet. If you are converting epoched to continuous and there are events with the same latency in the EEG.event.latency, you lose all but the first event (in the order in the latency struct) during the conversion. This is silent and doesn't raise errors or warnings.
]
Steps to Reproduce
run this on your data
EEG = epoch2continuous(EEG)
the resulting structure will not have the 'Fix' event at 100201 because line 27 in epoch2continuous only takes the first event at any given latency
[xlat, indx] = unique_bc2([EEG.event.latency], 'first');
in my case I was able to change that to
[xlat, indx] = unique_bc2([EEG.event.latency], 'last');
but that's only for the very narrow case of the data that I have here.
Expected behavior:
I expected all the events to carry over from the epoched data to the continuous, with boundary event. data
Actual behavior:
Only the first event comes over.
Versions