# Create a programmable filter along timesteps

**URL:** https://discourse.paraview.org/t/create-a-programmable-filter-along-timesteps/10723
**Category:** ParaView Support
**Created:** [November 11, 2022, 4:37am UTC](https://discourse.paraview.org/t/create-a-programmable-filter-along-timesteps/10723 "2022-11-11T04:37:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ouxid](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/c2a13f/32.png) [@Ouxid](https://discourse.paraview.org/u/Ouxid)
#### Post date: [November 11, 2022, 4:37am UTC](https://discourse.paraview.org/t/create-a-programmable-filter-along-timesteps/10723/1 "2022-11-11T04:37:04Z")

</div>

Hi!  
I am currently struggling to understand what I believe something straightforward. I want to create a programmable filter that take is a input any field, with lets say a velocity for each point, and return some data of the same type, but for new generated time-steps.

My code looks like this:

```auto
def SetOutputTimesteps(algorithm, timesteps):
    executive = algorithm.GetExecutive()
    outInfo = executive.GetOutputInformation(0)
    outInfo.Remove(executive.TIME_STEPS())
    for timestep in timesteps:
      outInfo.Append(executive.TIME_STEPS(), timestep)
    outInfo.Remove(executive.TIME_RANGE())
    outInfo.Append(executive.TIME_RANGE(), timesteps[0])
    outInfo.Append(executive.TIME_RANGE(), timesteps[-1])

input0=inputs[0]
data=input0.PointData["U"]

SetOutputTimesteps(self, range(0,1000,1))
output.PointData.append(data,"U_noise")

```

Right now I am juste passing the input as an output and creating timesteps, which works.  
But as soon as I create another item using this filter as an input, it does not detect the timesteps. For example, both TemporalInterpolator and ParticleTracer both return the error message that there is not enough timesteps.

What am I doing wrong? I believe the output is not correct, but can not see how to fix it.

Thanks in advance for the help!

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [November 15, 2022, 8:22am UTC](https://discourse.paraview.org/t/create-a-programmable-filter-along-timesteps/10723/2 "2022-11-15T08:22:09Z")

</div>

Your code looks like you take it from this example: [5. Programmable Filter — ParaView Documentation 5.11.0 documentation](https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html#reading-a-csv-file-series).

Did you correctly put the `SetOutputTimesteps` part (method and call) in the `RequestInformation Script` property of the programmable filter as described in the link ?

and then the `PointData` manipulation in the `Script` property.
