Plot Selection Over Time with Script Issue

Hello Paraview Community,

I created a Macro which does the following things:

  1. Create a slice.
  2. Calculate average values on each slice.
  3. Loop to create many slices and calculated variables.
  4. Group the calculated variables.
  5. Plot the calculated variables over time.
  6. Save the data to a .csv file.

My issue comes in when trying to plot (and save) only the calculated variables by using “OnlyReportSelectionStatistics = 0”. The script seems to ignore this line of code and still plots (and saves) all of the selection statistics (min, max, avg, std, etc.). Here are the steps to reproduce the issue:

  1. Open the Macro and change the file location of the saved data (AIR.PVD) and where to save the data. They are at the very top and very bottom of the Python file.
  2. Save Macro to Paraview Macros.
  3. Run Macro.
  4. Check the output data file to see all of the unwanted saved data. (1.5 MB)

I normally use a .PVD file with 200 .VTU data files, but for space considerations, I modified the script to read just 2 .VTU files.

I am assuming there is a way I can modify the script to only output the relevant data, but I am struggling and would really appreciate any help. Thanks.

Hi @jschirck ,

I cant reproduce with ParaView 5.11 RC1.


Hello @mwestphal ,

Thanks for your reply. I reproduced the error on version 5.10.1. After updating to 5.11 RC1, the error was gone, just like you mentioned.

The original error occurred in Paraview version 5.4.0. Very old I realize, but unfortunately, I cannot control the software on our university HPC cluster. To select my data for the “Plot Selection Over Time” filter, I was using the “selectionquerysource()” method, which I found from another forum post. After switching my selection method to “IDSelectionSource(FieldType=“CELL”, IDs=[-1,0], ContainingCells=0)”, the error was also gone on Paraview version 5.4.0.

Thank you for testing my issue, and I hope others find this helpful!

1 Like