<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">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<br>
<br>
On 11/14/2012 6:32 PM, Zita Eva Patai wrote:<br>
</div>
<blockquote
cite="mid:CACPtmWO61PMfRzNnz0j2LmZCjk0Q-ue7WCqeLrNDw+=FD19wgw@mail.gmail.com"
type="cite">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 moz-do-not-send="true"
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 class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" 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 class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel: +31-(0)24-36-68493
Web: <a class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
</body>
</html>