[Paraview] Calculator filter

2015-11-10 Thread Liam Healy
I am trying to compute a quantity based on two 3-vectors as input. All
six components are in six columns of one (csv) file, so I read that in
and create two Table to Points filters. I would like to bring up the
calculator to compute the magnitudes of each vector, but if I
highlight the two filters I cannot select the Calculator tool, it is
greyed out. How do I do computations on two (or more) inputs?

Thanks,
Liam
___
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] Calculator filter

2015-11-10 Thread David E DeMarle
The Python Calculator will accept multiple sources so I recommend that.
Otherwise you will need to apply something like the Append or Merge filter
to produce one source for the standard Calculator's input.

David E DeMarle
Kitware, Inc.
R Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Tue, Nov 10, 2015 at 2:30 PM, Liam Healy 
wrote:

> I am trying to compute a quantity based on two 3-vectors as input. All
> six components are in six columns of one (csv) file, so I read that in
> and create two Table to Points filters. I would like to bring up the
> calculator to compute the magnitudes of each vector, but if I
> highlight the two filters I cannot select the Calculator tool, it is
> greyed out. How do I do computations on two (or more) inputs?
>
> Thanks,
> Liam
> ___
> 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
>
___
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] Calculator filter

2015-11-10 Thread Liam Healy
Thanks for the advice. Indeed, I can select the two filter outputs and
start up a Python Calculator. Now however, I am stumped: I don't know
how to specify the input vectors which Table to Points created. The
spreadsheet view shows all the fields, and a points column which
happens to be the second vector. I don't know where the first one
went. I was able to find http://www.vtk.org/Wiki/Python_Calculator
which is a nice illustration of capability, but it's not specified
there how "BrownianVectors" got named. If I do mag(Points)
(Points=name at top of spreadsheet) or mag(points) or mag(Position)
(Position = name of my first filter) or mag(input[0]), I get an error.
I've tried looking through the documentation but I'm not even sure
where to look.

Thanks,
Liam

On Tue, Nov 10, 2015 at 2:34 PM, David E DeMarle
 wrote:
> The Python Calculator will accept multiple sources so I recommend that.
> Otherwise you will need to apply something like the Append or Merge filter
> to produce one source for the standard Calculator's input.
>
> David E DeMarle
> Kitware, Inc.
> R Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
> On Tue, Nov 10, 2015 at 2:30 PM, Liam Healy 
> wrote:
>>
>> I am trying to compute a quantity based on two 3-vectors as input. All
>> six components are in six columns of one (csv) file, so I read that in
>> and create two Table to Points filters. I would like to bring up the
>> calculator to compute the magnitudes of each vector, but if I
>> highlight the two filters I cannot select the Calculator tool, it is
>> greyed out. How do I do computations on two (or more) inputs?
>>
>> Thanks,
>> Liam
>> ___
>> 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
>
>
___
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


[Paraview] Calculator Filter Troubleshooting - Bug Report

2013-01-30 Thread Etienne Gibaud

Hello,

My colleagues and I use ParaView at work, we think we have been meeting 
a bug in the Calculator filter.
We use ParaView 3.14.1 (32  64-bit). The bug seems to happen on 3 
different machines.


Here are steps that can reproduce this bug :

- Load an *.sol.xmf solution (with multiple solutions *.solxx.xmf).
- Use the Calculator Filter to compute some quantity.
- Change the number of the solution, the calculator value is updated to 
compute the quantity on the new solution.

- Use a new Calculator to compute this same quantity.

We can see that the results from the two calculators are different.
If you need some additional details or files, i will follow your 
instructions.


Thank you,

E. Gibaud
Université Montpellier 2
Montpellier, France.
___
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] Calculator filter doesn't see a PointData vector

2012-01-30 Thread David Doria
I have a data set that has a 308D vector associated with the PointData:

descriptors-SetNumberOfComponents(308);
descriptors-SetName(Descriptors);
descriptors-SetNumberOfTuples(polyData-GetNumberOfPoints());
...
polyData-GetPointData()-AddArray(descriptors);

I want to apply a Calculator filter to filter the points by their
descriptor magnitude. In the Calculator filter, I choose

