Back to the main page.
Bug 2501 - databrowser displays old events after appending data
Status | CLOSED FIXED |
Reported | 2014-03-17 11:49:00 +0100 |
Modified | 2015-01-12 09:23:02 +0100 |
Product: | FieldTrip |
Component: | plotting |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P5 normal |
Assigned to: | Jan-Mathijs Schoffelen |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Phyllis - 2014-03-17 11:49:06 +0100
%note: as discussed in the mailinglist, this issue can be resolved by clearing the cfg field before calling the databrowser EEG = rmfield(EEG, 'cfg') _________ %after reading in and re-referencing two separate EEG recordings (with ft_preprocessing), I define the trials in each dataset(data_pt1 and data_pt2): cfg = []; cfg.dataset = 'data_pt1.vhdr'; cfg.trialdef.eventtype = 'Stimulus'; cfg.trialfun = 'my_trialfun'; cfg.trialdef.prestim = 1.25; cfg.trialdef.poststim = 3.55; cfg.trialdef.eventvalue = {'S 11', 'S 12', 'S 13', 'S14'}; cfg = ft_definetrial(cfg); EEG_pt1 = ft_redefinetrial(cfg, data_pt1); %(analogous for data_pt2, i.e. EEG_pt2) %append 1st and 2nd half of experiment cfg = []; EEG = ft_appenddata(cfg, EEG_pt1, EEG_pt2); %when looking at the data all event triggers are displayed throughout the data cfg = []; cfg.continuous = 'no'; ft_databrowser(cfg, EEG);
Robert Oostenveld - 2014-03-17 12:36:12 +0100
Getting the events from the provenance information (data.cfg.previous.previous...) is the problem here. I suspect that it also causes problems if data were downsampled, e.g. cfg = ... data = ft_preprocessing(cfg) cfg = ... resampled = ft_resampledata(cfg, data) cfg = ... ft_databrowser(cfg, resampled) In this case ft_databrowser would also get the events from the cfg.previous, without taking into account that the samples don't match. Removing the provenance (i.e. cfg) works, but is not the desired way to go about. Perhaps we should noty use ft_findcfg, but only use data.cfg.event if the events are at the present level and not deeper down in the history.
Jörn M. Horschig - 2014-03-25 16:59:48 +0100
see http://mailman.science.ru.nl/pipermail/fieldtrip/2014-March/007676.html
Jörn M. Horschig - 2014-03-25 17:00:22 +0100
and http://mailman.science.ru.nl/pipermail/fieldtrip/2014-March/007680.html
Robert Oostenveld - 2014-03-25 17:14:08 +0100
I guess that ft_findcfg shoudl not be used to dig all the way through the provenance (cfg.previous.previous), but that only data.cfg.event is to be considered (if present).