Jump to content

Get the Value of a Signal in the Middle of each Capsule

Recommended Posts

FAQ: I would like to capture the value of a signal at the exact center of each capsule within a condition. Is there a way to do this with Seeq?


1. Begin with your signal and the condition over which you want the middle value in the display pane. 


2. Open a new formula window and use the getMiddles() function to create a zero length capsule at the center of each capsule within your condition of interest. 


Note, depending on which tool what used to create the red condition shown in your screenshot, you may need to add a max capsule duration during this step as well. If you receive an error saying that the condition needs a maximum duration, try instead:


the 1d in the removelongerthan() function above applies a max capsule duration of 1d to $mycondition. Ensure your max capsule duration is longer than the longest capsule in your condition. 


3. Now you can use the Signal from Condition tool to calculate the value of your signal during each capsule of your "middle of each capsule" condition. Note: The statistic you select is not important here because the capsule is infinitesimally small so Average, Median, Value at End, etc will return the same value. 


The final  result in chain view:

  • Like 1
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...