<div dir="ltr">Okay, I figured it out. I updated my version of Paraview from 5.2.0 to 5.3.0 and that fixed it.<div><br></div><div>Is there a way to only have "aname" loop over "reader[0].ElementVariables"? I tried to replace the line</div><div><br></div><div>"for aname in inTable.RowData.keys():"<br></div><div><br></div><div>with</div><div><br></div><div>"for aname in " + reader[0].ElementVariables + ":"</div><div><br></div><div>but that didn't work</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="font-size:13px;color:rgb(136,136,136);font-family:arial,sans-serif">Regards,<br></div><div style="font-size:13px;color:rgb(136,136,136);font-family:arial,sans-serif"><br></div><div style="font-size:13px;color:rgb(136,136,136);font-family:arial,sans-serif">John R. Haase</div><div style="font-size:13px;color:rgb(136,136,136);font-family:arial,sans-serif"><a href="mailto:jhaase1@nd.edu" target="_blank">jhaase1@nd.edu</a></div></div></div></div>
<br><div class="gmail_quote">On Thu, Mar 30, 2017 at 3:35 PM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Not sure what's going on. The attached script worked just fine for me.<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Mar 30, 2017 at 1:02 PM, John Haase <<a href="mailto:jhaase1@nd.edu">jhaase1@nd.edu</a>> wrote:<br>
> Utkarsh,<br>
><br>
> Using the script attached, and the same data sets as before. I get the error<br>
><br>
> Traceback (most recent call last):<br>
><br>
> File "<string>", line 22, in <module><br>
><br>
> File "<string>", line 5, in RequestData<br>
><br>
> File "C:\Program Files\ParaView<br>
> 5.2.0-Qt4-OpenGL2-Windows-<wbr>64bit\bin\lib\site-packages\<wbr>vtk\numpy_interface\dataset_<wbr>adapter.py",<br>
> line 660, in append<br>
><br>
> arrLength = narray.shape[0]<br>
><br>
> IndexError: tuple index out of range<br>
><br>
><br>
> on the last line.<br>
><br>
> Regards,<br>
><br>
> John R. Haase<br>
> <a href="mailto:jhaase1@nd.edu">jhaase1@nd.edu</a><br>
><br>
> On Thu, Mar 30, 2017 at 12:32 PM, Utkarsh Ayachit<br>
> <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
>><br>
>> John,<br>
>><br>
>> That's the script for a "Programmable Filter", not simply to be added<br>
>> to your script, similar to what you're doing with `squareDiff`.<br>
>><br>
>> e.g.<br>
>><br>
>> myfilter = ProgrammableFilter(Input=<wbr>integrateSqrVarOverSpace)<br>
>> myfilter.Script = "...." # the script I provided.<br>
>> myfilter.UpdatePipeline()<br>
>> ...<br>
>><br>
>> Utkarsh<br>
>><br>
>> On Thu, Mar 30, 2017 at 12:09 PM, John Haase <<a href="mailto:jhaase1@nd.edu">jhaase1@nd.edu</a>> wrote:<br>
>> > Exploring 'integrateSqrVarOverSpace', it doesn't have a 'RowData'<br>
>> > object.<br>
>> ><br>
>> > dir(integrateSqrVarOverSpace)<br>
>> ><br>
>> > ['CellData', 'FieldData', 'FileNameChanged', 'GetCellDataInformation',<br>
>> > 'GetDataInformation', 'GetFieldDataInformation',<br>
>> > 'GetPointDataInformation',<br>
>> > 'GetProperty', 'GetPropertyValue', 'Initialize', 'InitializeFromProxy',<br>
>> > 'Input', 'ListProperties', 'Observed', 'ObserverTag',<br>
>> > '<wbr>OnlyReportSelectionStatistics'<wbr>, 'PointData', 'Port', 'SMProxy',<br>
>> > 'Selection', 'SetPropertyWithName', 'UpdatePipeline',<br>
>> > 'UpdatePipelineInformation', '_Proxy__<wbr>ConvertArgumentsAndCall',<br>
>> > '_Proxy__GetActiveCamera', '_Proxy__LastAttrName', '_Proxy__Properties',<br>
>> > '__class__', '__del__', '__delattr__', '__dict__', '__doc__', '__eq__',<br>
>> > '__format__', '__getattr__', '__getattribute__', '__getitem__',<br>
>> > '__hash__',<br>
>> > '__init__', '__iter__', '__module__', '__ne__', '__new__', '__reduce__',<br>
>> > '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',<br>
>> > '__subclasshook__', '__weakref__', 'add_attribute']<br>
>> ><br>
>> ><br>
>> > So, using the script you posted, I get the error "IndexError: tuple<br>
>> > index<br>
>> > out of range".<br>
>> ><br>
>> ><br>
>> > Regards,<br>
>> ><br>
>> > John R. Haase<br>
>> > <a href="mailto:jhaase1@nd.edu">jhaase1@nd.edu</a><br>
>> ><br>
>> > On Thu, Mar 30, 2017 at 10:35 AM, Utkarsh Ayachit<br>
>> > <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
>> >><br>
>> >> Isn't that simply a sum of all the rows in the output of<br>
>> >> integrateSqrVarOverSpace filter?<br>
>> >><br>
>> >> If so, that can be done by using another ProgrammableFilter with the<br>
>> >> following Script:<br>
>> >><br>
>> >> from numpy import sum<br>
>> >> for inTable, outTable in zip(inputs[0], output):<br>
>> >><br>
>> >> for aname in inTable.RowData.keys():<br>
>> >><br>
>> >> outTable.RowData.append(sum(<wbr>inTable.RowData[aname]), aname)<br>
>> >><br>
>> >><br>
>> >> Utkarsh<br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> >> On Wed, Mar 29, 2017 at 1:15 PM, John Haase <<a href="mailto:jhaase1@nd.edu">jhaase1@nd.edu</a>> wrote:<br>
>> >>><br>
>> >>> Sorry, that's not what I wanted. I want to integrate the variable<br>
>> >>> "integrateSqrVarOverSpace", over time as well.<br>
>> >>><br>
>> >>> Regards,<br>
>> >>><br>
>> >>> John R. Haase<br>
>> >>> <a href="mailto:jhaase1@nd.edu">jhaase1@nd.edu</a><br>
>> >>><br>
>> >>> On Wed, Mar 29, 2017 at 1:05 PM, Utkarsh Ayachit<br>
>> >>> <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
>> >>>><br>
>> >>>> Your script worked for me for the most part with ParaView 5.3. All I<br>
>> >>>> did<br>
>> >>>> was added a plot view to show the results (attached). If that what<br>
>> >>>> you were<br>
>> >>>> looking for?<br>
>> >>>><br>
>> >>>> On Wed, Mar 29, 2017 at 12:30 PM, John Haase <<a href="mailto:jhaase1@nd.edu">jhaase1@nd.edu</a>> wrote:<br>
>> >>>>><br>
>> >>>>> They are very large. I believe you should be able to access them<br>
>> >>>>> through this link<br>
>> >>>>><br>
>> >>>>> <a href="https://notredame.box.com/s/qy0p9y5jg71jwxtzfey80xiq9i9udk5s" rel="noreferrer" target="_blank">https://notredame.box.com/s/<wbr>qy0p9y5jg71jwxtzfey80xiq9i9udk<wbr>5s</a><br>
>> >>>>><br>
>> >>>>> Regards,<br>
>> >>>>><br>
>> >>>>> John R. Haase<br>
>> >>>>> <a href="mailto:jhaase1@nd.edu">jhaase1@nd.edu</a><br>
>> >>>>><br>
>> >>>>> On Wed, Mar 29, 2017 at 12:06 PM, Utkarsh Ayachit<br>
>> >>>>> <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
>> >>>>>><br>
>> >>>>>> John,<br>
>> >>>>>><br>
>> >>>>>> Can you send me the datafiles too (feel free to do it off the<br>
>> >>>>>> mailing<br>
>> >>>>>> list) so I can figure out what could be going wrong.<br>
>> >>>>>><br>
>> >>>>>> Thanks<br>
>> >>>>>> Utkarsh<br>
>> >>>>>><br>
>> >>>>>> On Wed, Mar 29, 2017 at 12:01 PM, John Haase <<a href="mailto:jhaase1@nd.edu">jhaase1@nd.edu</a>><br>
>> >>>>>> wrote:<br>
>> >>>>>>><br>
>> >>>>>>> Hello Paraviewers,<br>
>> >>>>>>><br>
>> >>>>>>> I'm trying to integrate variables over time. I found this thread<br>
>> >>>>>>> where it had been brought up previously.<br>
>> >>>>>>><br>
>> >>>>>>><br>
>> >>>>>>><br>
>> >>>>>>> <a href="http://paraview.markmail.org/search/?q=integral+over+time#query:integral%20over%20time+page:1+mid:z75bede26onth4eu+state:results" rel="noreferrer" target="_blank">http://paraview.markmail.org/<wbr>search/?q=integral+over+time#<wbr>query:integral%20over%20time+<wbr>page:1+mid:z75bede26onth4eu+<wbr>state:results</a><br>
>> >>>>>>><br>
>> >>>>>>> However, when I try and open the state file, paraview crashes. So<br>
>> >>>>>>> what commands do I use to do the integral over time? I'm trying to<br>
>> >>>>>>> integrate<br>
>> >>>>>>> a PlotSelectionOverTime filter (with row data).<br>
>> >>>>>>><br>
>> >>>>>>> I'm doing this programmatically, so attached is the python script.<br>
>> >>>>>>> I<br>
>> >>>>>>> have so far.<br>
>> >>>>>>><br>
>> >>>>>>> Regards,<br>
>> >>>>>>><br>
>> >>>>>>> John R. Haase<br>
>> >>>>>>> <a href="mailto:jhaase1@nd.edu">jhaase1@nd.edu</a><br>
>> >>>>>>><br>
>> >>>>>>> ______________________________<wbr>_________________<br>
>> >>>>>>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>> >>>>>>><br>
>> >>>>>>> Visit other Kitware open-source projects at<br>
>> >>>>>>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
>> >>>>>>><br>
>> >>>>>>> Please keep messages on-topic and check the ParaView Wiki at:<br>
>> >>>>>>> <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
>> >>>>>>><br>
>> >>>>>>> Search the list archives at:<br>
>> >>>>>>> <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
>> >>>>>>><br>
>> >>>>>>> Follow this link to subscribe/unsubscribe:<br>
>> >>>>>>> <a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
>> >>>>>>><br>
>> >>>>>><br>
>> >>>>><br>
>> >>>><br>
>> >>><br>
>> >><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>