Where to find the list of all time relevant fields in Python calculator

Hello,

I checked the different ParaView documentations about the Python calculator field but noticed that some information is still missing. For example, in my experience, to access the current time, I can access that with time_value. Could you please point me where the list of all variables that can be used within Python Calculator?

Thank you

https://www.paraview.org/paraview-docs/nightly/python/paraview.simple.PythonCalculator.html

1 Like

Thank you for sharing the link. I find the following confusing:

The Python expression evaluated during execution. Set of potentially available variables [inputs, points, t_value, t_index, FieldData, PointData, CellData] (i.e.: :point_right: “Momentum: (%f, %f, f)” (XMOM[t_index,0], YMOM[t_index,0], ZMOM[t_index,0]) :point_left: ). Additional variables, using the fmt library’s syntax, are {timevalue}, and {timeindex}. These variables are always available, and their default values are 0, and 0 respectively.

It seems like it is referring to Python Annotation filter not python calculator. Is it possible to use python string formatting in Python Calculator expressions?

The example may be specific to python annotation, but the variable are available all the same in the python calculator