Dear Diane,
On Wed, Dec 2, 2009 at 1:20 PM, Diane Whitmer <[log in to unmask]> wrote:
> What is the automated way to mark all trials as bad except for one?
> I've tried:
> D.reject([2:end],1);
> save(D);
>
Almost right. To make sure I'd do:
D = reject(D, [], 1); % reject all trials
D = reject(D, i, 0); % unreject trial i
save(D)
> I cannot verify that all but the first trial were successfully marked as bad
> by typing
> D.trials(2)
> because D.trials is a private meeg field.
>
You can just do D.reject
> After saving and then reloading the dataset using the gui, all trials are
> still marked as "Not bad."
>
Should work now.
> And, just to confirm, the inverse solution will be computed only based on
> "Not bad" trials, correct? Or do I need to ensure this by somehow using
> D.selectdata()?
>
If you mark trials as bad they will not be used for source
reconstruction. One other thing you can do (I'm not sure I wrote you
this before) is change the condition labels so that each trial will
have a different label (like 'trial1', 'trial2' etc.) Like:
for i = 1:D.ntrials
D = conditions(D, i, ['trial' num2str(i)]);
end
save(D)
Then you will still get an image for each trial but the source
reconstruction will be informed by all trials which is likely to work
better.
Best,
Vladimir
|