# Access data at different timesteps through Programmable Filter

**URL:** https://discourse.paraview.org/t/access-data-at-different-timesteps-through-programmable-filter/15800
**Category:** ParaView Support
**Created:** [November 27, 2024, 5:32pm UTC](https://discourse.paraview.org/t/access-data-at-different-timesteps-through-programmable-filter/15800 "2024-11-27T17:32:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jeytsav](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jeytsav/32/15615_2.png) [@jeytsav](https://discourse.paraview.org/u/jeytsav)
#### Post date: [November 27, 2024, 5:32pm UTC](https://discourse.paraview.org/t/access-data-at-different-timesteps-through-programmable-filter/15800/1 "2024-11-27T17:32:14Z")

</div>

Hello Community!

This is my first ever post so please be lenient with me 🙂

I am a relatively new user of ParaView and I’ve been recently looking into Programmable Filters

I would like to see how I can access data at different timesteps. I have already had a look at the different posts in the forum, including [this one](https://discourse.paraview.org/t/getting-data-from-multiple-timesteps-in-programmable-filter/10358), however I don’t seem to get how to achieve it apparently because I am quite new.

I have tried to build a simple example which I can share which hopefully will help you understand what I am looking for.

I have recreated this example (state file attached)  
[simpleExample.pvsm](https://discourse.paraview.org/uploads/short-url/wOXZGh1NrEuw7T7OSm2TJjBLX9S.pvsm) (358.6 KB)

[https://www.kitware.com/defining-time-varying-sources-with-paraviews-programmable-source/](https://www.kitware.com/defining-time-varying-sources-with-paraviews-programmable-source/)

1. In short, this uses a programmable source that generates a sphere. It also generates a list of timesteps from 0 to 99.
2. The radius of the sphere is then specified as a function of the timestep which means that the sphere becomes larger or smaller, depending on the timestep.

As an extra step I am saving a new variable to host the actual radius at every timestep  
`output.PointData.append(radius,"Radius")`

Now, to explain my goal, I would like to include a programmable Filter that within the same timestep can access and,lets say, print all the different Radius values in all different timesteps.

My code looks like the following

```auto
outInfo = self.GetOutputInformation(0)
timesteps = outInfo.Get(vtk.vtkStreamingDemandDrivenPipeline.TIME_STEPS())

for t in timesteps:
    outInfo.Set(vtk.vtkStreamingDemandDrivenPipeline.UPDATE_TIME_STEP(),t)
    check_time = outInfo.Get(vtk.vtkStreamingDemandDrivenPipeline.UPDATE_TIME_STEP())
    print(check_time)
    print(inputs[0].PointData["Radius"][0])

```

Apparently the code doesn’t work and its always printing the radius that is part of the selected (in the GUI) timestep.

I was hoping that the  
`outInfo.Set(vtk.vtkStreamingDemandDrivenPipeline.UPDATE_TIME_STEP(),t)`

will update the timestep meaning that anything I ask for after that, will correspond to the new updated timestep. However apparently it doesn’t work.

Any hints?

Thanks a lot in advance 🙂

-Ioannis

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 28, 2024, 8:28am UTC](https://discourse.paraview.org/t/access-data-at-different-timesteps-through-programmable-filter/15800/2 "2024-11-28T08:28:08Z")

</div>

Hi @jeytsav

> [@jeytsav](#):
>
> I would like to include a programmable Filter that within the same timestep can access and,lets say, print all the different Radius values in all different timesteps.

This is not a trivial things to do I’m afraid. You need basically to browse all timesteps and recover all values in this filter.

To do that, you need to use the CONTINUE\_EXECUTING information key.

> [@vtkTemporalStatistics in Programmable Filter](https://discourse.paraview.org/t/vtktemporalstatistics-in-programmable-filter/6252/5):
>
> 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

I do not have a programmable filter example of this on hand sadly.
