Jump to content
  • To Search the Seeq Knowledgebase:

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

Search the Community

Showing results for tags 'histogram'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Technical Forums
    • General Seeq Discussions
    • Seeq Admin Forum
    • Training Resources
    • Product Suggestions
    • Seeq Data Lab
  • Community News
    • Seeq Blog Posts
    • News Articles
    • Press Releases
    • Upcoming Events

Categories

  • Seeq FAQs
  • Online Manual
    • General Information

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Company


Title


Level of Seeq User

Found 14 results

  1. I would like to have the value to show directly on top of my histogram, doesn't seem to be able to do so with the current function. Any advice?
  2. Background: A property can be added to capsules for further filtering and aggregation through Seeq tools, including Histogram. All properties on a condition are stored as string values. This post examines how to add a property to a condition and then how those properties may be used. Adding Properties to a Condition Capsule properties may be used to store important information such as, Product Codes, Batch IDs, and Recipes. There are three functions in Seeq Formula which can add properties to the capsules in a condition: toCondition() - Dedicated function to transform a signal into a condition which contains a capsule for each value change in the input signal. The value of the signal is stored as a property of the capsule toCapsules() - Dedicated function to transform a signal into a condition which contains a capsule for each valid sample in the input signal. The value of the signal is stored as a property of the capsule. setProperty() - Flexible function which is used to assign properties to each capsule in a condition. It is most commonly used in SQL queries to attach transactional information from a data source to a capsule in a condition. toCondition() This function creates a capsule for every value change in a signal. This may be useful on a Batch ID signal or operating mode signal. The toCondition() function creates a new capsule for each value change and automatically assigns the signal value to a capsule property called 'Value'. Using the toCondition() operator on the Compressor Stage example data creates a capsule for each distinct value in the signal. The following image shows the condition created from performing toCondition() on the Compressor Stage Example Data. A capsule is created for each distinct value in the signal. This property may be viewed by adding the Value property to the Capsules Pane. The .toCapsules() operator works similiarly, but instead creates a new condition with a capsule for each sample point (regardless of whether the value has changed). setProperties() This flexible function is used to assign properties to a condition. Users must assign both a property name and value. The following syntax is an example of how the .setProperties() operator can be used in Formula to assign properties to the capsules in a condition. This example assigns a property of "Batch" with a value of '23' to each capsule in a condition. $condition.transform($capsule-> $capsule.setProperty('Batch',23)) In the next example, a High Power condition was created using Value Search tool (power >25). The following syntax can be used to assign a property called "averagePower" to each capsule in the High Power condition. The value of this property is calculated as the average Compressor Power during each High Power condition. Executing this Formula results in a new condition that contains the averagePower property for each capsule. Using Condition Properties Condition properties can be used in different ways, such as to filter the capsules in a Condition or to aggregate the data in Histogram Condition Filtering Capsule properties can be displayed in the Capsule Pane by adding a column to the table. These property columns may also be sorted in ascending or descending order. Once capsules within a condition have properties assigned, the filter() operator may be used in Formula to create new conditions containing only a subset of the original capsules. For example, the following syntax generates a new condition that only has the capsules where the Value property is equal to OFF. $condition.filter($capsule-> $capsule.getProperty('Value').isEqualTo('OFF')) Histogram Within the Histogram tool, users can select Condition as the aggregation type to create bins using capsule properties. The following example creates a Histogram based upon the Value property in the toCondition() condition. The output is a Histogram with a count of the number of capsules with a Value equal to each of the four stages of operation:
  3. Users are often interested in creating pareto charts using conditions they've created in Seeq sorted by a particular capsule property. The chart below was created using the Histogram tool in Seeq Workbench. For more information on how to create Histograms that look like this, check out this article on creating and using capsule properties. Often times users would like to see the histogram above, but with the bars sorted from largest to smallest in a traditional pareto chart. Users can easily create paretos from Seeq conditions using Seeq Data Lab. A preview of the chart that we can create is: The full Jupyter Notebook documentation of this workflow (including output) can be found in the attached pdf file. If you're unable to download the PDF, the code snippets below can be run in Seeq Data Lab to produce the chart above. #Import relevant libraries from seeq import spy import pandas as pd import numpy as np import matplotlib import matplotlib.pyplot as plt Log in to the SPY module if running locally using spy.login, or skip this step if running Seeq Data Lab. #Search for your condition that has capsule properties using spy.search #Use the 'scoped to' argument to search for items only in a particular workbook. If the item is global, no 'scoped to' argument is necessary condition = spy.search({ "Name": "Production Loss Events (with Capsule Properties)", "Scoped To": "9E50F449-A6A1-4BCB-830A-8D0878C8C925", }) condition #pull the data from the time frame of interest using spy.pull into a Pandas dataframe called 'my_data' my_data = spy.pull(condition, start='2019-01-15 12:00AM', end='2019-07-15 12:00AM', header='Name',grid=None) #remove columns from the my_data dataframe that will not be used in creation of the pareto/CDF my_data = my_data.drop(['Condition','Capsule Is Uncertain','Source Unique Id'], axis=1, inplace=False) #Calculate a new dataframe column named 'Duration' by subtracting the capsule start from the capsule end time my_data['Duration'] = my_data['Capsule End']-my_data['Capsule Start'] #Group the dataframe by reason code my_data_by_reason_code = my_data.groupby('Reason Code') #check out what the new data frame grouped by reason code looks like my_data_by_reason_code.head() #sum total time broken down by reason code and sort from greatest to least total_time_by_reason_code['Total_Time_by_Reason_Code'] = my_data_by_reason_code['Duration'].sum().sort_values(ascending=False) total_time_by_reason_code['Total_Time_by_Reason_Code'] = total_time_by_reason_code['Total_Time_by_Reason_Code'].rename('Total_Time_by_Reason_Code') total_time_by_reason_code['Total_Time_by_Reason_Code'] #plot pareto of total time by reason code total_time_by_reason_code['Total_Time_by_Reason_Code'].plot(kind='bar') #Calculate the total time from all reason codes total_time = total_time_by_reason_code['Total_Time_by_Reason_Code'].sum() total_time #calculate percentatge of total time from each individual reason code percent_time_by_reason_code['Percent_Time_by_Reason_Code'] = total_time_by_reason_code['Total_Time_by_Reason_Code'].divide(total_time) percent_time_by_reason_code['Percent_Time_by_Reason_Code'] #Calculate cumulative sum of percentage of time for each reason code cum_percent_time_by_reason_code['Cum_Percent_Time_by_Reason_Code'] = percent_time_by_reason_code['Percent_Time_by_Reason_Code'].cumsum() cum_percent_time_by_reason_code['Cum_Percent_Time_by_Reason_Code'] = cum_percent_time_by_reason_code['Cum_Percent_Time_by_Reason_Code'].rename('Cum_Percent_Time_by_Reason_Code') cum_percent_time_by_reason_code['Cum_Percent_Time_by_Reason_Code'] #plot cumulative distribution function of time spent by reason code cum_percent_time_by_reason_code['Cum_Percent_Time_by_Reason_Code'].plot(linestyle='-', linewidth=3,marker='o',markersize=15, color='b') #convert time units on total time by reason code column from default (nanoseconds) to hours total_time_by_reason_code['Total_Time_by_Reason_Code'] = total_time_by_reason_code['Total_Time_by_Reason_Code'].dt.total_seconds()/(60*60) #build dataframe for final overlaid chart df_for_chart = pd.concat([total_time_by_reason_code['Total_Time_by_Reason_Code'], cum_percent_time_by_reason_code['Cum_Percent_Time_by_Reason_Code']], axis=1) df_for_chart #create figure with overlaid Pareto + CDF plt.figure(figsize=(20,12)) ax = df_for_chart['Total_Time_by_Reason_Code'].plot(kind='bar',ylim=(0,800),style='ggplot',fontsize=12) ax.set_ylabel('Total Hours by Reason Code',fontsize=14) ax.set_title('Downtime Reason Code Pareto',fontsize=16) ax2 = df_for_chart['Cum_Percent_Time_by_Reason_Code'].plot(secondary_y=['Cum_Percent_Time_by_Reason_Code'],linestyle='-', linewidth=3,marker='o',markersize=15, color='b') ax2.set_ylabel('Cumulative Frequency',fontsize=14) plt.show()
  4. FAQ: We have various conditions that are calculated from signals on a variety of different equipment and assets. We would like to view them in a histogram that is broken out by month, and for each month each asset has a separate bar in the histogram. Example Solution: 1. For three signals, we want to create a histogram that is the total time per month spent above some threshold. In this example, each signal is associated with a different cooling tower Area. 2. We have a condition for when each signal is above it's threshold value. These conditions were created using the value search tool. 3. The three conditions can be combined into a single condition (here it is called "Combined In High Mode w Area as Property"). In the formula tool, before combining the conditions, we assign each condition a property called 'Area' and set the value as that particular asset area. Once the properties are set we use the combineWith() function to combine them into one final signal. The formula syntax below will achieve this: //Create a new condition for each original condition that has a property of 'Area'. $A=$AHigh.setProperty('Area','Area A') $G=$GHigh.setProperty('Area','Area G') $I=$IHigh.setProperty('Area','Area I') //Combine the new conditions created into a new condition with all of the high power modes where each capsule //has a property of 'Area' that describes the signal that was searched to identify that original condition. combineWith($A,$G,$I) ***Note: the combineWith() function in Seeq Formula is required here because it will retain capsule properties of individual conditions when combining them. Using union() or any other composite condition type logic will NOT retain the capsule properties of the individual condition.*** 4. Use the Histogram tool and the multiple grouping functionalities to aggregate over both time, and the capsule property of 'Area'. Final Result: (remove other items from the details pane to view just the histogram)
  5. I have several histograms set up to evaluate our process performance based on product criteria. It works great, except for two things... Is there a way I can hide histograms like I can with signals and conditions? I want 14 histograms in my analysis, but with them all displayed at once, it's impossible to see the data. Secondly, is there a way to export the histogram data to Excel (or anything Excel can manage)? Right now I am trying to mouse over each bin result and record it, but that is very time consuming.
  6. FAQ: I've got a signal for which the average and standard deviation are believed to be drifting over time. When I view the average and standard deviation in calendar time, it isn't helpful because they are highly dependent upon the production grade that I am running. Is there a better way that I could be viewing my data to get a sense of the drift of the average and standard deviation by production grade over time? Solution 1: Histogram 1. Add your signal of interest and your production grade code signal to the display. 2. Create a condition for all production grades using formula: $gradeCode.toCondition() 3. Use the Histogram tool to calculate the average reactor temperature during each grade campaign and display them aggregated over production grade, and time. The same methods from step 3 can be applied to get a second histogram of the distribution of the standard deviation of the signal of interest by grade over time. Solution 2: Chain View 1. Add your signal of interest and your operating state signal to the display. 2. Use Formula to create a condition for all operating states: $stateSignal.toCondition() 3. Use the Signal from Condition tool to calculate the average temperature over the all operating states condition. 4. Use the Signal from Condition tool to calculate the standard deviation of temperature over the all operating states condition. 5. Use Formula to calculate two new signals for “Avg + 2 SD” and “Avg – 2 SD”. 6. Filter your all operating states condition for only the state that you are interested in viewing. In this example we want to view only the capsules during which the compressor is in stage 2, for which the syntax is: $AllOperatingStates.removeLongerThan(7d).removeShorterThan(4h).filter($capsule -> $capsule.getProperty('Value').isEqualTo('STAGE 2')) This formula is taking our condition for all operating states, keeping only capsules that are between 4h and 7d in length, then filtering those capsules to include only those for which the value is equal to stage 2. 7. Swap to chain view and view a longer time range.
  7. Hi All, I've got few Scaler values in my data-set (E.g High,On,OFF) , I have convert all of them into Capsule by toCapsule() Function. Now wanted to remove only those capsules which are having "OFF" Status. Regards, Jitesh Vachheta
  8. 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?
  9. Overview: This technique example explores two methods for assessing equipment operating conditions per unit of time (i.e. total operating hours per week in this example) using Signal from Conditions (Presented as a Bar Graph) and Histogram. The Signal from Condition approach transforms a condition into a new signal using an equation or statistical function (in this case we will use an equation and the “TotalDuration” function). The approach using the Histogram tool allows transforming a signal into a "value" domain. For example, for a given segment of time, plot the distribution of values. For these examples, we will use “Compressor Power (Area A)” from the Seeq demo data and asset framework, which has routine ON/OFF operating cycles. The objective in this example is to create Derived Data signals to indicate when a compressor is running and calculate operating hours per week. The signals are then presented in two formats - bar graph and histogram. Applications: Similar types of duration analysis of signals from conditions can add value for Seeq users in comparative analysis for batch processes, calculating and monitoring equipment operating hours and tracking target operating envelope deviations. Workflow: 1. Add target signal --Find and add the target signal. In this analysis we will use Compressor Power (Area A) 2. Complete a Value Search to determine when the equipment is running. In this example, I searched the compressor power signal for when it is above 5 kW which indicates it is running. 3. Using Periodic Condition, create a Weekly Signal. This will be used in our Signal from condition Calculation 4. Create a Signal from Condition. Create a new signal Compressor Run Hours Per Week using Signal from Condition Tool. 5. Plot the Signal from Condition as a Bar Graph -- in order to show the derived signal for Compressor Run Hours Per Week as a bar graph, simply click the Customize button in the Details Pane and select the Bar Chart Icon under the Samples column. The result is shown below. Each bar represents the total operating hours of the compressor each week. 6. Histogram Aggregated by Calendar Week- The Histogram Tool can also be used to generate a similar graphical analysis for Compressor Run Hours per Week. However, this tool is currently applicable for performing statistical functions on signals. In this example, we have created a Histogram, Avg Compressor Run Hours per Week, which calculates the average value of the derived-signal, Compressor Run Hours per Week, aggregated by calendar week (Week of Year). The Bar Graph and Histogram are shown on the same display below.
  10. Issues with different devices can lead to shutdowns and failures. In this example we want to monitor the duration of each operation mode of an input signal. This example can be used to monitor all the conditions that can lead to inefficient device performance. In order to monitor all operation modes we need to, 1. Create all the modes using Value Search Tool. a. StartUp (input < 75) b. ShutDown (input > 95) c. SteadyState (75 < input < 95) 2. Create a continuous condition called “Mode” comprising all three (startup, steady state, shutdown), and assign a property to each capsule to identify the mode. for more information please look at the following link: Set property to a capsule $ShutDown = $Shutdown.setProperty("Mode", "ShutDown") $StartUp = $Start.setProperty("Mode", "StartUp") $steady = $Steady.setProperty("Mode", "Steady") combineWIth($StartUp, $steady, $ShutDown) 3. Finally, calculate the total time per mode using Histogram Tool. For more information on Histogram Tool please see the following link: Histogram Tool
  11. The histogram tool when aggregated over time can cause some confusion as to what hours of the day the values of the bins reflect. The bin labels that are generated by Seeq reflect the hour of the day beginning at midnight. So for example, 0 = midnight, 2 = 2 AM, 14 = 2 PM, etc. When the display range interval is set to one day beginning at midnight, the histogram bins line up with the signal value quite nicely (see attached screenshot 2). When the display range is not set to begin at midnight, or is set to multiple days, the histogram bins may not appear to line up with the process data (see attached screenshot 1), but the distribution that they reflect is correct for the day(s) in the display range. histogram tool discussion - screenshot 1.pdf histogram tool discussion - screenshot 2.pdf
  12. Hi Seeq- Is there a way to create a histogram with variable size bins?
  13. Hi, I have a strange issue when aggregating data in a histogram. I am counting the number of samples for a signal and aggregate by first using "Year" and the using "Day of the Week" as the aggregation type: This gives me the following histogram with a count of 246 samples for monday in 2012: But these data should belong to sunday. I set up another histogram using the following condition as the second aggregation type: The result now looks like this (which is correct): This is for the other days as well. Is there any way to get around this issue? Installed Seeq version is R21.0.40.01-v201812312325 Regards, Thorsten
  14. Hello - I've searched but not found - this seems, to me at least, an abvious question but I can find no way to do it. In the example below (existing_traces.png) I have three traces - If I want to edit e.g. the histogram (number of buckets etc.) I can't see a way of going back to the screen i used to create it in the first place (original_histogram_window.png). If I click on the (i) in the details tab I then see all the underlying code under item properties (properties_pane.png) but what I want to get to is the original screeen of "Overview >>Historgram" where I can change the number of boxes etc. The only way I can see to do it is to delete the historgam and start again - this seems a long way round. Intuitively I would expect to be be able to "right click" or "long click" on the historgram and get a context sensitive menu to get to the overview>>histogram page Am I missing somthing obvious?
×
×
  • Create New...