[Eeglablist] Changing event markers in dataset
Makoto Miyakoshi
mmiyakoshi at ucsd.edu
Wed Jul 18 11:59:18 PDT 2018
Dear Edwige,
Ok, let's wait for their response.
Makoto
On Wed, Jul 18, 2018 at 2:27 AM E. Sijyeniyo <e.sijyeniyo at student.rug.nl>
wrote:
> Dear Makoto,
>
> Thank you for your response.
>
> >*That is very strange! Where did the 12 events go??*
> *>**The comparison between your table in the .csv file and events =
> eeg_eventtable(EEG) also shows that their latency values are totally
> different. Does it ring a bell to you?*
>
> I wish I could answer your questions, I myself am still in search for the
> answers too.
>
>
> This is what I wrote to your colleague Arno Delorme:
>
> *Dear Arno, *
>
> *Please find attached my dataset: Participant 5_afterica. *
>
> *Also, please find attached the exported event file for this
> participant: *
> 5_SPES_afterica_[pp0005].fdt
> <https://drive.google.com/a/student.rug.nl/file/d/1TlRBqx6GZsCDZRGYTNNl0camj_FThVTQ/view?usp=drive_web>
>
>
> *I have also attached the file with the changed event markers, also
> attached to this email. *
>
>
>
> *Some important notes here:1) when I type eeg_eventtable(EEG), to have a
> look at my data, there seems some inconsistency. Yesterday, some triggers
> were missing (see email I sent yesterday with the two tables) and for some
> reason the latencies were different in my .csv file compared to the output
> I obtained when typing in eeg.eventtable(EEG), this was noted by your
> colleague Dr. Miyakoshi .*
> * Today, when I typed in eeg_eventtable(EEG), after I had imported the
> new event markers again, there are NO missing event markers, but when I
> type in eeg_eventtable(EEG), it looks like this:*
>
> * In the screenshot, you can see that my event markers, which are related
> to 'type' have now been placed under the header 'bvknum', and under the
> header 'type', the information that should be under ''code' has been placed
> there instead. *
>
> *2) Moreover, when I click on Plot > scroll data, I cannot plot it because
> I get an error message saying: 'matrix dimensions must agree'*
>
> *Altogether, I am feeling quite lost with this because it seemed fairly
> straightforward, but actually it is not (for me at least...). Maybe it's my
> lack in knowledge with MatLab or maybe I am overlooking something? *
>
> *I would be really happy if anyone could have a look at this and I would
> really appreciate all the help. *
>
>
> *Thank you once more.*
>
> *Best,*
> *Edwige*
>
>
>
>
>
> On Tue, Jul 17, 2018 at 6:08 PM, Arnaud Delorme <arno at ucsd.edu> wrote:
>
>> Yes, this does not sound right. Send us your dataset and Ramon in our
>> team will have a quick look.
>> Best wishes,
>>
>> Arno
>>
>> > On Jul 17, 2018, at 8:13 AM, E. Sijyeniyo <e.sijyeniyo at student.rug.nl>
>> wrote:
>> >
>> > Dear Arno,
>> >
>> > Thank you for your prompt response!
>> >
>> > I followed your suggestion and I the new events have been successfully
>> imported into EEGLab.
>> >
>> > However, when I try to plot the data by going to Plot > Channel data
>> scroll, just to see how the triggers have changed, I get an error saying:
>> >
>> > Matrix dimensions must agree
>> >
>> > Could this be because I have changed the event markers on a file with
>> ICA weight? If so, I have just tried importing the event markers on a file
>> with no ICA weights and when I try to plot it, I get the same exact error
>> message saying that the matrix dimensions.
>> >
>> > I think this might be a bug, because when I try to extract epochs and
>> then click on Plot > Channel data scroll , I do not get this error message
>> and I can view the epoched data.
>> >
>> > I would really like to view the continuous data, just to make sure
>> everything works well.
>> >
>> > How can I view my continuous data without getting this error message?
>> >
>> > I really appreciate your help so much!
>> >
>> > Thanks again!
>> >
>> > Best,
>> > Edwige
>> >
>> >> Op 17 jul. 2018, om 16:00 heeft Arnaud Delorme <arno at ucsd.edu> het
>> volgende geschreven:
>> >>
>> >> Dear Edwidge,
>> >>
>> >> I have tried importing your file and it worked fine.
>> >> Make sure to copy the name of the columns in the edit box, use 1 for
>> the header lines, and NaN for the unit of the latency which i assume are
>> samples.
>> >>
>> >> Best wishes,
>> >>
>> >> Arno
>> >>
>> >> <Screen Shot 2018-07-17 at 6.58.37 AM.png>
>> >>
>> >>> On Jul 17, 2018, at 5:29 AM, E. Sijyeniyo <e.sijyeniyo at student.rug.nl>
>> wrote:
>> >>>
>> >>> <Participant 5 test - Participant 5 test.csv>
>> >>
>> >
>>
>>
>
>
> Op 18 jul. 2018, om 00:09 heeft Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
> het volgende geschreven:
>
> Dear Edwige,
>
> > When I type in: events = eeg_eventtable(EEG) to have a look at all my
> events, it turns out that I only get 1830 events even though my original
> data file had 1842 events.
>
> That is very strange! Where did the 12 events go??
>
> The comparison between your table in the .csv file and events =
> eeg_eventtable(EEG) also shows that their latency values are totally
> different. Does it ring a bell to you?
>
> Makoto
>
>
> On Tue, Jul 17, 2018 at 8:34 AM Sijyeniyo, E. <e.sijyeniyo at student.rug.nl>
> wrote:
>
>> Dear Makoto,
>>
>> Through communication with your colleague, I tried re-importing the event
>> markers. However, at first glance it seems to be successful, but actually
>> it is not...
>>
>> When I type in: events = eeg_eventtable(EEG) to have a look at all my
>> events, it turns out that I only get 1830 events even though my original
>> data file had 1842 events.
>>
>> When I type in events = eeg_eventtable(EEG), I get:
>>
>> 'number' 'number' 'latency' 'duration' 'channel'
>> 'bvtime' 'bvmknum' 'type' 'code' 'var1'
>> [ 1] [ 3] [ 32.6] '0' [ 0] [
>> 0] [ 82] '40' 'Stimulus' []
>> [ 2] [ 4] [ 132.8] '0' [ 0] [
>> 0] [ 83] '9' 'Stimulus' []
>> [ 3] [ 5] [ 184] '0' [ 0] [
>> 0] [ 84] '13' 'Stimulus' []
>> [ 4] [ 6] [ 251] '0' [ 0] [
>> 0] [ 85] '17' 'Stimulus' []
>> [ 5] [ 7] [ 317.2] '0' [ 0] [
>> 0] [ 86] '21' 'Stimulus' []
>> [ 6] [ 8] [ 368.4] '0' [ 0] [
>> 0] [ 87] '25' 'Stimulus' []
>> [ 7] [ 9] [ 637] '0' [ 0] [
>> 0] [ 88] '29' 'Stimulus' []
>> [ 8] [ 12] [ 949.8] '0' [ 0] [
>> 0] [ 91] '43' 'Stimulus' []
>> [ 9] [ 13] [ 1001] '0' [ 0] [
>> 0] [ 92] '53' 'Stimulus' []
>> [ 10] [ 14] [ 1077.2] '0' [ 0] [
>> 0] [ 93] '63' 'Stimulus' []
>> [ 11] [ 15] [ 1128.2] '0' [ 0] [
>> 0] [ 94] '73' 'Stimulus' []
>> [ 12] [ 16] [ 1191.4] '0' [ 0] [
>> 0] [ 95] '83' 'Stimulus' []
>> [ 13] [ 17] [ 1388.8] '0' [ 0] [
>> 0] [ 96] '50' 'Stimulus' []
>> [ 14] [ 18] [ 1489] '0' [ 0] [
>> 0] [ 97] '10' 'Stimulus' []
>> [ 15] [ 31] [ 1539.4] '0' [ 0] [
>> 0] [ 110] '40' 'Stimulus' []
>> [ 16] [ 32] [ 1639.6] '0' [ 0] [
>> 0] [ 111] '9' 'Stimulus' []
>> [ 17] [ 33] [ 1690.8] '0' [ 0] [
>> 0] [ 112] '13' 'Stimulus' []
>> [ 18] [ 34] [ 1751] '0' [ 0] [
>> 0] [ 113] '17' 'Stimulus' []
>> [ 19] [ 35] [ 1818] '0' [ 0] [
>> 0] [ 114] '21' 'Stimulus' []
>> [ 20] [ 36] [ 1870.2] '0' [ 0] [
>> 0] [ 115] '25' 'Stimulus' []
>> [ 21] [ 37] [ 2138.8] '0' [ 0] [
>> 0] [ 116] '29' 'Stimulus' []
>>
>> Before the red numbers, there are two events missing: 45 and 9. Moreover,
>> after the red event markers '50' and '10', there are other events missing:
>> 14, 18, 22, 26 and 30.
>>
>> This is really strange because they are in the .csv file but the are
>> missing in the event structure.
>> The .csv file looks like this for the first few events, comparable to
>> what I get when I type in events = eeg_eventtable(EEG),
>>
>> 3 580 0 0 0 82 40 Stimulus 82
>> 4 680.2 0 0 0 83 9 Stimulus 83
>> 5 731.4 0 0 0 84 13 Stimulus 84
>> 6 798.4 0 0 0 85 17 Stimulus 85
>> 7 864.6 0 0 0 86 21 Stimulus 86
>> 8 915.8 0 0 0 87 25 Stimulus 87
>> 9 1184.4 0 0 0 88 29 Stimulus 88
>> 10 1368.8 0 0 0 89 45 Stimulus 89
>> 11 1469 0 0 0 90 9 Stimulus 90
>> 12 1826.8 0 0 0 91 43 Stimulus 91
>> 13 1878 0 0 0 92 53 Stimulus 92
>> 14 1954.2 0 0 0 93 63 Stimulus 93
>> 15 2005.2 0 0 0 94 73 Stimulus 94
>> 16 2068.4 0 0 0 95 83 Stimulus 95
>> 17 2265.8 0 0 0 96 50 Stimulus 96
>> 18 2366 0 0 0 97 10 Stimulus 97
>> 19 2522.4 0 0 0 98 14 Stimulus 98
>> 20 2573.4 0 0 0 99 18 Stimulus 99
>> 21 2620.6 0 0 0 100 22 Stimulus 100
>> 22 2672.8 0 0 0 101 26 Stimulus 101
>> 23 3363.2 0 0 0 102 30 Stimulus 102
>> Here, you can clearly see that the red event markers are not the same
>> since the EEGlab returns a different table than what my .csv file looks
>> like. For this reason, importing the new event markers was half successful
>> but I would like to have *all* the events imported...
>>
>> Do you know what might have gone wrong with this?
>>
>> kind regards,
>> Edwige
>>
>>
>> On Tue, Jul 17, 2018 at 2:33 PM, E. Sijyeniyo <e.sijyeniyo at student.rug.nl
>> > wrote:
>>
>>> Dear Makoto,
>>>
>>> I tried re-importing my event information after exporting it to
>>> Microsoft excel but it doesn’t work for some reason. I thought it would be
>>> pretty straightforward, but unfortunately not….
>>>
>>> I get the error:
>>>
>>> *EEGLAB error in function import event() at line 181:*
>>>
>>> *Reference to non-existent field ‘latency’. *
>>>
>>>
>>>
>>>
>>> If I type the following into “input field (column) names” *type
>>> latency *and I change "Number of file header lines" into *1, *then I
>>> get the latencies as new event markers.
>>>
>>> I do not understand how this may be, because I only modified the type
>>> (event markers) and for some reason the new event values are not imported
>>> and replaced.
>>>
>>> Attached you can see how my new .csv file looks like, when I try to
>>> import this, I get an error and I do not know why…
>>>
>>> I even changed my initial triggers from e.g. *S 40* to *40* because I
>>> read that EEGlab cannot read type when strings and integers are combined (
>>> https://sccn.ucsd.edu/wiki/Chapter_03:_Event_Processing)
>>>
>>> Can you provide me with some detailed information about how to import my
>>> changed event markers?
>>>
>>> The data was recorded with BrainVision Recorder and I am using Matlab
>>> 2017b version.
>>>
>>> I could really use your help and expertise with this...
>>>
>>> Best,
>>> Edwige
>>>
>>> Op 16 jul. 2018, om 20:13 heeft Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
>>> het volgende geschreven:
>>>
>>> Dear Edwige,
>>>
>>> > I am wondering whether I can change the other triggers so that they
>>> are distinguishable too. In this way, I can compare, for example, the
>>> target words in one particular condition with each other because they would
>>> have different event markers. For instance, in the active condition, the
>>> target word is marked with 17 in the prime sentence as well as in the
>>> target sentence, I am not sure if Matlab would be able to distinguish them
>>> (I assume not).
>>>
>>> I did not understand your question here. However,
>>>
>>> > Does anyone know how I can change event markers in my dataset?
>>>
>>> You can swap existing event marker types with other ones, if that solves
>>> your problem. See this page. Note that this coding is done outside EEGLAB
>>> so be careful.
>>> https://sccn.ucsd.edu/wiki/Makoto%27s_useful_EEGLAB_code#Event_types
>>>
>>> If you want to do it more intuitively, you may want to consider
>>> exporting the existing event structure to Microsoft Excel (or equivalent)
>>> and modify it visually and manually. Then re-import the event file.
>>>
>>> Makoto
>>>
>>>
>>> On Sun, Jul 15, 2018 at 9:08 PM E. Sijyeniyo <e.sijyeniyo at student.rug.nl>
>>> wrote:
>>>
>>>> Dear EEGlab users,
>>>>
>>>> I have a question regarding changing event markers in my dataset.
>>>>
>>>> Initially, I recorded my data with the following markers:
>>>>
>>>> Active condition:
>>>> Prime sentence: 40, 9, 13, 17, 21, 25, 29
>>>> Target sentence: 45, 9, 13, 17, 21, 25, 29
>>>>
>>>>
>>>> Passive condition
>>>> Prime sentence: 40, 8, 12, 16, 20, 24, 30
>>>> Target sentence: 45, 8, 12, 16, 20, 24, 30
>>>>
>>>>
>>>> However, only the first trigger distinguishes both sentences, so only
>>>> 40 and 45. I am wondering whether I can change the other triggers so that
>>>> they are distinguishable too. In this way, I can compare, for example, the
>>>> target words in one particular condition with each other because they would
>>>> have different event markers. For instance, in the active condition, the
>>>> target word is marked with 17 in the prime sentence as well as in the
>>>> target sentence, I am not sure if Matlab would be able to distinguish them
>>>> (I assume not).
>>>>
>>>> So I would want to change them into something like:
>>>>
>>>> Active condition:
>>>> Prime sentence: 40, 9, 13, 17, 21, 25, 29
>>>> Target sentence: 45, 23, 33, 43, 53, 63, 73
>>>>
>>>> Passive condition:
>>>> Prime sentence: 55, 8, 12, 16, 20, 24, 30
>>>> Target sentence: 60, 26, 36, 46, 56, 66, 76
>>>>
>>>> Does anyone know how I can change event markers in my dataset?
>>>>
>>>> Thank you so much for anyone who responds!
>>>>
>>>> Best
>>>> Edwige
>>>> P.s As I am a master student, this is my first ever EEG study and
>>>> during the design of my experiment these differences between triggers
>>>> coding did not occur to me...
>>>> _______________________________________________
>>>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>>>> To unsubscribe, send an empty email to
>>>> eeglablist-unsubscribe at sccn.ucsd.edu
>>>> For digest mode, send an email with the subject "set digest mime" to
>>>> eeglablist-request at sccn.ucsd.edu
>>>>
>>>
>>>
>>> --
>>> Makoto Miyakoshi
>>> Swartz Center for Computational Neuroscience
>>> Institute for Neural Computation, University of California San Diego
>>>
>>>
>>>
>>>
>>
>
> --
> Makoto Miyakoshi
> Swartz Center for Computational Neuroscience
> Institute for Neural Computation, University of California San Diego
>
>
>
--
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20180718/128bbde9/attachment.html>
More information about the eeglablist
mailing list