Attribute mode: PointData

Then if I click the Vectors drop down box, I see two other vectors
(colors and coords), but not Descriptors. If I click on the
Scalars drop down box, I see 308 entries for a single dimension of
the descriptor vector with their index appended after an underscore
(ie. Descriptors_0 ...Descriptors_307), but not the whole vector. Is
there a way to apply a norm(Descriptors) operation in the Calculator
filter with this data set?

Thanks,

David
___
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] Calculator filter doesn't see a PointData vector

2012-01-30 Thread David Doria
On Mon, Jan 30, 2012 at 1:59 PM, David Doria daviddo...@gmail.com wrote:
 I have a data set that has a 308D vector associated with the PointData:

 descriptors-SetNumberOfComponents(308);
 descriptors-SetName(Descriptors);
 descriptors-SetNumberOfTuples(polyData-GetNumberOfPoints());
 ...
 polyData-GetPointData()-AddArray(descriptors);

 I want to apply a Calculator filter to filter the points by their
 descriptor magnitude. In the Calculator filter, I choose

 Attribute mode: PointData

 Then if I click the Vectors drop down box, I see two other vectors
 (colors and coords), but not Descriptors. If I click on the
 Scalars drop down box, I see 308 entries for a single dimension of
 the descriptor vector with their index appended after an underscore
 (ie. Descriptors_0 ...Descriptors_307), but not the whole vector. Is
 there a way to apply a norm(Descriptors) operation in the Calculator
 filter with this data set?

I found the Auto Convert Properties which lets me threshold the magnitudes
directly in the Threshold filter (this is nice!). However, it still seems
like you should be able to use the magnitude in a calculator filter.
___
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] calculator filter - invalid array name

2010-10-27 Thread Aurélien Marsan
It seems that you're using wrong names.

The name of the only data that you can use in the formulas are available
under the buttons scalars and vectors in the calculator filter.
If you don't see anything, no variables is stored at the points of your
dataset.

You can see the data stored at the center of cells by into the information
tab.

2010/10/26 Jean-Baptiste Leydet jean-baptiste_ley...@whirlpool.com

 Hey all,

 I'm experiencing issues with the calculator filter. Basically I'm trying to
 create local_entropy_generation_rate=F(turbulent_viscosity
 ,space_derivatives_of_velocity_components) and I keep getting some kind of
 error in vtkArrayCalculator.cxx, line 305, like  Invalid array name:
 VectorGradient or Invalid array name: TurbVisc.

 I tried messing around with the cell-to-point or point-to-cell data filters
 but it did not help. My initial input is one single CFD dataset created by
 Code_Saturne. I can display the turbulent viscosity and the derivatives of
 the velocity field as I wish, but I don't manage to use the array data to
 create my entropy function...

 Any clue?

 Thanks!
 JB

 ___
 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


[Paraview] calculator filter - invalid array name

2010-10-26 Thread Jean-Baptiste Leydet
Hey all,
I'm experiencing issues with the calculator filter. Basically I'm trying 
to create local_entropy_generation_rate=F(turbulent_viscosity 
,space_derivatives_of_velocity_components) and I keep getting some kind of 
error in vtkArrayCalculator.cxx, line 305, like  Invalid array name: 
VectorGradient or Invalid array name: TurbVisc.

I tried messing around with the cell-to-point or point-to-cell data 
filters but it did not help. My initial input is one single CFD dataset 
created by Code_Saturne. I can display the turbulent viscosity and the 
derivatives of the velocity field as I wish, but I don't manage to use the 
array data to create my entropy function...

Any clue?

Thanks!
JB___
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] Calculator Filter -- Gradient

2010-09-14 Thread Berk Geveci
I am not sure that I understand. Are Q1 and Q2 vectors? Are you trying
to divide the component by component?

