[Eeglablist] Problems averaging trials

Tarik S Bel-Bahar tarikbelbahar at gmail.com
Tue Oct 3 23:47:45 PDT 2017


Hello Harold, Here's some quick/rough notes below regarding your question.
Does anything help?

*********************************************************************************
Overall that looks like a warning and not an error. So, for starters, you
likely need to closely review your data at each step and make sure it's
meeting your expectations and how it should look at each stage.

Check to make sure that you are using the correct/latest version of eeglab,
so as to make sure you are circumventing the problem noted in the warning,
which relates to older eeglab versions.

Other brief notes below that may be useful/relevant:

1. Make sure that mergeset works from the GUI, and also with eeglab
tutorial data (epoched data from several datasets).
Also try to make sure it's working for you with several continuous datasets.
2. Review the output of the eegh command after having successfully merged
any datasets via the gui. Emulate the eegh output and confirm/disconfirm
that you get the same or different errors you get via your command line
command.
3. Attempt your procedure by first merging continuous non-epoched versions
of your .set datasets (in case you are using epoched datasets).

****overall it's better and safer if you first get things to run correctly
by talking to an active EEG structure, as the eeglab code expects. Once you
get code working that way, then switch over to using your custom variables.
If you've already done the former, then great. If not, please do give it a
try first and see if you can replicate the issue by addressing the EEG
structure properly in your calls.

4. It's not clear that just changing trials to 1 is the only thing you need
to do.
5. It's not clear why you are using the mean command instead of the eeglab
averaging function. Also review changes in the EEG.structure variables,
including EEG.trials information. If for some reason you need to average in
the manner you are doing, that's fine, you just need to make sure that
you're meeting the expectations of eeglab functions you run after that
step, including updating any necessary bits of the EEG structure to reflect
the changes you made.

If you are matlaab-saavy:
6. Review the innards of the mergeset function.
7. Review the innards of the eeg_eegrej function, and why the error comes
up.

Also:
8. Remember you should also be properly updating the EEG structure via the
updating commands you see after functions are run (review the output of
eegh command and you will see that usually there is a function line, and
then there is an EEG structure update line, emulate this in order to be
sure you are meeting eeglab's expectations, and not skipping an important
step that eeglab needs by accident).

9. .Please Do let the list know how you resolve this issue. If after trying
the various options above things are still not working, and if you can
readily replicate the issue, you may want to drop a note about it into the
eeglab bugzilla.













On Sat, Sep 30, 2017 at 12:43 PM, Harold Hodgins <hodg4890 at mylaurier.ca>
wrote:

> Good Afternoon,
>
> I'm trying to merge three set files and then average them across trials
> and later by time slice.
>
> I'm able to load the data using raw_data = pop_loadset('filename',file_
> names,'filepath',ROOT_DIR);
> and then merge the sets using averaged_set = pop_mergeset(raw_data,
> linspace(1,numel(raw_data), numel(raw_data) ), 0);
>
> I then average it using averaged_set.data = mean(averaged_set.data,3);
> and set the number of trials to be 1 using averaged_set.trials = 1;
>
> When I try to time select the data using selection =
> pop_select(averaged_set,'time',[0 0.5]); I get the following
>
> Warning: negative minimum time; unchanged to ensure correct latency of
> initial boundary event
> eeg_insertbound(): 1 boundary (break) events added.
> eeg_checkset warning: 42/44 events had out-of-bounds latencies and were
> removed
> eeg_insertbound(): 1 boundary (break) events added.
> 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/EEGLAB_bug1971);
> Warning: Discrepency when recomputing event latency.
> Try to reproduce the problem and send us your dataset
> > In eeg_eegrej at 155
>   In pop_select at 537
>
> but selection = pop_select(raw_data(1),'time',[0 0.5]); works fine so I'm
> suspicious I'm doing something wrong with the merging or averaging.
>
> Any suggestions are greatly appreciated.
>
> Sincerely,
> Harold Hodgins
>
> _______________________________________________
> 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/20171003/568b4222/attachment.html>


More information about the eeglablist mailing list