Steve, I don't have a SLAC dataset, but here's the python script for an exodus dataset.
Utkarsh On Tue, Mar 9, 2010 at 3:51 PM, Stephen Molloy <stephen.mol...@rhul.ac.uk> wrote: > Utkarsh, > I was using a development version of Paraview 3.7 provided by friends at > SLAC. I've also tried with 3.6.2. > > To be honest, I'm still having troubles. The CSV file is written OK, but > all values of the field magnitudes are filled with zeros. I'm pretty sure > the problem is that I'm not giving PlotOverLine the correct "Input" variable > on instantiation. > > Can anyone give me advice on how to do this when the data-file has been > opened with a SLACDataReader class? > > Steve > > > Utkarsh Ayachit wrote: >> >> Steve, >> >> When you were saving your trace out, what version of ParaView were you >> using? I just tried today's CVS and I do indeed get a correct trace >> for the PlotOverLine as under: >> >> .... >> PlotOverLine1 = PlotOverLine( Source="High Resolution Line Source" ) >> PlotOverLine1.Source.Point1 = [-10.0, -10.0, -10.0] >> PlotOverLine1.Source.Point2 = [10.0, 10.0, 10.0] >> .... >> >> Utkarsh >> >> On Tue, Mar 9, 2010 at 8:33 AM, Stephen Molloy >> <stephen.mol...@rhul.ac.uk> wrote: >> >>> >>> Right. As I mentioned in my email from last night, I suspected the >>> problem >>> was with the PlotOverLine object, and I was right. I wasn't defining >>> that >>> properly, so the CSV file was empty. >>> >>> Attached is the working file. >>> >>> Thanks again, >>> >>> Steve >>> >>> >>> Stephen Wornom wrote: >>> >>>> >>>> Utkarsh Ayachit wrote: >>>> >>>>> >>>>> You can use the following: >>>>> >>>>> w = DataSetCSVWriter(FileName="foo.csv") >>>>> w.UpdatePipeline() >>>>> >>>>> >>>>> >>>>> >>>> >>>> When all is working well, would you share your python script? >>>> Thanks in advance, >>>> Stephen >>>> >>>>> >>>>> On Mon, Mar 8, 2010 at 5:50 AM, Stephen Molloy >>>>> <stephen.mol...@rhul.ac.uk> wrote: >>>>> >>>>> >>>>>> >>>>>> Hi all, >>>>>> I am using Paraview 3.7.0 to view a large number of data files, each >>>>>> with >>>>>> the same geometry. I need to load the geometry and volume data, use >>>>>> PlotOverLine to extract the magnitude of a variable along a particular >>>>>> line, >>>>>> and then save this data to a CSV file. >>>>>> >>>>>> Due to the large number of data sets I am dealing with, I have been >>>>>> trying >>>>>> to use the Python Trace functionality to automate this, and I am able >>>>>> to >>>>>> do >>>>>> everything except for saving the CSV file at the end. I have browsed >>>>>> around >>>>>> quite a bit over the past few days, and I understand that the trace >>>>>> functionality does not work for save data commands, but I was >>>>>> wondering >>>>>> if >>>>>> someone could help me find the Python object that contains the >>>>>> relevant >>>>>> data >>>>>> so that I can write my own little routine to dump it to a CSV file. >>>>>> >>>>>> Many thanks for any help you can offer. >>>>>> >>>>>> Steve >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>>>> >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>>> >>>> >>>> >
try: paraview.simple except: from paraview.simple import * disk_out_ref_ex2 = ExodusIIReader( FileName=['/disk_out_ref.ex2'] ) disk_out_ref_ex2.FilePrefix = '/disk_out_ref.ex2' disk_out_ref_ex2.XMLFileName = '/artifact.dta' disk_out_ref_ex2.SideSetArrayStatus = [] disk_out_ref_ex2.FilePattern = '%s' disk_out_ref_ex2.FileRange = [0, 0] disk_out_ref_ex2.NodeSetArrayStatus = [] disk_out_ref_ex2.PointVariables = [] disk_out_ref_ex2.PointVariables = ['Temp', 'V', 'Pres', 'AsH3', 'GaMe3', 'CH4', 'H2'] disk_out_ref_ex2.ElementBlocks = ['Unnamed block ID: 1 Type: HEX8 Size: 7472'] RenderView1 = GetRenderView() DataRepresentation1 = Show() RenderView1.CameraPosition = [0.0, 0.0, 50.119268546836174] RenderView1.CameraFocalPoint = [0.0, 0.0, 0.079999923706054688] RenderView1.CameraClippingRange = [29.479676088723771, 76.040257461360738] RenderView1.CenterOfRotation = [0.0, 0.0, 0.079999923706054688] RenderView1.CameraParallelScale = 12.951115722667065 PlotOverLine1 = PlotOverLine( Source="High Resolution Line Source" ) PlotOverLine1.Source.Point1 = [-5.75, -5.75, -10.0] PlotOverLine1.Source.Point2 = [5.75, 5.75, 10.159999847412109] writer = DataSetCSVWriter(FileName="/tmp/data.0.csv") writer.FieldAssociation = "Points" writer.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