pvpython Rescale to Data Range for Calculator

Hi, I’m having some trouble getting the colourmap to rescale for a calculator output.

I used calculator1Display.RescaleTransferFunctionToDataRange(False, True) as in the trace, but it doesn’t seem to update the colour. After digging through some old ParaView help pages, I saw a suggestion to run UpdatePipeline(). I tried that on the function and the display proxy but neither worked. I’d appreciate any thoughts - I’m probably just missing something, as it should be a simple operation!

Kind regards,
Tim

I’ve used the following code:

v = GetActiveView()
[(Show(s).RescaleTransferFunctionToDataRange()) for s in GetSources().values() if servermanager.GetRepresentation(s, v) is not None and GetDisplayProperties(s, v).Visibility==1]
Render()

Second line filters uninitialized sources (see this post).
Render() may be omitted if you don’t need to redraw view right away.