Jump to content

Filtering the capsules


Recommended Posts

I need to receive the starting time of the water breakthrough in absorbers.

For that I do following:

  1. Filtering the signal of water content to smooth it.
  2. Creating the derivative of the water content to use it further to find where the water content increasing
  3. 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 &
  • 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. 

Annotation-2020-08-24-175652.png

 

 

Link to comment
Share on other sites

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:

image.thumb.png.574095990f897efe801abd2b67e05031.png

Hope this helps.

Regards,

Thorsten

  • Like 1
Link to comment
Share on other sites

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:

image.png.330ca4484d8fb3a960ad7c2e529e62ed.png

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.

 

 

  • Thanks 1
Link to comment
Share on other sites

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. 

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