[Paraview] plot over line

2008-11-20 Thread Stephen Wornom

How does one "plot over line" if the line is curved in x,y,z?
I would like to plot pressure over a curved line in a x-y plane.

I tried:
1-using the calculator to compute the arc length but the plot options 
remain lines in x or y or z (no arc length is added).
2-I tried exporting, I get the x,y, z coordinates to process outside of 
PV but the pressure does not get written.

Any ideas?
Stephen

--
[EMAIL PROTECTED]
2004 route des lucioles - BP93
Sophia Antipolis
06902 CEDEX

Tel: 04 92 38 50 54
Fax: 04 97 15 53 51

begin:vcard
fn:Stephen Wornom
n:Wornom;Stephen
email;internet:[EMAIL PROTECTED]
tel;work:04 92 38 50 54
x-mozilla-html:TRUE
version:2.1
end:vcard

___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


[Paraview] Plot over line

2013-10-02 Thread Colin McAuliffe
Hello all, I would like to use a plot over line filter where the line  
is defined by two nodes on the mesh, which move in time, rather than  
defining the line with two fixed spacial points. Is it possible to do  
this with the POL filter as is, or will this require some extra  
scripting?


Thanks
Colin




--
Colin McAuliffe
PhD Candidate
Columbia University
Department of Civil Engineering and Engineering Mechanics

___
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


Re: [Paraview] plot over line

2008-11-24 Thread Berk Geveci
Hi Stephen,

This is a feature we are looking at implementing for the next release.
Just a question though, how did you generate the line?

-berk

On Thu, Nov 20, 2008 at 5:29 AM, Stephen Wornom
<[EMAIL PROTECTED]> wrote:
> How does one "plot over line" if the line is curved in x,y,z?
> I would like to plot pressure over a curved line in a x-y plane.
>
> I tried:
> 1-using the calculator to compute the arc length but the plot options remain
> lines in x or y or z (no arc length is added).
> 2-I tried exporting, I get the x,y, z coordinates to process outside of PV
> but the pressure does not get written.
> Any ideas?
> Stephen
>
> --
> [EMAIL PROTECTED]
> 2004 route des lucioles - BP93
> Sophia Antipolis
> 06902 CEDEX
>
> Tel: 04 92 38 50 54
> Fax: 04 97 15 53 51
>
>
> ___
> ParaView mailing list
> ParaView@paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
>
___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] plot over line

2008-11-25 Thread Stephen Wornom

Berk Geveci wrote:

Hi Stephen,

This is a feature we are looking at implementing for the next release.
Just a question though, how did you generate the line?
  

extract surface -> connectivity filter -> threshold filter + slice in z
Stephen

-berk

On Thu, Nov 20, 2008 at 5:29 AM, Stephen Wornom
<[EMAIL PROTECTED]> wrote:
  

How does one "plot over line" if the line is curved in x,y,z?
I would like to plot pressure over a curved line in a x-y plane.

I tried:
1-using the calculator to compute the arc length but the plot options remain
lines in x or y or z (no arc length is added).
2-I tried exporting, I get the x,y, z coordinates to process outside of PV
but the pressure does not get written.
Any ideas?
Stephen

--
[EMAIL PROTECTED]
2004 route des lucioles - BP93
Sophia Antipolis
06902 CEDEX

Tel: 04 92 38 50 54
Fax: 04 97 15 53 51


___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview




___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview
  



--
[EMAIL PROTECTED]
2004 route des lucioles - BP93
Sophia Antipolis
06902 CEDEX

Tel: 04 92 38 50 54
Fax: 04 97 15 53 51

begin:vcard
fn:Stephen Wornom
n:Wornom;Stephen
email;internet:[EMAIL PROTECTED]
tel;work:04 92 38 50 54
x-mozilla-html:TRUE
version:2.1
end:vcard

___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] plot over line

2008-11-25 Thread Stephen Gillen
Hello, I had a similar problem in which was looking to plot the pressure on
the surface of a tube in a flow.
The way I did it was to 
Extract Block -> Connectivity -> Scatter plot.
The only problem with this was that it plotted starting at 120 degrees and
also I have the pressure over top and bottom overlaying each other, kind of
like it is plotted against x instead of along surface. It is also possible
to plot along a contour by selecting the points along a contour and
extracting selection and scatter plot. Note, I have so far been looking only
at 2D sets of data but I am sure can be used for 3D by taking a slice.

If I didn't include the Connectivity when extracting block it still plotted
however it jumped around the circle, which I think may be something to do
with my original mesh.

So I haven't quite got it doing what I want and look forward to when plots
along curved lines are available, if anyone else has any advice it would be
welcome.

Just to say it is also possible to open new viewer window with spreadsheet
and select extarcted selection or contour from drop down and then save this
as a .csv file which can easily be read plenty of other programs such as
Matlab for further data analysis.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Stephen Wornom
Sent: 25 November 2008 09:38
To: Berk Geveci
Cc: paraview@paraview.org
Subject: Re: [Paraview] plot over line

Berk Geveci wrote:
> Hi Stephen,
>
> This is a feature we are looking at implementing for the next release.
> Just a question though, how did you generate the line?
>   
extract surface -> connectivity filter -> threshold filter + slice in z
Stephen
> -berk
>
> On Thu, Nov 20, 2008 at 5:29 AM, Stephen Wornom 
> <[EMAIL PROTECTED]> wrote:
>   
>> How does one "plot over line" if the line is curved in x,y,z?
>> I would like to plot pressure over a curved line in a x-y plane.
>>
>> I tried:
>> 1-using the calculator to compute the arc length but the plot options 
>> remain lines in x or y or z (no arc length is added).
>> 2-I tried exporting, I get the x,y, z coordinates to process outside 
>> of PV but the pressure does not get written.
>> Any ideas?
>> Stephen
>>
>> --
>> [EMAIL PROTECTED]
>> 2004 route des lucioles - BP93
>> Sophia Antipolis
>> 06902 CEDEX
>>
>> Tel: 04 92 38 50 54
>> Fax: 04 97 15 53 51
>>
>>
>> ___
>> ParaView mailing list
>> ParaView@paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>>
>> 
> ___
> ParaView mailing list
> ParaView@paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>   


--
[EMAIL PROTECTED]
2004 route des lucioles - BP93
Sophia Antipolis
06902 CEDEX

Tel: 04 92 38 50 54
Fax: 04 97 15 53 51


No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.9.10/1810 - Release Date: 24/11/2008
14:36


___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] plot over line

2008-12-11 Thread Berk Geveci
Question: If I implemented the ability to plot values along a closed
curve, where should the plot start?

-berk

On Tue, Nov 25, 2008 at 4:38 AM, Stephen Wornom
 wrote:
> Berk Geveci wrote:
>>
>> Hi Stephen,
>>
>> This is a feature we are looking at implementing for the next release.
>> Just a question though, how did you generate the line?
>>
>
> extract surface -> connectivity filter -> threshold filter + slice in z
> Stephen
>>
>> -berk
>>
>> On Thu, Nov 20, 2008 at 5:29 AM, Stephen Wornom
>>  wrote:
>>
>>>
>>> How does one "plot over line" if the line is curved in x,y,z?
>>> I would like to plot pressure over a curved line in a x-y plane.
>>>
>>> I tried:
>>> 1-using the calculator to compute the arc length but the plot options
>>> remain
>>> lines in x or y or z (no arc length is added).
>>> 2-I tried exporting, I get the x,y, z coordinates to process outside of
>>> PV
>>> but the pressure does not get written.
>>> Any ideas?
>>> Stephen
>>>
>>> --
>>> stephen.wor...@sophia.inria.fr
>>> 2004 route des lucioles - BP93
>>> Sophia Antipolis
>>> 06902 CEDEX
>>>
>>> Tel: 04 92 38 50 54
>>> Fax: 04 97 15 53 51
>>>
>>>
>>> ___
>>> ParaView mailing list
>>> ParaView@paraview.org
>>> http://www.paraview.org/mailman/listinfo/paraview
>>>
>>>
>>>
>>
>> ___
>> ParaView mailing list
>> ParaView@paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>
>
> --
> stephen.wor...@sophia.inria.fr
> 2004 route des lucioles - BP93
> Sophia Antipolis
> 06902 CEDEX
>
> Tel: 04 92 38 50 54
> Fax: 04 97 15 53 51
>
>
___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] plot over line

