epsproc.util.selectors module

epsproc.util.selectors.dataGroupSel(data, dInd)[source]
epsproc.util.selectors.matEleSelector(da, thres=None, inds=None, dims=None, sq=False, drop=True)[source]

Select & threshold raw matrix elements in an Xarray

  • da (Xarray) – Set of matrix elements to sub-select
  • thres (float, optional, default None) – Threshold value for abs(matElement), keep only elements > thres. This is element-wise.
  • inds (dict, optional, default None) – Dicitonary of additional selection criteria, in name:value format. These correspond to parameter dimensions in the Xarray structure. E.g. inds = {‘Type’:’L’,’Cont’:’A2’}
  • dims (str or list of strs, dimensions to look for max & threshold, default None) – Set for dimension-wise thresholding. If set, this is used instead of element-wise thresholding. List of dimensions, which will be checked vs. threshold for max value, according to abs(dim.max) > threshold This allows for consistent selection of continuous parameters over a dimension, by a threshold.
  • sq (bool, optional, default False) – Squeeze output singleton dimensions.
  • drop (bool, optional, default True) – Passed to da.where() for thresholding, drop coord labels for values below threshold.

Xarray structure of selected matrix elements. Note that Nans are dropped if possible.

Return type:



>>> daOut = matEleSelector(da, inds = {'Type':'L','Cont':'A2'})