Jump to content
  • To Search the Seeq Knowledgebase:

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

Search the Community

Showing results for tags 'histogram'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Technical Forums
    • Tips & Tricks
    • General Seeq Discussions
    • Seeq Data Lab
    • Seeq Developer Club
    • Seeq Admin Forum
    • Feature Requests

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


Company


Title


Level of Seeq User

Found 16 results

  1. When I select time as aggregation type, it seems that the time zone in histogram is not the same as the time zone I used in the normal trend view. It seems that time zone in the histogram has a default value. But there is no way that I can know. For example, I had some discrete signal, I want sum them by day, I use two methods, signal from condition and histogram. But I can not get them follow each other. I even filter the signal to have it only to show a value a day. And found the aggregate from the histogram offsets. I think it is time zone setting that caused this problem. But I can't change the time zone in the histogram. Is there a way to do it? For instance, as below picture shows, Nov 14th, the signal has only a sample value 9708.1s(blue bar), the signal from condition gives the right summation(yellow bar) at the correct time Nov 14. But histogram gives the right value but on the different day 13th. Even some time it can't provide the correct value.
  2. I need to accomplish following things: - Bin the x-axis - Span the y-axis for each bin (max-min) - Filter outliers based on quantiles - Finally I would want to fit some polynomial curve based on max and min values of the span (join the mid values in each bin) But I cant find appropriate way to do it
  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. 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
  5. There are times when we'd like to view histograms in a monthly view ordered chronologically by the starting month in the display range. This post reviews the results of 3 different methods of utilizing Histogram vs Signal from Condition. All 3 examples show the same results but differ in how the results are displayed. Example 1: This method displays histograms by order of Month, thus, January will show first with December showing last, even though the display range is set from 7/26/2017 - 7/26/2018. As a result, we are not always looking at data in chronological order with this method. Simply goto your Histogram tool, select your signal/condition & statistic, then select Time as aggregation type --> Month of Year. Continue to Execute. Example 2: This method will ensure your Histogram is in chronological order, first ordered by year, then by month. The caveat to this is the spacing of all bars in the display window is not held constant (a gap between years will be observed). Go back to the Histogram tool, select your signal/condition & statistic, then select Time as aggregation type --> Year. After this, select Add grouping. Again, select Time as aggregation type --> Month of Year. Continue to Execute. The color gradient can be changed by changing the main color in the histogram. Individual bar colors can also be changed by clicking the respective color box in the legend (top right of histogram). Example 3: This method will produce equally spaced bars in chronological order with no color gradient. To achieve this, we will use Signal from Condition. First, we need to create our condition. Because we are interested in a Monthly view, we can navigate to our Periodic Condition tool under Identify; Duration-->Monthly (All). Timezone can be specified and any shifts to the resulting capsules can be applied under Advanced. Now that we have our condition, we can proceed to our Signal from Condition tool under Quantify. As with the other examples, select your signal/condition & statistic. The bounding condition will be the Monthly condition we just created. For this use case, we will want our timestamp to be at the start of each capsule (month), and the interpolation method to be Discrete so that bars will be the resulting output. The output may have skinny bars and non-ideal axis min/max. This can be adjusted by clicking Customize in the Details pane. For this example, I used a width of 50, and axis min/max of 0/1.25.
  6. 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.
  7. While Seeq is working towards enhancing our features in the Histogram tool, here are a simple workaround commonly used to create a histogram for multiple signals with display times in chronological order. Step 1: Start by loading all of the signals we want to include in the matrix into the display. Step 2: Create a monthly condition with a property that split the years and months (YYYY-MM) from the initial date format (YYYY-MM-DDT00:00:00Z) using the formula tool. Formula 1 - month_withProperty $monthly = months("Asia/Kuala_Lumpur") //split the years and month of the data $monthly .move(8hrs) //move based on specific timezone example the timezone used here is UTC+8 .transform($capsule -> $capsule.setProperty('month_year',$capsule.property('start').tostring().replace('/(.*)(-..T.*)/','$1'))) Step 3: Combine the aggregate calculation for the multiple signals in a formula. Formula 2 -combine the aggregate calculations, example here is based on average. //Step 1: calculate monthly average for each signals $monthlyaverageA = $t1.aggregate(average(),$month_withProperty, startKey(),0s) $monthlyaverageB = $t2.aggregate(average(),$month_withProperty, startKey(),0s) $monthlyaverageC = $t3.aggregate(average(),$month_withProperty, startKey(),0s) //Step2: combine all the discrete points and move each signal by 1,2 and 3 hours to have different time stamp. Please refer combinewith() formula documentation. combinewith( $monthlyaverageA.move(1hr), $monthlyaverageB.move(2hr), $monthlyaverageC.move(3hr)) Step 4 : Create condition for each average temperature signals and use setProperty() function to set the naming for each signal. //Step 1: calculate monthly average for each signals $monthlyaverageA = $t1.aggregate(average(), $month_withProperty, startKey(),0s) $monthlyaverageB = $t2.aggregate(average(), $month_withProperty, startKey(),0s) $monthlyaverageC = $t3.aggregate(average(), $month_withProperty, startKey(),0s) //Step2: combine all and create condition for each discrete points and set the property accordingly. combinewith( $monthlyaverageA.move(1hr).toCapsules().setProperty('Mode','Area A'), $monthlyaverageB.move(2hr).toCapsules().setProperty('Mode','Area B'), $monthlyaverageC.move(3hr).toCapsules().setProperty('Mode','Area C')) Step 5: Create the histogram as shown in the screenshot below. The colour for each signal can be changed by selecting the legend box on the top right side of the histogram. For users who would like to split the quarter_year or year_week, please refer to the formula below. Formula to split quarter_year $quarter = quarters(Month.January, 1, "Asia/Kuala_Lumpur") $quarter.move(8hrs)//move based on specific timezone, example used here is UTC+8 .transform($cap -> { $year = $cap.startKey().toString().replace('/-.*/','') $quart = $cap.property('Quarter').toString() $cap.setproperty('Quart',$year+' '+'Q'+$quart)}) Formula to split year_week //Set up formula for $week_counter = (timesince(years("UTC"),1wk)+1).round() //The aim is to add '0' in front of single digit number so that the sequence in histogram 01, 02,....10, $weekLessThan10 = $week_counter < 10 $signal1 = $week_counter.toString() $signal2 = toString('0').toSignal() + $signal1 $new_week_counter = $signal1.splice($signal2,$weekLessThan10 ) $weekly_capsule_embedded_property = $new_week_counter.toCondition() //Setting the year and week property //$year - the function here meant to extract the year //$week - the embedded Value is XX.0wk - remove the .0wk //set new property of year_week $weekly_capsule_embedded_property.removeLongerThan(8d).transform($cap -> { $year = $cap.startKey().toString().replace('/-.*/','') $week = $cap.property('Value').toString().replace('/\wk/','') $cap.setproperty('Year_Week',$year+' '+'W'+$week)}) You can also check this post to create histogram with hourly bins.
  8. 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)
  9. 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.
  10. 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
  11. 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?
  12. Overview: This example explores two methods for assessing equipment operating conditions per unit of time (i.e. total operating hours per week in this example) using the Signal from Condition tool and Histogram. The Signal from Condition approach creates a new signal using an equation or statistical function. The Histogram approach transforms a signal into a "value" domain, plotting the distribution of values over a period of time. 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. Workflow: 1. Add 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. 4. Create a new signal Compressor Run Hours Per Week using Signal from Condition Tool. 5. Customize the Signal from Condition as a Bar Graph -- click the Customize button in the Details Pane and select the Bar Chart Icon under the Samples column. Each bar represents the total operating hours of the compressor each week. 6. Histogram Aggregated by Calendar Week- 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). Content Verified DEC2023
  13. 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 post: A Guide to Working with Capsule Properties $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 Content Verified DEC2023
  14. 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
  15. Hi Seeq- Is there a way to create a histogram with variable size bins?
×
×
  • Create New...