<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Calibri">Hi Karl,<br>
<br>
Sorry for my late reply. We are looking for a proper fix for this
issue, it occurs in several situations. Any axes that are not
monotonously increasing causes a crash in uimagesc, because it
cannot determine how to plot the data (if I recall correctly,
uimagesc plots multiple copies of the same data when axes are not
evenly spaced). For the moment, you can try to hack the frequency
axis to conform to the monotonously increasing part<small><i> (in
most cases a simple round() would do it)</i></small>. Or, you
can hack it by changing it to a linear index, and then add the
axis-labels by hand afterwards <small><i>(by using
set(gca,'ytick', [index vector], 'yticklabel', string-array of
num2str(freq-axis))</i></small>.<br>
<br>
Best,<br>
Roemer<br>
<br>
<br>
</font><br>
On 17-01-11 2:51, Karl Doron wrote:
<blockquote
cite="mid:AANLkTi=dT85ukVd5f8AyK-AimMvh3wCa-v1tybUH0n-E@mail.gmail.com"
type="cite">Hello Roemer,
<div><br>
</div>
<div>Here's the cfg's and output from calls to ft_freqanalysis
with method='wavelet' and the subsequent call to
ft_singleplotTFR and the resulting error. The imagesc command
will however plot the data at that
channel imagesc(squeeze(wvpow.powspctrm(strmatch('A177',label),:,:)))
Thanks for any help!</div>
<div><br>
</div>
<div>
<p style="margin: 0px; font: 12px Courier;">cfg =
[];</p>
<p style="margin: 0px; font: 12px Courier;">cfg.output = <span
style="color: rgb(177, 40, 242);">'pow'</span>;</p>
<p style="margin: 0px; font: 12px Courier;">cfg.channel = <span
style="color: rgb(177, 40, 242);">'MEG'</span>;</p>
<p style="margin: 0px; font: 12px Courier;">cfg.method = <span
style="color: rgb(177, 40, 242);">'wavelet'</span>;</p>
<p style="margin: 0px; font: 12px Courier;">cfg.foi =
10:2:30; </p>
<p style="margin: 0px; font: 12px Courier;">cfg.toi =
0.0:0.05:2.75; </p>
<p style="margin: 0px; font: 12px Courier; min-height: 14px;"> </p>
<p style="margin: 0px; font: 12px Courier;">wvpow =
ft_freqanalysis(cfg, data_spctrm);</p>
<p style="margin: 0px; font: 12px Courier; min-height: 14px;"> </p>
<p style="margin: 0px; font: 12px Courier; min-height: 14px;">wvpow
= </p>
<p style="margin: 0px; font: 12px Courier; min-height: 14px;"> </p>
<p style="margin: 0px; font: 12px Courier;"> label:
{246x1 cell}</p>
<p style="margin: 0px; font: 12px Courier; color: rgb(177, 40,
242);"><span style="color: rgb(0, 0, 0);"> dimord: </span>'chan_freq_time'</p>
<p style="margin: 0px; font: 12px Courier;"> freq: [1x11
double]</p>
<p style="margin: 0px; font: 12px Courier;"> time: [1x56
double]</p>
<p style="margin: 0px; font: 12px Courier;"> powspctrm:
[246x11x56 double]</p>
<p style="margin: 0px; font: 12px Courier;"> grad: [1x1
struct]</p>
<p style="margin: 0px; font: 12px Courier;"> cfg: [1x1
struct]</p>
<p style="margin: 0px; font: 12px Courier; min-height: 14px;">
</p>
<p style="margin: 0px; font: 12px Courier; color: rgb(51, 157,
47);">%Singleplot results</p>
<p style="margin: 0px; font: 12px Courier;">cfg =
[];</p>
<p style="margin: 0px; font: 12px Courier;">cfg.channel = <span
style="color: rgb(177, 40, 242);">'A177'</span>;</p>
<p style="margin: 0px; font: 12px Courier;">cfg.grad =
grad;</p>
<p style="margin: 0px; font: 12px Courier;">cfg.xlim =
[0.6 2.5];</p>
<p style="margin: 0px; font: 12px Courier;">cfg.ylim =
[10 20];</p>
<p style="margin: 0px; font: 12px Courier; min-height: 14px;"> </p>
<p style="margin: 0px; font: 12px Courier;">figure;</p>
<p style="margin: 0px; font: 12px Courier;">ft_singleplotTFR(cfg,
wvpow)</p>
<p style="margin: 0px; font: 12px Courier; min-height: 14px;"> </p>
<p style="margin: 0px; font: 12px Courier;">Warning: (one of
the) axis <span style="color: rgb(177, 40, 242);">are</span>
<span style="color: rgb(177, 40, 242);">not</span> <span
style="color: rgb(177, 40, 242);">evenly</span> <span
style="color: rgb(177, 40, 242);">spaced</span> <span
style="color: rgb(177, 40, 242);">-></span> <span
style="color: rgb(177, 40, 242);">nans</span> <span
style="color: rgb(177, 40, 242);">cannot</span></p>
<p style="margin: 0px; font: 12px Courier; color: rgb(177, 40,
242);"><span style="color: rgb(0, 0, 0);">be </span>masked<span
style="color: rgb(0, 0, 0);"> </span>out<span style="color:
rgb(0, 0, 0);"> </span>-><span style="color: rgb(0, 0,
0);"> </span>cfg.masknans<span style="color: rgb(0, 0,
0);"> </span>is<span style="color: rgb(0, 0, 0);"> </span>set<span
style="color: rgb(0, 0, 0);"> </span>to<span style="color:
rgb(0, 0, 0);"> </span>'no'<span style="color: rgb(0, 0,
0);">; </span></p>
<p style="margin: 0px; font: 12px Courier;">> In
ft_singleplotTFR <span style="color: rgb(177, 40, 242);">at</span>
<span style="color: rgb(177, 40, 242);">296</span></p>
<p style="margin: 0px; font: 12px Courier; color: rgb(177, 40,
242);"><span style="color: rgb(0, 0, 0);">??? Attempted </span>to<span
style="color: rgb(0, 0, 0);"> </span>access<span
style="color: rgb(0, 0, 0);"> </span>c(6,1)<span
style="color: rgb(0, 0, 0);">; index </span>out<span
style="color: rgb(0, 0, 0);"> </span>of<span style="color:
rgb(0, 0, 0);"> </span>bounds<span style="color: rgb(0, 0,
0);"> </span>because</p>
<p style="margin: 0px; font: 12px Courier;">size(c)=[5,37].</p>
<p style="margin: 0px; font: 12px Courier; min-height: 14px;"> </p>
<p style="margin: 0px; font: 12px Courier; color: rgb(177, 40,
242);"><span style="color: rgb(0, 0, 0);">Error </span>in<span
style="color: rgb(0, 0, 0);"> </span>==><span
style="color: rgb(0, 0, 0);"> </span>uimage<span
style="color: rgb(0, 0, 0);"> </span>at<span style="color:
rgb(0, 0, 0);"> </span>124</p>
<p style="margin: 0px; font: 12px Courier;"> ce(j,i)
= c(indi(end), indj(end));</p>
<p style="margin: 0px; font: 12px Courier; min-height: 14px;"> </p>
<p style="margin: 0px; font: 12px Courier; color: rgb(177, 40,
242);"><span style="color: rgb(0, 0, 0);">Error </span>in<span
style="color: rgb(0, 0, 0);"> </span>==><span
style="color: rgb(0, 0, 0);"> </span>uimagesc<span
style="color: rgb(0, 0, 0);"> </span>at<span style="color:
rgb(0, 0, 0);"> </span>46</p>
<p style="margin: 0px; font: 12px Courier;"> hh =
uimage(varargin{:},<span style="color: rgb(177, 40, 242);">'CDataMapping'</span>,<span
style="color: rgb(177, 40, 242);">'scaled'</span>);</p>
<p style="margin: 0px; font: 12px Courier; min-height: 14px;"> </p>
<p style="margin: 0px; font: 12px Courier; color: rgb(177, 40,
242);"><span style="color: rgb(0, 0, 0);">Error </span>in<span
style="color: rgb(0, 0, 0);"> </span>==><span
style="color: rgb(0, 0, 0);"> </span>ft_plot_matrix<span
style="color: rgb(0, 0, 0);"> </span>at<span style="color:
rgb(0, 0, 0);"> </span>192</p>
<p style="margin: 0px; font: 12px Courier;"> h = uimagesc(hdat,
vdat, cdat, clim);</p>
<p style="margin: 0px; font: 12px Courier; min-height: 14px;"> </p>
<p style="margin: 0px; font: 12px Courier; color: rgb(177, 40,
242);"><span style="color: rgb(0, 0, 0);">Error </span>in<span
style="color: rgb(0, 0, 0);"> </span>==><span
style="color: rgb(0, 0, 0);"> </span>ft_singleplotTFR<span
style="color: rgb(0, 0, 0);"> </span>at<span style="color:
rgb(0, 0, 0);"> </span>327</p>
<p style="margin: 0px; font: 12px Courier;">
ft_plot_matrix(data.(cfg.xparam)(xidc),data.(cfg.yparam)(yidc),</p>
<p style="margin: 0px; font: 12px Courier;"> TFR, <span
style="color: rgb(177, 40, 242);">'clim'</span>,[zmin,zmax],<span
style="color: rgb(177, 40, 242);">'tag'</span>,<span
style="color: rgb(177, 40, 242);">'cip'</span>)</p>
<div><br>
</div>
<br>
<div class="gmail_quote">On Sun, Jan 16, 2011 at 2:20 AM, Roemer
van der Meij <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:r.vandermeij@donders.ru.nl">r.vandermeij@donders.ru.nl</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> <font face="Calibri">Hi
Karl,<br>
<br>
Could you give some more information on the errors?
Could you also post your cfg's? That will help in
finding and fixing the bug. What FieldTrip version are
you using?<br>
<br>
Best,<br>
Roemer <br>
<br>
<br>
</font>
<div>
<div class="h5"><br>
On 15-1-2011 18:05, Karl Doron wrote: </div>
</div>
<blockquote type="cite">
<div>
<div class="h5">Hello,
<div><br>
</div>
<div>Has anyone else reported a problem with
ft_singleplotTFR and output of the new specest
module?</div>
<div><br>
</div>
<div>multiplotTFR works, but 'interactive' method
fails. </div>
<div><br>
</div>
<div>It looks like the error occurs when trying to
mask NaNs</div>
<div><br>
</div>
<div>
<p style="margin: 0px; font: 12px Courier; color:
rgb(0, 161, 44);">% masking only possible for
evenly spaced axis</p>
<p style="margin: 0px; font: 12px Courier;"><span
style="color: rgb(51, 0, 255);">if</span>
strcmp(cfg.masknans, <span style="color:
rgb(197, 0, 245);">'yes'</span>) &&
(~evenx || ~eveny)</p>
<p style="margin: 0px; font: 12px Courier; color:
rgb(197, 0, 245);"><span style="color: rgb(0, 0,
0);"> warning(</span>'(one of the) axis are
not evenly spaced -> nans cannot be masked
out -> cfg.masknans is set to ''no'';'<span
style="color: rgb(0, 0, 0);">)</span></p>
<p style="margin: 0px; font: 12px Courier;">
cfg.masknans = <span style="color: rgb(197, 0,
245);">'no'</span>;</p>
<p style="margin: 0px; font: 12px Courier; color:
rgb(51, 0, 255);">end</p>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Thank you,</div>
<div>karl doron</div>
<div>UCSB</div>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
fieldtrip mailing list
<a moz-do-not-send="true" href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a>
<a moz-do-not-send="true" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
</blockquote>
<br>
<div>-- <br>
<font size="3"><font color="darkblue"><font
face="calibri">Roemer van der Meij M.Sc.<br>
PhD student<br>
Donders Institute for Brain, Cognition and
Behaviour<br>
Centre for Cognition<br>
P.O. Box 9104<br>
6500 HE Nijmegen<br>
The Netherlands<br>
Tel: +31(0)24 3655932<br>
E-mail: <a moz-do-not-send="true"
href="mailto:r.vandermeij@donders.ru.nl"
target="_blank">r.vandermeij@donders.ru.nl</a><br>
</font></font></font></div>
</div>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a moz-do-not-send="true"
href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a moz-do-not-send="true"
href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip"
target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</blockquote>
</div>
<br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
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>
<div class="moz-signature">-- <br>
<font size="3"><font color="darkblue"><font face="calibri">Roemer
van der Meij M.Sc.<br>
PhD student<br>
Donders Institute for Brain, Cognition and Behaviour<br>
Centre for Cognition<br>
P.O. Box 9104<br>
6500 HE Nijmegen<br>
The Netherlands<br>
Tel: +31(0)24 3655932<br>
E-mail: <a class="moz-txt-link-abbreviated" href="mailto:r.vandermeij@donders.ru.nl">r.vandermeij@donders.ru.nl</a><br>
</font></font></font></div>
</body>
</html>