vtkTemporalStatistics in Programmable Filter

Hello,

I wonder if someone can provide me some code snippet showing how to implement “vtkTemporalStatistics” in a Python Programmable Filter (I want to obtain the standard deviation of time varying data without using the “Temporal Statistics” Paraview filter)

Thanks in advance

Miguel

Hello,

I can’t write the whole script right now but here’s some pointers :

Also is there a specific reason on why you don’t want to use the “Temporal Statistics” filter ?

Hello Timothee,

Thanks for the tips! I will take a look at this in detail. My objective is to integrate the TemporalStatistics filter into a custom made Python source just to simplify the tasks for the user (which allows us to pre-process the time-series data and to post-process the resulting mean values inside the same programmable source).

Thanks again

Miguel

Ok I think I got it now. A few more pointers :slightly_smiling_face: :

  • Look here to check how to handle temporal data in a script
  • Also look at the key vtkStreamingDemandDrivenPipeline::CONTINUE_EXECUTING() (executive.CONTINUE_EXECUTING() in its python version) to make the RequestData call looping as long as this key is defined

But if I had to do this, I think I would make a paraview pipeline like so MySource -- [PreProcessFilters] -- TemporalStatistics -- [PostProcessFilters] and give the paraview state file (either .py or .pvsm) to the final user. Data array processing can either be done using the python programmable filter or the “Calculator” filter. But maybe putting everything in a single script is the best in your case :slightly_smiling_face:

Hello,

Ahhh, excellent! The key “CONTINUE_EXECUTING()” seems to be very weel suited for my purpose. I have to play a little bit with this parameter to get familiarized with. If I make it work, I will put here the code.

Thanks a lot !

Miguel