.. highlightlang:: us .. index:: Dialog Box=>Data Filter .. _dialog-boxdata-filter: .. _dialog-box-data-filter: Dialog Box=>Data Filter ----------------------- To import a subgroup of data, a record filter can be specified. For example, a filter to which only data will be imported if a certain channel is above a specified threshold (e.g. Torque > 10 Nm). .. image:: S:/uniplot-obj/images/DataImportFilter_N-en.* .. us.dlgitem **Channel** List of all available numeric and text channels. Channel names may contain the following special characters: ``.``, ``-``, ``+``, ``$``, ``#``, ``~``, ``!``, ``^``, ``&``, ``%``. The special characters will be replaces by an underscore. .. us.dlgitem **Comparison Operators** The following operators are available: .. list-table:: :header-rows: 1 * - Value - Meaning * - == - equal or with tolerance * - > - greater than * - < - less than * - <= - less than or equal * - >= - greater or equal to * - != - not equal to .. us.dlgitem **Value** Type in a value or pick one from the list. The list shows a maximum of 100 elements. In a filter, numeric and text channels can be used. For text channels the wildcards ``"*"`` and ``"?"`` can be used. The asterisk character (``*``) substitutes for zero or more characters. The question mark (``?``) substitutes for exactly one character. Example ``Mode == "On*"`` or ``Mode != "Off*"``. Quotes (") are not allowed in the search text. .. us.dlgitem **Tolerance** For the == operator, a tolerance in percent or an absolute value can be specified. To avoid a tolerance, set the value to 0 or clear the field. Up to seven filters can be logically linked using one of the following operators: .. list-table:: :header-rows: 1 * - Value - Meaning * - AND - logical AND * - OR - logical OR The AND operator has a higher precedence than the OR operator. Parentheses cannot be used. .. us.dlgitem **Sort** The sort button can be used to open a dialog box in which you can sort filters The filters can be deleted. The filters can can be exported and imported. The maximum number of filters is limited to 100. .. image:: S:/uniplot-obj/images/DataImportFilter_sort-en.* .. us.comment **Comment** Up to UniPlot R2013.7, it was not possible to define a record filter for NC files with multiple time groups (dimensions). To work around this problem all channels could be interpolated onto one time resolution before the filter was specified. Now a record filter can be defined for MDF, BLF, or Puma recorder data without the interpolation. The filter can use channels from different time groups. The channels will be interpolated to the time resolution of the first channel. The filter channel is saved in the time group of the first channel in the filter. For all other time groups the filter will be calculated on demand. The record filter is saved in the NC file as a channel. The channel name of the record filter starts with ``__nc_filter_`` followed by the dimension name, for example ``__nc_filter_group2``. The channel contains the value 0 for records that did not pass the filter and otherwise 1 If the record filter is enabled, only data points will be loaded into a dataset where the filter record has the value 1. In the NC file, global attributes with information about the record filter will be added to the file: .. list-table:: :header-rows: 1 * - Attribute Name - Description * - _nc_record_filter_enabled - Is 1 if the filter is enabled or 0 if disabled. * - _nc_record_filter_text - Is the filter text, for example ``$speed$ > 600 && $torque$ > 10``. All channels used in the filter will be interpolated to the resolution of the first channel. The record filter channel will be saved in the dimension of the first data channel. * - _nc_record_filter_channel - Name of the filter channel, for example ``__nc_filter_NumPoints1``. The filter channel is used to interpolate the filter channel for other dimensions (time groups). * - _nc_record_filter_update - Is an update counter. **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2018.12 - Sort Button added. * - R2013.7 - Record filter can be specified for NC files with multiple data groups, for example MDF files with different time groups. Up to version R2013.6, record filters could only be specified for NC files where all channels had the same number of data points. * - R2013.3 - Text channels can be used in a filter. * - 5.14.5 - "Extended from 4 to 7 elements. A tolerance can be specified". .. seealso:: :ref:`fileimport-data`, :ref:`auto_SetFilter` :sub:`id-1177646`