MantisBT - ParaView
View Issue Details
0012127ParaViewFeaturepublic2011-04-27 12:412016-08-12 09:58
Greg Weirs 
Robert Maynard 
normalminorhave not tried
closedmoved 
 
 
Sandia
incorrect functionality
0012127: Prism treatment of negative pressure when log scaling
It is possible that pressure, internal energy, and other thermodynamic variables (except density and temperature) can be negative. When the user selects to log scale these variables, Prism replaces the negative values with an arbitrary small positive number. The feature request is to set this number to be two orders of magnitude smaller than the smallest positive value for that variable.
No tags attached.
Issue History
2011-04-27 12:41Greg WeirsNew Issue
2011-04-28 13:44Robert MaynardAssigned To => Robert Maynard
2011-04-28 13:44Robert MaynardStatusbacklog => tabled
2011-04-28 15:16Robert MaynardNote Added: 0026280
2011-04-28 15:36Greg WeirsNote Added: 0026281
2011-04-28 15:44Robert MaynardNote Added: 0026282
2011-04-28 16:13Greg WeirsNote Added: 0026283
2011-06-16 13:10Zack GalbreathCategoryFeature Request => Feature
2012-02-06 14:58Alan ScottStatusbacklog => todo
2012-02-06 15:11Alan ScottProject => Sandia
2012-02-06 15:11Alan ScottType => incorrect functionality
2012-02-06 15:16Robert MaynardNote Added: 0028061
2012-02-06 16:00Greg WeirsNote Added: 0028062
2012-02-06 16:04Robert MaynardNote Added: 0028063
2012-05-31 10:23Utkarsh AyachitStatustodo => backlog
2016-08-12 09:58Kitware RobotNote Added: 0037965
2016-08-12 09:58Kitware RobotStatusbacklog => closed
2016-08-12 09:58Kitware RobotResolutionopen => moved

Notes
(0026280)
Robert Maynard   
2011-04-28 15:16   
It looks like it actually sets all negative values to 0.0 if you are asking for log scale.

So in the usecase that you had negative, positive and zero values you would want all zero values to stay 0.0 and the negative values to become two orders of magnitude smaller than the smallest non zero positive value?
(0026281)
Greg Weirs   
2011-04-28 15:36   
log fails for any non-positive number, including zero, so something is being done to handle 0.

What I have observed is a surface where the values are positive, and a flat region where some small value has replaced negative numbers, and at the border between there are spikes below the flat region. I interpret the spikes as small positive values that are less than the replacement value for negative values. Small positive numbers are valid and not unusual, this is not a rare, academic case.
(0026282)
Robert Maynard   
2011-04-28 15:44   
I double checked all values less than or equal to zero are set to zero. Negative values are not given a special positive value currently.
(0026283)
Greg Weirs   
2011-04-28 16:13   
I don't understand why you don't get an error when you take the log of 0, but the desired end result is that negative and zero values should be reset to two orders of magnitude below the smallest positive value (before taking the log). Then take the log of the whole field.
(0028061)
Robert Maynard   
2012-02-06 15:16   
we don't take the log of 0, we just set the value to 0 instead of doing the log calculation.

This request functionality is doable but will slow down reading as we will have to iterate all the values twice.
(0028062)
Greg Weirs   
2012-02-06 16:00   
The problem is that in log space, the value 0 is often in the middle of the data. Setting to a value smaller than the smallest positive value ensures that the reset data is a minimum value in log space.

In a previous comment I said this resetting shouldn't be done for density and temperature. It turns out that 0 is often a value in these two fields, and when log scaling is selected, these should also be reset to two orders of magnitude below the minimum positive value.

The reduced reading speed is acceptable (since it only happens once.)
(0028063)
Robert Maynard   
2012-02-06 16:04   
So to clarify all properties must now have zero and negative values set to two orders of magnitude less than the smallest positive value. Than take the log of the whole field.
(0037965)
Kitware Robot   
2016-08-12 09:58   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current ParaView Issues page linked in the banner at the top of this page.