Dear Anette,
On Tue, Nov 2, 2010 at 3:39 PM, Anette Giani
<[log in to unmask]> wrote:
>
> I have a question concerning the function ‘spm_eeg_sort_conditions.m’. If I
> understand this function correctly it can be used to sort your conditions
> (as the name is saying). However, to me it seems as if it merely sorts the
> condition labels and NOT the actual conditions. This means after sorting (my
> averaged .mat file):
>
> D.condlist is being sorted according to what you wanted (e.g.: ‘A’ ‘B’ ‘C’)
>
> D.conditions however stays the same (e.g.: ‘C’ ‘B’ ‘A’)
'Sort conditions' does not change the order of trials physically in
the dataset but just the order of conditions list. This can be
important in several situations. For instance when you average an
epoched file then the conditions in the average will be ordered
according to D.condlist. Also when you do source reconstruction or DCM
condlist determines what is meant by condition1, condition2 etc.
>
> If I now convert my .mat file to images the whole thing gets totally mixed
> up. Labels of the images do no longer correspond to the correct trial
> number. Hence it creates a folder for condition ‘A’ containing trials 3
> (which actually correspond to condition ‘C’). The same happens in the
> reviewing tool. Even though it claims to display condition ‘A’ it actually
> displays condition ‘C’.
>
That shouldn't happen and I don't think it does. The reviewing tool
does not look at condlist. It still displays conditions in the
physical order they are in the dataset. When you create images the
conditions are exported in the order of condlist, but the files it
puts in the directory for each condition should be the correct ones.
> Am I not allowed to use the function in this case? Or do I misunderstand the
> functioning of this function? Is there a way to change both, condition
> labels AND the actual conditions?
>
If you want the conditions in the average to be in a particular order
the best thing to do is to sort conditions in the epoched file before
you average. If you want to change the physical order of conditions in
an existing file you can first do 'Sort conditions' and then run
'Remove bad trials' on it (even if you have no bad trials). This
function writes the trials out in the order of condlist.
In any case none of this operations should create mismatches between
condition label and the data. So if you find that this happens, this
is a bug that should be fixed. But make sure that you can really
recognize from the data that it's labelled wrong.
Best,
Vladimir
>
> Thanks a lot,
>
> Anette
>
>
|