2008-12-11 Thread Stephen Wornom

Berk Geveci wrote:

Question: If I implemented the ability to plot values along a closed
curve, where should the plot start?
  

The minimun x,y,z on the curve seems ok to me.
Stephen

-berk

On Tue, Nov 25, 2008 at 4:38 AM, Stephen Wornom
 wrote:
  

Berk Geveci wrote:


Hi Stephen,

This is a feature we are looking at implementing for the next release.
Just a question though, how did you generate the line?

  

extract surface -> connectivity filter -> threshold filter + slice in z
Stephen


-berk

On Thu, Nov 20, 2008 at 5:29 AM, Stephen Wornom
 wrote:

  

How does one "plot over line" if the line is curved in x,y,z?
I would like to plot pressure over a curved line in a x-y plane.

I tried:
1-using the calculator to compute the arc length but the plot options
remain
lines in x or y or z (no arc length is added).
2-I tried exporting, I get the x,y, z coordinates to process outside of
PV
but the pressure does not get written.
Any ideas?
Stephen

--
stephen.wor...@sophia.inria.fr
2004 route des lucioles - BP93
Sophia Antipolis
06902 CEDEX

Tel: 04 92 38 50 54
Fax: 04 97 15 53 51


___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview





___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview

  

--
stephen.wor...@sophia.inria.fr
2004 route des lucioles - BP93
Sophia Antipolis
06902 CEDEX

Tel: 04 92 38 50 54
Fax: 04 97 15 53 51




___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview
  


___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


[Paraview] Plot over Line source

2015-09-08 Thread no name
Hey there

I have some hundred VTU files and I want to plot some data in a graph (Plot
over Line - POL) next to it. The Problem is, the data from these POLs is
coming from a simple log file, basically conaining only x and y values
(like two np.arrays).

I can transform the arrays via

from vtk.util import numpy_support
values = np.array((x,y))
vtk_values = numpy_support.numpy_to_vtk(values, array_type=vtk.VTK_FLOAT)
vtk_values.setName('values_2_show')
vtk_values.setComponentName(1, 'x_value')
vtk_values.setComponentName(2, 'y_value')

But so far I have no success with how to change the input (source)

