Vladimir Khudokormov Posted August 24, 2020 Share Posted August 24, 2020 I need to receive the starting time of the water breakthrough in absorbers. For that I do following: Filtering the signal of water content to smooth it. Creating the derivative of the water content to use it further to find where the water content increasing Creating the conditions: A. when the inlet valve is open (adsorbtion cycle) B. when the water content is higher than 0.5 (for 5 min) C. when the derivative is higher than 0.0001 to find the increasing of the water content 4. Creating the composite conditions: AA. intersection of A & B BB. intersection of AA & C Probably it's not the optimal solution, but it works (see pic below). A, B, C...etc are the conditions (see above). Question: How to remove all other capsules which are within the specified conditions? I need only the first capsule in BB (there are 2 capsules at the pic below, I need only first). I will then export this info to excel and extract only the start time. Therefore, all other capsules except first are trash. Link to comment Share on other sites More sharing options...
Thorsten Vogt Posted August 24, 2020 Share Posted August 24, 2020 Hi Vladimir, you may use a transform for this: $A.transform($capsule -> $BB.toGroup($capsule).first()) $A refers to condition A, $BB refers to condition BB. The formula retrieves all capsules of BB during A and returns a condition containing only the first capsule of BB: Hope this helps. Regards, Thorsten 1 Link to comment Share on other sites More sharing options...
Vladimir Khudokormov Posted August 24, 2020 Author Share Posted August 24, 2020 28 minutes ago, Thorsten Vogt said: $A.transform($capsule -> $BB.toGroup($capsule).first()) Hi, Thorsten, I have following error Link to comment Share on other sites More sharing options...
Thorsten Vogt Posted August 24, 2020 Share Posted August 24, 2020 Hi Vladimir, the error indicates that at least one of the conditions used in the formula does not have a maximum capsule duration defined. To get the formula working you have to specify a maximum capsule duration by using removeLongerThan(). The function takes a scalar value (e.g. 1wk) and removes all capsules longer than that duration. $A.removeLongerThan(1wk).transform( $capsule -> $BB.removeLongerThan(1wk).toGroup($capsule).first() ) You can check for a maximum duration by clicking the "i" icon next to the item in Details Pane: If the attribute is missing, the item doesn't have a maximum duration specified. This is the case if you create a condition by using a simple Value Search. Regards, Thorsten. 1 Link to comment Share on other sites More sharing options...
Danilo Posted August 24, 2020 Share Posted August 24, 2020 Hello Vladimir, Another thing you can try is to use the ignore capsules/gaps shorter than when creating your C condition. I can't tell from the image that you shared, but I believe your C condition has a small gap between the 2 capsules. If you merge the 2 conditions those 2 capsules, you might end up with just a single BB condition when you look for the intersection of AA and C. 1 1 Link to comment Share on other sites More sharing options...
Vladimir Khudokormov Posted August 24, 2020 Author Share Posted August 24, 2020 Hi Thorsten, Adding maximum duration helped. Thanks a lot 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