code: def source_sum(self):
          
  
          if self._is_completely_masked:
              return np.nan * self._data_unit  # table output needs unit
          else:
              return np.sum(self.values)
docs: The sum of the unmasked ``data`` values within the source segment.
  
          .. math:: F = \\sum_{i \\in S} (I_i - B_i)
  
          where :math:`F` is ``source_sum``, :math:`(I_i - B_i)` is the
          ``data``, and :math:`S` are the unmasked pixels in the source
          segment.
  
          Non-finite pixel values (e.g. NaN, infs) are excluded
          (automatically masked).