2010/9/13 Aurélien Marsan aur.mar...@gmail.com:
 Hello,

 In order to calculate a new scalar (here for a multiblockdataset)

 pdi = self.GetInput()

 pdo = self.GetOutput()

 pdo.ShallowCopy(pdi)

 for block in output[0]:

 if block.GetNumberOfPoints() != 0:

 array = block.PointData['Q1'] / block.PointData['Q2']

 block.PointData.append(array, 'newQ')

 For a new vector, I would like someone to explain a simple way to do that.
 (without many transpose, ravel, etc...)
 Knowing that it does not work with array =
 numpy.array([block.PointData['Q1'], block.PointData['Q2'],
 block.PointData['Q3']]) / block.PointData['Q4']
 because of a problem of dimensions.

 Regards,

 A.Marsan

 2010/9/10 dpar...@chromalloy.com

 I have a couple of questions about using the Programmable Filter. I have
 imported Tecplot dataset with the following data: coordsX, coordsY, coordsZ,
 Q1, Q2, Q3, Q4, Q5.

 How would I create a new data array that is Q2^2+Q3^2+Q4^2?

 How would I create a new vector data array (similar to
 Q2*iHat+Q3*jHat+Q4*kHat in the Calculator Filter)?




 From:        David E DeMarle dave.dema...@kitware.com
 To:        dpar...@chromalloy.com
 Cc:        parav...@paraview.org
 Date:        09/10/2010 01:24 PM
 Subject:        Re: [Paraview] Calculator Filter -- Gradient
 Sent by:        paraview-boun...@paraview.org
 


 On Fri, Sep 10, 2010 at 1:10 PM,  dpar...@chromalloy.com wrote:
  I have two somewhat related questions:
 
  1. Is it possible to calculate a gradient vector using the calculator
  filter?

 No. The calculator filter does only element wise (cell by cell or
 point by point) computations. To compute the gradient you need
 information from neighboring elements.

 
  2. Is it possible to define a new data array using a Python script
  without
  the calculator filter? Currently, I am using several Calculator Filters
  to
  calculate CFD flow variables from the conservative variables. I use a
  Python
  script to create the Calculator Filters, but I'm wondering if I can
  avoid
  the Calculator Filter and directly generate new data arrays for
  plotting.
 

 Not with a python script (under the python shell) since that runs on
 the client and can't really manipulate the data (which lives on the
 server) directly. However, the python programmable filter runs on the
 server, and with that you can create new arrays, and access
 neighboring elements as well.
 See http://www.paraview.org/Wiki/Python_Programmable_Filter for examples.

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


 ___
 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


___
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] Calculator Filter -- Gradient

2010-09-14 Thread Aurélien Marsan
That's it.
In the Calculator, I would set the formula : Q1/Q4*iHat + Q2/Q4*jHat +
Q3/Q4*kHat.

In the programmable filter, there is some facilities in order to use numpy
arrays. But what should be the dimensions of the numpy array if we want to
add a vector by doing something like block.PointData.append(array, 'newQ')
?


