DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Removing Repeatedly Occurring Values in a Channel

Solved!
Go to solution

Is there a way of only deleting values in a channel when for example there are more than 10 values in a sequence the same.

 

I tried using 

 

ChnDeleteDuplicateValues(chnData, , "absolute", 10, false,"FirstNonNoValue")

 

but I can only adjust the tolerance that the values differ by.

0 Kudos
Message 1 of 5
(1,588 Views)

Hey Warburtonj,

Is the talk about DIAdem scripting here?

0 Kudos
Message 2 of 5
(1,532 Views)

Yes I need to be able to implement this in a Diadem script.  Only replace values in a channel with NOVALUE when there are say 10 values in sequence that are the same.

0 Kudos
Message 3 of 5
(1,527 Views)

Hello warburtoni,

 

I think you can use the Channel Event Functions for this. The first step is to find all values where the difference is zero. In the second step all results with more than 10 hits are filtered. The third step is to create a result channel.

 

 

ChnEventList1 = ChnEventDetectionDifference("", "[1]/Signal", 0, "absolute-exact")
'Call ChnEventCreateFilteredFalseChn("/EventStatus1", ChnEventList1, "[1]/Signal", NOVALUE) ' for test only

ChnEventList2 = ChnEventFilter(ChnEventList1, "Peaks", 10 , "Index")
Call ChnEventCreateFilteredFalseChn("/EventStatus2", ChnEventList2, "[1]/Signal", NOVALUE)

 

Walter_Rick_0-1628577338810.png

 

Walter_Rick_1-1628577358398.png

 

Greetings

Walter

 

Message 4 of 5
(1,504 Views)
Solution
Accepted by topic author warburtonj

Brilliant!  Does exactly what I need.  Thanks Walter 😀

0 Kudos
Message 5 of 5
(1,474 Views)