Jump to content

All Activity

This stream auto-updates

  1. Yesterday
  2. Last week
  3. Thank you. My confusion is that I'm following along line by line in the training video and the formulas are identical. I didn't see any instructions in the training to use the "toCondition" function. I'll give it a try.
  4. Hello, Be careful to two things: When you create the condition, make sure you name your property correctly: $signal.toCondition('Grade Code') Then pay attention to single and double quotes: $condition.keep('Grade Code', isEqualTo('Grade 106')) Let me know if this helpful.
  5. My keep function in advanced training does not work and only returns a ZERO. Below is the code an the image. $Grade106 = $gcwp.keep('Grade Code', isEqualTo('Grade 106')) $Grade107 = $gcwp.keep("Grade Code", isEqualTo("Grade 107")) $Grade108 = $gcwp.keep("Grade Code", isEqualTo("Grade 108")) 0.splice(0.6,$Grade106).splice(1.15,$Grade107).splice(1.75,$Grade108)
  6. This page from our SPy documentation walks through a very similar example - again, the key is to specify the mustache ({{}}) notation on the image alt text, rather than just in the body of the document.
  7. Hi Martin, Here's the full script that I did to replicate the issue. The organizer topic template require dummy image for an image content. Step 1. Build a organizer topic template. For a text, add curly braces, and for an image content/chart, add dummy image then set the image text alternative with curly braces and save this organizer topic as Organizer_Template. Step 2. Search, pull and save the Organizer_Template in a zip file. (e.g.: Template_20March.zip) workbooks_df = spy.workbooks.search({'ID':'0EEE504F-96B9-6030-9FA3-1612720FB9B9'}) workbooks = spy.workbooks.pull(workbooks_df) spy.workbooks.save(workbooks,'Template_20March.zip', overwrite=True) workbooklist = spy.workbooks.load('Template_20March.zip', as_template_with_label=f'{spy.user.username} Template_20March') Step 3. Load the zip file workbooklist = spy.workbooks.load('Template_20March.zip', as_template_with_label=f'{spy.user.username} Template_20March') Step 4. Use the template and define it as data_lab_visualization_template. Then look at the code for the parameters data_lab_visualization_template = workbooklist['Organizer_Template'] #this need to be the same as topic name print(data_lab_visualization_template.code) output : topic.parameters = { "Title": None, "[Image] cell1": None, "[AltText] cell1": None, "[Image] Chart1": None, "[AltText] Chart1": None, "[Image] Chart2": None, "[AltText] Chart2": None } Step 5. Populate the parameters data_lab_visualization_template.parameters = { "Title": "Prod1", "[Image] cell1": "./Support Files/charts/Area E Histogram.png", "[AltText] cell1": "Area E Histogram", "[Image] Chart1": "./Support Files/charts/Area G Histogram.png", "[AltText] Chart1": "Area G Histogram", "[Image] Chart2": "./Support Files/charts/Area H Histogram.png", "[AltText] Chart2": "Area H Histogram" } print(data_lab_visualization_template.parameters) output : {'Title': 'Prod1', '[Image] cell1': './Support Files/charts/Area E Histogram.png', '[AltText] cell1': 'Area E Histogram', '[Image] Chart1': './Support Files/charts/Area G Histogram.png', '[AltText] Chart1': 'Area G Histogram', '[Image] Chart2': './Support Files/charts/Area H Histogram.png', '[AltText] Chart2': 'Area H Histogram'} Step 6. Push the organizer topic to Seeq spy.workbooks.push(data_lab_visualization_template) Creating a second topic using the same template. (Repeat step 3 until 6) Step 3 #load the template zip file workbooklist = spy.workbooks.load('Template_20March.zip', as_template_with_label=f'{spy.user.username} Template_20March') Step 4 #Use the template and define it as data_lab_visualization_template2, Then look at the code for the parameters data_lab_visualization_template2 = workbooklist['Organizer_Template'] #this need to be the same as topic name print(data_lab_visualization_template2.code) Step 5 #populate the parameters data_lab_visualization_template2.parameters = { "Title": "Prod2", "[Image] cell1": "./Support Files/Area A Histogram1.png", "[AltText] cell1": "Area A Histogram", "[Image] Chart1": "./Support Files/Area C Histogram1.png", "[AltText] Chart1": "Area C Histogram", "[Image] Chart2": "./Support Files/Area D Histogram1.png", "[AltText] Chart2": "Area D Histogram" } print(data_lab_visualization_template2.parameters) Step 6 #push the organizer to seeq spy.workbooks.push(data_lab_visualization_template2)
  8. Earlier
  9. My intention is starting from a workbook with many worksheets I would like to create new workbooks where the worksheets are obtained swapping assets from the orginal one with date ranges adjusted. If one perform the operation manually is quite straightforward. On the contrary when trying to prtfrom the same operation on datalab I have not progressed from doing the operation signal by signal (I'm attaching the relevant createSwaapedWorksheet.ipynb). This example insert into the same worksheet new content so it is only in any case a partial step. However if one have to swap tens of assets for hundreds of signals per asset this approach does not seem to be viable. I've seen that a similar problem has be tackled here where the signals are taken directly into to the worksheet, but they seem to be taken again one by one. I've also tried to swap signals. So I've taken some signals and then I swapped them Now I'm stuck because I do not know how to use them. Also because the organizer will have manu worksheets and many relevant workbenches and I do not know how to use the dataframe with wwapping relation to swap my topic content. Does anyone has already tackled this issue? Is solvable? thanks, Andrea createSwaapedWorksheet.ipynb
  10. Hi Michelle. Please try this formula to identify the transition period, where $signal = "LICTime" $signal.toCondition().beforestart(5min).afterstart(10min) you can also refer to this post for reference : Let me know how it goes.
  11. thats good 🙂 Step by step I´m understanding how to work with capsules and formulas. Magnificent whats possible there. Thanks again.
  12. I am trying to create capsules for every step change that happens in 'LICTime'. The changes aren't predictable (e.g. the value could be holding for days) but I want to compare how the values differ between each step-change. Is there a way where I don't have to define how long I will like to look at these values?
  13. Hi Leah - Would you mind submitting a support ticket via our portal at https://seeq.atlassian.net/servicedesk/customer/portal/3? If you can view the dashboard and have shared it with your colleagues via the share menu, yet they get this error, we will want to investigate a bit more.
  14. Hello, I created a dashboard with some workbench tables linked. The dashboard functions well from my end, however the people who I share the dashboard with (read and write access) are seeing the attached error messages. Is there something additional I need to do so my colleagues can see and interact with the dashboard I made? Thank you!
  15. 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/
  16. 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
  17. 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.
  18. 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?
  19. 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.
  20. 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?
  21. 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())
  22. 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?
  23. 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.
  24. 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?
  25. 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?
  26. The other month (Sep-Nov) value is same between formula and manual. Only that one. And this is happen in another signal.
  1. Load more activity
×
×
  • Create New...