Python Macro to "Rescale Data to Range"
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Can I get a single Python macro that is equivalent to "Rescale to Data Range"? I will provide below an example of how I want to use this macro, but I suppose this feature would be valuable for ANY python script that loads a state file where the scale of some variables changes after the state file is created.
I am doing some testing with Paraview where I'm looking at how the data is distributed across processors. So, I'm loading my data and applying the Process ID Filter. So far, so good.
I'm using PVBATCH to do some of the testing and I'm using a very simple .py file that looks like this:
rom paraview.simple import * servermanager.LoadState("cth_390.pvsm") WriteAnimation("./cth_390.png")
I need one more command to get things the way that I want them. The color table is not automatically scaled across the number of processors used in the current batch run - it's scaled across the number of processors I used when I created the state file. If I'm running ParaView interactively, I can simply use the "Rescale to Data Range" button. How do I find the appropriate action when running in batch? I looked at the python that was generated when I do this interactively, and the command is specific to the current run - it's not a generic solution:
a1_ProcessId_PVLookupTable = GetLookupTableForArray( "ProcessId", 1, RGBPoints=[0.0, 0.23000000000000001, 0.29899999999999999, 0.754, 5.0, 0.70599999999999996, 0.016, 0.14999999999999999] ) Render()
I suppose this feature would be valuable for ANY state file where the scale of some variables changes after the state file is created.