Le 14 septembre 2010 17:15, Berk Geveci berk.gev...@kitware.com a écrit :

 I am not sure that I understand. Are Q1 and Q2 vectors? Are you trying
 to divide the component by component?

 2010/9/13 Aurélien Marsan aur.mar...@gmail.com:
  Hello,
 
  In order to calculate a new scalar (here for a multiblockdataset)
 
  pdi = self.GetInput()
 
  pdo = self.GetOutput()
 
  pdo.ShallowCopy(pdi)
 
  for block in output[0]:
 
  if block.GetNumberOfPoints() != 0:
 
  array = block.PointData['Q1'] / block.PointData['Q2']
 
  block.PointData.append(array, 'newQ')
 
  For a new vector, I would like someone to explain a simple way to do
 that.
  (without many transpose, ravel, etc...)
  Knowing that it does not work with array =
  numpy.array([block.PointData['Q1'], block.PointData['Q2'],
  block.PointData['Q3']]) / block.PointData['Q4']
  because of a problem of dimensions.
 
  Regards,
 
  A.Marsan
 
  2010/9/10 dpar...@chromalloy.com
 
  I have a couple of questions about using the Programmable Filter. I have
  imported Tecplot dataset with the following data: coordsX, coordsY,
 coordsZ,
  Q1, Q2, Q3, Q4, Q5.
 
  How would I create a new data array that is Q2^2+Q3^2+Q4^2?
 
  How would I create a new vector data array (similar to
  Q2*iHat+Q3*jHat+Q4*kHat in the Calculator Filter)?
 
 
 
 
  From:David E DeMarle dave.dema...@kitware.com
  To:dpar...@chromalloy.com
  Cc:paraview@paraview.org
  Date:09/10/2010 01:24 PM
  Subject:Re: [Paraview] Calculator Filter -- Gradient
  Sent by:paraview-boun...@paraview.org
  
 
 
  On Fri, Sep 10, 2010 at 1:10 PM,  dpar...@chromalloy.com wrote:
   I have two somewhat related questions:
  
   1. Is it possible to calculate a gradient vector using the calculator
   filter?
 
  No. The calculator filter does only element wise (cell by cell or
  point by point) computations. To compute the gradient you need
  information from neighboring elements.
 
  
   2. Is it possible to define a new data array using a Python script
   without
   the calculator filter? Currently, I am using several Calculator
 Filters
   to
   calculate CFD flow variables from the conservative variables. I use a
   Python
   script to create the Calculator Filters, but I'm wondering if I can
   avoid
   the Calculator Filter and directly generate new data arrays for
   plotting.
  
 
  Not with a python script (under the python shell) since that runs on
  the client and can't really manipulate the data (which lives on the
  server) directly. However, the python programmable filter runs on the
  server, and with that you can create new arrays, and access
  neighboring elements as well.
  See http://www.paraview.org/Wiki/Python_Programmable_Filter for
 examples.
 
   David Parker
   ___
   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
 
 
  ___
  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
 
 

___
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

Re: [Paraview] Calculator Filter -- Gradient

2010-09-13 Thread Aurélien Marsan
Hello,

In order to calculate a new scalar (here for a multiblockdataset)

pdi = self.GetInput()

pdo = self.GetOutput()

pdo.ShallowCopy(pdi)

for block in output[0]:

if block.GetNumberOfPoints() != 0:

array = block.PointData['Q1'] / block.PointData['Q2']

block.PointData.append(array, 'newQ')


For a new vector, I would like someone to explain a simple way to do that.
(without many transpose, ravel, etc...)
Knowing that it does not work with array =
numpy.array([block.PointData['Q1'], block.PointData['Q2'],
block.PointData['Q3']]) / block.PointData['Q4']
because of a problem of dimensions.

Regards,

A.Marsan

2010/9/10 dpar...@chromalloy.com

 I have a couple of questions about using the Programmable Filter. I have
 imported Tecplot dataset with the following data: coordsX, coordsY, coordsZ,
 Q1, Q2, Q3, Q4, Q5.

 How would I create a new data array that is Q2^2+Q3^2+Q4^2?

 How would I create a new vector data array (similar to
 Q2*iHat+Q3*jHat+Q4*kHat in the Calculator Filter)?




 From:David E DeMarle dave.dema...@kitware.com
 To:dpar...@chromalloy.com
 Cc:paraview@paraview.org
 Date:09/10/2010 01:24 PM
 Subject:Re: [Paraview] Calculator Filter -- Gradient
 Sent by:paraview-boun...@paraview.org
 --



 On Fri, Sep 10, 2010 at 1:10 PM,  dpar...@chromalloy.com wrote:
  I have two somewhat related questions:
 
  1. Is it possible to calculate a gradient vector using the calculator
  filter?

 No. The calculator filter does only element wise (cell by cell or
 point by point) computations. To compute the gradient you need
 information from neighboring elements.

 
  2. Is it possible to define a new data array using a Python script
 without
  the calculator filter? Currently, I am using several Calculator Filters
 to
  calculate CFD flow variables from the conservative variables. I use a
 Python
  script to create the Calculator Filters, but I'm wondering if I can avoid
  the Calculator Filter and directly generate new data arrays for plotting.
 

 Not with a python script (under the python shell) since that runs on
 the client and can't really manipulate the data (which lives on the
 server) directly. However, the python programmable filter runs on the
 server, and with that you can create new arrays, and access
 neighboring elements as well.
 See http://www.paraview.org/Wiki/Python_Programmable_Filter for examples.

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


 ___
 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


[Paraview] Calculator Filter -- Gradient

