[Paraview-developers] time-dependent output in programmable source
Cory Quammen
cory.quammen at kitware.com
Wed Jul 27 10:54:44 EDT 2016
Hi Jean,
Responses inlined below:
On Wed, Jul 27, 2016 at 5:41 AM, Favre Jean <jfavre at cscs.ch> wrote:
> hi there
>
> I have a time-dependent python programmable source. Once run, the Information view tab shows the two-column output with indices and values. The first problem I see, is that I give exact values, and the GUI gives me floating point values that are not exact: for example:
>
> timesteps = (0.,0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35)
> 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])
>
> and the GUI shows the following Values:
>
> 0
> 0.05000
> 0.010000...1
> 0.149999999
> 0.200000...1
> 0.25
> 0.29999999
> 0.34999999
>
> the next problem is the VCR Controls; if I mouse-over the Last Frame button, it correctly shows "0.35", but the Time display shows "0.349999". That's annoying.
Yep, that's annoying. You can change the displayed precision following
TJ's blog post:
https://blog.kitware.com/change-the-animation-clock-precision-in-paraview/
This is in the version of ParaView that Utkarsh just tagged.
> the real problem is that using the Play button, the executive does not iterate through the timesteps values I have advertized, but rather, it iterates through the following values:
>
> ts = 0.0388888888889
> ts = 0.0777777777778
> ts = 0.116666666667
> ts = 0.155555555556
> ts = 0.194444444444
> ts = 0.233333333333
> ts = 0.272222222222
> ts = 0.311111111111
> ts = 0.35
>
> My understanding is that the VCR controls uses a fixed number of timesteps, and does an interpolation from the minimum time value to the maximum time values.
>
> Indeed, if I now augment the number of timestes my programmable source is capable of producing, for example:
>
> timesteps = (0.,0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55)
> for timestep in timesteps:
> outInfo.Append(executive.TIME_STEPS(), timestep)
>
> When using the Play button of the VCR controls, it requests the following times:
> ts = 0.0611111111111
> ts = 0.122222222222
> ts = 0.183333333333
> ts = 0.244444444444
> ts = 0.305555555556
> ts = 0.366666666667
> ts = 0.427777777778
> ts = 0.488888888889
> ts = 0.55
>
> so, it seems like it always produces 9 timestep requests, instead of what the reader advertizes. Playing with a different set of timesteps values, it seems like the VCR always calculates (maxTime - minTime)/(10-1) for the time increment.
>
> I don't feel like this should be the accepted behaviour for the VCR controls. Am I missing some python code? I have followed Chapter 13 of the User Guide.
>
> I have attached the full python code. This is version 5.1.2.
When I use your Programmable Source python code in the UI, everything
seems to work as expected. I can even change the list of timesteps in
the RequestInformation script and things update as expected. So I
think your Programmable Source code is fine.
When I run your full servermanager python through the python console,
I don't see any time step information in the UI. If I make a small,
inconsequential change to the RequestInformation script and click
Apply, all the timestep info appears. So something is not being
defined correctly.
I'm not sure what's happening. I suspect a problem in updating
StringVectorProperties, but can't be sure.
Cory
>
> Jean/CSCS
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
--
Cory Quammen
R&D Engineer
Kitware, Inc.
More information about the Paraview-developers
mailing list