VTUFILE = FindSource('VTUFILE*')
plotOverLine1 = PlotOverLine(Input=VTUFILE, Source='High Resolution
Line Source')

to a simple array.

Thanks for any help!
Richard
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Plot over line

2013-10-02 Thread Samuel Key

Colin,

A not necessarily straight forward way is to use the Warp filter to 
remove the mesh motion (assumes you have the displacement vector as a 
point value in your datum set). Then the POL Filter end-points remain 
fixed with respect to the two nodes over which you initially placed the 
end-points.


However, implicit in this approach is that the POL Filter's line is a 
material line and deforms with the material, probably not remaining a 
straight line as the time (or loading) progresses. It may or may not be 
the result for which you are looking?


Samuel Key
FMA Development, LLC


On 10/2/2013 6:03 PM, Colin McAuliffe wrote:
Hello all, I would like to use a plot over line filter where the line 
is defined by two nodes on the mesh, which move in time, rather than 
defining the line with two fixed spacial points. Is it possible to do 
this with the POL filter as is, or will this require some extra 
scripting?


Thanks
Colin






___
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


Re: [Paraview] Plot over line

2013-10-02 Thread Colin McAuliffe
Hi Samuel, thanks for the response. My line is on a boundary which  
remains a strait line so there is no worry of the line becoming  
curved. My data set contains mesh node points which are fixed in time,  
along with the nodal displacements which give the deformed  
configuration when the warp filter is applied. I can do what you  
describe but this will give me the POL of the undeformed  
configuration. What I want to do here is get a plot over line on the  
warped mesh, since I need to compute an integral along the warped edge.


Thanks
Colin

Quoting Samuel Key :


Colin,

A not necessarily straight forward way is to use the Warp filter to
remove the mesh motion (assumes you have the displacement vector as a
point value in your datum set). Then the POL Filter end-points remain
fixed with respect to the two nodes over which you initially placed the
end-points.

However, implicit in this approach is that the POL Filter's line is a
material line and deforms with the material, probably not remaining a
straight line as the time (or loading) progresses. It may or may not be
the result for which you are looking?

Samuel Key
FMA Development, LLC


On 10/2/2013 6:03 PM, Colin McAuliffe wrote:
Hello all, I would like to use a plot over line filter where the   
line is defined by two nodes on the mesh, which move in time,   
rather than defining the line with two fixed spacial points. Is it   
possible to do this with the POL filter as is, or will this require  
 some extra scripting?


Thanks
Colin






___
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




--
Colin McAuliffe
PhD Candidate
Columbia University
Department of Civil Engineering and Engineering Mechanics

___
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


[Paraview] plot over line in 2D

2008-10-10 Thread Michele Vascellari
Hello!

I'm trying to extract the data from a line of my 2D dataset, using the
probeline filter. The Z range of my domain is from 0 to 0.

Extracting a line with z1=z2=0, the data at the ends of the line are not
realistic, or rather they remain constant at the ends of the line extracted.
Modifyng the z range of the line (i.e. z1=-0.1 and z2=0.1), tha part of the
line where the data are constant is reduced.

Does someone know how to avoid this problem?

Thanks in advice for ypur attention,

Michele
___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Plot over Line source

2015-09-08 Thread Cory Quammen
Hi Richard,

You won't be able to set a vtkDataArray subclass as the input to a
PlotOverLine filter. Instead, you should read the log files in a
Programmable Source, and connect the Programmable Source to the
PlotOverLine filter.

See Chapter 13 of the ParaView Guide [1].

Hope that helps,
Cory

[1]
http://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v4.3&type=data&os=all&downloadFile=TheParaViewGuide-v4.3-CC-Edition.pdf


On Tue, Sep 8, 2015 at 3:57 AM, no name  wrote:

> Hey there
>
> I have some hundred VTU files and I want to plot some data in a graph
> (Plot over Line - POL) next to it. The Problem is, the data from these POLs
> is coming from a simple log file, basically conaining only x and y values
> (like two np.arrays).
>
> I can transform the arrays via
>
> from vtk.util import numpy_support
> values = np.array((x,y))
> vtk_values = numpy_support.numpy_to_vtk(values, array_type=vtk.VTK_FLOAT)
> vtk_values.setName('values_2_show')
> vtk_values.setComponentName(1, 'x_value')
> vtk_values.setComponentName(2, 'y_value')
>
> But so far I have no success with how to change the input (source)
>
> VTUFILE = FindSource('VTUFILE*')
> plotOverLine1 = PlotOverLine(Input=VTUFILE, Source='High Resolution Line 
> Source')
>
> to a simple array.
>
> Thanks for any help!
> Richard
>
> ___
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>


-- 
Cory Quammen
R&D Engineer
Kitware, Inc.
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Plot over Line source

2015-09-09 Thread Cory Quammen
Hi Richard,

If you don't mind, let's keep the discussion on the list so that others may
benefit from the discussion.

Outputting a vtkTable is the right thing to do. What I suspect is happening
with the first error message is that if you execute a programmable source
with the output set to one type of data set (e.g., vtkPolyData), there is a
bug that doesn't let you switch to a different type of output. As a
workaround, you can create a new Programmable Source, copy and paste your
code from the original Programmable Source into the new one, and set the
output type to vtkTableData *before* you click Apply.

To view line plots of your data, you'll need to create a Line Chart View by
splitting the 3D Render View. To do this, look for the icon on the top
right of the 3D Render View that has two vertically-oriented rectangles
side by side (tool tip "Split Horizontal"). In the list of views that comes
up, click on "Line Chart View". If your line plots are not visible right
away, you will need to make them visible by clicking on the eye icon next
to the Programmable Source. Voila, you should have a line plot.

Hope that helps,
Cory

On Wed, Sep 9, 2015 at 5:23 AM, no name  wrote:

> Hey Cory
>
> Thanks for the hint! I did some coding and I got stuck at the vtkTable as
> Output DataSet Type.
>
>
> I used -> Programmable Source and then vtkTable which gives me the
> following error code:
>
> ERROR: In
> C:\DBD\pvs-x64\paraview\src\paraview\VTK\Common\ExecutionModel\vtkDemandDrivenPipeline.cxx,
> line 810
>
> vtkPVDataRepresentationPipeline (9F2FC720): Input for connection
> index 0 on input port index 0 for algorithm
> vtkGeometryRepresentationWithFaces(946A85F0) is of type vtkTable,
> but a vtkDataSet is required.
>
>
>
> ERROR: In
> C:\DBD\pvs-x64\paraview\src\paraview\VTK\Common\ExecutionModel\vtkDemandDrivenPipeline.cxx,
> line 810
>
> vtkPVDataRepresentationPipeline (9F2FAB00): Input for connection
> index 0 on input port index 0 for algorithm
> vtkGeometryRepresentation(4FAC3570) is of type vtkTable, but a
> vtkDataSet is required.
>
> for the code I am using:
>
> import numpy as np
>
>
> switching_log = 'C:\\Users\\raphael\\Desktop\\logs 
> auswertung\\newsims\\flat_Aex_1_E_-11\\flat_12\\switching.log'
>
> class DataFile(object):
>
> def __init__(self, filename, h_xyz, m_xyz):
>
> self._filename = filename
>
> self._h_xyz = h_xyz
>
> self._m_xyz = m_xyz
>
> def read_dat_file(self):
>
> data = np.genfromtxt(self._filename, delimiter='', \
>
> usecols=(0, self._h_xyz, self._m_xyz), unpack=True)
>
> return data
>
>
> log = DataFile(switching_log, 9, 13)
>
> data = log.read_dat_file()
>
>
> A = np.rec.fromarrays(data, dtype= {'names': ['Time', 'Hx', 'Mx'], 
> 'formats':['int','f8', 'f8']})
>
> print A.dtype.names
>
>
> for name in A.dtype.names:
>
> array = A[name]
>
> output.RowData.append(array, name)
>
>
> Now I could use the "vtkMultiBlockSet" or "vtkPolyData" as output DataSet,
> but then I get:
>
>
> Traceback (most recent call last):
>
> File "", line 19, in 
>
> File "", line 41, in RequestData
>
> File "C:\Program Files (x86)\ParaView
> 4.3.1\lib\paraview-4.3\site-packages\vtk\numpy_interface\dataset_adapter.py",
> line 121, in __getattr__
>
> return getattr(self.VTKObject, name)
>
> AttributeError: RowData
>
>
> Because output.rowdata needs a vtkTable. I found the vtkTable in the
>  Paraview Guide in Chapter 13.2.1 "Reading a CSV" file - which is basically
> my thing, but I dont exactly understand where the difference between the
> example and my situation lies ...
>
>
> Thanks for your help!
>
>
> Richard
>
> On 8 September 2015 at 15:00, Cory Quammen 
> wrote:
>
>> Hi Richard,
>>
>> You won't be able to set a vtkDataArray subclass as the input to a
>> PlotOverLine filter. Instead, you should read the log files in a
>> Programmable Source, and connect the Programmable Source to the
>> PlotOverLine filter.
>>
>> See Chapter 13 of the ParaView Guide [1].
>>
>> Hope that helps,
>> Cory
>>
>> [1]
>> http://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v4.3&type=data&os=all&downloadFile=TheParaViewGuide-v4.3-CC-Edition.pdf
>>
>>
>> On Tue, Sep 8, 2015 at 3:57 AM, no name 
>> wrote:
>>
>>> Hey there
>>>
>>> I have some hundred VTU files and I want to plot some data in a graph
>>> (Plot over Line - POL) next to it. The Problem is, the data from these POLs
>>> is coming from a simple log file, basically conaining only x and y values
>>> (like two np.arrays).
>>>
>>> I can transform the arrays via
>>>
>>> from vtk.util import numpy_support
>>> values = np.array((x,y))
>>> vtk_values = numpy_support.numpy_to_vtk(values, array_type=vtk.VTK_FLOAT)
>>> vtk_values.setName('values_2_show')
>>> vtk_values.setComponentName(1, 'x_value')
>>> vtk_values.setComponentName(2, 'y_value')
>>>
>>> But so far I have no success with how to change the input (source)
>>>
>>> VTUFILE = FindSou

Re: [Paraview] Plot over Line source

2015-09-10 Thread Cory Quammen
Richard,

I'm glad you got it working.

cory

On Wed, Sep 9, 2015 at 1:45 PM, no name  wrote:

> I just managed to do this myself and I had to do it the same way again,
> redo everything by copy and paste, there seems to be a bug in here too, but
> I am not capable of reproducing it :( I just wanted to let you know.
>
> Thanks for your Help!
>
> Richard
>
> On 9 September 2015 at 18:20, no name  wrote:
>
>> this is straight what I was looking for! Thank you SO MUCH for pointing
>> out this bug to me. This drove me mad :(
>>
>> One last question: Line Chart != PlotOverLine, so its hard for me to plot
>> x and y axis, or like in my script mx over hx, as nothing happens when I
>> choose to use one of my coordinates as "X-Axis Parameter" and just let the
>> other one being drawn.
>>
>> Can't I make a real Plot over Line?
>>
>> Thanks again for your time!
>> Richard
>>
>> On 9 September 2015 at 15:12, Cory Quammen 
>> wrote:
>>
>>> Hi Richard,
>>>
>>> If you don't mind, let's keep the discussion on the list so that others
>>> may benefit from the discussion.
>>>
>>> Outputting a vtkTable is the right thing to do. What I suspect is
>>> happening with the first error message is that if you execute a
>>> programmable source with the output set to one type of data set (e.g.,
>>> vtkPolyData), there is a bug that doesn't let you switch to a different
>>> type of output. As a workaround, you can create a new Programmable Source,
>>> copy and paste your code from the original Programmable Source into the new
>>> one, and set the output type to vtkTableData *before* you click Apply.
>>>
>>> To view line plots of your data, you'll need to create a Line Chart View
>>> by splitting the 3D Render View. To do this, look for the icon on the top
>>> right of the 3D Render View that has two vertically-oriented rectangles
>>> side by side (tool tip "Split Horizontal"). In the list of views that comes
>>> up, click on "Line Chart View". If your line plots are not visible right
>>> away, you will need to make them visible by clicking on the eye icon next
>>> to the Programmable Source. Voila, you should have a line plot.
>>>
>>> Hope that helps,
>>> Cory
>>>
>>> On Wed, Sep 9, 2015 at 5:23 AM, no name 
>>> wrote:
>>>
 Hey Cory

 Thanks for the hint! I did some coding and I got stuck at the vtkTable
 as Output DataSet Type.


 I used -> Programmable Source and then vtkTable which gives me the
 following error code:

 ERROR: In
 C:\DBD\pvs-x64\paraview\src\paraview\VTK\Common\ExecutionModel\vtkDemandDrivenPipeline.cxx,
 line 810

 vtkPVDataRepresentationPipeline (9F2FC720): Input for
 connection index 0 on input port index 0 for algorithm
 vtkGeometryRepresentationWithFaces(946A85F0) is of type vtkTable,
 but a vtkDataSet is required.



 ERROR: In
 C:\DBD\pvs-x64\paraview\src\paraview\VTK\Common\ExecutionModel\vtkDemandDrivenPipeline.cxx,
 line 810

 vtkPVDataRepresentationPipeline (9F2FAB00): Input for
 connection index 0 on input port index 0 for algorithm
 vtkGeometryRepresentation(4FAC3570) is of type vtkTable, but a
 vtkDataSet is required.

 for the code I am using:

 import numpy as np


 switching_log = 'C:\\Users\\raphael\\Desktop\\logs 
 auswertung\\newsims\\flat_Aex_1_E_-11\\flat_12\\switching.log'

 class DataFile(object):

 def __init__(self, filename, h_xyz, m_xyz):

 self._filename = filename

 self._h_xyz = h_xyz

 self._m_xyz = m_xyz

 def read_dat_file(self):

 data = np.genfromtxt(self._filename, delimiter='', \

 usecols=(0, self._h_xyz, self._m_xyz), unpack=True)

 return data


 log = DataFile(switching_log, 9, 13)

 data = log.read_dat_file()


 A = np.rec.fromarrays(data, dtype= {'names': ['Time', 'Hx', 'Mx'], 
 'formats':['int','f8', 'f8']})

 print A.dtype.names


 for name in A.dtype.names:

 array = A[name]

 output.RowData.append(array, name)


 Now I could use the "vtkMultiBlockSet" or "vtkPolyData" as output
 DataSet, but then I get:


 Traceback (most recent call last):

 File "", line 19, in 

 File "", line 41, in RequestData

 File "C:\Program Files (x86)\ParaView
 4.3.1\lib\paraview-4.3\site-packages\vtk\numpy_interface\dataset_adapter.py",
 line 121, in __getattr__

 return getattr(self.VTKObject, name)

 AttributeError: RowData


 Because output.rowdata needs a vtkTable. I found the vtkTable in the
  Paraview Guide in Chapter 13.2.1 "Reading a CSV" file - which is basically
 my thing, but I dont exactly understand where the difference between the
 example and my situation lies ...


 Thanks 

Re: [Paraview] Plot over Line source

2015-09-13 Thread Cory Quammen
Hi Richard,

Please keep your replies on the list with a "reply-all". Someone else may
have a similar question as you (or better yet, an answer) and this may come
in handy in a future search of the list serve.

I'm not sure how to annotate the position on the graph as you seek to do as
there is no mechanism for this. You could perhaps hack this in by creating
another column in your table where all the values are zero except for the
time that you are showing. Setting this column to the maximum of your
plotted y values in the row at the time you are showing would result in an
almost vertical line showing up at the time you are displaying if your data
samples in x are dense enough.

HTH,
Cory

On Fri, Sep 11, 2015 at 10:58 AM, no name 
wrote:

> Hey Cory
>
> I have one more question I am trieing to solve since we started mailing
> ... I got everything working so far using a programmable filter and I read
> my files into a vtkTable now, but I want to read more than one information
> and hand it to my LineChartView. At the moment I am doing:
>
> A = np.rec.fromarrays(switching_data_clean, dtype= {'names': ['Time', 'x',
> 'y'], 'formats':['int','f8', 'f8']})
>
>
> for name in A.dtype.names:
>
> array = A[name]
>
> output.RowData.append(array, name)
>
>  But I want to add a point data aswell (basically I am plotting a time 
> dependent external field, and I want to point out where I am at the moment, 
> so I have to be able to read one more Point in every timestep). I tried to do 
> a new array with only that one point inside in a second Programmable Filter 
> as vtkDATA, which didn't really work. Do you have another hint for me?
>
> Thanks
>
> Richard
>
>
> On 10 September 2015 at 15:34, Cory Quammen 
> wrote:
>
>> Richard,
>>
>> I'm glad you got it working.
>>
>> cory
>>
>> On Wed, Sep 9, 2015 at 1:45 PM, no name 
>> wrote:
>>
>>> I just managed to do this myself and I had to do it the same way again,
>>> redo everything by copy and paste, there seems to be a bug in here too, but
>>> I am not capable of reproducing it :( I just wanted to let you know.
>>>
>>> Thanks for your Help!
>>>
>>> Richard
>>>
>>> On 9 September 2015 at 18:20, no name 
>>> wrote:
>>>
 this is straight what I was looking for! Thank you SO MUCH for pointing
 out this bug to me. This drove me mad :(

 One last question: Line Chart != PlotOverLine, so its hard for me to
 plot x and y axis, or like in my script mx over hx, as nothing happens when
 I choose to use one of my coordinates as "X-Axis Parameter" and just let
 the other one being drawn.

 Can't I make a real Plot over Line?

 Thanks again for your time!
 Richard

 On 9 September 2015 at 15:12, Cory Quammen 
 wrote:

> Hi Richard,
>
> If you don't mind, let's keep the discussion on the list so that
> others may benefit from the discussion.
>
> Outputting a vtkTable is the right thing to do. What I suspect is
> happening with the first error message is that if you execute a
> programmable source with the output set to one type of data set (e.g.,
> vtkPolyData), there is a bug that doesn't let you switch to a different
> type of output. As a workaround, you can create a new Programmable Source,
> copy and paste your code from the original Programmable Source into the 
> new
> one, and set the output type to vtkTableData *before* you click Apply.
>
> To view line plots of your data, you'll need to create a Line Chart
> View by splitting the 3D Render View. To do this, look for the icon on the
> top right of the 3D Render View that has two vertically-oriented 
> rectangles
> side by side (tool tip "Split Horizontal"). In the list of views that 
> comes
> up, click on "Line Chart View". If your line plots are not visible right
> away, you will need to make them visible by clicking on the eye icon next
> to the Programmable Source. Voila, you should have a line plot.
>
> Hope that helps,
> Cory
>
> On Wed, Sep 9, 2015 at 5:23 AM, no name 
> wrote:
>
>> Hey Cory
>>
>> Thanks for the hint! I did some coding and I got stuck at the
>> vtkTable as Output DataSet Type.
>>
>>
>> I used -> Programmable Source and then vtkTable which gives me the
>> following error code:
>>
>> ERROR: In
>> C:\DBD\pvs-x64\paraview\src\paraview\VTK\Common\ExecutionModel\vtkDemandDrivenPipeline.cxx,
>> line 810
>>
>> vtkPVDataRepresentationPipeline (9F2FC720): Input for
>> connection index 0 on input port index 0 for algorithm
>> vtkGeometryRepresentationWithFaces(946A85F0) is of type vtkTable,
>> but a vtkDataSet is required.
>>
>>
>>
>> ERROR: In
>> C:\DBD\pvs-x64\paraview\src\paraview\VTK\Common\ExecutionModel\vtkDemandDrivenPipeline.cxx,
>> line 810
>>
>> vtkPVDataRepresentationPipeline (9F2FAB00): Input

Re: [Paraview] Plot over Line source

2015-09-15 Thread no name
Hey Cory

Thanks for the tip with the array [(0,0,0)  (0,0,0),
(x,y,time),(0,0,0)...(0,0,0)] While this was easy to do, I still get a
point in Paraview at 0/0 for each time, or, if I choose to draw a line, one
that starts at 0/0 - which is kind of understandable, when looking at my
table, which is 0 everywhere but on one point. Can you give me another hint
on how to proceed? I only want PV to draw ONE point at (x,y)...

Thanks
Richard

On 13 September 2015 at 15:42, Cory Quammen 
wrote:

> Hi Richard,
>
> Please keep your replies on the list with a "reply-all". Someone else may
> have a similar question as you (or better yet, an answer) and this may come
> in handy in a future search of the list serve.
>
> I'm not sure how to annotate the position on the graph as you seek to do
> as there is no mechanism for this. You could perhaps hack this in by
> creating another column in your table where all the values are zero except
> for the time that you are showing. Setting this column to the maximum of
> your plotted y values in the row at the time you are showing would result
> in an almost vertical line showing up at the time you are displaying if
> your data samples in x are dense enough.
>
> HTH,
> Cory
>
> On Fri, Sep 11, 2015 at 10:58 AM, no name 
> wrote:
>
>> Hey Cory
>>
>> I have one more question I am trieing to solve since we started mailing
>> ... I got everything working so far using a programmable filter and I read
>> my files into a vtkTable now, but I want to read more than one information
>> and hand it to my LineChartView. At the moment I am doing:
>>
>> A = np.rec.fromarrays(switching_data_clean, dtype= {'names': ['Time', 'x',
>> 'y'], 'formats':['int','f8', 'f8']})
>>
>>
>> for name in A.dtype.names:
>>
>> array = A[name]
>>
>> output.RowData.append(array, name)
>>
>>  But I want to add a point data aswell (basically I am plotting a time 
>> dependent external field, and I want to point out where I am at the moment, 
>> so I have to be able to read one more Point in every timestep). I tried to 
>> do a new array with only that one point inside in a second Programmable 
>> Filter as vtkDATA, which didn't really work. Do you have another hint for me?
>>
>> Thanks
>>
>> Richard
>>
>>
>> On 10 September 2015 at 15:34, Cory Quammen 
>> wrote:
>>
>>> Richard,
>>>
>>> I'm glad you got it working.
>>>
>>> cory
>>>
>>> On Wed, Sep 9, 2015 at 1:45 PM, no name 
>>> wrote:
>>>
 I just managed to do this myself and I had to do it the same way again,
 redo everything by copy and paste, there seems to be a bug in here too, but
 I am not capable of reproducing it :( I just wanted to let you know.

 Thanks for your Help!

 Richard

 On 9 September 2015 at 18:20, no name 
 wrote:

> this is straight what I was looking for! Thank you SO MUCH for
> pointing out this bug to me. This drove me mad :(
>
> One last question: Line Chart != PlotOverLine, so its hard for me to
> plot x and y axis, or like in my script mx over hx, as nothing happens 
> when
> I choose to use one of my coordinates as "X-Axis Parameter" and just let
> the other one being drawn.
>
> Can't I make a real Plot over Line?
>
> Thanks again for your time!
> Richard
>
> On 9 September 2015 at 15:12, Cory Quammen 
> wrote:
>
>> Hi Richard,
>>
>> If you don't mind, let's keep the discussion on the list so that
>> others may benefit from the discussion.
>>
>> Outputting a vtkTable is the right thing to do. What I suspect is
>> happening with the first error message is that if you execute a
>> programmable source with the output set to one type of data set (e.g.,
>> vtkPolyData), there is a bug that doesn't let you switch to a different
>> type of output. As a workaround, you can create a new Programmable 
>> Source,
>> copy and paste your code from the original Programmable Source into the 
>> new
>> one, and set the output type to vtkTableData *before* you click Apply.
>>
>> To view line plots of your data, you'll need to create a Line Chart
>> View by splitting the 3D Render View. To do this, look for the icon on 
>> the
>> top right of the 3D Render View that has two vertically-oriented 
>> rectangles
>> side by side (tool tip "Split Horizontal"). In the list of views that 
>> comes
>> up, click on "Line Chart View". If your line plots are not visible right
>> away, you will need to make them visible by clicking on the eye icon next
>> to the Programmable Source. Voila, you should have a line plot.
>>
>> Hope that helps,
>> Cory
>>
>> On Wed, Sep 9, 2015 at 5:23 AM, no name 
>> wrote:
>>
>>> Hey Cory
>>>
>>> Thanks for the hint! I did some coding and I got stuck at the
>>> vtkTable as Output DataSet Type.
>>>
>>>
>>> I used -> Programmable Source and then vtkTable which gi

Re: [Paraview] Plot over Line source

2015-09-15 Thread Cory Quammen
Richard,

I understand. Sorry, I don't think there is a way to do this.

Having an annotation mechanism for your use case might be something we can
do in the future, but there are currently no plans to do this that I know
of.

Best,
Cory

On Tue, Sep 15, 2015 at 7:13 AM, no name 
wrote:

> Hey Cory
>
> Thanks for the tip with the array [(0,0,0)  (0,0,0),
> (x,y,time),(0,0,0)...(0,0,0)] While this was easy to do, I still get a
> point in Paraview at 0/0 for each time, or, if I choose to draw a line, one
> that starts at 0/0 - which is kind of understandable, when looking at my
> table, which is 0 everywhere but on one point. Can you give me another hint
> on how to proceed? I only want PV to draw ONE point at (x,y)...
>
> Thanks
> Richard
>
> On 13 September 2015 at 15:42, Cory Quammen 
> wrote:
>
>> Hi Richard,
>>
>> Please keep your replies on the list with a "reply-all". Someone else may
>> have a similar question as you (or better yet, an answer) and this may come
>> in handy in a future search of the list serve.
>>
>> I'm not sure how to annotate the position on the graph as you seek to do
>> as there is no mechanism for this. You could perhaps hack this in by
>> creating another column in your table where all the values are zero except
>> for the time that you are showing. Setting this column to the maximum of
>> your plotted y values in the row at the time you are showing would result
>> in an almost vertical line showing up at the time you are displaying if
>> your data samples in x are dense enough.
>>
>> HTH,
>> Cory
>>
>> On Fri, Sep 11, 2015 at 10:58 AM, no name 
>> wrote:
>>
>>> Hey Cory
>>>
>>> I have one more question I am trieing to solve since we started mailing
>>> ... I got everything working so far using a programmable filter and I read
>>> my files into a vtkTable now, but I want to read more than one information
>>> and hand it to my LineChartView. At the moment I am doing:
>>>
>>> A = np.rec.fromarrays(switching_data_clean, dtype= {'names': ['Time', 'x
>>> ', 'y'], 'formats':['int','f8', 'f8']})
>>>
>>>
>>> for name in A.dtype.names:
>>>
>>> array = A[name]
>>>
>>> output.RowData.append(array, name)
>>>
>>>  But I want to add a point data aswell (basically I am plotting a time 
>>> dependent external field, and I want to point out where I am at the moment, 
>>> so I have to be able to read one more Point in every timestep). I tried to 
>>> do a new array with only that one point inside in a second Programmable 
>>> Filter as vtkDATA, which didn't really work. Do you have another hint for 
>>> me?
>>>
>>> Thanks
>>>
>>> Richard
>>>
>>>
>>> On 10 September 2015 at 15:34, Cory Quammen 
>>> wrote:
>>>
 Richard,

 I'm glad you got it working.

 cory

 On Wed, Sep 9, 2015 at 1:45 PM, no name 
 wrote:

> I just managed to do this myself and I had to do it the same way
> again, redo everything by copy and paste, there seems to be a bug in here
> too, but I am not capable of reproducing it :( I just wanted to let you
> know.
>
> Thanks for your Help!
>
> Richard
>
> On 9 September 2015 at 18:20, no name 
> wrote:
>
>> this is straight what I was looking for! Thank you SO MUCH for
>> pointing out this bug to me. This drove me mad :(
>>
>> One last question: Line Chart != PlotOverLine, so its hard for me to
>> plot x and y axis, or like in my script mx over hx, as nothing happens 
>> when
>> I choose to use one of my coordinates as "X-Axis Parameter" and just let
>> the other one being drawn.
>>
>> Can't I make a real Plot over Line?
>>
>> Thanks again for your time!
>> Richard
>>
>> On 9 September 2015 at 15:12, Cory Quammen 
>> wrote:
>>
>>> Hi Richard,
>>>
>>> If you don't mind, let's keep the discussion on the list so that
>>> others may benefit from the discussion.
>>>
>>> Outputting a vtkTable is the right thing to do. What I suspect is
>>> happening with the first error message is that if you execute a
>>> programmable source with the output set to one type of data set (e.g.,
>>> vtkPolyData), there is a bug that doesn't let you switch to a different
>>> type of output. As a workaround, you can create a new Programmable 
>>> Source,
>>> copy and paste your code from the original Programmable Source into the 
>>> new
>>> one, and set the output type to vtkTableData *before* you click Apply.
>>>
>>> To view line plots of your data, you'll need to create a Line Chart
>>> View by splitting the 3D Render View. To do this, look for the icon on 
>>> the
>>> top right of the 3D Render View that has two vertically-oriented 
>>> rectangles
>>> side by side (tool tip "Split Horizontal"). In the list of views that 
>>> comes
>>> up, click on "Line Chart View". If your line plots are not visible right
>>> away, you will need to make them visible 

[Paraview] plot over line question (save data)

2010-05-28 Thread Stephen Wornom
When I save data in the format .csv, I would like to save only the 
values that I select. But save.data writes every variable 17 of which I 
don't want. Is there a way to save only selected values?

Stephen

--
stephen.wor...@sophia.inria.fr
2004 route des lucioles - BP93
Sophia Antipolis
06902 CEDEX

Tel: 04 92 38 50 54
Fax: 04 97 15 53 51

<>___
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


[Paraview] Plot over line, averaged over time.

2013-03-20 Thread Scott, W Alan
Utkarsh,
Any idea how to do this?

Thanks,

Alan




I have a 3D dataset with 500 time planes.  I want to use Plot Over Line to show 
a variable but averaged over, say, the last 100 time planes.  Is this possible?

Thanks,
Matt


___
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


[Paraview] "plot over line" with time dependent data

2009-01-13 Thread David Fuentes




For "plot over line" w/ time dependent data,
Is there a way to hold the upper and lower bounds fixed
for the y axis on the associated xy plot?
___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] plot over line question (save data)

2010-05-28 Thread Sven Buijssen
Stephen,

There is no built-in solution as far as I know, but the following pipeline may
serve as a guideline:

* Apply ’Extract Block’ and ’Merge Blocks’ filter for a multi-block data set
* Apply Programmable Filter with the following Python source code:

inp = self.GetInput()
filename = "foo.csv"
FILE = open(filename, "w")
FILE.write("x,y,z, x-velocity\n")
numPoints = inp.GetNumberOfPoints()
vel = inp.GetPointData().GetArray("velocity")
for i in xrange(0, numPoints):
  coords = inp.GetPoint(i)[:3]
  FILE.write(str(coords[0]) + ",")
  FILE.write(str(coords[1]) + ",")
  FILE.write(str(coords[2]) + ",")
  FILE.write(str(vel.GetValue(i * 3)) + "\n")
FILE.close()


Sven


Stephen Wornom wrote, On 28.05.2010 17:39:
> When I save data in the format .csv, I would like to save only the
> values that I select. But save.data writes every variable 17 of which I
> don't want. Is there a way to save only selected values?
> Stephen
> 
> 
> 
> ___
> 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


Re: [Paraview] plot over line question (save data)

2010-05-28 Thread Utkarsh Ayachit
Apply "Extract Selection" filter to extract the selected data and then
save data as csv.

Utkarsh

On Fri, May 28, 2010 at 11:39 AM, Stephen Wornom
 wrote:
> When I save data in the format .csv, I would like to save only the values
> that I select. But save.data writes every variable 17 of which I don't want.
> Is there a way to save only selected values?
> Stephen
>
> --
> stephen.wor...@sophia.inria.fr
> 2004 route des lucioles - BP93
> Sophia Antipolis
> 06902 CEDEX
>
> Tel: 04 92 38 50 54
> Fax: 04 97 15 53 51
>
>
> ___
> 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


Re: [Paraview] Plot over line, averaged over time.

2013-03-20 Thread Utkarsh Ayachit
"Temporal Statistics" --> "Plot Over Line" should do the trick,
however, for the entire 500 timesteps. We don't have an easy mechanism
to limit it to last 100 timesteps. However, it's just a matter of
writing a filter to do that (similar to "Temporal Shift Scale").

Utkarsh

On Wed, Mar 20, 2013 at 1:12 PM, Scott, W Alan  wrote:
> Utkarsh,
> Any idea how to do this?
>
> Thanks,
>
> Alan
>
>
>
>
> I have a 3D dataset with 500 time planes.  I want to use Plot Over Line to 
> show a variable but averaged over, say, the last 100 time planes.  Is this 
> possible?
>
> Thanks,
> Matt
>
>
___
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


Re: [Paraview] "plot over line" with time dependent data

2009-01-14 Thread Moreland, Kenneth
Yes.  Open the view settings for the plot view (that button on the thin toolbar 
right above the view, third from the left).  Click on Left Axis -> Layout, then 
select Specify the Axis Range and set the Axis Range to what you want it fixed 
to.

-Ken


On 1/13/09 6:13 PM, "David Fuentes"  wrote:





For "plot over line" w/ time dependent data,
Is there a way to hold the upper and lower bounds fixed
for the y axis on the associated xy plot?
___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview




     Kenneth Moreland
***  Sandia National Laboratories
***
*** *** ***  email: kmo...@sandia.gov
**  ***  **  phone: (505) 844-8919
***  web:   http://www.cs.unm.edu/~kmorel

___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] "plot over line" with time dependent data

2009-01-14 Thread David Fuentes



AAAHHH!!! thanks Ken!
Couldn't find that for the anything yesterday



df






On Wed, 14 Jan 2009, Moreland, Kenneth wrote:


Yes.  Open the view settings for the plot view (that button on the thin toolbar 
right above the view, third from the left).  Click on Left Axis -> Layout, then 
select Specify the Axis Range and set the Axis Range to what you want it fixed to.

-Ken


On 1/13/09 6:13 PM, "David Fuentes"  wrote:





For "plot over line" w/ time dependent data,
Is there a way to hold the upper and lower bounds fixed
for the y axis on the associated xy plot?
___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview




    Kenneth Moreland
   ***  Sandia National Laboratories
***
*** *** ***  email: kmo...@sandia.gov
**  ***  **  phone: (505) 844-8919
   ***  web:   http://www.cs.unm.edu/~kmorel



___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


[Paraview] Plot over line CSV export python script not working

2011-09-29 Thread Luca Giannelli
Hello everybody,

I've been using Paraview for quite a long time but I didn't need the python
scripting up to now.
I want to execute a series of plot over line in numerous points and
different time steps so it is nothing
I can afford to do manually.
Looking on the net I was able to find out how to record a macro and how to
create a writer so I
ended up with this script:


try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

fotobioreattore_foam = GetActiveSource()
PlotOverLine2 = PlotOverLine( Source="High Resolution Line Source" )

PlotOverLine2.Source.Point1 = [-0.03511841783524, -0.03509980067610741,
0.0]
PlotOverLine2.Source.Point2 = [0.03511841783524, 0.03511841783524,
0.430071525574]

DataRepresentation7 = Show()

PlotOverLine2.Source.Point1 = [-0.0, 0.0, 0.0]
PlotOverLine2.Source.Point2 = [0.0, 0.0, 0.430071525574]

XYChartView4 = GetRenderView()
DataRepresentation7.XArrayName = 'arc_length'
DataRepresentation7.SeriesVisibility = ['U (0)', '0', 'U (1)', '0', 'U (2)',
'0', 'vtkValidPointMask', '0', 'arc_length', '0', 'Points (0)', '0', 'Points
(1)', '0', 'Points (2)', '0', 'Points (Magnitude)', '0']
DataRepresentation7.UseIndexForXAxis = 0

Render()

#= create writer
source = PlotOverLine2 #PlotOverLine2.Source
writer = CreateWriter("/home/piota/csv.csv", source)
#writer = CreateWriter("/home/piota/csv.csv")
writer.FieldAssociation = "Points" # or "Cells"
writer.UpdatePipeline()
del writer
--

If I'm not mistaken, this should write a csv.csv file in my home folder but
it doesn't write anything. No error is reported when I run the script but
still I get no output.
I'm still a bit confused on which source I should specify, so I'm pretty
sure that the writer part is incorrect.

Can somebody help me filling it out properly?

Thx in advance.

Luca
___
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


Re: [Paraview] Plot over line CSV export python script not working

2011-09-29 Thread Andy Bauer
If you're running the python script in the paraview gui sometimes the
messages are printed out to the python shell.  What version of paraview are
you using?

I'm running paraview from the head of the repo.  The output I get from the
OutputMessages window is:


ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
line 727

vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.

 ERROR: In
/home/acbauer/CODE/ParaView/Para

Re: [Paraview] Plot over line CSV export python script not working

2011-09-29 Thread Luca Giannelli
Andy,

thank you for your quick reply.

I am using Paraview 3.8.0 which is the latest binary in the Ubuntu repos. I
chose to install that without compiling from source as I was rushing (I
know, it sounds weird... but). Do you believe that the problem is
build-related?

However, reading the errors that you get I don't see anything that I can
visualize in my output which is as follows (Python shell)

Traceback (most recent call last):

File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line 2922,
in _proxyDefinitionsUpdated

if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():

AttributeError: GetProxyDefinitionsUpdated

Traceback (most recent call last):

File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line 2922,
in _proxyDefinitionsUpdated

if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():

AttributeError: GetProxyDefinitionsUpdated

Traceback (most recent call last):

File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line 2922,
in _proxyDefinitionsUpdated

if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():

AttributeError: GetProxyDefinitionsUpdated

Traceback (most recent call last):

File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line 2922,
in _proxyDefinitionsUpdated

if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():

AttributeError: GetProxyDefinitionsUpdated

Traceback (most recent call last):

File "", line 17, in 

File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line 201,
in __setattr__

"to add this attribute.")

AttributeError: Attribute XArrayName does not exist. This class does not
allow addition of new attributes to avoid mistakes due to typos. Use
add_attribute() if you really want to add this attribute.


It looks like a complain about the server, not about my script though in
fact, if comment out the writer part, leaving only the "trace" recorded set
of operations, it spits out the very same error. Moreover, the Paraview
output doesn't show any output at all (except for the usual a complain about
the qt4 that is not related).

Do you see any evident problem in the script syntax in the writer section?
For example references to the wrong source, etc?

Or do you believe that it is a problem related to the Paraview/Python
installation (or whatever..).


Another point does the "PlotOverLine2" influence the results? I recorded
the trace making a second POL that automatically got labeled as #2... if I
run it at startup it executes perfectly fine so I don't think that the
problem is here too.


I'm sorry for my pretty low level in Python as I am an absolute beginner


Thanks again


Luca

2011/9/29 Andy Bauer 

> If you're running the python script in the paraview gui sometimes the
> messages are printed out to the python shell.  What version of paraview are
> you using?
>
> I'm running paraview from the head of the repo.  The output I get from the
> OutputMessages window is:
> 
>
> ERROR: In
> /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
> line 727
>
> vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
> vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.
>
>  ERROR: In
> /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
> line 727
>
> vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
> vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.
>
>  ERROR: In
> /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
> line 727
>
> vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
> vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.
>
>  ERROR: In
> /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
> line 727
>
> vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
> vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.
>
>  ERROR: In
> /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
> line 727
>
> vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
> vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.
>
>  ERROR: In
> /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
> line 727
>
> vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
> vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.
>
>  ERROR: In
> /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
> line 727
>
> vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
> vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.
>
>  ERROR: In
> /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
> line 727
>
> vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
> vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.
>
>  ERROR: In
> /home/acbauer/CODE/

Re: [Paraview] Plot over line CSV export python script not working

2011-09-29 Thread Luca Giannelli
Ok,

I moved on a little. Reading the output of the error reported in the
previous mail, it says that it cannot find "XArrayName". Looking the
original script you can see that it is needed for the definition of the plot
area properties in the GUI I don't need it as I only want a csv file, so
I commented out everything in that section. Running the script again it now
complains about being unable to find "CreateWriter". I need this to write
the csv file so this error becomes fatal.
As this function should be included in the paraview.simple that I load at
the beginning of the script (like explained in the manual), what I did was
to go through all the functions in the simple.py file to locate it. Without
any succes. Then I went on with the brute-force approach and lauched:

grep -H -r "CreateWriter" /usr

Binary file /usr/lib/paraview/libvtkPVFilters.so matches

Binary file /usr/lib/paraview/libvtkPVServerManager.so matches

Binary file /usr/lib/paraview/libvtkIO.so.pv3.8 matches

Binary file /usr/lib/paraview/libvtkPVServerManagerPythonD.so matches

Binary file /usr/lib/paraview/libpqApplicationComponents.so matches

Binary file /usr/lib/paraview/libvtkIO.so matches


Unfortunately they are all bin files and not py...

I'm starting to believe that I'm really missing something here.

Any idea?


Thx!!!


Luca


2011/9/30 Luca Giannelli 

> Andy,
>
> thank you for your quick reply.
>
> I am using Paraview 3.8.0 which is the latest binary in the Ubuntu repos. I
> chose to install that without compiling from source as I was rushing (I
> know, it sounds weird... but). Do you believe that the problem is
> build-related?
>
> However, reading the errors that you get I don't see anything that I can
> visualize in my output which is as follows (Python shell)
>
> Traceback (most recent call last):
>
> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line
> 2922, in _proxyDefinitionsUpdated
>
> if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():
>
> AttributeError: GetProxyDefinitionsUpdated
>
> Traceback (most recent call last):
>
> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line
> 2922, in _proxyDefinitionsUpdated
>
> if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():
>
> AttributeError: GetProxyDefinitionsUpdated
>
> Traceback (most recent call last):
>
> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line
> 2922, in _proxyDefinitionsUpdated
>
> if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():
>
> AttributeError: GetProxyDefinitionsUpdated
>
> Traceback (most recent call last):
>
> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line
> 2922, in _proxyDefinitionsUpdated
>
> if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():
>
> AttributeError: GetProxyDefinitionsUpdated
>
> Traceback (most recent call last):
>
> File "", line 17, in 
>
> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line 201,
> in __setattr__
>
> "to add this attribute.")
>
> AttributeError: Attribute XArrayName does not exist. This class does not
> allow addition of new attributes to avoid mistakes due to typos. Use
> add_attribute() if you really want to add this attribute.
>
>
> It looks like a complain about the server, not about my script though
> in fact, if comment out the writer part, leaving only the "trace" recorded
> set of operations, it spits out the very same error. Moreover, the Paraview
> output doesn't show any output at all (except for the usual a complain about
> the qt4 that is not related).
>
> Do you see any evident problem in the script syntax in the writer section?
> For example references to the wrong source, etc?
>
> Or do you believe that it is a problem related to the Paraview/Python
> installation (or whatever..).
>
>
> Another point does the "PlotOverLine2" influence the results? I
> recorded the trace making a second POL that automatically got labeled as
> #2... if I run it at startup it executes perfectly fine so I don't think
> that the problem is here too.
>
>
> I'm sorry for my pretty low level in Python as I am an absolute beginner
>
>
> Thanks again
>
>
> Luca
>
> 2011/9/29 Andy Bauer 
>
>> If you're running the python script in the paraview gui sometimes the
>> messages are printed out to the python shell.  What version of paraview are
>> you using?
>>
>> I'm running paraview from the head of the repo.  The output I get from the
>> OutputMessages window is:
>> 
>>
>> ERROR: In
>> /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
>> line 727
>>
>> vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
>> vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.
>>
>>  ERROR: In
>> /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
>> line 727
>>
>> vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm
>> vtkPProbeFilter(0x493dab0) has 0 connecti

Re: [Paraview] Plot over line CSV export python script not working

2011-09-30 Thread Andy Bauer
I think the first problem is that there isn't an active source.  The
GetActiveSource() is returning None and when you create subsequent filters
that automatically connect to the active source it causes problems when you
try to execute the pipeline.  Something along the lines of below should get
you closer:
=
try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

Wavelet()
p = PlotOverLine()
p.Source.Point1 = [-.5, -5., -5.]
p.Source.Point2 = [.5, 5., 5.]
w = CSVWriter()
w.FileName = "/home/piota/csv.csv"
w.UpdatePipeline()
=

The problem here is that the output of PlotOverLine is a polydata and the
writer is expecting a vtkTable.  I'm not sure how to convert between the
two.  Maybe someone else can help you with that.

The 2 things I'd try at this point are either creating my own writer using
the python programmable filter or writing out a polydata file and parsing
that for the information that you need.  The first one is probably the
better choice of the two.

Andy


On Fri, Sep 30, 2011 at 12:47 AM, Luca Giannelli  wrote:

> Ok,
>
> I moved on a little. Reading the output of the error reported in the
> previous mail, it says that it cannot find "XArrayName". Looking the
> original script you can see that it is needed for the definition of the plot
> area properties in the GUI I don't need it as I only want a csv file, so
> I commented out everything in that section. Running the script again it now
> complains about being unable to find "CreateWriter". I need this to write
> the csv file so this error becomes fatal.
> As this function should be included in the paraview.simple that I load at
> the beginning of the script (like explained in the manual), what I did was
> to go through all the functions in the simple.py file to locate it. Without
> any succes. Then I went on with the brute-force approach and lauched:
>
> grep -H -r "CreateWriter" /usr
>
> Binary file /usr/lib/paraview/libvtkPVFilters.so matches
>
> Binary file /usr/lib/paraview/libvtkPVServerManager.so matches
>
> Binary file /usr/lib/paraview/libvtkIO.so.pv3.8 matches
>
> Binary file /usr/lib/paraview/libvtkPVServerManagerPythonD.so matches
>
> Binary file /usr/lib/paraview/libpqApplicationComponents.so matches
>
> Binary file /usr/lib/paraview/libvtkIO.so matches
>
>
> Unfortunately they are all bin files and not py...
>
> I'm starting to believe that I'm really missing something here.
>
> Any idea?
>
>
> Thx!!!
>
>
> Luca
>
>
> 2011/9/30 Luca Giannelli 
>
>> Andy,
>>
>> thank you for your quick reply.
>>
>> I am using Paraview 3.8.0 which is the latest binary in the Ubuntu repos.
>> I chose to install that without compiling from source as I was rushing (I
>> know, it sounds weird... but). Do you believe that the problem is
>> build-related?
>>
>> However, reading the errors that you get I don't see anything that I can
>> visualize in my output which is as follows (Python shell)
>>
>> Traceback (most recent call last):
>>
>> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line
>> 2922, in _proxyDefinitionsUpdated
>>
>> if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():
>>
>> AttributeError: GetProxyDefinitionsUpdated
>>
>> Traceback (most recent call last):
>>
>> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line
>> 2922, in _proxyDefinitionsUpdated
>>
>> if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():
>>
>> AttributeError: GetProxyDefinitionsUpdated
>>
>> Traceback (most recent call last):
>>
>> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line
>> 2922, in _proxyDefinitionsUpdated
>>
>> if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():
>>
>> AttributeError: GetProxyDefinitionsUpdated
>>
>> Traceback (most recent call last):
>>
>> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line
>> 2922, in _proxyDefinitionsUpdated
>>
>> if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():
>>
>> AttributeError: GetProxyDefinitionsUpdated
>>
>> Traceback (most recent call last):
>>
>> File "", line 17, in 
>>
>> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line
>> 201, in __setattr__
>>
>> "to add this attribute.")
>>
>> AttributeError: Attribute XArrayName does not exist. This class does not
>> allow addition of new attributes to avoid mistakes due to typos. Use
>> add_attribute() if you really want to add this attribute.
>>
>>
>> It looks like a complain about the server, not about my script though
>> in fact, if comment out the writer part, leaving only the "trace" recorded
>> set of operations, it spits out the very same error. Moreover, the Paraview
>> output doesn't show any output at all (except for the usual a complain about
>> the qt4 that is not related).
>>
>> Do you see any evident problem in the script syntax in the writer section?
>> For example references to the wrong source, etc?
>>
>> Or do you believe t

Re: [Paraview] Plot over line CSV export python script not working

2011-10-02 Thread Luca Giannelli
Thank you very much Andy,
with your precious help I have been able to find out a working solution for
what I need.

I foud out the the original script is completly functional without any
modification
the only BIG ISSUE was the the Paraview binaries provided by the Ubuntu
Repositories
do not provide all the needed python scripts for the execution of a perfect
python environment
in Paraview. I would like to notify this to the mantainers of the repos.
So, the workaround was this easy! I just installed Paraview from the latest
source and got
the thing running.

However I found another problem relatet of course to the execution of the
pipeline due to
the missing active source, just as you suggested in you mail. That was
easier to solve.
So I ended up with a working script I want to share with all those people
that may need it.
I'll send an heavily commented version with a dedicated email. Here is a
snippet just to let you
see how i did.
Thank you very much for your time!

Luca

-- CODE---

try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

fotobioreattore_foam = FindSource("fotobioreattore.foam")
SetActiveSource(fotobioreattore_foam)

PlotOverLine2 = PlotOverLine( Source="High Resolution Line Source" )
DataRepresentation7 = Show()

PlotOverLine2.Source.Point1 = [0.0, 0.0, 0.0]
PlotOverLine2.Source.Point2 = [0.0, 0.0, 0.43]

Render()

source = PlotOverLine2
writer = CreateWriter("YOUR_FILE_NAME_GOES_HERE.csv", source)
writer.FieldAssociation = "Points" # or "Cells"
writer.UpdatePipeline()
del writer

---

2011/9/30 Andy Bauer 

> I think the first problem is that there isn't an active source.  The
> GetActiveSource() is returning None and when you create subsequent filters
> that automatically connect to the active source it causes problems when you
> try to execute the pipeline.  Something along the lines of below should get
> you closer:
> =
>
> try: paraview.simple
> except: from paraview.simple import *
> paraview.simple._DisableFirstRenderCameraReset()
>
> Wavelet()
> p = PlotOverLine()
> p.Source.Point1 = [-.5, -5., -5.]
> p.Source.Point2 = [.5, 5., 5.]
> w = CSVWriter()
> w.FileName = "/home/piota/csv.csv"
> w.UpdatePipeline()
> =
>
> The problem here is that the output of PlotOverLine is a polydata and the
> writer is expecting a vtkTable.  I'm not sure how to convert between the
> two.  Maybe someone else can help you with that.
>
> The 2 things I'd try at this point are either creating my own writer using
> the python programmable filter or writing out a polydata file and parsing
> that for the information that you need.  The first one is probably the
> better choice of the two.
>
> Andy
>
>
>
> On Fri, Sep 30, 2011 at 12:47 AM, Luca Giannelli  wrote:
>
>> Ok,
>>
>> I moved on a little. Reading the output of the error reported in the
>> previous mail, it says that it cannot find "XArrayName". Looking the
>> original script you can see that it is needed for the definition of the plot
>> area properties in the GUI I don't need it as I only want a csv file, so
>> I commented out everything in that section. Running the script again it now
>> complains about being unable to find "CreateWriter". I need this to write
>> the csv file so this error becomes fatal.
>> As this function should be included in the paraview.simple that I load at
>> the beginning of the script (like explained in the manual), what I did was
>> to go through all the functions in the simple.py file to locate it. Without
>> any succes. Then I went on with the brute-force approach and lauched:
>>
>> grep -H -r "CreateWriter" /usr
>>
>> Binary file /usr/lib/paraview/libvtkPVFilters.so matches
>>
>> Binary file /usr/lib/paraview/libvtkPVServerManager.so matches
>>
>> Binary file /usr/lib/paraview/libvtkIO.so.pv3.8 matches
>>
>> Binary file /usr/lib/paraview/libvtkPVServerManagerPythonD.so matches
>>
>> Binary file /usr/lib/paraview/libpqApplicationComponents.so matches
>>
>> Binary file /usr/lib/paraview/libvtkIO.so matches
>>
>>
>> Unfortunately they are all bin files and not py...
>>
>> I'm starting to believe that I'm really missing something here.
>>
>> Any idea?
>>
>>
>> Thx!!!
>>
>>
>> Luca
>>
>>
>> 2011/9/30 Luca Giannelli 
>>
>>> Andy,
>>>
>>> thank you for your quick reply.
>>>
>>> I am using Paraview 3.8.0 which is the latest binary in the Ubuntu repos.
>>> I chose to install that without compiling from source as I was rushing (I
>>> know, it sounds weird... but). Do you believe that the problem is
>>> build-related?
>>>
>>> However, reading the errors that you get I don't see anything that I can
>>> visualize in my output which is as follows (Python shell)
>>>
>>> Traceback (most recent call last):
>>>
>>> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line
>>> 2922, in _proxyDefinitionsUpdated
>>>
>>> if vtkSMObject.GetProxyManager().GetProxyDefinit