2010-09-10 Thread DParker
I have two somewhat related questions:

1. Is it possible to calculate a gradient vector using the calculator 
filter?

2. Is it possible to define a new data array using a Python script without 
the calculator filter? Currently, I am using several Calculator Filters to 
calculate CFD flow variables from the conservative variables. I use a 
Python script to create the Calculator Filters, but I'm wondering if I can 
avoid the Calculator Filter and directly generate new data arrays for 
plotting. 

David Parker___
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] Calculator Filter -- Gradient

2010-09-10 Thread David E DeMarle
On Fri, Sep 10, 2010 at 1:10 PM,  dpar...@chromalloy.com wrote:
 I have two somewhat related questions:

 1. Is it possible to calculate a gradient vector using the calculator
 filter?

No. The calculator filter does only element wise (cell by cell or
point by point) computations. To compute the gradient you need
information from neighboring elements.


 2. Is it possible to define a new data array using a Python script without
 the calculator filter? Currently, I am using several Calculator Filters to
 calculate CFD flow variables from the conservative variables. I use a Python
 script to create the Calculator Filters, but I'm wondering if I can avoid
 the Calculator Filter and directly generate new data arrays for plotting.


Not with a python script (under the python shell) since that runs on
the client and can't really manipulate the data (which lives on the
server) directly. However, the python programmable filter runs on the
server, and with that you can create new arrays, and access
neighboring elements as well.
See http://www.paraview.org/Wiki/Python_Programmable_Filter for examples.

 David Parker
 ___
 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] Calculator Filter -- Gradient

2010-09-10 Thread DParker
I have a couple of questions about using the Programmable Filter. I have 
imported Tecplot dataset with the following data: coordsX, coordsY, 
coordsZ, Q1, Q2, Q3, Q4, Q5. 

How would I create a new data array that is Q2^2+Q3^2+Q4^2? 

How would I create a new vector data array (similar to 
Q2*iHat+Q3*jHat+Q4*kHat in the Calculator Filter)?




From:   David E DeMarle dave.dema...@kitware.com
To: dpar...@chromalloy.com
Cc: paraview@paraview.org
Date:   09/10/2010 01:24 PM
Subject:Re: [Paraview] Calculator Filter -- Gradient
Sent by:paraview-boun...@paraview.org



On Fri, Sep 10, 2010 at 1:10 PM,  dpar...@chromalloy.com wrote:
 I have two somewhat related questions:

 1. Is it possible to calculate a gradient vector using the calculator
 filter?

No. The calculator filter does only element wise (cell by cell or
point by point) computations. To compute the gradient you need
information from neighboring elements.


 2. Is it possible to define a new data array using a Python script 
without
 the calculator filter? Currently, I am using several Calculator Filters 
to
 calculate CFD flow variables from the conservative variables. I use a 
Python
 script to create the Calculator Filters, but I'm wondering if I can 
avoid
 the Calculator Filter and directly generate new data arrays for 
plotting.


Not with a python script (under the python shell) since that runs on
the client and can't really manipulate the data (which lives on the
server) directly. However, the python programmable filter runs on the
server, and with that you can create new arrays, and access
neighboring elements as well.
See http://www.paraview.org/Wiki/Python_Programmable_Filter for examples.

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

___
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] Calculator Filter Scripting?

2010-09-08 Thread DParker
I have several variables that have to be calculated using a series of 
calculator filters. How can I automate the task of setting up the 
calculator filters?

David Parker 
Chromalloy - TDAG
730 SE Indian Street, Stuart, Florida, 34977
561-935-9737 (W)
561-307-2939 (M)___
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] Calculator Filter Scripting?

2010-09-08 Thread Andy Bauer
You can try creating a customizable filter under Tools or recording a python
trace and then create a macro from it under Tools as well.

Andy

On Wed, Sep 8, 2010 at 5:01 PM, dpar...@chromalloy.com wrote:

 I have several variables that have to be calculated using a series of
 calculator filters. How can I automate the task of setting up the calculator
 filters?

 David Parker
 Chromalloy - TDAG
 730 SE Indian Street, Stuart, Florida, 34977*
 *561-935-9737 (W)
 561-307-2939 (M)
 ___
 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] Calculator Filter Scripting?

