<div dir="ltr"><div>Oops<br><br> N = 100 ; even<br> df = 1.0/N <br><br> frq := df*ispan(1,N/2,1) ; 0 => 0.5 <br> print(frq) <br><br></div>What you are seeing is <br><div><br> N=101 ; odd<br> df = 1.0/N<br> frq := df*ispan(1,N/2,1) ; 0 => 0.4950495<br><br></div><div>This will have to be fixed. A JIRA ticket has been opened<br></div><div><br>===<br><br><div><br></div><div>N=even .... (N/2) real and imaginary parts 2*(N/2)=N<br><br></div>N=odd .... 2*(N/2) + one real part => N (imaginary part 'undefined')<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 15, 2014 at 3:09 PM, Maria Gehne - NOAA Affiliate <span dir="ltr"><<a href="mailto:maria.gehne@noaa.gov" target="_blank">maria.gehne@noaa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p style="margin:0px;font-size:11px;font-family:Menlo">Hi all,</p><p style="margin:0px;font-size:11px;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;font-family:Menlo">not sure if anyone else has noticed this before. The specxy_anal routine returns maximum frequency values that are less that the 0.5 that it should return. (The documentation says the last entry of the spectrum is for frequency 0.5) This doesn't seem like the desired behavior. Or maybe it is?</p><p style="margin:0px;font-size:11px;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;font-family:Menlo">Here is a 4 line script that reproduces the issue:</p><p style="margin:0px;font-size:11px;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;font-family:Menlo">a = fspan(1,100,101)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">b = fspan(101,200,101)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">dof = specxy_anal(a,b,0,3,0.1)<br></p>
<p style="margin:0px;font-size:11px;font-family:Menlo">printMinMax(dof@frq,1)<br></p><p style="margin:0px;font-size:11px;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;font-family:Menlo">Output: </p><p style="margin:0px;font-size:11px;font-family:Menlo"><br></p>
<p style="margin:0px;font-size:11px;font-family:Menlo">(0) </p>
<p style="margin:0px;font-size:11px;font-family:Menlo">(0) min=0.00990099 max=0.49505</p><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div><br></div><div>Maria</div></font></span></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>