<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; ">
<div style="font-family: Calibri, sans-serif; ">
<div>
<div>That's not how you use the Python Histogram function. First of all, it doesn't just assume that the first argument is the name of the input array. Second, input arrays are specified with identifiers contained in strings. The Python interpreter thinks q
is the Python variable q, not the field name.</div>
</div>
</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">Your script should look something like the following.</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px; ">
<div><font face="Courier">reader = ExodusIIReader(Filename='out.e')</font></div>
<div><font face="Courier">histogram = Histogram()</font></div>
<div><font face="Courier">histogram.SelectInputArray = 'q'</font></div>
<div><font face="Courier">histogram.BinCount = 30</font></div>
<div><br>
</div>
</blockquote>
<div>Try using the stack trace if you are having trouble determining the right Python functions to call.</div>
<div><br>
</div>
<div>-Ken</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="font-family: Calibri, sans-serif; ">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>John Mangeri <<a href="mailto:john.mangeri@uconn.edu">john.mangeri@uconn.edu</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, August 28, 2014 3:02 PM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>" <<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>><br>
<span style="font-weight:bold">Subject: </span>[EXTERNAL] [Paraview] How to call a specifc data set from a multi-block ExodusII data set?<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div>
<div>
<div><font>I'm currently trying to do something simple. I have a ElementVariable q in my .e file.<br>
<br>
</font></div>
<font>I read them into the pipeline with<br>
<br>
<font size="1">reader = ExodusIIReader(FileName = 'out.e')<br>
</font><br>
</font></div>
<font>I want to use<br>
<font size="1"><br>
histogram = Histogram(q,BinCount=30) </font><br>
<br>
</font></div>
<font>but I recieve the following error:</font><br>
<div>
<pre style="" class=""><code><font size="1"><span class="">Traceback</span><span class=""> </span><span class="">(</span><span class="">most recent call last</span><span class="">):</span><span class="">
</span><span class="">File</span><span class=""> </span><span class="">"<console>"</span><span class="">,</span><span class=""> line </span><span class="">1</span><span class="">,</span><span class=""> </span><span class="">in</span><span class=""> </span><span class=""><</span><span class="">module</span><span class="">></span><span class=""></span><span class="">NameError</span><span class="">:</span><span class=""> name </span><span class="">'q'</span><span class=""> </span><span class="">is</span><span class=""> </span><span class="">not</span></font><span class=""><font size="1"> defined<br></font><br></span></code></pre>
<pre class=""><font><code><span class="">What is going on here?<br><br>Thanks<br></span></code></font></pre>
<pre style="" class=""><code><span class=""><font>John</font><br></span></code></pre>
</div>
</div>
</div>
</div>
</span>
</body>
</html>