Create a programmable filter along timesteps

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:

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!

Your code looks like you take it from this example: 5. Programmable Filter — ParaView Documentation 5.11.0 documentation.

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.