Jump to content

All Activity

This stream auto-updates

  1. Today
  2. Yesterday
  3. Hi Manoel - Can you try inserting a `.validvalues()` after the "$reg" in the last line? If invalid samples are present in the signal, no interpolation will occur. This also might be worth a quick office hour visit to troubleshoot 1:1 - https://outlook.office365.com/book/SeeqOfficeHours@seeq.com/
  4. Hello Manoel, To compare values at the start of a capsule, you would use Signal from Condition with a summary statistic "Value at Start" for each variable and use the "Start" placement for the timestamp. This will create two discrete signals at the starting time of your capsule. To create a condition that compares the two values, use Formula. You cannot directly compare discrete values in Formula. You get an error stating "x must be continuous signal at $signal1". Using the resampleHold function, you hold the discrete value for the length of your desired condition. For example, if you want your comparison condition duration to be 1 hour, you would use: $signal2.resampleHold(1h, 1min) < $signal1.resampleHold(1h, 1min) If you wish the have the comparison condition capsule duration be equal to the same duration as the original condition capsule, you could add a .touches() function where the original condition touches the comparison condition. $comparison = $signal2.resampleHold(1h, 1min) < $signal1.resampleHold(1h, 1min) $originalCondition.removeLongerThan(40h).touches($comparison) Alternatively, you could change the timestamp placement in your signal from conditions to Duration for both and then use value search or formula to create the comparison conditions. This will create a conditions equal to the length of the original condition. Please let me know if you have any other questions. Chris
  5. I have a signal that has a few gaps between valid portion and gap size can vary. I want to fill the gaps with the the last good value of the each segment. I tried using ".ToStep" function, but it din't work.
  6. how to get the start time of the capsules, compare the value of two variables at the exact moment that the capsule starts. Then make a condition compering their values?
  7. Last week
  8. Thanks for the additional context. I agree I'm not sold on the utility of stacking the capsules end-to-end, but I figured I'd give an example of how it could be done since it may help move you in the right direction. In much the same way we calculated when the capsule should end based on the start_value + reset_quantity, we can find when the capsule should start based on the reset quantities of all the capsules before it in the same year (since we reset the totalizer every year). In practice this adds a bit of complexity to the formula 😉 $grow_amount = 3wk $condition_with_reset_quantity .move(-$grow_amount, $grow_amount) // grow the condition since a transform can only output capsules if they are within the originals .transform($c -> { $actual_start_key = $c.startKey() + $grow_amount // un-grown capsule start $actual_end_key = $c.endKey() - $grow_amount // un-grown capsule end $actual_input_capsule = capsule($actual_start_key, $actual_end_key) $current_year_capsule = $years.toGroup($actual_input_capsule, CAPSULEBOUNDARY.overlap) .first() $current_year_start = $current_year_capsule.startKey() // find all the reset quantity capsules that overlap the year // then sum up all the 'Reset Quantities' for those capsules. $start_value = $condition_with_reset_quantity.toGroup(capsule($current_year_start, $actual_start_key+1ns), CAPSULEBOUNDARY.INTERSECT) .forEach($cap -> $cap.property('Reset Quantity')) .sum() - $c.property('Reset Quantity') // what value should we stop the capsule at? $end_value = $start_value + $c.property('Reset Quantity') // generate a condition internal to the transform that tells us when we reach this end value $cond_volume_reached = $yearly_integral == $end_value // turn this condition back into a capsule so we can grab its start key $cap_volume_reached = $cond_volume_reached.removeLongerThan(1s) .toGroup($c) .last() // do the same thing with the start value $start_volume_reached = $yearly_integral == $start_value $cap_start_volume_reached = $start_volume_reached.removelongerthan(1s) .toGroup($c) .last() // create the output condition. Manually reassign the Reset Quantity property capsule($cap_start_volume_reached.startkey(), $cap_volume_reached.startKey()) .setProperty('Reset Quantity', $c.property('Reset Quantity')) .setProperty('Start Quantity', $start_value) .setProperty('End Quantity', $end_value) }) Notice how the resultant purple capsules stack end-to-end. The first capsule property on the purple condition is the reset quantity for that capsule, the second is the volume we should start that capsule at, and the third is the volume we want to end the capsule at. As a noted before, notice how the capsules are starting to creep forward over time.
  9. Thanks for asking about that John B. It is a batch process (reactors) which then starts to be a continuous process. The general idea is to track how long each reactor batch (based on volume calculations) is how long (residence time) in the following UnitOperations. What we basically calculated so far (examples above) are the timeframes when something comes from the reactors (dynamic reset signal pink capsules, goes to the first UO -> blue capsules). And the blue capsules are longer then the pink ones, because it is diluted and the product resides longer in that UO as the next Reactor-batch arrives... So I was thinking it might be interessting to put that blue capsules one after another, to basically ignore the dilution effect and just keep on the volumes, but after rethinking that would be not a right calulation, because as you mentioned if would delay the blue capsules more and more to the past and ignore the dilution, which is not realistic. I hope that desciption is understandable?
  10. Hi Nurhazx - In general, the average displayed in the details pane will be dependent on the time range selected in your display pane. i.e., in the above screenshot, 9/13/2023 to 3/14/2024. If you select a timerange by left-click and dragging a section of the trend, as you did in your screenshot, the average will representative for the selection - in the above, it will be 12/1/2023 to 12/13/2023. The details pane average will also include data removed in your monthly aggregation since you are passing the `remove` operator into your monthly aggregation. The calculated monthly average will always be based on the start and end time of the monthly condition, regardless of the display pane time range. It will of course also honor the "remove()" parameter. One note regarding "remove()" - if you are removing periods shorter than your signal maximum interpolation, Seeq will interpolate (draw a line) across the "gap" of data removed. If you, instead, want the removed section to be shown as a true gap regardless of interpolation settings, you can use the "within()" operator combined with "inverse()" $signal=$bt.within($d.inverse())
  11. If you do that, you're likely going to keep pushing your capsules further and further out into the future. Can you share more about the use case so I can make sure we're going down the right path?
  12. Hi, could you try creating a new formula and remove the ".predict($mlv)" part in line 5? This should result in a new scalar with the intercept as value which you can use in further calculations.
  13. I´m at the same time impressed by the capabilities of Seeq and thankful for your help. Works perfectly also for my use case, only had to add one little thing (since I do not have the Unit inside the capsule property) $end_value = $start_value + ($c.property('Rvol')).setUnits('L') Feeling already sorry for all my questions, but maybe one more follow up questions more: Is it also possible that on that resulting overlapping capsules, starting with capsule 1, the durations will stay, but the start key of capsule 2 will be put directly after the end of capsule 1 and so on with all the capsules?
  14. Getting the below error when trying to get the regression properties. It worked well when tested using a static capsule instead of dynamic one. However for my case I do need a dynamic, given that the regression coefficients are expected to change over time. Latter on I will get the regression coefficient and intercept to build the same regression. Then use the input variable high limit to calculate the new recommended high limit for the target variable. Any work around it available?
  15. The other month (Sep-Nov) value is same between formula and manual. Only that one. And this is happen in another signal.
  16. Hi, I am trying to create monthly average data by ignoring the downtime condition (signal less than 60). I am using formula : $d= downtime condition $ar= monthly capsule The value from formula is different from manual averaging as shown in pic below. Could anyone help me to explain the difference? Many thanks
  17. Hi EPH - We don't have the capability to remove short Capsules in a Composite Condition via the GUI, however, it can be done easily in formula like so: ($a.intersect($b)) .removeShorterThan(1h) where $a and $b are the respective conditions and the parameter in removeshorterthan() specifies the minimum capsule duration (above example, anything shorter than 1 hour will be ignored). If you already have the Composite Condition set up, go to "Item Properties" (green i), click the down arrow next to "Duplicate", and select "Duplicate to Formula". This will pre-populate $a.intersect($b) with your signals in Formula, and you can then append ".removeShorterThan(1h)" to create the new condition that ignores short capsules.
  18. So is the desired behavior to start integrating at the start of each capsule, and then only close the capsule once the flow rate has been reached? By nature of that logic you'll have overlapping or non-continuous capsules. The issue with the formula you wrote is that $flow_integral_signal isn't going to reset at the start of each capsule, so floor won't actually find the point that it rolls past Rvol, but instead find when the yearly integral rolls past the a multiple of Rvol. We can take a slightly different approach and calculate what value the yearly integral needs to be before the capsule should end, find the timestamp of that event, and use that as the end key of your capsule: $condition_with_reset_quantity .move(0, 1wk) // grow the condition since a transform can only output capsules if they are within the originals .transform($c -> { // find the value of the yearly integral at the start of the capsule $start_value = $yearly_integral.valueAt($c.startKey()) // what value should we stop the capsule at? $end_value = $start_value + $c.property('Reset Quantity') // generate a condition internal to the transform that tells us when we reach this end value $cond_volume_reached = $yearly_integral == $end_value // turn this condition back into a capsule so we can grab its start key $cap_volume_reached = $cond_volume_reached.removeLongerThan(10d).toGroup($c).first() // create the output condition. Manually reassign the Reset Quantity property capsule($c.startKey(), $cap_volume_reached.startKey()) .setProperty('Reset Quantity', $c.property('Reset Quantity')) }) // just to prove our capsules generated correctly .setProperty('Delta', $yearly_integral, delta()) This results in a condition that looks like: Note how each blue capsule has the same start of a pink capsule, but only ends once the corresponding volume has been achieved.
  19. I am trying to create a Composite Condition with the Intersection of two other conditions, however I would like to ignore short capsules which are created during transient conditions. Is there a way to ignore short capsules for composite conditions as there is for simple Value Search Conditions?
  20. I´m thinking about something like: $condition2.transform($c -> // to loop over each capsule $c.setProperty('min_for_vol', // create a new property floor($flow_integral_signal/$c.property("Rvol")) // for the first time the liters from the this capsule-property passed on the flow signal .toCondition() .removeLongerThan(3d) .ToGroup($c) .pick(1).duration().convertUnits('min') )) It still does not behave as I need it, but it might be in the right direction for my usecase. The generated capsules / times are way to short now. For the floor calculation, does the capsule start also need to be defined if it should start it at the beginning of each capsule? Next step could be to generate a signal / condition based on the new capsule property.
  21. Thanks, it runs perfectly within this example, unfortunalty my real data is different 😉 It is a continuous process which I like to chunk into UnitOperations based on Volume Calculations. Tried to sketch my usecase: The Problem is that on my data the capsules which have the reset information are actually to small that the runningSum (integral) in it can reach the reset_quantity What I´m trying to achieve: everytime a capsule starts of the initial condition1 -> start doing the integral running sum L/min of the flow, until a dynamic limit is reached (based on the capsule properties, per capsule on condition1, one after another) and finally get a signal / condition(capsules) thanks alot in advance, really appreciate all that very beneficial input from this Seeq forums
  22. For that case, I'd suggest doing the running integral over each time period that has a different $reset_quantity. In your example, if you have a different reset quantity for each month, do the running integral over each month. This will keep the behavior across reset quantities consistent since the integral will reset: If you approach it this way, all you have to do is swap out the $reset_quantity for a signal: $months = months() // pull your reset quantity from a capsule property to a signal // in this case, I'm just creating a dummy signal $reset_quantity = $months.toSignal('Month') * 1000 $monthly_integral = $flow.integral($months) $fill_events = floor($monthly_integral/$reset_quantity).toCondition() $flow.integral($fill_events.removeLongerThan(10d))
  23. A follow up question on this: Could the formula / logic be extended to have the $reset_quantity not be static but been read from another capsule property? F.e. Sum up over the year, but there are capsules each $month which have different liters per month to be used as $reset_quantity? Thanks
  24. Earlier
  25. Thanks for the update. As additional information, I confirmed that currently, even though you see the scroll wheel in Organizer when hovering over the y-axis, it is not possible to change the y-axis scale from within the view in Organizer (no matter if you have view only or full edit access). If you would like, I can create a support ticket for you in our system, this is a "feature request" that other customers have asked for. Creating a support ticket would have 2 benefits: increases the likelihood it gets worked on by our team and automatically notifies you when the new feature is made available. Let me know if you'd like me to create a ticket for you - if yes, then email me at john.cox@seeq.com with your name and company name.
  26. We've resolved it. I'm not sure what the user with write-access did differently this time, I think maybe she set the Y-Axis to an actual number instead of Auto. But its working now. Thanks. I'm marking this resolved.
  27. @Nitish, Great question! What kind of Add-on are you developing? Is it an Add-on Tool or a frontend Add-on that uses a Data Lab Function as a backend? If you are developing an Add-on uses a Data Lab Function as a backend then you can directly call the reserved `LOG` variable to write to the Data Lab logger. Lets look at a really simple example of a function in the cell of a Data Lab Functions notebook. def add_ten(number=0): # This function adds 10 to a number LOG.info("Starting the process") try: new_number = number + 10 return new_number except Exception as e # Lets log this failure LOG.error(f"Failed to add ten with error - {e}" Alternatively, you can use the `getLogger` method from the logging module to get the Data Lab Functions Logger: import os import logging my_log = logging.getLogger(os.environ['SEEQ_DATALAB_FUNCTIONS_LOGGER']) my_log.info("Hello World!") The logs for the Data Lab Function can be viewed from : `https://your.seeq.server/data-lab/<DATALAB_PROJECT_ID>/functions/logs` Check out https://support.seeq.com/kb/latest/cloud/reserved-variables#id-(R64)ReservedVariables-TheLOGObject for more information.
  1. Load more activity
×
×
  • Create New...