2010-09-08 Thread DParker
Thanks. I really like the Python trace method. 

I tried the Custom Filter but I didn't like the fact that all the 
calculations were hidden and I need the ability to modify some constants. 

The Python script method looks very powerful and the trace functionality 
makes it very easy to get started. 

David Parker 
Chromalloy - TDAG



From:   Andy Bauer andy.ba...@kitware.com
To: dpar...@chromalloy.com
Cc: paraview@paraview.org
Date:   09/08/2010 05:16 PM
Subject:Re: [Paraview] Calculator Filter Scripting?



You can try creating a customizable filter under Tools or recording a 
python trace and then create a macro from it under Tools as well.

Andy

On Wed, Sep 8, 2010 at 5:01 PM, dpar...@chromalloy.com wrote:
I have several variables that have to be calculated using a series of 
calculator filters. How can I automate the task of setting up the 
calculator filters? 

David Parker 
Chromalloy - TDAG 
730 SE Indian Street, Stuart, Florida, 34977
561-935-9737 (W) 
561-307-2939 (M)
___
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] Calculator Filter Scripting?

2010-09-08 Thread Andy Bauer
Most people seem to like the python scripting stuff over the custom filter.
With macros you can create a GUI button for running the python script as
well.  The custom filter may be able to expose some of the calculator inputs
in the way that you want to in the gui though.  I think the custom filter
can somehow be saved so that you can share it with other people but I'm not
sure how to do that.

On Wed, Sep 8, 2010 at 5:41 PM, dpar...@chromalloy.com wrote:

 Thanks. I really like the Python trace method.

 I tried the Custom Filter but I didn't like the fact that all the
 calculations were hidden and I need the ability to modify some constants.

 The Python script method looks very powerful and the trace functionality
 makes it very easy to get started.

 David Parker
 Chromalloy - TDAG



 From:Andy Bauer andy.ba...@kitware.com
 To:dpar...@chromalloy.com
 Cc:paraview@paraview.org
 Date:09/08/2010 05:16 PM
 Subject:Re: [Paraview] Calculator Filter Scripting?
 --



 You can try creating a customizable filter under Tools or recording a
 python trace and then create a macro from it under Tools as well.

 Andy

 On Wed, Sep 8, 2010 at 5:01 PM, 
 *dpar...@chromalloy.com*dpar...@chromalloy.com
 wrote:
 I have several variables that have to be calculated using a series of
 calculator filters. How can I automate the task of setting up the calculator
 filters?

 David Parker
 Chromalloy - TDAG
 730 SE Indian Street, Stuart, Florida, 34977
 561-935-9737 (W)
 561-307-2939 (M)
 ___
 Powered by *www.kitware.com* http://www.kitware.com/

 Visit other Kitware open-source projects at *
 http://www.kitware.com/opensource/opensource.html*http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the ParaView Wiki at: *
 http://paraview.org/Wiki/ParaView* http://paraview.org/Wiki/ParaView

 Follow this link to subscribe/unsubscribe:*
 **http://www.paraview.org/mailman/listinfo/paraview*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] Calculator Filter

2010-05-24 Thread Robert Maynard
Hi Micheal,

You can use the calculator filter to rename variables. Could you also create
a bug report at http://www.paraview.org/Bug/main_page.php.

On Sun, May 23, 2010 at 1:32 PM, Michael Deveau 0980...@acadiau.ca wrote:

 Hi, hopefully you can help me with my issue.

 I'd like to do some calculations involving some vector data, but it keeps
 throwing an error.

 (iHat*abs(2DVEL_X))+(jHat*abs(
 2DVEL_Y))+(kHat*0)

 I think what's happening is that ParaView expects an operator between the 2
 and the D. However, the 2 is part of the variable name. Is there a way to
 tell ParaView this, such as an escape character or a way to enclose the
 variable name?

 I'd like to not have to rename the variables in the file, because I'm not
 in charge of the data. If there is a way I can do that in ParaView, that
 would work as well, I think.

 I've just started using ParaView, so hopefully I'm not missing something
 obvious, but thanks in advance for your help.

 ~ Michael Deveau

 ___
 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




