Data Correction Tool

Introduction

The Data Correction Tool allows you to apply one-off corrections to a selection of existing CPT data in your gINT Project. The two fundamental correction types are the application of a formula (Correction), and shifting a record up or down by a relative number of units, such as metres (Offset).

Each correction is defined as a "Formula" and can either be an Offset or a Correction. The correction can be applied to any field from the CPT_DATA table, including Depth. However, if you are correcting Depth, you must ensure that the correction will not result in duplicate depth values for a given CPT.

The Formulas stored in the library are executed first, in the order they are listed in the grid, followed by the Formulas in the project, in the order they are listed in the grid. If you wish to apply an offset and a correction to one particular field, then you must create two Formulas, one for the offset and the correction, and ensure they are listed in the desired order.

To launch the Data Correction Tool, select INPUT | Add-Ins > Datgel CPT Tool > Data Correction Tool.

You should see a window similar to the following.

Formula Toolbar

Hovering the mouse cursor over each item will show a tooltip with a short description of the item.

Name

Icon/Image

Keyboard Shortcut

Description

New Formula

Ctrl + N

Creates a new empty formula in the current formula grid

Save Formula

Ctrl + S

Saves all changes to the gINT Library and Project database

Delete Formula

Ctrl + D

Deletes the currently selected formula

Undo Changes

Ctrl + U

Reverts any changes made to the current formula to the state it was last saved

Copy Current Formula

Ctrl + Shift + C

Makes a copy of the currently selected formula, and stores it in memory.

Paste Formula

Ctrl + Shift + V

Inserts the previously copied formula into the current formula grid

Enable all Formulas

Ctrl + Shift + E

Checks the Enabled check box column for all formulas in the current Formulas Grid

Disable all Formulas

Ctrl + Shift + D

Unchecks the Enabled check box column for all formulas in the current Formulas Grid

Data Tool Toolbar

Hovering the mouse cursor over each item will show a tooltip with a short description of the item.

Name

Icon/Image

Keyboard Shortcut

Description

Refresh Data Tool

Ctrl + R

Clears, re-reads and reloads the Table and Field drop down list items from the current gINT Project. Use this to update the drop down list if you have added a new table or field after the Data Correction Tool has been opened.

Table Field Data Tool

 

Pastes the selected table and field as formatted text into the last focused configuration field. Refer to the Table Field Data Tool section of the manual for detailed information

Function Data Tool

 

Pastes the selected function text into the last focused configuration field.

Table Field Data Tool

The Table Field Data Tool pastes the selected table and field as formatted text into the last focused configuration field. The drop down list contains all tables and fields in the current gINT Project database. When a Table is selected, the Field list will automatically filter to show only the fields for the selected table.

Currently, the Data Correction Tool only supports referencing fields on CPT_DATA, hence the Table has been fixed to CPT_DATA.

The Table and Field drop down lists consist of three columns:

  • Table Name/Field Name – database name of the Table or Field
  • Caption – The caption text as configured in the Caption field in the gINT Table or Field Properties
  • Description – The description text as configured in the Description field in the gINT Table or Field Properties

The drop down list can be sorted by a column by clicking on the column header. The columns can be resized by clicking and dragging the edges of the column header left or right. The drop down list window can be resized by clicking and dragging the bottom right corner of the window.
The Paste  button will insert the selected table field into a formatted, table field reference text into the last focused configuration text field or grid cell. The Paste button can insert text into the following Configuration fields:

  • Description
  • Any cell in the Variables Grid
  • Formula
  • Name

The table field reference format is as below:

<<Table Name.Field Name>>

Table field references in the Formula field are required to be surrounded by quotation marks. The Table Field Data Tool will automatically add the quotation marks if pasting in the Formula field. The table field reference format for the Formula field is as below:

"<<Table Name.Field Name>>"

The pasted text will be inserted at the current position of the cursor in the fields. Any highlighted text will be replaced by the inserted text. Selecting an entire cell in the Variables grid will replace the contents of that cell with the inserted text.

