Print

Print


Thank you, that is a great help.

Another question: is there an example script somewhere for running spm_eeg_invert via the command line?


On Wed, Dec 2, 2009 at 2:50 PM, Vladimir Litvak <[log in to unmask]> wrote:
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



--
Diane Whitmer
Researcher in Applied Neuroscience

C. de l' Observatori Fabra s/n
08035 - Barcelona - Spain
tel. +34 93 254 03 68
fax. +34 93 212 64 45
skype. dwhitmer
email. [log in to unmask]
______________________________________
STARLAB, Living Science http://www.starlab.es

This e-mail and the attached files contain confidential information and are of exclusive use for the addressee. The disclosure, copy and distribution of the present message and its attachments are prohibited. If you are not the intended recipient and you receive this communication, we inform you that it is forbidden by law to read, copy or use it. Please notify us at [log in to unmask] and proceed immediately to delete it.