Sivaji Posted September 7, 2022 Share Posted September 7, 2022 Hi, I have an use case where I need to calculate aggregated value of every n-samples and replace the samples with the aggregated value in case the difference between the sample and aggregated value is greater than certain threshold. Link to comment Share on other sites More sharing options...
Seeq Team Sharlinda Salim Posted September 8, 2022 Seeq Team Share Posted September 8, 2022 (edited) Hi Sivaji, Step 1: Calculate aggregated value of every n-samples. Example here I am calculating the average for every 5 samples. Use aggregateByCount which is introduced in version R54. $signal.aggregateByCount(average(), 5, 10d) Step 2: The difference between the sample and aggregated value is greater than certain threshold These capsules will be 0s duration as the aggregateByCount generated a discrete signal. Step 3: Replace the samples with the aggregated value Hope this help. Edited September 8, 2022 by Sharlinda Salim Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now