Jump to content

Finding Periods of Overlapping Events


John Cox

Recommended Posts

  • Seeq Team

FAQ: How do I identify time periods where I have overlapping capsules within the same condition? I may want to keep only the capsules (time periods) where capsules overlap. I may also want to keep the times where a certain number (2, 3, or more) of capsules overlap. In this example, we will find time periods where there are at least 2 overlapping capsules which make up the Event Condition. In the screenshot below, you can see there are 3 separate time periods where the Event condition capsules overlap:

StartingPoint.JPG

 

Step 1: Merge any overlapping capsules together using the merge() function in Formula:

Step2_merged.JPG

Now, we have a time period basis (Event Condition (merged)) over which we can count the total number of overlapping capsules.

 

Step 2: Count the number of overlapping capsules using the count of the original Event Condition capsules over each Event Condition (merged) capsule:

SignalFromCondition.JPG

This creates a new signal as shown in the trend below. We can see that the new signal values (where > 1) correctly identify the 3 time periods where there are overlapping capsules in the original Event Condition.

OverlappingEventsSignal.JPG

 

Step 3: We use Formula to find where the Event Condition (merged) capsules touch a time period where the Number of Overlapping Events signal (created in Step 2) is > 1. Note that we could test for varying number of overlapping capsules (> 2, > 3, etc.) depending on the goals of our analysis. We could also break Step 3 into 2 steps (a Value Search to find where the Number of Overlapping Events is > 1, followed by a Composite Condition to do the touches logic). 

 

OverlappingEventsFormula.JPG

 

This generates the final results where the Overlapping Events condition correctly identifies our time periods of interest:

OverlappingEventsResult.JPG

  • Like 2
Link to comment
Share on other sites

  • Seeq Team

As another variation, in some cases the user may want to see the number of overlapping capsules at any point in time. In this case, the .fragment() Formula function may be helpful:

     $EventCondition.fragment()

The .fragment() function creates a non-overlapping condition representing all the boundaries of capsules in an overlapping condition. 

You can see a comparison of the conditions generated using .merge() and .fragment() below. Where there are overlapping capsules, the .fragment() function creates a series of capsules touching each other. For example, note that there are 5 green capsules in the Event Condition (fragment) shown on the far right of the trend. 

FragmentMergeComparison.jpg

 

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