Jump to content

Thorsten Vogt

Super Seeqer
  • Posts

  • Joined

  • Last visited

  • Days Won


Thorsten Vogt last won the day on February 7

Thorsten Vogt had the most liked content!


Personal Information

  • Company
    Werusys GmbH & Co. KG
  • Level of Seeq User
    Seeq Advanced

Recent Profile Visitors

3,552 profile views

Thorsten Vogt's Achievements

  1. Hello, you might want to check the following way: As you need to specify which is the first capsule you want to start with you need to define a bounding condition. In my example I use a monthly condition to do the calculation: Next I created a signal that puts the value 1 at the start of each capsule: $condition.removeLongerThan(40h).toSamples($c -> sample($c.startKey(), 1), 0s) This signal is used to build the running sum of these values: The calculated value can be used to extend the original condition with a property containing the capsule number during each month: $condition.removeLongerThan(1d).setProperty('Capsule Number', $count, startValue()) Then two new conditions can be created to include only capsules with odd and even capsule numbers: $conditionWithCount.keep($c -> ($c.property('Capsule Number')/2)-floor($c.property('Capsule Number')/2) > 0) $conditionWithCount.keep($c -> ($c.property('Capsule Number')/2)-floor($c.property('Capsule Number')/2) == 0) A composite condition can be used to join the odd and even ones: Hope this helps. Regards, Thorsten
  2. Hi Kevin, you can use the Formula tool to calculate the value. The function setUnits sets the unit of the resulting signal to m³. Regards, Thorsten
  3. Hi, you can do this by using splice(). The following example takes 10 as the default value and changes the part of the signal to 15 or 22 based on the value of the batch id. If the lot number you mentioned is a property of the capsule you imported you might need to convert it to a signal using toSignal() and the property name that is used to store the lot number: Or filter for capsules that contain the lot number using keep() on the condition: You can check your capsules for existing properties by having a look at the Capsules Pane. When clicking the "Add Column" icon you are able to choose the properties from the dropdownlist of available properties. The name of the property can be used in the functions mentioned above. Regards, Thorsten
  4. Hello Bill, if you do not have Data Lab than you can use the REST API of Seeq. I created an example using Powershell: $baseurl = "https://myseeqinstance" $headers = @{ "accept" = "application/vnd.seeq.v1+json" "Content-Type" = "application/vnd.seeq.v1+json" } $body = @{ "authProviderClass" = "Auth" "authProviderId" = "Seeq" "code" = $null "password" = "<password>" "state" = $null "username" = "<username>" } | ConvertTo-Json $url = $baseurl + "/api/auth/login" $response = Invoke-WebRequest -Method Post -Uri $url -Headers $headers -body $body $headers = @{ "accept" = "application/vnd.seeq.v1+json" "x-sq-auth" = $response.Headers.'x-sq-auth' } $url = $baseurl + "/api/users?sortOrder=email%20asc&offset=0&limit=200" $response = Invoke-RestMethod -Method Get -Uri $url -Headers $headers $selectedAttributes = $response.users | Select-Object -Property firstname, lastname, email $selectedAttributes | Export-Csv -Path "userlist.csv" -NoTypeInformation The script uses the /auth/login endpoint to authenticate the user and retrieves the list of users (limited to 200) using the /users endpoint. You would need to replace the value in the first line with the URL of your Seeq system (eg. https://mycompany.seeq.site) and specify the credentials by replacing <password> and <username> inside the script. The list of users will be written to the file userlist.csv inside the directory from which the powershell script is run. Let me know if this works for you. Regards, Thorsten
  5. Hi Brian, you can use the timesince() function for this: years('CET').timesince(1h, $uptime.inverse()) The example above creates a signal representing the running amount of hours for each year putting a sample every 1 hour. The last parameter specifies that periods where the uptime condition is not met are excluded from the calculation. In the follwowing screenshot you can see the signal is only increasing if a capsule for my uptime condition exists, otherwise the value does not change. Furthermore the value will be reset to 0 at January 1st every year: Does this answer your question? Regards, Thorsten
  6. Hi Dayyan, instead of months() you can use the periods() function: periods(6mo, 6mo, '2023-01-01', 'CET') The code above creates a capsules with a duration of 6 months every 6 months using the CET timezone. The timestamp specifies the origin that the capsules should be aligned to. Regards, Thorsten
  7. Hi Alex, maybe one workaround you could try is creating capsules for the discrete signal using $signal.tocapsules(). The capsules do not have duration, but will contain the value of the signal in a capsule property. Then export the Condition using OData and use the OData Capsule Summary Table Endpoint. I do not have Power BI, but when loading the data to Excel I can see the start of the capsule and the corresponding value. So this might be the information you can use. Regards, Thorsten
  8. Hello Bill, one way I can think of is using a little python script inside Seeq Data Lab: import seeq.sdk as sdk import pandas as pd user_api = sdk.UsersApi(spy.client) userlist = user_api.get_users() users = list() for user in userlist.users: users.append({"Username": user.username, "First Name": user.first_name, "Last Name": user.last_name, "Directory": user.datasource_name}) pd.DataFrame(users).to_excel("userlist.xlsx") You might need to run pip install openpyxl first and restart the kernel, if you get an error message that the package could not be found. The Excel file will appear in the rootfolder of your DataLab project and can be downloaded from there. I tested the script on R61, so I am not sure if you need to modify it a bit to get it working with R58. Regards, Thorsten
  9. Hi Jason, this might be due to uncertainty. You may have a look at this post: Regards, Thorsten
  10. Hi Swapnil, you can calculate the average for these periods using the runningAggregate function. I created the 12 hour periods with the following formula: periods(12h, 12h, '2023-01-01T08:00:00', 'CET') This condition is then used inside the aggregation of the signal: $signal.runningAggregate(average(), $periods) The result will be the average value of the signal that resets at the beginning of each capsule: I am not sure what you want to display in the table? Just the last value for the current period? Regards, Thorsten
  11. Hi Saha, from your example it seems you want to filter your signal for a specific value to create a condition. In general it is easier to do this using a Value Search. The syntax you want to use only works on conditions, but you are using it on a signal. Therefore you get the syntax error. Can you provide some more details on what you are trying to achieve? Regards, Thorsten
  12. When using condition() you need to specify a maximum capsule duration. 10d means 10 days. I could have shortened this to 1 day in my example, as the capsule only captures the 19th of August. Regards, Thorsten
  13. Hi Jason, you need to specify the date in an ISO 8601 format, then it should work. In the following example I am creating a condition with one capsule from Aug 19th to Aug 20th using UTC+2 timezone: condition(10d, capsule('2023-08-19T00:00:00+02:00', '2023-08-20T00:00:00+02:00')) Regards, Thorsten
  14. Hi Pat, I think "$condition" in the formula is the parameter you are searching for: In Data Lab you should be able to access it via the "Formula Parmeters" column of the data frame: Regards, Thorsten
  15. Hi Tyler, you can change this by clicking the Headers-Button that allows you to adjust the Date Format token: A reference of available tokens can be reached by clicking the ?-Icon, which redirects to https://momentjs.com/docs/#/displaying/. On that page you see the tokens with examples: Regards, Thorsten
  • Create New...