08-03-2021 04:44 AM
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.
Solved! Go to Solution.
08-09-2021 11:18 AM
Hey Warburtonj,
Is the talk about DIAdem scripting here?
08-09-2021 01:07 PM
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.
08-10-2021 01:36 AM - edited 08-10-2021 01:37 AM
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)
Greetings
Walter
08-12-2021 09:21 AM
Brilliant! Does exactly what I need. Thanks Walter 😀