Re: [Paraview] NaN values

2017-11-14 Thread Moreland, Kenneth
danger of removing a NaN from elsewhere in the file that you want.) -Ken From: "Doina Gumeniuc (224252 MAHS)" <224...@via.dk> Date: Tuesday, November 14, 2017 at 12:42 AM To: "Moreland, Kenneth" , Mathieu Westphal , "paraview@paraview.org" Subject: [EXTE

Re: [Paraview] NaN values

2017-11-13 Thread Doina Gumeniuc (224252 MAHS)
! From: Moreland, Kenneth Sent: November 14, 2017 12:24:03 AM To: Doina Gumeniuc (224252 MAHS); Mathieu Westphal; paraview@paraview.org Subject: Re: [Paraview] NaN values Doina, vtk files support Nan’s in general. (I just tried it. It worked fine.) However, you are trying to introduce NaN’s in

Re: [Paraview] NaN values

2017-11-13 Thread Moreland, Kenneth
13 2 0 1 3 1 2 3 2 3 4 2 4 5 -Ken From: ParaView on behalf of "Doina Gumeniuc (224252 MAHS)" <224...@via.dk> Date: Monday, November 13, 2017 at 12:55 PM To: Mathieu Westphal , "paraview@paraview.org" Subject: [EXTERNAL] Re: [Paraview] NaN values Hi Mathieu,

Re: [Paraview] NaN values

2017-11-13 Thread Doina Gumeniuc (224252 MAHS)
: [Paraview] NaN values Hi Can you share your dataset ? Thanks, Mathieu Westphal On Mon, Nov 13, 2017 at 4:10 PM, Doina Gumeniuc (224252 MAHS) <224...@via.dk<mailto:224...@via.dk>> wrote: Hi Mathieu, I am using a vtk poly data file, which when I load in paraview, it gives me error (p

Re: [Paraview] NaN values

2017-11-13 Thread Mathieu Westphal
king). I was thinking it is because of my > NaN values. > -- > *From:* Mathieu Westphal > *Sent:* November 13, 2017 2:53:19 PM > *To:* Doina Gumeniuc (224252 MAHS) > *Cc:* paraview@paraview.org > *Subject:* Re: [Paraview] NaN values > > Hi >

Re: [Paraview] NaN values

2017-11-13 Thread Doina Gumeniuc (224252 MAHS)
MAHS) Cc: paraview@paraview.org Subject: Re: [Paraview] NaN values Hi ParaView understand NaN correctly as blanks. If you are reading a .csv file, the correct string that is interpreted as NaN is "nan" without the quotes. Best, Mathieu Westphal On Mon, Nov 13, 2017 at 2:48 PM, Doin

Re: [Paraview] NaN values

2017-11-13 Thread Mathieu Westphal
Hi ParaView understand NaN correctly as blanks. If you are reading a .csv file, the correct string that is interpreted as NaN is "nan" without the quotes. Best, Mathieu Westphal On Mon, Nov 13, 2017 at 2:48 PM, Doina Gumeniuc (224252 MAHS) <224...@via.dk > wrote: > Hi all, > > > I have a file

[Paraview] NaN values

2017-11-13 Thread Doina Gumeniuc (224252 MAHS)
Hi all, I have a file with NaN values in almost every column and row. The integer numbers represent which points should be connected by lines, therefor I can not replace NaN with zeros because it will interpret it as Point with ID 0. Is there any way I can replace this NaNs with something whic

[Paraview] NaN coloring on non-NaN component

2017-04-11 Thread Ibanez, Daniel Alejandro
Hello, I'm using the ParaView 5.2.0 binary download for Mac. I've attached an unstructured grid VTK file, using binary encoding. When I open this file, and try to color by the Y component of nodal velocity, I get the NaN color. I've checked the data right before it goes into the file and am

Re: [Paraview] nan

2010-08-23 Thread Aurélien Marsan
Hi Eric, You are right : for block in inputs[0]: print block.Points iterates over the Points of the Blocks of the MultiBlockDataSet. And input[0].VTKObject and pdi are the same object. Really a great way to can work with numpy ! Many thanks ! -- Aurélien __

Re: [Paraview] nan

2010-08-23 Thread Eric E. Monson
Okay, found how you can see that they're the same object "under the covers": pdi = self.GetInputDataObject(0,0) print pdi print inputs[0].VTKObject -Eric On Aug 23, 2010, at 9:46 AM, Eric E. Monson wrote: > Hey Aurélien, > > (Someone with more detailed knowledge can correct me if I'm wrong...

Re: [Paraview] nan