Function Data Tool

The Table Field Data Tool pastes the selected function text into the last focused configuration field. The Function drop down list contains all functions, constants and operators that are available in the Formula Tool, it the correct syntax. Each function is categorised as a type, and selecting a type in the Type drop down list will filter the function drop down list by that type.

The Function drop down list consists of three columns:

  • Type – type of function, can be filtered by a particular type by selecting a type in the Type drop down list
  • Function – the function, constant or operator in the correct syntax as required by the Formula Tool. The typical syntax composition of a function consists of the function name, followed by an open bracket, followed by a comma separated list of function parameters, followed by a closed bracket.
    FunctionName(Parameter 1, Parameter 2 \[,...\])

    The function name is case sensitive. All function parameters are required, unless noted otherwise. If a function accepts an arbitrary number of parameters, it is denoted by ... .

  • Description – A short description about the function

The Paste  button will insert the selected table field into a formatted, table field reference text into the last focused configuration text field or grid cell. The Paste button can insert text into the following Configuration fields:

  • Description
  • Any cell in the Variables Grid
  • Formula
  • Name

Refer to section  Formula Tool and Data Correction Tool Functions for detailed information about the functions.

Formulas Group

The Formulas Group contains a list of formulas stored in the currently selected tab. The formulas listed in the Library tab are stored in the gINT Library, and the Project tab in the current gINT Project database. Each row in the Grid represents one formula, and is listed in the order they are to be evaluated from first to last.

Selecting a formula by either by clicking on a row, or pressing the up or down keys in the Grid will display the configuration associated with the selected formula in the Configuration Group. The Name column values cannot be changed in this grid. It must be done in the Configuration/Offset and Correction Group after the formula has been selected.

The Enabled column maybe edited from the grid by clicking on the cell or pressing the space bar for the selected cell.

The Order of the formula can be changed in the Formulas Group with the up down buttons on the top left. Descriptions of the bottom are listed below from top to bottom:

  • Move to Top – Moves the currently selected formula to the top of the grid
  • Move Up – Moves the currently selected formula up by one row
  • Move Down – Moves the currently selected formula down by one row
  • Move to Bottom – moves the currently selected formula to the bottom of the grid

Key Set Group

Select the CPTs/Strokes you wish to run the data correction calculations to in this group.

Source Table is fixed to CPT_GENERAL, which is the most appropriate table for selecting key sets for running calculations on the CPT_DATA table.

  • Source Table – The table containing the key sets that define a unique list of CPTs. The table is currently fixed to CPT_GENERAL.
  • Key Set Selector – Defines the selection of CPTs to be calculated. Click on the button on the right end of the text box to display the Key Set Selector Window. 
    A window similar to the following should appear:

    You may use a combination of left click, left click-drag, ctrl + click and shift + click to select the desired CPTs, and the arrow buttons in the middle to move CPTs to the right or left grid.

Configuration Group

