<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body ocsi="0" fpstyle="1" bgcolor="#FFFFFF">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Thanks Burlen. I think I am finally done with this. I really appreciate all yours and others help in getting me here. thanks...<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF400580"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Burlen Loring [burlen.loring@gmail.com]<br>
<b>Sent:</b> Wednesday, May 21, 2014 12:05 PM<br>
<b>To:</b> Su, Simon M CTR USARMY ARL (US); paraview@paraview.org<br>
<b>Subject:</b> Re: [Paraview] ParaView programmable filter -> what datatype to use to store complex number and complex number visualization<br>
</font><br>
</div>
<div></div>
<div>So you have 3 numpy arrays each with 3 complex values?<br>
<br>
In any case you'll use vtk double  array for this, and you'll want to explictly handle real and imaginary parts. PV can iso surface the real and imaginary parts separately. There are a couple of ways you could do that. 1) each array of complex values could
 go into a 2 component vtkDoubleArray, first component is the real part and second component is the imaginary part. 2) each array of complex values could go into 2 1 component double arrays, the first double array for the real part and the second double array
 for the imaginary part. Since you mentioned iso surfacing I'm guessing option 2 will be the easiest path for you.
<br>
<br>
Burlen<br>
<br>
<div class="moz-cite-prefix">On 05/21/2014 07:20 AM, Su, Simon M CTR USARMY ARL (US) wrote:<br>
</div>
<blockquote type="cite"><style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hello,<br>
<br>
I am calculating the roots using numpy in the python programmable filter. numpy.roots(coeff) is returning an array of type ndarray with complex128 array elements.
<br>
<br>
<style type="text/css">
<!--
p, li
        {white-space:pre-wrap}
body
        {scrollbar-base-color:undefined;
        scrollbar-highlight-color:undefined;
        scrollbar-darkshadow-color:undefined;
        scrollbar-arrow-color:undefined}
-->
BODY {direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;}</style>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px">
<span style="font-family:'Courier'; font-size:9pt; color:#008000"><type 'numpy.ndarray'></span></p>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px">
<span style="font-family:'Courier'; font-size:9pt; color:#008000">[-0.77184451+1.11514251j -0.77184451-1.11514251j 0.54368901+0.j ]</span></p>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px">
<span style="font-family:'Courier'; font-size:9pt; color:#008000">array size = 3</span></p>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px">
<span style="font-family:'Courier'; font-size:9pt; color:#008000">(-0.771844506346+1.11514250804j)</span></p>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px">
<span style="font-family:'Courier'; font-size:9pt; color:#008000"><type 'numpy.complex128'></span></p>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px">
<span style="font-family:'Courier'; font-size:9pt; color:#008000">(-0.771844506346-1.11514250804j)</span></p>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px">
<span style="font-family:'Courier'; font-size:9pt; color:#008000"><type 'numpy.complex128'></span></p>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px">
<span style="font-family:'Courier'; font-size:9pt; color:#008000">(0.543689012692+0j)</span></p>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px">
<span style="font-family:'Courier'; font-size:9pt; color:#008000"><type 'numpy.complex128'></span></p>
<br>
<br>
In my calculation I will have 3 roots so I will be creating three variables root1, root2, root3, and  add them to the output data via<br>
<br>
<pre class="de1">output.<span class="me1">GetPointData</span><span class="br0">(</span><span class="br0">)</span>.<span class="me1">AddArray</span><span class="br0">(</span><span class="br0">root1)
</span>output.<span class="me1">GetPointData</span><span class="br0">(</span><span class="br0">)</span>.<span class="me1">AddArray</span><span class="br0">(</span><span class="br0">root2)
</span>output.<span class="me1">GetPointData</span><span class="br0">(</span><span class="br0">)</span>.<span class="me1">AddArray</span><span class="br0">(</span><span class="br0">root3)
</span>
</pre>
what would the vtk type that I need to use to create root1, root2, and root3?<br>
<br>
Can ParaView draw an isosurface using root1, or root2, or root3?<br>
<br>
Any help on this is much appreciated.<br>
<br>
thanks<br>
-simon<br>
<br>
<br>
<br>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader" target="_blank"></fieldset> <br>
<pre>_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com" target="_blank">www.kitware.com</a>

Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the ParaView Wiki at: <a class="moz-txt-link-freetext" href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
</body>
</html>