Set Mask Using Code

The Drillhole system provides the ability to create or update a mask channel based on values matched from any other channel. If a mask channel is enabled, only the data values whose corresponding mask channel values are not dummy will be plotted or exported.

To Mask Data by Code:
  1. On the DH-Plot menu, click Select Data by Code.
    The Set Mask using Code dialog is displayed.

  2. Using the Data channel drop-down list, select the data channel (column) to mask. Then, by using the Mask channel drop-down list select a mask channel or type the name of a new mask channel.

  3. Using the Append/New and the Hole selection drop-down lists, select the appropriate values.

  4. Click the OK button.
    The Select Codes dialog will appear.

  5. In the Code box, select the "number" or "text string" to match.

  6. Click the OK button to mask the data channel based on the code.

Use the Select Data by Code option (DHLIMASK GX) to set a mask for your database using code.

Set Mask Using Code dialog options

Data Channel

Select the code channel, and the mask channel (the default is "Mask"), and whether you wish to create a new mask channel or append to an existing one. Once you hit "Ok", the two-panel selection tool is displayed with a list of unique items in the code channel. Select one or more of the items from the list. The default mask channel is set from the DHPREFERENCES GX (DH-Data > Preferences menu option).

Script Parameter: DHLIMASK.MASK

Mask Channel

Select a mask channel from the drop-down list. If the use of the mask channel is enabled and set to this channel, only those data values whose corresponding mask channel values are not dummy values will be plotted or exported.Channels must have their CLASS attribute set to MASK to appear as selections in the drop-down list. If the mask channel does not exist, it will be created with its CLASS attribute set to MASK. The default mask channel is set from the DHPREFERENCES GX (DH-Data > Preferences menu option).

Script Parameter: DHLIMASK.MASK

Append/New

If "New" is chosen, all the mask values in the selected holes are first reset to dummies, and then the mask values of selected data are set to 1. If "Append" is chosen, the current selection is added to what already is selected. No value which is already selected ("1") will be set to dummy.

Script Parameter:DHLIMASK.APPEND: 0: Append, 1: New

Hole selection

"Selected Holes" or "All Holes"

Application Notes

This GX was originally created for updating a mask channel based on a lithology channel, but works equally well for any channel (even floating-point channels, where the number of decimals is small enough that they may reliably be converted to a text string which can be matched against).

For example, the channel might contain known codes such as:

grd = granite
sst = sandstone.