isofit.utils.reducers ===================== .. py:module:: isofit.utils.reducers Functions --------- .. autoapisummary:: isofit.utils.reducers.band_mean isofit.utils.reducers.class_priority Module Contents --------------- .. py:function:: band_mean(vals) Wrapper for the np.mean reducer. A wrapper is necessary because you need to pass it a row-axis call. :param vals: (N-locs x bands) array of pixel values :returns: (b x 1) array of band-means .. py:function:: class_priority(vals, thresh=0.25) Wrapper for the priority reducer. This might not be the correct place for this reducer. The rules are as follows: If pct(n) > thresh: -> class = n elif pct(n-1) > thresh: -> class = n-1 else pct(0) > thresh -> class = 0 This will mean that the largest int class will take precedence. The threshold controls how many pixels in the SUB have to be a class for it to be important. :param vals: (N-locs) array of pixel classes :returns: (int) Super pixel class