-- 
Robert Maynard
___
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] Calculator filter

2009-08-13 Thread bastil2...@yahoo.de
Dear all,

after some time with paraview I am quite impressed about its features.
However one thing I am not very happy with remains: I do an ipmort of a
dataset from CFD and afterwards create some slices or clips... Now I
realize there was a variable missing. I calculate it using the
calculator but afterwards the scalar is not available on all allredy
created parts. This means I have to re-create all slices,... using the
calculator filter as an input. I do not think this is very effective.
Are there reasons for this? Any workarounds? Plans to change this?

Regards BastiL
___
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] Calculator filter

2009-08-13 Thread pat marion
Hi,

Sorry if I am misunderstanding your question... but perhaps the
solution is to use paraviews Change input dialog.  You can right click
an object in the pipeline browser and select Change input...  This
way you can use the calculator as an input to your pre-existing
pipeline.

On Thu, Aug 13, 2009 at 3:01 PM, bastil2...@yahoo.debastil2...@yahoo.de wrote:
 Dear all,

 after some time with paraview I am quite impressed about its features.
 However one thing I am not very happy with remains: I do an ipmort of a
 dataset from CFD and afterwards create some slices or clips... Now I
 realize there was a variable missing. I calculate it using the
 calculator but afterwards the scalar is not available on all allredy
 created parts. This means I have to re-create all slices,... using the
 calculator filter as an input. I do not think this is very effective.
 Are there reasons for this? Any workarounds? Plans to change this?

 Regards BastiL
 ___
 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] calculator filter with pvpython

2009-02-24 Thread David E DeMarle
If you mean the new python based calculator in the development
version, perhaps Berk can chime in. Otherwise, if you meant, how do I
use the calculator filter from within python, perhaps this email will
be of use:

http://paraview.markmail.org/search/?q=calculator%20filter%20python#query:calculator%20filter%20python+page:1+mid:uvj55aql4e5rrh7a+state:results

On Tue, Feb 24, 2009 at 5:20 AM, Michael Buchmayr
michi.buchm...@hotmail.fr wrote:
 Hallo,

 I'm having a hard time writing a Python script using the Calculator filter.
 Does anybody of you have a working example that he/she can send me?

 Thanks,
 Michael

 
 Votre correspondant a choisi Hotmail et profite d'un stockage quasiment
 illimité. Créez un compte Hotmail gratuitement !
 ___
 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





-- 
David E DeMarle
Kitware, Inc.
RD Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109
___
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] calculator filter via python

2009-01-07 Thread Utkarsh Ayachit
Alas there's no way for the python programmable filter to ask for a
particular timestep currently. This should be remedied soon. Feel free
to add a bug report at:
www.paraview.org/Bug

Thanks
Utkarsh

On Fri, Jan 2, 2009 at 4:00 PM, Peter Brady petertbr...@gmail.com wrote:
 I don't think I can do what I originally intended via the calculator
 filter due to the need to access the data in center[i][k] which is a
 data array in my script but the function parser won't know what to do
 with it.  I was able to make some good progress using the programmable
 filter and the information on the wiki.

 My main question at this point is how do I access the time data from
 the programmable filter?  I am using multiblockdatasets.

 Thanks,
 Peter.

 On Fri, Jan 2, 2009 at 11:04 AM, Peter Brady petertbr...@gmail.com wrote:
 Hello all,

 I am trying to do calculations based on coordinate locations.  In the
 GUI I can simply select 'coordsX', 'coordsY', 'coordsZ'.  From python
 things seem to be more complicated.  I've tried the snippet below with
 several variations and keep getting errors

 calc_radius = servermanager.filters.Calculator(Input=g_cont)
 calc_radius.AddCoordinateScalarVariable('coordsX', 0)
 calc_radius.Function =
 'sqrt((coordsX-center[i][0])^2+(coordsY-center[i][1])^2+(coordsZ-center[i][2])^2)'
 calc_radius.UpdatePipeline()

 I've also tried
 calc_radius.AddCoordinateScalarVariable('coordsX')
 but I get the error:
 calc_radius.AddCoordinateScalarVariable('coordsX')
 TypeError: __call__() takes exactly 1 argument (2 given)

 I've also tried using the scalar array name ('G' in this case) in
 place of coordsX but have met the same error message.

 What is the correct way of doing this?

 Also, I've tried using the PV-Dump.py script that was suggested to me
 previously but am met with the error:

 Traceback (most recent call last):
  File console, line 1, in module
  File string, line 33, in allToPython
  File string, line 48, in proxiesToPython
  File string, line 149, in __orderProxies
 AttributeError: 'NoneType' object has no attribute 'groups'

 The offending lines are:
 def __orderProxies( proxies ):
