[Eeglablist] Shifted rejection boundaries in continuous data

James Desjardins jdesjardins at brocku.ca
Thu Nov 22 06:37:36 PST 2012


Hi Maria,

We can check to see if your shift is affecting the event markers other than the "boundary" events.

Load a file like you normally do and copy the following code to the command line to create a "trig" channel in the EEG.data array (and save a test file named "trig_test.set" in the current directory):

EEG.nbchan=EEG.nbchan+1;
EEG.data(EEG.nbchan,:)=zeros(size(EEG.data(1,:)));
EEG.chanlocs(EEG.nbchan).labels='trig';
EEG.data(EEG.nbchan,[EEG.event.latency])=50;

EEG=eeg_checkset(EEG);
eeglab redraw

pop_eegplot( EEG, 1, 0, 1);

EEG = pop_saveset( EEG, 'filename','trig_test.set', ... 'filepath',cd);


At this point you can remove a data interval the way that you normally do (perhaps remove an approximately 1 second data portion following the 10th event marker).

Now copy the following code to the command line in order to segment +/-400ms intervals around all event types and plot an ERPimage figure.


EEG = pop_epoch( EEG, unique({EEG.event.type}), [-0.4 0.4], ...
'newname', 'trigLock', ...
'epochinfo', 'yes');
EEG = eeg_checkset( EEG );
figure;
pop_erpimage(EEG,1, [EEG.nbchan],[[]],'trig',1,1,{},[],'' , ...
'yerplabel','\muV', ...
'erp','on', ...
'cbar','on', ...
'topo', { [EEG.nbchan] EEG.chanlocs EEG.chaninfo } );


If everything is OK there should be a red vertical stripe in the surface plot at 0 ms and a 50 µV ERP at 0 ms in the bottom waveform.

If there is not a vertical stripe at 0 ms we can use the trig_test.set file to explore the cause of the shift.

This will also let us know if the "boundary" shift is a separate issue.

James
________________________________________
From: Maria Teresa Wijaya [a0089301 at nus.edu.sg]
Sent: November-22-12 1:53 AM
To: James Desjardins
Cc: mmiyakoshi at ucsd.edu; eeglablist at sccn.ucsd.edu
Subject: Re: [Eeglablist] Shifted rejection boundaries in continuous data

Hi James,

I did everything using the GUI: plot > channel data (scroll) > drag and
click to specify the boundaries > reject button > save it as file . In
my case, my events seem to still be in the right place when I tried
using eeg_eegrej function with overlapping boundaries.

Maria


On Wednesday 21,November,2012 11:41 AM, James Desjardins wrote:
> Hi Maria,
>
> What were the exact functions or menu items that you used to select the periods for rejection?
>
> Similarly, what exactly did you use to remove the periods?
>
> I am interested in this problem because I have caused such things to happen while tinkering with the EEG structure from the command line. The shifting of events from their true position relative to the data can occur if there is overlap among the latency boundaries specified for removal in a call to the eeg_eegrej function, but I have never seen it happen while building latency boundaries or removing continuous data periods using the EEGLab GUI.
>
> For example, If I specify overlapping latency boundaries:
>
> rejarr=[10000 11000;10900 11900];
>
> Then try to remove both of them with one call to eeg_eegrej:
>
> EEG = eeg_eegrej(EEG, rejarr);
>
> I find that all of the events following the rejection period are shifted to the left (relative to their true position) in the data scroll (with the shift distance being equal to the duration of the overlap across the rejarr latency boundaries).
>
> If you are building latency boundaries outside of the EEGLab GUI and using eeg_eegrej to purge them it is crucial that you merge the overlapping latency boundaries.
>
> Again, I am very interested in this topic. I look forward to exploring this further if you have more to add.
>
>
> James
>
> ________________________________________
> From: eeglablist-bounces at sccn.ucsd.edu [eeglablist-bounces at sccn.ucsd.edu] on behalf of Maria Teresa Wijaya [a0089301 at nus.edu.sg]
> Sent: November-18-12 11:07 PM
> To: mmiyakoshi at ucsd.edu
> Cc: eeglablist at sccn.ucsd.edu
> Subject: Re: [Eeglablist] Shifted rejection boundaries in continuous data
>
> Dear Makoto,
>
> I recorded my data using Biosemi Active two system with 64 electrodes at
> 256Hz. Data were band pass filtered at 0.1-20 Hz and re-referenced
> offline first to nose reference to remove bad channels. Removed channels
> were interpolated and the data were re-referenced to average reference.
> I then checked the continuous data for non-typical artifacts, removed
> them, and saved the data with a new name. The shifted rejection
> boundaries problem appeared in this new data set.
>
> Kindly let me know if I need to provide any other information.
>
> Thank you.
>
> Regards,
> Maria
>
>
>
> On Saturday 17,November,2012 01:33 PM, Makoto Miyakoshi wrote:
>
>> Dear Maria,
>>
>> We need more information to identify what caused this.
>> Could you tell me more detail?
>>
>> Makoto
>>
>> 2012/11/12 Maria Teresa Wijaya<a0089301 at nus.edu.sg>:
>>
>>
>>> Dear list,
>>>
>>> I did rejection on continuous data and noticed that the rejection
>>> boundaries shifted from where they are supposed to be (picture here:
>>> http://www.flickr.com/photos/89964745@N02/8178303896/in/photostream).
>>> This happened to several of my subjects, and it also happened to someone
>>> else in our lab before. My questions are:
>>>
>>> - What are the possible reasons of this shift?
>>> - Is there any way I can know if any of my event triggers have also been
>>> shifted or if only the rejection boundaries are shifted?
>>>
>>> Thank you for your help.
>>>
>>> Regards,
>>> Maria
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>>
>>
> _______________________________________________
> 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
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20121122/89a2eef4/attachment.html>


More information about the eeglablist mailing list