def maxval_cutout_pos(self):
        """
        The ``(y, x)`` coordinate, relative to the `data_cutout`, of the
        maximum pixel value of the ``data`` within the source segment.

        If there are multiple occurrences of the maximum value, only the
        first occurence is returned.
        """

        if self._is_completely_masked:
            return (np.nan, np.nan) * u.pix
        else:
            arr = self.data_cutout_ma
            # multiplying by unit converts int to float, but keep as
            # float in case of NaNs
            return np.asarray(np.unravel_index(np.argmax(arr),
                                               arr.shape)) * u.pix
def maxval_cutout_pos ( self ) : if self . _is_completely_masked : return ( np . nan , np . nan ) * u . pix else : arr = self . data_cutout_ma return np . asarray ( np . unravel_index ( np . argmax ( arr ) , arr . shape ) ) * u . pix
The ``(y, x)`` coordinate, relative to the `data_cutout`, of the
        maximum pixel value of the ``data`` within the source segment.

        If there are multiple occurrences of the maximum value, only the
        first occurence is returned.