Select Filter

Use the SEM-Data > Filter option (SEMFILTER GX) to apply a filter, based on data values, to the currently viewed data.

Select using Filter dialog options

Filter

Select an existing filter from the drop-down list. Select the New button to create a new filter, or the Edit button to modify the currently selected filter.

  • Filters are now stored as files in the %USERPROFILE%\Documents\Geosoft\Desktop Applications \etc directory. The list of available filters is automatically built from the files names and displayed to the user without the file extensions ("*.semfilter).
  • Script Parameter: SEMFILTER.FILTER

    Mask Channel

    The "Mask" channel records whether a row of data is selected or not. A dummy is used to indicate that the data is NOT selected, while a 1 indicates the data is selected. (In fact any non-dummy value will be interpreted as "selected"). Any channel can be used as a Mask channel, but only those channels whose CLASS is set to MASK are included in the list. Multiple mask channels can be used to record the results of different filters or selections. The latest mask channel specified in any of the filter/selection options is used when creating plots.

    Script Parameter: SEMPLOT.MASK

    Mineral Channel

    The Mineral channel contains the codes identifying the mineral identification for each sample.

    More than one mineral channel can exist in a database. Mineral channels are identified internally by having the channel CLASS set to "MINERAL". They must be of string type. You may use the "Identify Minerals…" method to create or re-initialize a mineral channel.

    Script Parameter: SEMPLOT.MINERAL_CHANNEL

    Selected Mineral

    Select a mineral from the list to restrict the action of the filter to that mineral only, or select All Minerals, or leave blank so that the filter applies to all the data in the selected groups.

    Currently recognized mineral codes are:

    • A: Amphibole

    • C: Chromite

    • G: Garnet

    • I: Ilmenite

    • K: Perovskite

    • M: Magnetite

    • O: Olivine

    • P: Pyroxene

    • R: Rutile

    • Z: Sphene

    • X: Unknown

    Additional minerals may be added by the user by editing the "semplot_minerals.csv" file found in the%USERPROFILE%\Documents\Geosoft\Desktop Applications \csv directory.

    Script Parameter: SEMFILTER.MINERAL

    Append/New

    If Append is selected, then the filter operates only on currently selected data, and the number of selected items following the application of the filter will be smaller than or equal to the number before.

    If New is selected, all items in the selected groups, and with the selected minerals will first be reset to "1" (selected), before tested with the filter.

    Script Parameter: SEMFILTER.MODE

    Filter Operation

    Edit Filter: Bring up the Edit Filter dialog to define a filter.

    Apply Filter: Apply the filter to the currently viewed data. Only values whose mask value is "1" are considered; the filter will not turn "0" mask values back to "1".

    Remove masked data: Remove data in rows where the mask value is "0".

    Clear Filter: Restore viewed data according to the current Mineral/Position selection, from the internally stored data.

    Script Parameter: SEMFILTER.OPT (0: Edit, 1: Apply, 2: Delete masked Data, 3: Clear Filter)

    "Filters" Dialog

    This dialog is used to show the defined filter components.

    Filters

    Each component is a single logical statement (to which the answer for each data values is TRUE or FALSE). Each component is applied sequentially, using either AND or OR, as defined by the user.

    String-type data is matched by Value, while Numeric-type data takes minimum and/or maximum values.

    New

    Define a new component of the filter. This brings up the New Filter dialog.

    Edit

    This brings up the Edit Filter dialog to edit the currently selected filter component.

    Delete

    Deletes the currently selected filter component.

    Apply

    If the Apply command is selected, the current Mask channel values are updated based on the filter. If the Append/New mode is set to New, then all eligible data is first set to 1. Any values not passing the filter are reset from "1" to dummy "*".

    If automatic redraw is enabled in the Semplot Preferences, then any open maps are automatically replotted with the new data selection.

    Remove

    This will reset all eligible mask channel values (e.g. selected group, selected mineral) back to "1".

    If automatic redraw is enabled in the Semplot Preferences, then any open maps are automatically replotted with the new data selection.

    "Edit Filter" Dialog

    This dialog is used to define individual filter components.

    Field/Oxide

    Select the data to include in the filter component by specifying "Field" and "Oxide" values.

    Filter data takes on two forms; some require one-part descriptions ("Field" only) and others require two-part descriptions ("Field" and "Oxide").

    The "Field" list is populated with the names of the non-oxide channels in the database, as well as the five data "stages": Raw Data, Fe Corrected, Re Normalized, Cation and Recast. If a non-oxide channel is selected, the "Oxide" selection is unnecessary, and the field remains greyed out. If one of the stages is selected, then the corresponding oxide channel is selected from the "Oxide" list.

    Value/Range

    For Numeric-type data, select a minimum and/or maximum value (values are inclusive). If a minimum or maximum value is left blank, that limit is not applied in the filter.

    For String-type data, select a value or string-mask value. Wild cards are permissible for filter matches with strings. Two wild cards are implemented. "*" (asterisk) matches any number of characters in the string, and "?" (question mark) matches any one character in the string. For instance "12?45" matches 12145, 12345, 12945 etc, but does not match 123345. "12*45" matches all the preceding strings.

    Conjunction

    Select "AND" or "OR". This applies only to the second and subsequent filter components, and determines how the filter is to be combined with the effect of the previously applied component.

    "AND" means that a data points will be selected only if the application of all previous components of the filter has also yield a "TRUE" result, and the current component also yields a "TRUE".

    "OR" means that if either the accumulated effect of the previous components, or the present component is "TRUE", then the combined components result will be "TRUE".

    Because the components are applied individually, and sequentially, a single "OR" can yield a "TRUE" result, even if all the "AND" values previously have yielded "FALSE".

    Calculate Defaults

    When checked, the default min/max values, or the available string values, are obtained by applying the entire filter, less the currently edited component, to the data set as a whole. In effect, this shows the range of data, which the current component can affect. All the filter options, including the current selection of groups, currently selected mineral, and filter mode are taken into account. If the filter mode is "Append", then only those data items where the current mask value is not a dummy will be considered. If the filter mode is "New", then, in effect, the current mask channel values are ignored, and all the selected groups and mineral data is considered.

    For very large data sets, with many groups selected, this could take considerable time to calculate, so the box can be deselected.