[Paraview] python scripting / calculator filter
Pierre-Olivier Dallaire
pierre-olivier.dallaire at videotron.ca
Tue Dec 2 17:38:19 EST 2008
Thanks Peter, very useful !
PO
On 2-Dec-08, at 4:53 PM, Peter Brady wrote:
> Here's something I did recently
>
> calc = servermanager.filters.Calculator(Input=pderiv)
> calc.ResultArrayName = 'w'
> calc.AddVectorVariable = ['Vorticity', 'Vorticity', '0', '1', '2']
> calc.Function = '(Vorticity).(kHat)'
> calc.UpdatePipeline() # w is now element 16
>
> This gave the vorticity in the khat direction. That should get you
> started.
>
> Good Luck,
> Peter.
>
>
> On Tue, Dec 2, 2008 at 2:45 PM, Pierre-Olivier Dallaire
> <pierre-olivier.dallaire at videotron.ca> wrote:
>> Good afternoon,
>>
>> I'm looking for an example on how to use the calculator filter in a
>> python
>> script.
>> With the calculator, I want to :
>>
>> 1) Extract each component of a vector array (x, y, z);
>> 2) Apply a scalar factor on each array (for unit conversion).
>>
>> Best regards,
>>
>> PO
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>>
More information about the ParaView
mailing list