surfplot.utils.threshold

surfplot.utils.threshold(data, thresh, binarize=False, two_sided=True)[source]

Threshold vertex array

Parameters
  • data (numpy.ndarray) – Vertex array

  • thresh (float) – Threshold value. All values below or equal to threshold are set 0.

  • binarize (bool, optional) – Set all values above threshold to 1. Default: False

  • two_sided (bool, optional) – Apply thresholding to both positive and negative values. Default: True

Returns

numpy.ndarray – Thresholded data