Jitesh Vachheta Posted July 8, 2019 Share Posted July 8, 2019 (edited) Hi All, I've got few Scaler values in my data-set (E.g High,On,OFF) , I have convert all of them into Capsule by toCapsule() Function. Now wanted to remove only those capsules which are having "OFF" Status. Regards, Jitesh Vachheta Edited July 8, 2019 by Jitesh Vachheta For Missing Tag Link to comment Share on other sites More sharing options...
Thorsten Vogt Posted July 8, 2019 Share Posted July 8, 2019 Hi Jitesh, you can achieve this by filtering the values with the filter() function: $stage.toCapsules().filter($x -> $x.getProperty("Value") != "OFF") You should think of using toCondition() instead of using toCapsules(), as toCapsules() generates a capsule for each interval between recorded points even if the value stays the same. You can see this in the Capsules window of your screenshot. By using toCondition() you will get only one capsule per change of value: $stage.toCondition() If you want to filter the results of toCondition() you have to specify a maximum duration for the capsules before using filter(): $stage.toCondition().setMaximumDuration(1wk).filter($x -> $x.getProperty("Value") != "OFF") Regards, Thorsten 1 Link to comment Share on other sites More sharing options...
Danilo Posted July 8, 2019 Share Posted July 8, 2019 Hello Jitesh, Another option to filter the OFF condition would be to create a Value Search for when your compressor is OFF, then create a composite condition between the OFF condition and the Compressor Stages Conditions to only output when your compressor is on Stage 1, 2 or in Transition (You can achieve that by using the outside logic). Use this new condition as the input into your histogram. Finally, I agree with @Thorsten Vogt suggestion to use tocondition() instead tocapsules(). Hope this helps. Danilo Link to comment Share on other sites More sharing options...
Seeq Team Allison Buenemann Posted July 8, 2019 Seeq Team Share Posted July 8, 2019 Another possible method is to first cleanse the compressor stage signal to remove values equal to 'OFF' and then apply the toCondition() function. This can be done in one step using formula: $CompressorStage.remove(isEqualTo('OFF')).toCondition() Link to comment Share on other sites More sharing options...
Seeq Team Ben Johnson Posted July 9, 2019 Seeq Team Share Posted July 9, 2019 The subtlety in the last option of filtering by sample values rather than capsule properties is that the maximum interpolation of the signal may span over the removed samples, resulting in extra time for the adjacent states. 1 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