2010-08-23 Thread Eric E. Monson
Hey Aurélien, (Someone with more detailed knowledge can correct me if I'm wrong...) pdi and inputs[0] refer to the same input to the programmable filter, but pdi is the VTK object and inputs[0] is a more Python-friendly wrapper for the VTK object which makes access to the object properties more

Re: [Paraview] nan

2010-08-23 Thread Eric E. Monson
Hey Aurélien, Most of what I know about this new interface is from a couple of examples that Berk posted a while back (he may have written the interface...?), and from looking at the python module dataset_adapter.py in ParaView/Utilities/VTKPythonWrapping/paraview/vtk. I don't understand it all

Re: [Paraview] nan

2010-08-23 Thread Aurélien Marsan
Hello Eric, I'm very interested in what you call "super-spiffy-numpy-hidden-behind-the-scenes". That would shorten most of my scripts ! But do you know if it can handle with MultiBlockDataSet ?... I would have like to do inputs[0].GetBlock(1).PointData[att_name] But it doesn't seem to work... T

Re: [Paraview] nan

2010-08-23 Thread Aurélien Marsan
Hello Eric, In the solution you propose, what is the inputs[0] for ? Is there a connection between the line : > pdi = self.GetInputDataObject(0,0) > and inputs[0] ? Or does inputs[0] picks on something else ? Thanks, Aurélien ___ Powered by www.kitwa

Re: [Paraview] nan

2010-08-20 Thread Moreland, Kenneth
x27;Eric E. Monson' Cc: 'paraview@paraview.org list' Subject: Re: [Paraview] nan Thanks all! I believe we have found numerous solutions. Alan From: Eric E. Monson [mailto:emon...@cs.duke.edu] Sent: Friday, August 20, 2010 9:26 AM To: Scott, W Alan Cc: David E DeMarle; Aurélien

Re: [Paraview] nan

2010-08-20 Thread Scott, W Alan
-boun...@paraview.org] On Behalf Of Scott, W Alan Sent: Friday, August 20, 2010 11:13 AM To: 'Eric E. Monson' Cc: 'paraview@paraview.org list' Subject: Re: [Paraview] nan Thanks all! I believe we have found numerous solutions. Alan From: Eric E. Monson [mailto:emon...@cs.duke.

Re: [Paraview] nan

2010-08-20 Thread Scott, W Alan
Thanks all! I believe we have found numerous solutions. Alan From: Eric E. Monson [mailto:emon...@cs.duke.edu] Sent: Friday, August 20, 2010 9:26 AM To: Scott, W Alan Cc: David E DeMarle; Aurélien Marsan; paraview@paraview.org list Subject: Re: [Paraview] nan If you can use numpy, and you&#x

Re: [Paraview] nan

2010-08-20 Thread Eric E. Monson
If you can use numpy, and you're using a recent-enough version of ParaView, then you can also use the super-spiffy-numpy-hidden-behind-the-scenes programmable filter API to replace all of the attribute arrays with zero'd versions: pdi = self.GetInputDataObject(0,0) pdo = self.GetOutputDataObjec

Re: [Paraview] nan

2010-08-20 Thread Aurélien Marsan
You would have to use the numpy_support.vtk_to_numpy and numpy_support.numpy_to_vtk functions. You can find this module in the directory ParaView-3.8.0-Linux-x86_64/lib/paraview-3.8/paraview Then, you might write something like (for a StructuredGrid) array = numpy_support.vtk_to_numpy(Data.GetPoi

Re: [Paraview] nan

2010-08-20 Thread Aurélien Marsan
Hi, If you're using python, and if you can use the numpy library, you can use the function numpy.nan_to_num too. http://docs.scipy.org/doc/numpy/reference/generated/numpy.nan_to_num.html#numpy.nan_to_num Regards, Aurélien 2010/8/20 David E DeMarle > That said, the same trick may work in the s

Re: [Paraview] nan

2010-08-20 Thread David E DeMarle
That said, the same trick may work in the standard calculator filter with the expression: if(val=val, val, 0.0) David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 On Fri, Aug 20, 2010 at 9:26 AM, David E DeMarle wrote: > You migh

Re: [Paraview] nan

2010-08-20 Thread David E DeMarle
You might write a python filter that iterates over all floating point arrays and replaces nan's with 0. According to http://stackoverflow.com/questions/944700/how-to-check-for-nan-in-python The most py version robust way to check for nan is: def isNaN(num): return num != num David E DeMarle

Re: [Paraview] nan

2010-08-19 Thread Moreland, Kenneth
This might not be the best solution, but you can use the threshold filter to remove NANs. A NAN will always fall outside the threshold range. -Ken On 8/19/10 6:28 PM, "Scott, W Alan" wrote: Is there a way to convert nan's to zeros in ParaView? I have a user that is trying to use the integr

[Paraview] nan

2010-08-19 Thread Scott, W Alan
Is there a way to convert nan's to zeros in ParaView? I have a user that is trying to use the integrate data filter, and it is having troubles with NANs. Thanks, Alan ___ Powered by www.kitware.com Visit other Kitware open-source projects at http