This article covers the following topics:
- Introduction
- General
- Rows and Columns
- Table Meta-Items
- Calculation Columns
- Calculation Rows
- Table Calculations
- Table Widgets
Introduction
Numeric tables are used to perform calculations on various cells in a table or meta-items associated with that table. Numeric tables provide the look and feel similar to a spreadsheet in new QA and reports but provide the ability to perform more complex mathematical operations and logic. For an idea of the scope, visit https://mathjs.org/docs/reference/functions.html. Below is an example as it would appear in new QA:
Grey cells contain meta-items or calculations. For any cell with a calculation, hovering over it will display the equation.
Calculations should follow the math.js library expression syntax. Documentation for the math.js library may be found at https://mathjs.org/docs/expressions/syntax.html.
Baselines and tolerances may be set on any calculation. If a table is being created that does not include any calculations, a numeric custom test with child tests should be used instead. A numeric table without calculations will not be saved.
To create a custom numeric table, Navigate to Manage - Custom Tests, expand the section and subsection where the table will be added, and click the Add Numeric Table button. The following options are also available for each numeric table:
- Manage - allows editing of the numeric table.
- Preview - displays a preview of the table as it might appear in a schedule.
- Move/Copy - allows moving or copying the numeric test to a different section on the Custom Tests page.
- Hide - hides the table so that it is not visible unless the Display Hidden Tests is set to On. This is useful for tables that are no longer used but cannot be deleted because they are associated with data.
- Delete - allows a table with no associated data to be deleted.
Once created the numeric table may be dragged to change the order of tests in the section.
Once a numeric table is created, it may be selected when creating or modifying a template.
General
The table name is the name that will appear in new QA and reports. It should be unique name that describes the table.
The description will be shown below the table name in new QA and reports. Rich text, images, and links may be used to provide detail instructions to perform any measurements and complete the table.
Rows and Columns
Select the number of rows needed. For example, you might have as many rows as energies used on a specific machine.
Next select the number of columns. Generally columns correspond to the number of readings taken. Any columns for calculations will be added later.
Each reading may be given a specific name which will be shown as the column label. If no name is selected the column label will use the default. For example, the first reading is named Reading 1.
If a unit should be used enter the units. The units will be displayed in the new QA and final report.
Row meta-items are used to describe the readings in a row and may be used in calculations. There are four types of meta-item supported:
- Numeric - any numeric value may be entered. Numeric entries may be used in calculations.
- List - any value my be entered. List meta-items are not used in calculations. Use the + Add option button to add another item to the list.
- Text - any text may be entered. Text meta-items are not used in calculations.
- Lookup List - any value my be entered for the label. The value in Value may be used in calculations. Use the + Add option button to add another pairs to the lookup list.
Each meta-item must have a name which will be used for the column label. Optionally, units may be entered and will be displayed in the new QA and final report. The UID is the variable name used in calculations for each meta-item and is not shown in new QA or reports.
To add an additional meta-item, click the + Add row meta-item button. To remove a meta-item, click the x on the far right.
Table Meta-Items
Table meta-items are used to describe the overall table and may be used in calculations.
There are four types of meta-item supported:
- Numeric - any numeric value may be entered. Numeric entries may be used in calculations.
- List - any value my be entered. The value may be used in calculations. If the entry includes text only string operations may be performed in calculations. Use the + Add option button to add another item to the list.
- Text - any text may be entered. Text meta-items are not used in calculations.
- Lookup List - any value my be entered for the label. Value may be used in calculations. If the entry includes text only string operations may be performed in calculations. Use the + Add option button to add another pairs to the lookup list.
Each meta-item must have a name which will be used for the column label. Optionally, units may be entered and will be displayed in the new QA and final report. The UID is the variable name used in calculations for each meta-item and is not shown in new QA or reports.
To add an additional meta-item, click the + Add table meta-item button. To remove a meta-item, click the x on the far right.
Calculation Columns
The calculation columns section is used to create calculations for each row. When a calculation column is added it applies to all rows. Calculation columns are added to the right of the measurements.
Each calculation column must have a type of calculation and a name which will be used for the column label. Optionally, units may be entered and will be displayed in the new QA and final report. The UID is the variable name used in calculations for each meta-item and is not shown in new QA or reports.
If a calculation should not be shown on new QA or the reports, click the Hide box. This is typically used for interim calculations that are used in multiple places.
To add an additional column calculation, click the + Add Column Calculation button. To remove a column calculation, click the x on the far right.
Built-in Calculations
Built-in calculations will operate on all readings in the row. Available calculations are:
- Abs. Min
- Abs. Max
- Average
- Difference
- Division
- Magnitude
- Maximum
- Median
- Minimum
- Product
- Standard Deviation (Population)
- Standard Deviation (Sample)
- Sum
- Sum Square
Specifics for each function may be found at https://mathjs.org/docs/reference/functions.html. For functions not listed in the list above, a custom calculations will need to be used.
Custom Calculations
Custom calculations allow calculations to be created that operate on row meta-items, table meta-items, Ctp, source activity, and any other column calculation in the row that comes before it. In the example below, the only row calculation available to e1 is e0.
Functions, numbers, operators, meta-items, Ctp, temperature, pressure, source activity, readings, and any prior row calculations may be added at the click of a button. The calculation may also be typed in manually.
The calculation may include comments (preceded with a #), multiple rows, variables, and ternary operators.
Operands from the table are numbered starting with 0 and are designated as follows:
- r - reading
- m - row meta-item
- t - table meta-item
- e - equation or calculation
- temp - temperature from the Ctp widget
- pres - pressure from the Ctp widget
- ctp - temperature and pressure correction from the Ctp widget
- csa - calculated source activity from the Source Activity widget
Before the equation may be submitted, it must first be validated.
If the equation cannot be validated, an informative error will be displayed.
Custom Calculations by Row
Custom calculations by row allow calculations to be created that operate on row meta-items, table meta-items, Ctp, source activity, and any other column calculation regardless of where it is in the table.
To create a custom calculation, click + Add Calculation Column, select --Custom By Row-- from the Type column, and click the Edit button. An Equation Builder popup window will appear.
Functions, numbers, operators, meta-items, Ctp, temperature, pressure, source activity, readings, and any row calculations may be added at the click of a button. The calculation may also be typed in manually.
The calculation may include comments (preceded with a #), multiple rows, variables, and ternary operators.
Operands from the table are numbered starting with 0 and are designated as follows:
- r - reading
- m - row meta-item
- t - table meta-item
- e - equation or calculation
- temp - temperature from the Ctp widget
- pres - pressure from the Ctp widget
- ctp - temperature and pressure correction from the Ctp widget
- csa - calculated source activity from the Source Activity widget
Before the equation may be submitted, it must first be validated.
If the equation cannot be validated, an informative error will be displayed.
Calculation Rows
The calculation rows section is used to create calculations for each readings row. Calculation rows are added to the bottom of the measurement columns.
Each calculation must have a type of calculation and a name which will be used for the label. Optionally, units may be entered and will be displayed in the new QA and final report. The UID is the variable name used in calculations for each meta-item and is not shown in new QA or reports.
If a calculation should not be shown on new QA or the reports, click the Hide box. This is typically used for interim calculations that are used in multiple places.
To add an additional row calculation, click the + Add Calculation row button. To remove a row calculation, click the x on the far right.
Built-in Calculations
Built-in calculations will operate on all readings in a column. Available calculations are:
- Abs. Min
- Abs. Max
- Average
- Difference
- Division
- Magnitude
- Maximum
- Median
- Minimum
- Product
- Standard Deviation (Population)
- Standard Deviation (Sample)
- Sum
- Sum Square
Specifics for each function may be found at https://mathjs.org/docs/reference/functions.html. For functions not listed in the list above, a custom calculations will need to be used.
Custom Calculations
Custom calculations allow calculations to be created that operate on all columns of readings, table meta-items, Ctp, and source activity.
To create a custom calculation, click + Add Calculation Column, select --Custom-- from the Type column, and click the Edit button. An Equation Builder popup window will appear.
While only the first column of readings is shown, the calculation will be applied to all reading columns.
Functions, numbers, operators, meta-items, Ctp, temperature, pressure, source activity, readings, and any row calculations may be added at the click of a button. The calculation may also be typed in manually.
The calculation may include comments (preceded with a #), multiple rows, variables, and ternary operators.
Operands from the table are numbered starting with 0 and are designated as follows:
- r - reading
- m - row meta-item
- t - table meta-item
- e - equation or calculation
- temp - temperature from the Ctp widget
- pres - pressure from the Ctp widget
- ctp - temperature and pressure correction from the Ctp widget
- csa - calculated source activity from the Source Activity widget
Before the equation may be submitted, it must first be validated.
If the equation cannot be validated, an informative error will be displayed.
Table Calculations
The table calculation section is used to create calculations that can act on the entire table. When a calculation column is added it applies to all rows. Table calculations at the bottom of the table. In the example below, the table calculations are the four Ratios at the bottom of the table.
Each calculation column must have a type of calculation and a name which will be used for the label. Optionally, units may be entered and will be displayed in the new QA and final report. The UID is the variable name used in calculations for each meta-item and is not shown in new QA or reports. The Cells column is used to select specific cells for the built in calculations.
If a calculation should not be shown on new QA or the reports, click the Hide box. This is typically used for interim calculations that are used in multiple places.
To add an additional calculation, click the + Add Table Calculation button. To remove a table calculation, click the x on the far right.
Built-in Calculations
Built-in calculations will operate on all readings in a column. Available calculations are:
- Abs. Min
- Abs. Max
- Average
- Difference
- Division
- Magnitude
- Maximum
- Median
- Minimum
- Product
- Standard Deviation (Population)
- Standard Deviation (Sample)
- Sum
- Sum Square
Specifics for each function may be found at https://mathjs.org/docs/reference/functions.html. For functions not listed in the list above, a custom calculations will need to be used.
Unlike column or row calculations, the range of cells acted on by the calculation is not predetermined. The cells must be selected individually. Any row meta-item, reading, column calculation, or row calculation may be chosen. As individual cells are selected by clicking on them, they will turn green. The table below shows the color coding for the Cells field.
Type | Color |
Row Meta-Item | black |
Reading | white |
Column or Row Calculation | gray |
Selected Cells | green |
Custom Calculations
Custom calculations for table calculations allow calculations to be created that operate on table meta-items, Ctp, source activity, row meta-items, readings, column calculations, row calculations, and table calculations. To create a custom calculation select --Custom-- from type drop down and click the Edit button.
The following screen will be displayed:
Functions, numbers, operators, meta-items, Ctp, temperature, pressure, source activity, readings, column calculations, row calculations, and any prior table calculations may be added at the click of a button. The calculation may also be typed in manually.
The calculation may include comments (preceded with a #), multiple rows, variables, and ternary operators.
Operands from the table are numbered starting with 0 and are designated as follows:
- r - reading
- m - row meta-item
- t - table meta-item
- e - equation or calculation
- temp - temperature from the Ctp widget
- pres - pressure from the Ctp widget
- ctp - temperature and pressure correction from the Ctp widget
- csa - calculated source activity from the Source Activity widget
Before the equation may be submitted, it must first be validated.
If the equation cannot be validated, an informative error will be displayed.
Table Widgets
There are additional widgets that may be added for special functions such at temperature and pressure correction or source activity.
Ctp
The Ctp widget allows users to enter the temperature and pressure in new QA and it will automatically calculate the correction factor.
When using a custom calculation, the calculation will have access to the temperature, the pressure, and Ctp the correction factor. When building out the test, the account wide default pressure units and pressure will be used. Once the numeric table is assigned to a schedule, the numeric table will use any site specific settings if they have been set under Manage Sites and Machines, otherwise they will use the the account wide default.
To add the widget to a numeric table, tick the checkbox.
Source Activity
The source activity widget allows automatic calculation of a source's activity for a given date and time. The source activity widget will automatically use the radioactive source associated with the machine the schedule created under. Decay rate and other characteristics of the of source are defined under Manage Radioactive Sources.
The widget will use the time and date the new QA was opened by default but the time and date may be changed. To change the date and time click the lock icon and enter the new date and time.
To add the source activity widget to a numeric table, tick the checkbox.
Comments
0 comments
Please sign in to leave a comment.