hanskanns Posted January 24 Posted January 24 I would like generate new capsules, grouped as -> start of capsules from first capsules until end of second capsules When doing just a union $c = $a.union($b) the capsules in $c are not getting grouped as needed. thanks for any help
Seeq Team Joe Reckamp Posted January 24 Seeq Team Posted January 24 Would recommend taking a look at the "join" option in Composite Condition under Identify - this will allow you to join from one condition to the next. You can see more visually in the skills explorer here under Identify Events >> Composite Conditions: https://skill-explorer.seeq.com/
hanskanns Posted January 24 Author Posted January 24 Thanks for the hint Joe, I checked the composite Condition but I still don´t figured out yet how to: after rethinking I need to re-specify what I´m trying to achieve. On the same capsule layer, on the first found Capsule-1 extend the end of this Capsule-1 until the start of Capsule-2. Then again extend Capsule-3-end until start of Capsule 4 and so on. To only make this on the capsule-pairs 1/2 3/4 5/6 ... maybe somehow count up?
Solution Thorsten Vogt Posted January 24 Solution Posted January 24 Hello, you might want to check the following way: As you need to specify which is the first capsule you want to start with you need to define a bounding condition. In my example I use a monthly condition to do the calculation: Next I created a signal that puts the value 1 at the start of each capsule: $condition.removeLongerThan(40h).toSamples($c -> sample($c.startKey(), 1), 0s) This signal is used to build the running sum of these values: The calculated value can be used to extend the original condition with a property containing the capsule number during each month: $condition.removeLongerThan(1d).setProperty('Capsule Number', $count, startValue()) Then two new conditions can be created to include only capsules with odd and even capsule numbers: $conditionWithCount.keep($c -> ($c.property('Capsule Number')/2)-floor($c.property('Capsule Number')/2) > 0) $conditionWithCount.keep($c -> ($c.property('Capsule Number')/2)-floor($c.property('Capsule Number')/2) == 0) A composite condition can be used to join the odd and even ones: Hope this helps. Regards, Thorsten
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