Dear Panagiotis, This sounds reasonable. I suspect you are the first person who's ever tried to clone a TFphase dataset. Vladimir On 2 Jul 2012, at 14:56, Panagiotis Tsiatsis wrote: > Dear Vladimir and SPMers, > > I am writing to you to report a possible bug in the "clone" function > when cloning M/EEG TimeFrequency Phase data (TFphase). > > More specifically, the "if" statement in line 21 that controls the > dimensions of the new object is not taking into account the case of > TFphase data and the result is that a newly cloned TFphase object, > although containing all the data of the original object, will be > missing the frequency dimension. Therefore, the new object is > rendered incosistent, the checkmeeg function fails and the newly > cloned files cannot be loaded and used in spm. > > In order to fix the bug, I substituted line 21 > > if ~strcmp(transformtype(this), 'TF') > > with > > if ~strcmp(transformtype(this), 'TF') && > ~strcmp(transformtype(this), 'TFphase') > > so as to include the case of TFphase -type data. It seems to be > working now but there might be other points in the code that need > correction. > > > Thanks and best, > Panagiotis > > -- > Panagiotis S. Tsiatsis > Max Planck Institute for Biological Cybernetics > Cognitive NeuroImaging Group > Tuebingen, Germany