The Configuration Group contains options identifying, defining and ordering for the currently selected formula in the Formulas grid.

  • Name – Name of the formula. The formula name must be unique for the formula grid. This means that you may have two formulas with the same name in the current Library and Project, but not in the Library or Project only.
    You will not be able to select another formula, or save the formula until a unique name is entered.
  • Order – a numeric value of the order the formula will be evaluated. If the result of the current formula is required to evaluate another formula, then the current formula should be placed at a higher order to than the other formula.
    The order cannot be changed in the Configuration Group. Move the selected formula up or down using the up down buttons left of the Formulas Grid. The numeric Order value will update itself when the order has changed.
  • Iteration - The round of iteration in which the current formula will be evaluated. Default value is 1. Functions which calculate the average of a correlation that is evaluated by the Formula Tool need to be run at a later iteration to the correlation.
  • Description – Description of the formula. It is not used or required in the data correction calculation, and hence it is an optional field.
  • Source/Target Field – The field on the Source Table where the value for the formula is read and written to. This field can be any field on the Source Table, including key fields. Use the drop-down combo box to select the field from the current Source Table.
  • Validate – Click this button to evaluate the current formula expression, with the Validation Value set as the Variables. The Validate button is only enabled if the current formula is a Correction type. If the evaluation was successful, the result will be written to the adjacent text field. The Formatting Type and Value will be applied to the result, if defined. Use Validate to spot check your formula expression for syntax errors, and to verify the formula returns an expected result.
  • Enabled – Check or uncheck to enable or disable the formula respectively from evaluating in the CPT calculation
  • Formatting Type and Value – Formats the result to either decimal or significant figures, to the nearest specified value. The formatting only applies to formula expressions that return a numeric value.
  • OK – Saves the current state of the formulas in the Data Correction Tool to the selected location, and closes the window.
  • Cancel – Discards any changes made in the Data Correction Tool and closes the window. The formulas will remain at the exact same state as before the Formula Configuration form was opened. You will be prompted to save if changes are detected.

Offset and Correction Group

The Offset and Correction group defines the formula type and options related to the for the currently selected formula.

Offset

This formula type allows for the vertical offset of columns/channels. For example, the offset of sleave friction data.

  • Offset or Correction – Choose the formula type, Offset or Correction. If Offset is selected, the Offset subgroup is enabled, and the Correction subgroup is disabled, and vice versa.
  • Offset Reference Field – Field that defines the offset reference field on the currently selected Source table. The Offset calculation will read values in this field as a reference to offset the values in the source/target field. A typical Offset Reference Field value would be Depth.
  • Direction – Determines the offset direction. Increase offsets the value to a greater depth, whereas Decrease offsets the value to a lesser depth.
  • Offset By – The value to offset the source/target field by. The unit of this value is taken from the Offset Reference Field. For example, if the Offset Reference Field of Depth is in Metres, then the Offset By value will also be in Metres. The Offset By value must be positive.

Correction

This formula type allows for the alteration in value of data for a column based on a Formula. For example:

  1. Re-zero the Depth column, to correct for an incorrect start depth applied during acquisition.
  2. Subtract 101.4 kPa from measured pore pressure.

  • Table/Field References to Variables – Declare the variables that are used in the formula expression in this grid. The rows in this grid can be changed with the up down buttons on the left of this grid. Column definitions are listed below:
  • Variable Name – Name of the variable. The variable name can consist of alphanumeric characters [a-z, A-Z, 1-9], but must have at least one alphabetic character, and is case sensitive. It cannot contain the following:
    • Symbols, such as `, $, #
    • White spaces or carriage return

In addition, duplicate variable names for a particular formula is not permitted, and a variable name cannot be exactly the same as a function name.

    • Expression – Table Field reference to where the variable value is to be retrieved from, or a text or numeric value. The following is a list of rules and specifications regarding the Expression:

      • Table Field references must be in the format of <<Table.Field>>
      • Referenced fields must be from the CPT_DATA table, and it will take the value from the field of the current row the CPT Tool is calculating.
      • To use the variable as a constant, enter a numeric value, or text that is not in the format of <<Table.Field>>
    • Validation Value – Value used to evaluate the formula when the Validate button is clicked, and in the Validation Reports. The Validation Value has no effect on the actual CPT calculation, and is solely used in the Formula Configuration Form.
  • Formula – The formula expression. Refer to section Formula Tool and Data Correction Tool Functions for a full list of available functions. Variables declared in the Variables Grid above can be referenced in the formula expression. String constants must be surrounded with quotation marks "" in order to differentiate it from a variable reference. Spaces and carriage returns may be used liberally to improve readability.
    Table field references in the formula expression must be surrounded by quotation marks, i.e. "<<Table.Field>>". The Table Field Data Tool will automatically add the quotation marks when pasted in the formula expression field.
On this page