Find maximum and minimum of a scalar field

Hi everyone, i have a transient simulation and i need to normalize a scalar field for every step so that the range is always [-1,1], is there any way trough the calculator to do this?
I’ll be applying isoVolumes so every little change in the range will give changes in volume size which I do not want, also I’ll be postprocessing trough a python script if that makes any difference.
Thanks in advance

Did you mean Temporal -> Temporal Statistics filter?

There is no normalization built into the Calculator filter, but you can do this with the Python Calculator. Set the expression to 2*(RTData - min(RTData)) / (max(RTData) - min(RTData))-1 and substitute your array name for RTData.

How do I set the array equal to the expression you wrote?
I have this that gives me the Helicity array which i need to normalize:

calculator1 = Calculator(Input=openFOAMReader2)
calculator1.ResultArrayName = 'Helicity'
calculator1.Function = '(U_X*vorticity_X+U_Y*vorticity_Y+U_Z*vorticity_Z)/(sqrt(U_X^2+U_Y^2+U_Z^2+vorticity_X^2+vorticity_Y^2+vorticity_Z^2)'

What should i set equal to this code you wrote?

Thanks for all the help, i’m not very good at python

Probably the easiest thing to do is add a PythonCalculator filter to your script that takes calculator1 as the Input argument. Then the expression would be

2*(Helicity - min(Helicity)) / (max(Helicity) - min(Helicity))-1