Dear Jörn,<div><br></div><div>Thank you for the quick reply. I will try your suggestion!</div><div><br></div><div>Many thanks,</div><div>z<br><br><div class="gmail_quote">On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" <span dir="ltr"><<a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Dear Zita,<br>
<br>
The function seems to convert the function not correctly to a freq
datastructure - it seems more like raw data to me.<br>
<br>
freq data requires a .powspctrm field, which should be a matrix of
observations x channels x freq x time. So you would need to use
cell2mat on your .trial field. Probably you need to permute the
dimensions to match this order. Additionally, you will need a
.dimord field which which should be 'rpt_chan_freq_time' and you
need a .freq field that contains the frequencies in that matrix.
Please first make sure that your trials actually have 3
dimensions, else something else in the conversion went wrong.<br>
<br>
I don't use SPM so no clue if there is a better way than doing it
manually.<br>
<br>
Best,<br>
Jörn<div><div class="h5"><br>
<br>
On 11/14/2012 6:32 PM, Zita Eva Patai wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">Hello FT-ers
<div><br>
</div>
<div>In the past i had no problem when converting my data from SPM
(where i do preprocessing and averaging) to FT (where I do my
cluster-stats and plotting)</div>
<div><br>
</div>
<div>Currently, I am using the new way to convert (previous
version seems outdated 'nspm2ftrip') and I am hitting a wall: it
says my data is not in the right format, ie: not freq data. But
i know that it is...any advice would be much appreciated! Not to
mention is warns me my data is not epoched when it is indeed
so...</div>
<div><br>
</div>
<div>Thank you!</div>
<div>zita</div>
<div><br>
</div>
<div>*********************</div>
<div>
<div><b>>> D = spm_eeg_load</b></div>
<div>SPM M/EEG data object</div>
<div>Type: evoked</div>
<div>Transform: TF</div>
<div>8 conditions</div>
<div>326 channels</div>
<div>20 frequencies</div>
<div>501 samples/trial</div>
<div>8 trials</div>
<div>Sampling frequency: 250 Hz</div>
<div>Loaded from file C:\Users\Eva Z
Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat</div>
<div><br>
</div>
<div>Use the syntax D(channels, frequencies, samples, trials) to
access the data</div>
<div>Type "methods('meeg')" for the list of methods performing
other operations with the object</div>
<div>
Type "help meeg/method_name" to get help about methods</div>
<div><br>
</div>
<div><b>>> data = spm2ft(D)</b></div>
<div><br>
</div>
<div>mapping condition label "11" to condition code 1</div>
<div>mapping condition label "12" to condition code 2</div>
<div>mapping condition label "21" to condition code 3</div>
<div>mapping condition label "22" to condition code 4</div>
<div>mapping condition label "31" to condition code 5</div>
<div>mapping condition label "32" to condition code 6</div>
<div>mapping condition label "41" to condition code 7</div>
<div>mapping condition label "42" to condition code 8</div>
<div><br>
</div>
<div>data = </div>
<div><br>
</div>
<div> fsample: 250.0000</div>
<div>
label: {326x1 cell}</div>
<div> time: {1x8 cell}</div>
<div> trial: {1x8 cell}</div>
<div> trialinfo: [8x1 double]</div>
<div> cfg: [1x1 struct]</div>
<div><br>
</div>
<div><br>
</div>
<div><b>>> data2 = ft_checkdata(data, 'datatype', 'freq')</b></div>
<div> </div>
<div>Warning: the data does not contain a trial definition,
assuming that the trials are consecutive segments of a
continuous recording </div>
<div>> In utilities\private\warning_once at 81</div>
<div> In utilities\private\fixsampleinfo at 54</div>
<div> In ft_datatype_raw at 91</div>
<div> In ft_checkdata at 170 </div>
<div><font color="#ff0000">Error using ft_checkdata (line 288)</font></div>
<div><font color="#ff0000">This function requires freq data as
input.</font></div>
</div>
<div><br clear="all">
<div><br>
</div>
-- <br>
<div><br>
</div>
<div>Zita Patai</div>
<div>DPhil, Experimental Psychology</div>
<div>University of Oxford</div>
<div><a href="http://bcl.psy.ox.ac.uk/people/zita-eva-patai/" target="_blank">bcl.psy.ox.ac.uk/people/zita-eva-patai/</a></div>
<div><br>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
fieldtrip mailing list
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
</blockquote>
<br>
<br>
<pre cols="72">--
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands
Contact:
E-Mail: <a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a>
Tel: <a href="tel:%2B31-%280%2924-36-68493" value="+31243668493" target="_blank">+31-(0)24-36-68493</a>
Web: <a href="http://www.ru.nl/donders" target="_blank">http://www.ru.nl/donders</a>
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
</div>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><br></div>
<div>Zita Patai</div><div>DPhil, Experimental Psychology</div><div>University of Oxford</div><div><a href="http://bcl.psy.ox.ac.uk/people/zita-eva-patai/" target="_blank">bcl.psy.ox.ac.uk/people/zita-eva-patai/</a></div><div>
<br></div><br>
</div>