Jump to content

Filter a Signal to View Only Samples with Values Above a Threshold


Go to solution Solved by Teddy,

Recommended Posts

  • Administrators
  • Solution

The simplest method for filtering a signal to only view samples with values above a threshold is to use the .remove() function coupled with a numeric value comparison in formula. 

Example formula:

image.png

 

Resulting signal:

image.png

 

Another method is to use the .remove() function in combination with a condition. This gives some added flexibility to further customize the condition you are removing data during vs just removing data under a certain threshold.

Example using .grow() to increase the duration of the condition that data is being removed during:

image.png

 

Resulting signal: 

image.png


Depending on interpolation of the data, you could also consider using the .within() function. Check out the following post that explains the differences of working with .remove() and .within():

Content Verified DEC2023

Edited by Mark Pietryka
Separating question from answer in Allison's original post. Consolidating most up-to-date answer in this post.
Link to comment
Share on other sites

  • 1 year later...
  • Seeq Team

Hi Pat,

You will need to make sure that the maximum interpolation is less than the data being removed or else the data will be interpolated through the gaps. You can set the maximum interpolation in the formula as well by adding a .setmaxinterpolation(<time>) at the end.

  • Like 1
Link to comment
Share on other sites

That helped, thanks.  Would it make sense to have a trim or clamp function to make this easier?  All I want to do is to remove data outside of a range, and it seems you have to go pretty deep to get that to work

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...