LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for a solution to simply drop outliers

I have created an application to measure a Helium concentration, using an Alcatel ASM-102 Leak Detector.  The problem is that occasionally, the device sends out a bogus value, perhaps 0.00x10^0 or perhaps 2 x 10^-2, reather than 2 x 10^-7.  I am looking for the cleanest approach to look at the array when I'm done, and just discard any values that do not fall between 1 x 10^-6 and 1x10^-3.  Any ideas? 
0 Kudos
Message 1 of 6
(3,511 Views)
BTW, I do NOT need to do any interpolation, as it's not necessary to "fill in the blanks".  I just want to eliminate the zeros and other corrupt data.
0 Kudos
Message 2 of 6
(3,507 Views)
Just use "in Range?" and built a new array for the matching elements.
 
If the array is large, you should re-use the old array for efficiency. See attached (LabVIEW 7.0).
0 Kudos
Message 3 of 6
(3,503 Views)

altenbach, as usual, your programming is really easy to follow.  OK, so here is the last piece of the puzzle.  I actually have two arrays:  one is a helium concentration, and the other is a helium flow. My flow values are always good, but as I said before, there are sometimes bad values in the concentrration array.  SO, what I want to do is to eliminate the flow element that corresponds to any bad concentration element.  Hmmm, sounded like a good idea when I did itSmiley Indifferent   Anyway, you can see that the result that I currently have is that the filtered flow array is simply the last n elements of the raw flow array, n being equal to the delta between the array size of the raw concentration and the filtered concentration arrays.  I hope I haven't managed to confuse you with that nonsense. 

Basically, if I drop 5 elements from the raw concentration array, due to their not having passed through the filter, then I show the last 5 flow values in the filtered flow array, rather than passing all but 5 of the values.

 

If 15 of 20 helium concentration values are good, then I pass the last 5 helium flow values, rather than the 15 values that correspond to the 15 good concentration values.

 

HELP!  If I can't figure this out, I may just take the average of the good concentration values, and the average of all the flow values, and do the rest of my calculations based on averages, rather than calculating each value based on a known good concentration and a known good flow. 

0 Kudos
Message 4 of 6
(3,489 Views)
Hi,

I have attached a different approach that I think (if I understand the question correctly) goes to solving the problem. This method doesn't reuse the existing arrays so it's not as efficient but unless arrays are very large, that most likely won't effect things.

hope it helps

Cheers,

--Russ
0 Kudos
Message 5 of 6
(3,479 Views)
You just had a "slip of the mouse" 😞
 
When you take the array subset, you wired to the "index" instead of the "lenght" input of "array subset" in the lower instance.
(If you double-click the wire, you can actually see where it's going)
 
Also, there is absolutely no need to duplicate code, you only need one shift register to keep track of the insert point, right? 😉
 

0 Kudos
Message 6 of 6
(3,473 Views)