Put the attached files in /external/fieldtrip/private overwriting the files that are there. This should solve the problem.
Ok I updated with the last version of SPM and tried the same procedure but now there is another bug. I can upload the file for the fieldtrip rejection function but now I can't use the option by Trial (it works only for by Channels, and for the Summary).
I get the message below:
??? Undefined function or method 'channelselection' for input arguments of type 'cell'.
Error in ==> rejectvisual_trial at 8
cfg.channel = channelselection(cfg.channel, data.label);
Error in ==> ft_rejectvisual at 257
[chansel, trlsel, cfg] = rejectvisual_trial(cfg, tmpdata);
Error in ==> spm_eeg_ft_artefact_visual at 71
data = ft_rejectvisual(cfg, data);
Error in ==> spm_MEEGtools at 41
eval(fun);
Error in ==> spm at 914
evalin('base',xTB(i).prog);
??? Error while evaluating uicontrol Callback
Also, since it still works with channels, I tried to mark a channel as bad, quit and when I reopen the channel is still marked as good.
I use Matlab 2009b 64 bits on a windows 7 64bit machine.
Thanks
-Sid
De : Vladimir Litvak [mailto:[log in to unmask]]
Envoyé : jeudi 2 décembre 2010 13:23
À : [log in to unmask]
Cc : [log in to unmask]
Objet : Re: bug in SPM EEG fieldtrip visual artefact rejection
Dear Sid,
I tried the tool on your data and everything seems to work fine. Make sure that you use the latest SPM update.
Vladimir
On Thu, Dec 2, 2010 at 10:34 AM, Sid Kouider <[log in to unmask]> wrote:
Dear Vladimir,
We are analyzing EEG from infants with SPM8 and we would like to use the fieldtrip visual artefact rejection tool.
The way we do it is that we open the file through the function in MEEG tools, we mark some of the trials as BAD, and then we click on quit assuming that it will be saved automatically.
The problems we encounter are the following:
1) When we open the file again with the same function (for instance to examine further trials), the trials previously marked as bad before quitting now appear as GOOD.
When looking at the file, using
tmp = load('C:\Imaging\EEG\sublibaby_EEG\12mois\EEGdata\spm8dataFiles\bMrefspm8_Antoine.mat')
tmp.D.trials(22).bad
ans =
1
we do see that the trials marked as bad are indeed marked as bad. It looks like the fieldtrip function is not considering that information when loading the file, isn't it?
2) The second issue is more weird. The trials we update are marked as BAD (at least in D.trials.bad), but not on all instances. Indeed, sometimes, after reopening the file for instant a third time and marking further trials as BAD, even the D.trials.bad is not updated.
Any thought? Did you encounter the same problem?
I have put one original file (i.e., without any trials marked as BAD) at the following location:
http://www.lscp.net/persons/sidk/spm8dataFiles.zip
Thanks for any help you can provide,
-Sid
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dr Sid Kouider, CNRS research scientist
Ecole Normale Supérieure
LSCP, Pavillon Jardin,
29 rue d'Ulm, 75005 Paris, France
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~