Greg, sorry if I did not explain fully. After reading your data, it is the active source. if you instantiate a ProgrammableFilter (PF), it takes wake_out as its input. But you can also set it explicitly as the source. inside the PF, you have VTK objects, so you can use VTK methods. Here is a script that works for me. The last point is to manually create a spreadsheet, because I just don't find a python command for it.
I load this as "paraview --script=script.py" and it scales the data just fine. ----------------- Jean M. Favre Swiss National Supercomputing Center
try: paraview.simple except: from paraview.simple import * paraview.simple._DisableFirstRenderCameraReset() wake_out = CSVReader(FileName="/tmp/histogram.csv",FieldDelimiterCharacters = ',',HaveHeaders = 0) wake_out.UpdatePipeline() # this is necessary! blank objects otherwise... SetActiveSource(wake_out) pf1 = ProgrammableFilter() pf1.OutputDataSetType = 'vtkTable' pf1.CopyArrays = 1 pf1.RequestUpdateExtentScript = '' pf1.PythonPath = '' pf1.RequestInformationScript = '' pf1.Script = 'import vtk\ninput = self.GetInput()\nscale = 1.0/input.GetRowData().GetArray(0).GetRange()[1]\nnewcol0 = vtk.vtkDoubleArray()\nnewcol0.SetName("New-col")\nnewcol0.DeepCopy(input.GetColumn(0))\nfor i in range(newcol0.GetNumberOfTuples()):\n newcol0.SetValue(i, scale * newcol0.GetValue(i))\noutput = self.GetOutputDataObject(0)\noutput.AddColumn(newcol0)' pf1.UpdatePipeline()
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview