Re: [Paraview] Python + ParaView

2011-06-16 Thread Nico Schlömer
A small correction to the previous script: Two pi2's should be replaced by just pi. The correct Function is == *snip* == calc2.Function = 'if( psi__X>0, atan(psi__Y/psi__X),' + \ 'if( psi__X<0,' + \ 'if ( psi__Y<0, -

Re: [Paraview] Python + ParaView

2011-06-16 Thread Nico Schlömer
Okay, for everyone interested: I think I got it to work, somehow, with the help of . The atan2() function can be imitated in ParaView's calculator filter by == *snip* == calc2 = pv.Calculator( ResultArrayName

Re: [Paraview] Python + ParaView

2011-06-16 Thread Nico Schlömer
Progress! Thanks to the incredibly helpful Trance functionality, I understand now that something like === *snip* === calc1 = pv.Calculator( ResultArrayName = '|psi|^2' ) calc1.AttributeMode = 'point_data' calc1.Function = 'psi__X^2 + psi__Y^2' [...]

Re: [Paraview] Python + ParaView

2011-06-16 Thread Nico Schlömer
Also, when *snip* >>> >>> import paraview.simple paraview version 3.10.1, Date: 2011-01-28 >>> calc1 = paraview.simple.servermanager.filters.Calculator() >>> help( calc1 ) >>> *snip* I don't see ho

Re: [Paraview] Python + ParaView

2011-06-16 Thread Nico Schlömer
> See the manual for the syntax. Where can I find that? The ParaView User's Guide isn't too verbose on any of that. The Wiki, on the other hand, seems to contain a fair amount of examples. Specifically, I've looked at to see about programm

Re: [Paraview] Python + ParaView

2011-06-08 Thread David E DeMarle
Also the standard calculator does have conditionals, there just isn't a button corresponding to them on the UI. See the manual for the syntax. David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 On Wed, Jun 8, 2011 at 12:16 PM, David

Re: [Paraview] Python + ParaView

2011-06-08 Thread David E DeMarle
The python programmable filter (and the easier to use python programmable calculator variant of that) will get you beyond all of those limitations. David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 On Wed, Jun 8, 2011 at 12:11 PM,

Re: [Paraview] Python + ParaView

2011-06-08 Thread Nico Schlömer
> If you want to do arbitrary arithmetic, you will have to first > generate the array using something like a "Calculator" filter and then > color using the generated array. Oh, if I remember correctly I did look into this before, and found the calculator filter too limited on the arithmetics that

Re: [Paraview] Python + ParaView

2011-06-08 Thread Utkarsh Ayachit
Magnitude corresponds to the magnitude of a vector, so yes, it takes the square root. If you want to do arbitrary arithmetic, you will have to first generate the array using something like a "Calculator" filter and then color using the generated array. Yes, RGBPoints defines the mapping between s

Re: [Paraview] Python + ParaView

2011-06-08 Thread Nico Schlömer
Thanks for the hints. The Trace function in indeed quite useful in that it get you where you want to be. When looking at the code there's still a lot of me to understand though, the GetLookupTableForArray() call seems to be crucial for example. * The VectorMode='Magnitude' parameter seems to be

Re: [Paraview] Python + ParaView

2011-06-08 Thread Utkarsh Ayachit
The following wiki page talks about how to color using arrays: http://www.paraview.org/Wiki/ParaView/Python_Scripting#Representations_and_Views The easiest way to figure out Python code equivalents is to use the Trace functionality to generate python trace files for actions performed in the GUI (a

[Paraview] Python + ParaView

2011-06-08 Thread Nico Schlömer
Hi, I'm just taking first steps with ParaView's Python interface and figured out so far that *snip* exodusReader = ExodusIIReader( FileName="solution.e" ) Show( exodusReader ) Render() *snap* would plot the mesh that is stored i

[Paraview] python-paraview

2011-04-05 Thread David Fritzsche
is it possible to get an access to the paraview gui with a normal python interpreter. when i start a skript an i will show the result in the gui and not in the visualisation tollkit. thanks -- David Fritzsche Informations- und Medientechnik -