<p>Hi Russ,</p>
<p>The imaginary part of a complex number (i.e. the 'b' in 'a+b*i') is very different from the phase (i.e. the 'p' in 'A*exp(i*p)'). When computing ITC, the expression z = z / abs(z) sets the amplitude (A) to 1, while preserving the phase. This is not the same as taking the imaginary par.</p>

<p>To be able to later compute the ITC, I would actually just use cfg.hilbert = 'complex', and then do the exact same computations as with your wavelet approach. Using cfg.hilbert = 'angle' gives you the angle (in radians) directly, so a real number. This is more difficult (and slow) to work with than using the normalized complex representation.</p>

<p>Hope this helps,<br>
Best,<br>
Eelke</p>
<div class="gmail_quote">On Dec 5, 2013 11:39 PM, "Russell G Port" <<a href="mailto:russgport@gmail.com">russgport@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Hi fellow fieldtippers,</span></p>

<br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">

<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">I
 have a question that brought around by an answer I previously received.
   For data analyzed with ft_freqanalysis and using the 'wavelet' option
 I can computer ITC/PLF via, </span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">tmpdat = freq.fourierspctrm;<br>

tmpdat = tmpdat./abs(tmpdat); ; % this will normalize each trial for its amplitude;<br>itc = abs(mean(tmpdat)); % this will give the itc</span></p><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">

<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">thank you again Jan-Mathijs for this insight</span></p>

<br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">

<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">I am now trying to calculate ITC via hilbert transformation, putting my VE data through</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">ft_preproc_hilbert. Can I just use the cfg.option = 'imag', to get the imaginary component of</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">the analytic signal, since this is what i use with wavelets (i.e. what the</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">tmpda =tmpdat./abs(tmpdat) achieves). Then I would just repeat the last line itc =</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">abs(mean(tmpdat)). I only hesitate because on several of the mailing list emails people have</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">suggested
 doing cfg.option = 'angle' (which computes the imaginary component 
(tmpdat./abs(tmpdat)  then uses the angle function (angle()). Have I 
been calculating ITC wrong for my wavelets? Or should i just the the 
cfg.option = 'imag' and mimik my wavelet based ITC.</span></p><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">

<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Thanks</span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">

<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Russ</span></p></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>