[Eeglablist] Error while rejecting continuous data (eeglab 14)

Rafał Jończyk rafal.jonczyk at gmail.com
Sun Apr 23 12:39:26 PDT 2017


Dear Zahra,

I am happy that the num2str works for you. As regards your previous
question -- I ran this code after importing the data, as one of the first
preprocessing steps, but I don't think it would be a problem if you
executed it a bit later (say, after filtering, etc.).
As regards str2num, the code: EEG.event(1).type=str2num(EEG.event(1).type)
should work (it follows the same logic). However, remember that eeglab
tends to automatically convert numerical events to strings, because it
prefers the events to be strings rather than integers. Also if you have
inserted some boundary events that are strings by nature, I am not sure
that you can make them integers. Maybe more experienced eeglab users could
help here?
If you don't mind me asking - why would you come back to numerical events
in the first place? What's the motivation behind doing it?

Best,
Rafal

2017-04-22 16:17 GMT+02:00 zahra fotovatnia <fotovatnia at yahoo.com>:

> Hello Rafal,
>
> I used your code and I noticed that all events were kept after cleaning.
> However, it seems it is not possible to convert the events back to numbers
> after cleaning with the reverse code of EEG.event(1).type =
> str2num(EEG.event('1').type). Do you have any idea what to do? I need them
> back to normal after cleaning.
>
> I emailed you before but no response. I am a new user of MATLAB and other
> related software programs. I wonder if you could help me out please.
>
> Best regards,
> Thank you in advance for your help
>
>
> On Monday, 17 April 2017, 13:45, Rafał Jończyk <rafal.jonczyk at gmail.com>
> wrote:
>
>
> Dear all,
>
> I have found a simple solution, but I'd like to get some feedback if this
> does not negatively impact the EEG.event.structure in any way.
> What I did was to write the following code:
>
> EEG.event(1).type = num2str(EEG.event(1).type)
>
> , which changes the first event in EEG.event.type structure field into a
> string. Next, eeglab seems to automatically convert all the other events
> into strings to make it a homogeneous array.
>
> Would you say that is okay? I already checked, and I can insert boundary
> events without any trouble.
>
> Best,
> Rafał
>
> 2017-04-15 11:55 GMT+02:00 Rafał Jończyk <rafal.jonczyk at gmail.com>:
>
> Dear Nicholas and Zahra,
>
> thank you for your feedback. I thought that the problem might lie in the
> numeric/string nature of events. I am a bit confused, though, because
> eeglab gave me a warning message a few times saying "converting all event
> types to strings" -- could it be that the conversion didn't work? Also do
> you know if there is a way to run such a conversion manually without doing
> any harm to the event structure? In other words -- is there an unambiguous
> and safe way to convert the numeric event types to string event types?
>
> Best,
> Rafal
>
>
> 2017-04-13 14:31 GMT+02:00 zahra fotovatnia <fotovatnia at yahoo.com>:
>
> Hi Rafal,
>
> Yes. I found the same problem when using cleaning continuous data. The
> point is I was trying to do difference waves on erplab after analyzing
> continuous data on eeglab but I repeatedly found the error of missing data.
> I tried different options but the same error. ASR deleted the events while
> cleaning.
>
> Best
> Zahra
>
>
>
>
> On Thursday, 13 April 2017, 2:45, Rafał Jończyk <rafal.jonczyk at gmail.com>
> wrote:
>
>
> Thank you Tarik for advice. I will have a go at your suggestions. I think
> there might be something with the latest version of eeglab given that I
> have never experienced such problems in previous versions, and it's not the
> first time that I am analyzing *cnt files from neuroscan in eeglab.
>
> Has anyone else experienced a similar problem?
>
> Best,
> Rafał
>
> 2017-04-12 3:10 GMT+02:00 Tarik S Bel-Bahar <tarikbelbahar at gmail.com>:
>
> Hello Rafal, a few notes below that may help, all the best!
>
> ****************************** **
> Yes you could try just changing the format of all the events by looping
> through them and rewriting them.
> It may not be about the numeric format, it may be how they are read and/or
> stored (cell vs. strong array, or something basic like that).
> See also addnewevents function mentioned on list previously, and some
> related messages,
> which may allow you to write in new events that are accepted by eeglab.
> However, this may be problem with new build as you're seeing, thus a
> bugzilla note would be cool when you have a chance.
> Another thing to check is if the same thing happens with the eeglab
> tutorial data too,
> which would be telling if there's something unique about your data and/or
> it's event structure.
>
>
>
>
> On Tue, Apr 11, 2017 at 10:37 AM, Rafał Jończyk <rafal.jonczyk at gmail.com>
> wrote:
>
> Dear eeglablist community,
>
> I have experienced some problems with event structure -- that's my guess
> -- when rejecting fragments of continuous data (raw *.cnt files resampled
> to 250Hz & filtered) in the latest version of eeglab. Interestingly, this
> does not happen when I am using eeglab 13.6.5b on the same computer. Note
> that I am not rejecting the onset of the data.
>
> The error:
>
> eeg_insertbound(): 3 boundary (break) events added.
> eeg_insertbound(): 3 boundary (break) events added.
> Warning: converting all event types to strings
> BUG 1971 WARNING: IF YOU ARE USING A SCRIPT WITTEN FOR A PREVIOUS VERSION
> OF
> EEGLAB TO CALL THIS FUNCTION, BECAUSE YOU ARE REJECTING THE ONSET OF THE
> DATA,
> EVENTS WERE CORRUPTED. EVENT LATENCIES ARE NOW CORRECT (SEE https://sccn.ucsd.edu/wiki/EEG
> LAB_bug1971 <https://sccn.ucsd.edu/wiki/EEGLAB_bug1971>);
>
> Error using cell/strmatch (line 19)
> Requires character array or cell array of strings as inputs.
>
> Error in eeg_eegrej (line 147)
>     indBound2 = strmatch('boundary', { event2(:).type });
> Error while evaluating DestroyedObject Callback
>
>
> Could you give me a hint how to resolve the problem and continue working
> with the latest version of eeglab? Is it because my events are numeric?
>
> Best,
> Rafał
>
> --
> Rafał Jończyk
> Assistant Professor
> Faculty of English
> Adam Mickiewicz University, Poznań | Poland
>
> ______________________________ _________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/ee glabmail.html
> <http://sccn.ucsd.edu/eeglab/eeglabmail.html>
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.uc
> sd.edu <eeglablist-unsubscribe at sccn.ucsd.edu>
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.e
> du <eeglablist-request at sccn.ucsd.edu>
>
>
>
>
>
> --
> Rafał Jończyk
> Assistant Professor
> Faculty of English
> Adam Mickiewicz University, Poznań | Poland
> ______________________________ _________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/ee glabmail.html
> <http://sccn.ucsd.edu/eeglab/eeglabmail.html>
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.uc
> sd.edu <eeglablist-unsubscribe at sccn.ucsd.edu>
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.e
> du <eeglablist-request at sccn.ucsd.edu>
>
>
>
>
>
> --
> Rafał Jończyk
> Assistant Professor
> Faculty of English
> Adam Mickiewicz University, Poznań | Poland
>
>
>
>
> --
> Rafał Jończyk
> Assistant Professor
> Faculty of English
> Adam Mickiewicz University, Poznań | Poland
>
>
>


-- 
Rafał Jończyk
Assistant Professor
Faculty of English
Adam Mickiewicz University, Poznań | Poland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170423/30039af1/attachment.html>


More information about the eeglablist mailing list