Jump to content
  • To Search the Seeq Knowledgebase:

    button_seeq-knowledgebase.png.ec0acc75c6f5b14c9e2e09a6e4fc8d12.png.4643472239090d47c54cbcd358bd485f.png

Search the Community

Showing results for tags 'capsules'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Technical Forums
    • Tips & Tricks
    • General Seeq Discussions
    • Seeq Data Lab
    • Seeq Developer Club
    • Seeq Admin Forum
    • Feature Requests

Calendars

  • Community Calendar

Categories

  • Seeq FAQs
  • Online Manual
    • General Information

Categories

  • Published
  • Code
  • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Company


Title


Level of Seeq User

Found 11 results

  1. Dear community, I want to identify representative capsules based on the capsule duration. What I did so far is: 1. Identify capsules 2. Create a signal from condition that represents the capsule duration. 3. Calculate average capsule duration and percentiles of interest from this signal using metrics 4. Use these metrics to identify capsules that are within a certain range around the average or between two percentiles. What I would like to do next and could not accomplish so far is: By now step 4 works when entering the respective criterion to a value search by hand. Now I would like to do that dynamically, i.e., calculate the metrics for the displayed time range and directly get capsules that satisfy the criterion given above. After trying around for some time, this seems to be possible using formula: I tried to use the metrics directly, but the function I tried to use (InBetween) does not accept metrics as input. I also tried to calculate the metrics directly in formula to avoid wrong data types, but that was also not successful. It sems to get down to explicitly convert the signal metrics to scalar, but I also fail to do that. As I am quite new to seeq, I would appreciate if there were some hints on this: Is it possible? Did I choose the correct approach? Are there other, even simpler ways to accomplish that. Thanks in advance!
  2. In some cases you may want to do a calculation (such as an average) for a specific capsule within a condition. In Seeq Formula, the toGroup() function can be used to get a group of capsules from a condition (over a user-specified time period). The pick() function can then be used to select a specific capsule from the group. The Formula example below illustrates calculating an average temperature for a specific capsule in a high temperature condition. // Calculate the average temperature during a user selected capsule of a high temperature // condition. (The high temperature condition ($HighT) was created using the Value Search tool.) // // To prevent an unbounded search for the capsules, must define the search start/end to use in toGroup(). // Here, $capsule simply defines a search time period and does not refer to any specific capsules in the $HighT condition. $capsule = capsule('2019-06-19T09:00Z','2019-07-07T12:00Z') // Pick the 3rd capsule of the $HighT condition during the $capsule time period. // We must specify capsule boundary behavior (Intersect, EnclosedBy, etc.) to // define which $HighTcapsules are used and what their boundaries are (see // CapsuleBoundary documentation within the Formula tool for more information). $SelectedCapsule = $HighT.toGroup($capsule,CapsuleBoundary.EnclosedBy).pick(3) // Calculate the temperature average during the selected capsule. $Temperature.average($SelectedCapsule) The above example shows how to select and perform analysis on one specific capsule in a given time range. If instead you wanted to select a certain capsule of one condition within the capsule of a second condition, you can use the .transform() function. In this example, the user want to pick the first capsule from condition 2 within condition 1. Use formula tool: $condition1 .removeLongerThan(1d) .transform($c -> $condition2.removeLongerThan(1d).toGroup($c).pick(1)) The output: Content Verified DEC2023
  3. Seeq has functions to allow easy manipulation of the starts and ends of capsules, including functions like afterStart(), move(), and afterEnd(). One limitation of these functions is that they expect scalar inputs, which means all capsules in the condition have to be adjusted by the same amount (e.g. move all capsules 1 hour into the future). There are cases when you want to adjust each capsule dynamically, for instance using the value of a signal to determine how to adjust the capsule. Solution: This post will show how to accomplish a dynamic / signal-based version of afterStart(). This approach can be modified slightly to recreate other capsule adjustment functions. Assume I have an arbitrary condition 'Condition', and signal 'Capsule Adjustment Signal'. I want to find the first X hours after each capsule start, where X is the value of 'Capsule Adjustment Signal' at the capsule start. I can do this with the below formula. $condition .afterStart(3h) // has to be longer than an output capsule will ever be .transform($capsule -> { $newStartKey = $capsule.startKey() $newEndKey = $capsule.startKey() + $signal.valueAt($capsule.startKey()) capsule($newStartKey, $newEndKey) }) This formula only takes two inputs: $condition, and $signal. This formula goes through each capsule in the condition, and manipulates its start and end keys. In this case, the start key is the same as the original, but the new end key is set to the original start key plus the value of my signal. This formula produces the following purple condition: Some notes on this formula: The output capsules must be within the original capsules. Therefore, I have included .afterStart(3h) in the formula. This ensures the original capsules will always be larger than the outputted capsules. If you don't do this, you may see the following warning on your item, which indicates the formula is throwing away capsules: Your capsule adjustment signal must have units of time To accomplish other capsule adjustments, look at changing the definitions of the $newStartKey and $newEndKey variables to suit your needs.
  4. 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: Step 1: Merge any overlapping capsules together using the merge() function in Formula: 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: 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. 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). This generates the final results where the Overlapping Events condition correctly identifies our time periods of interest:
  5. FAQ: I have a condition for events of variable duration. I would like to create a new condition that comprises the first third of the time (or 4th, or 10th) of the original condition. Solution: A stepwise approach can be taken to achieve this functionality. 1. Begin with your condition loaded in the display pane. 2. Create a new Signal using Signal from Condition that calculates the total duration of each of your event capsules, interpolated as a step signal. 3. Create a new signal that is your total event duration multiplied by the proportion of the event that you would like to capture. e.g. for the first 1/3 of the event, divide your total duration signal by 3, as shown below. 4. Create an arbitrary discrete signal with a sample at the start of each of your event capsules. 5. Shift the arbitrary discrete signal in time by the value of your signal calculated in step 3. In this example, the 1/3 duration signal. Note, depending on your version of Seeq, the function to do this may be called move() or delay(). 6. Use the toCapsules() function in Formula to create a tiny (zero duration) capsule at each of your shifted, discrete samples. 7. Join the start of your original condition with the capsules created in step 6 using the composite condition tool.
  6. As a Seeq user, you may have created a condition for a particular event of interest and would like to create a signal that is the running count of these events over a given time period. This analysis is common in equipment fatigue use cases when equipment degrades slowly based on a number of cycles (thermal, pressure, tension, etc) that it has undergone during it's life or since a last component replacement. This use case can be done very efficiently in Seeq Formula. The assumptions for the below solution are: You have a condition ($condition) of interest that you would like to understand the running count for There is a defined timeframe of interest, where counting will start and end. Note the end date can be sometime in the future. For the below example, this condition is referenced as $manualCondition, but could very well be another condition that wasn't created via the Manual Condition tool. Just note that for each capsule in this condition, the count will restart at 0. Solution - Utilize the runningCount() formula function: 1) runningCount() currently only accepts signals as inputs, so convert your $condition to a signal by using .toSignal(), which produces a single sample for each capsule: $condition.toSignal(SAMPLE_PLACEMENT) SAMPLE_PLACEMENT should be specified as startKey(), middleKey(), or endKey(). If you want your count to increase at the start of each event, then use startKey(). If wanting the count to increase in the middle or end of each event, then use middleKey() or endKey() 2) Use the runningCount() function on the signal created above. $signal.runningCount($conditionToStartAndEndCounting) Both steps are shown below in a unified Formula: /* This portion yields a SINGLE point for each capsule. startKey() generates the point at the START of each capsule, where middleKey() and endKey() could also be used to generate a point at the MIDDLE or END of each capsule. Where these points are placed matter, as that is the point in time the count will increase. */ $samplePerCapsule = $condition.toSignal(startKey()) /* This portion yields the running count of each sample (capsule). The 15d in toStep() can be adjusted. Ideally this number will be the duration of the longest expected time between two events that are being counted. */ $samplePerCapsule.runningCount($manualCondition).toStep(15d) .toStep(15d) ensures the output signal is step interpolated, interpolating points at most 15 days apart. If step interpolation is not required, then this can be removed or replaced with something like .toLinear(15d). Below shows the associated output. Content Verified DEC2023
  7. Hello everyone, I want to get the first value of signal within capsule. When I use getStart it returns No variant of function 'toscalars' consumes the parameters (Signal, Condition) at 'toscalars' Same with following function: $signal.toscalars($capsule).first() When I created capsule inside formula everything works fine: $signal.toscalars(capsule(now() - 6y, now())).first() Thanks
  8. Is there a way to count capsules? For example, I have created a value search in my data to show me all values above 70%. This forms capsules at the top of my timeframe. However I would like to now count how many capsules are in the selected timeframe (ie from November to January). I have tried using the "count" formula however it is showing a trend with a value every time the value search shows above 70%. I am looking for something that will tell me there were 87 capsules in the timeframe. And if I change the timeframe, then this value would change. I hope this makes sense. Thank you!
  9. The timing of Periodic Condition capsules is tied to the time zone selected by the user when specifying the Periodic Condition. The user should pay close attention to this selection as it can have significant impact on calculated results. Suppose the user is creating a daily periodic condition as shown below: In this case, the user has specified US/Eastern time zone for the daily capsules when setting up the Periodic Condition We can see in the capsules pane in the screenshot below that these capsules start at 12am in the Eastern time zone, which is the "worksheet time zone" the user is currently using for the trend display (evidenced by the "EST" to the right of the timestamps just below the trend). NOTE: the worksheet time zone changes the display of the timestamps, but it doesn't change the actual timestamps of the daily capsules. Now, suppose the user wants to do a daily average or totalization based on this daily condition, but the calculations are for equipment or a manufacturing site that is in the US Central time zone (or some other time zone). Because the daily capsules start at 12am Eastern time, the calculated results would be inaccurate for daily results involving equipment in the US Central time zone, as we would be aggregating the daily results starting at 11pm Central time. The selection of the appropriate time zone always depends on the specific objectives of each analysis, but in this specific case the user may want to set up the Periodic Condition specifying US/Central for the time zone, so that daily aggregations are from 12am-12am Central time. Selecting the correct time zone is also important because it affects edge cases like daylight savings. Selecting a time zone that honors DST will produce the 25 or 23h capsule on the proper adjustment day. Similar time zone comments apply when working with capsules representing other periodic time periods (weeks, months, years, etc.), as well as for recurring crew shifts - where the user should specify the time zone carefully based on the objectives, manufacturing site, equipment location, etc. Content Verified DEC2023
  10. I have a Boolean signal and would like to count the number of events over a specified time period. How can this be accomplished in Seeq? Thanks, Sam
  11. Hi- I have a process that goes through several different stages during its operation, e.g. 'Stage 1', 'Stage 2', 'Off' etc. I'd like to determine a count or frequency that my process is in each of these stages. What is the best way to do this?
×
×
  • Create New...