[CCR PATCH] Calculate appropriate po2 values
Willem Ferguson
willemferguson at zoology.up.ac.za
Sat Jun 21 05:09:50 PDT 2014
Robert,
On 21/06/2014 12:43, Robert C. Helling wrote:
>
> three quick comments:
>
> 1) What about the case of readings 1050, 1140, 1160? Then only one difference is big.
As is, diff_limit is the value that determines the way the rule is
applied. I hope that diff_limit will ultimately be an editible value in
the Subsurface Preferences tab, but with a sensible default value.
Assume here diff_limit is 100 mBar which, from my interacting with CCR
logs, appears in the right ball park.
Your example: This is case A) of the rule. The mean of the three values
would be calculated. [This is not the way the APD Discovery does it, the
APD equipment would reject the 1050 value as an outlier, but on this
discussion forum there has been some criticism of the simplistic
rejection of outlier values implemented by APD]. The present code would
treat 1050,1140,1160 in the same way as 1060,1140,1160.
The values 1030,1140,1160 would trigger case B) of the rule. Now the
difference between the 1030 and the other two values are too big and the
lower value is rejected as an outlier.
The values 1030,1140,1270 would trigger case C) of the rule, which is
calculating the mean of the three values (in other words, actually,
handled the same way as case A). In case C) there is no way of knowing
which values is are outliers.
Any comments or suggestions would be very valuable here.
> 2) The logic of hard coding all the cases with explicit 1,2,3 is in my point of view not the most straight forward. Why don’t you start by sorting the three values (can be done in a single for loop: Find both the min and the max of the three and the middle one is the sum - min - max) and then have the clear cases min far away from mid or max far away from mid.
It seems a sensible way to go, except that the code currently does not
use the middle reading as a reference (there is nor reason to believe
that the middle value has any special significance). Rather, it uses the
relative differences among all three of the readings. But the mechanism
of using a do-loop is attractive.
Comments, please!
Kind regards,
willem
More information about the subsurface
mailing list