Returns an array, where each entry contains the names of the proxies 
 that
depend on the previous array entry.
patternName   = re.compile(' *XMLName: *(.*)')
patternValues = re.compile(' *Values: *(.*)')
patternHex= re.compile('^0x[0-9a-f]+$')
pmanager  = servermanager.ProxyManager()

dependencies  = {}# COLLECT DEPS
for group in proxies: # For each proxy
  for name in proxies[group]:
dependencies[group+':'+name] = {} # Init its 
 depend.
proxy = proxies[group][name]

for prop in proxy:
 148  match = patternName.search( str(prop) )
 149  propName  = match.groups()[0]

 I was hoping that this script would be very helpful.  Anyone else have
 similar problems?

 Thanks in advance for your help,
 Peter.

 ___
 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] calculator filter via python

2009-01-02 Thread Peter Brady
I don't think I can do what I originally intended via the calculator
filter due to the need to access the data in center[i][k] which is a
data array in my script but the function parser won't know what to do
with it.  I was able to make some good progress using the programmable
filter and the information on the wiki.

My main question at this point is how do I access the time data from
the programmable filter?  I am using multiblockdatasets.

Thanks,
Peter.

On Fri, Jan 2, 2009 at 11:04 AM, Peter Brady petertbr...@gmail.com wrote:
 Hello all,

 I am trying to do calculations based on coordinate locations.  In the
 GUI I can simply select 'coordsX', 'coordsY', 'coordsZ'.  From python
 things seem to be more complicated.  I've tried the snippet below with
 several variations and keep getting errors

 calc_radius = servermanager.filters.Calculator(Input=g_cont)
 calc_radius.AddCoordinateScalarVariable('coordsX', 0)
 calc_radius.Function =
 'sqrt((coordsX-center[i][0])^2+(coordsY-center[i][1])^2+(coordsZ-center[i][2])^2)'
 calc_radius.UpdatePipeline()

 I've also tried
 calc_radius.AddCoordinateScalarVariable('coordsX')
 but I get the error:
 calc_radius.AddCoordinateScalarVariable('coordsX')
 TypeError: __call__() takes exactly 1 argument (2 given)

 I've also tried using the scalar array name ('G' in this case) in
 place of coordsX but have met the same error message.

 What is the correct way of doing this?

 Also, I've tried using the PV-Dump.py script that was suggested to me
 previously but am met with the error:

 Traceback (most recent call last):
  File console, line 1, in module
  File string, line 33, in allToPython
  File string, line 48, in proxiesToPython
  File string, line 149, in __orderProxies
 AttributeError: 'NoneType' object has no attribute 'groups'

 The offending lines are:
 def __orderProxies( proxies ):
Returns an array, where each entry contains the names of the proxies 
 that
depend on the previous array entry.
patternName   = re.compile(' *XMLName: *(.*)')
patternValues = re.compile(' *Values: *(.*)')
patternHex= re.compile('^0x[0-9a-f]+$')
pmanager  = servermanager.ProxyManager()

dependencies  = {}# COLLECT DEPS
for group in proxies: # For each proxy
  for name in proxies[group]:
dependencies[group+':'+name] = {} # Init its 
 depend.
proxy = proxies[group][name]

for prop in proxy:
 148  match = patternName.search( str(prop) )
 149  propName  = match.groups()[0]

 I was hoping that this script would be very helpful.  Anyone else have
 similar problems?

 Thanks in advance for your help,
 Peter.

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