Jump to content

Synjen Marrocco

Members
  • Posts

    12
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Synjen Marrocco

  1. Multiple conditions that contain current, previous, or other specific timeframes can be combined into one condition using the combineWith() function. The above method may not be required if you would like to have your aggregated signal calculated across every capsule within a condition (i.e. every week in a weekly condition). combineWith($current_week, $previous_week, $week_N)
  2. Hi Johannas, It looks like in your first post that your metadata dataframe might have an issue. Can you try the same code but remove the inplace= True from the set_index? Additionally, can you add a 'Type' column to the metadata? You can also output the metadata frame before the push to ensure it is as expected. This example seemed to work for me: from seeq import spy import pandas as pd import csv csv_file = pd.read_csv('data_.csv', parse_dates=['Date-Time'], index_col='Date-Time') metadata = pd.DataFrame({ 'Name': ['Temperature', 'RH'], 'Value Unit Of Measure': 'EUR/MW', 'Type':'Signal' }).set_index('Name', drop=False) spy.push(data = csv_file, metadata = metadata, workbook='synjen_test004')
  3. Hi Anton, Thank you for the question. Unfortunately, there is not currently a supported method for explicitly pulling a table view from Seeq WB into SDL. Depending on what you have in the table, you may be able to get it pretty close with a typical spy.pull using the shape and or capsule_properties arguments. That said, there are certainly instances where the spy.pull alone will not get the table you are looking for. You could leverage pandas to manipulate the table to the format you are looking for as well. I hope this helps. Thank you, Synjen
  4. This is probably uglier that Thorsten's approach, but you could also convert the duration property to a signal and do some regex replacing. Here is an example I used recently. First convert the property to a signal: $condition.toSignal('Duration Property Name') Then use the replace function to adjust the date as needed (you may need to move some thing around depending on the exact format): $timestamp_signal.replace('/(?<year>....)/(?<month>..)/(?<day>..)T(?<hour>..):(?<minute>..):(?<sec>..)(?<dec>.*)Z/' , '${hour}:${minute}:${sec}') //This example normalizes the duration if the original date always 1 day -- may need to dived here too $day = ($s.replace('/(?<year>....)/(?<month>..)/(?<day>..)T(?<hour>..):(?<minute>..):(?<sec>..)(?<dec>.*)Z/' , '${day}').toNumber() - 1).toString() $day + $s.replace('/(?<year>....)/(?<month>..)/(?<day>..)T(?<hour>..):(?<minute>..):(?<sec>..)(?<dec>.*)Z/' , ':${hour}:${minute}:${sec}') You would then set this new signal back as a property: //may need to adjust key for sample $newformat_signal.setProperty('New Duration', $duration_signal, $StartValue()) Again, this is a little ugly, and Thorsten's approach may work better depending on need, but wanted to give an example where you might get away without a transform.
  5. Hi MArgarida, If I am understanding you correctly, you are looking to create reference profiles in an asset group where some of the columns in the group are the input condition, apply to condition, and the signal itself? If so, once you have added the respective input conditions and signal columns, you can add a new column that is a calculated item (reference profile) that references the respective conditions and signal columns. Once you configure the one calculation, the remaining rows in that column will auto populate. Example of formula for reference profile in asset group: Note that you can also select the apply to all other assets if you go back and add additional rows and want to apply for formula after.
  6. Hi, The radar/spider/polar plot is not a native Seeq visualization. That said, you could use one of the many python libraries (matplotlib, Seaborn, plotly)out there that supports this type of plot to create the visual in Seeq Data Lab(SDL). The visual you create in SDL can be pushed to an Organizer Topic as an image. This workflow can also be automated to push an updated plot as needed. Simple example: #save plot as png once created plot.savefig('chart.png') #Use spy workbooks to find your topic/sheet topic = spy.workbooks.Topic({'Name': "Charts Testing Push"}) page = topic.document('Visualizations Using Data Lab') #add image to topic page.document.add_image(filename='chart.png', placement='end') #push topic iwth new image spy.workbooks.push(topic) Here is a post on replacing images using a more advanced method with html: To automate the workflow you can schedule the notebook that creates and pushes the plot to organizer using spy.jobs.
  7. Hi Margarida, The calculation hierarchy is based on what you currently have in your details pane. You are on the right track to find previously created Seeq calculations that have since removed with the recently accessed. A couple tips for finding items once removed: Click and expand your recently accessed items to get a more complete list: This is a great place to take advantage of the journal in Seeq. Before removing items from the display, create item and or workstep links in your journal to quickly access the items once removed. Finally, you can always search for the items if you recall the name. Removing the items from the details pane does not delete them. This will of course require that you recall the name (at least in part) of the item. (tip: make sure to click reset prior to searching to ensure you are not searching a subset of data in an asset tree)
  8. Hi Pat, You should be able to get the average across all of your capsules with the following formula: //Define the time period that contains all good quality capsules $capsule = capsule('2023-02-25T11:36:16.491000+00:00', '2023-03-27T11:36:16.491000+00:00') //Create average based on the good quality capsules. $Temp.remove(not $Good_Quality).toDiscrete().average($capsule).tosignal() This will produce an unweighted average using toDiscrete(). Note that we define a large capsule that captures all the good quality capsules, remove the data outside of the good capsules, convert temp to discrete, take the average, and covert the average to a signal. If you want to create a dynamic "training" period, you could do the following as well: //Use the last 7d of data to capture the good quality capsule data $capsule = capsule(now() - 7d, now()) Please let me know if this helps get you what you are looking for. Synjen
  9. Hi Christopher, Seeq does not have a non-linear equation editor/solver built-in to do what you are looking for. Of course, Seeq Data Lab is python based, so there is likely a library that you could use to solve you equation there. That said, I did poke around and find an equation rearranger that looks like it might do what you need. If am am understanding your request correctly, everything in your equation is either a constant or another signal already in Seeq. If that is is the case, you should be able just plug the rearranged equation into a Seeq formula to get your density as a function of temp (and level is sounds like). https://www.wolframalpha.com/widgets/view.jsp?id=4be4308d0f9d17d1da68eea39de9b2ce I definitely recommend confirming the accuracy.
  10. When creating Seeq signals using Seeq Data Lab(SDL) it can be useful to know how to delete signals from Seeq after pushing the signal to a workbench using a Spy push. Fortunately, the process is as simple as adding a column to your metadata dataframe called 'Archived' and setting the value to 'True' for any signal(s) you would like to archive. Below is a snippet of code where an 'Archived' column is added to the spy.push example notebook metadata dataframe is the SDL Spy Documentation. The DEPTH(ft) signal will be archived after pushing the new metadata dataframe with the archived column set to 'True'. A couple other notes about deleting signals in Seeq: If you would like to keep the signal in Seeq, but want to update the data, you can do so with a subsequent push of the signal that includes the new data. The caveat is the new data must have the same keys (timestamps) as the old data. If the keys are different, the data will be appended to the existing signal. Otherwise, you will need to push the signal with a unique name/path/type. If you would like to fully delete the signal samples from Seeq, you can do so using Seeq's API call to delete the signal samples.
×
×
  • Create New...