parameters: (self)
return_statement: return peak_center_list, peak_intensity_list
docstring: Get the peak centers found in peak workspace.
          Guarantees: the peak centers and its weight (detector counts) are exported
          :return: 2-tuple: list of 3-tuple (Qx, Qy, Qz)
                            list of double (Det_Counts)
docstring_summary: Get the peak centers found in peak workspace.
          Guarantees: the peak centers and its weight (detector counts) are exported
          :return: 2-tuple: list of 3-tuple (Qx, Qy, Qz)
                            list of double (Det_Counts)
docstring_tokens: Get the peak centers found in peak workspace . Guarantees : the peak centers and its weight ( detector counts ) are exported : return : 2 - tuple : list of 3 - tuple ( Qx Qy Qz ) list of double ( Det_Counts )
function: def get_weighted_peak_centres(self):
          """ Get the peak centers found in peak workspace.
          Guarantees: the peak centers and its weight (detector counts) are exported
          :return: 2-tuple: list of 3-tuple (Qx, Qy, Qz)
                            list of double (Det_Counts)
          """
          # get PeaksWorkspace
          if AnalysisDataService.doesExist(self._myPeakWorkspaceName) is False:
              raise RuntimeError('PeaksWorkspace %s does not exist.' % self._myPeakWorkspaceName)
  
          peak_ws = AnalysisDataService.retrieve(self._myPeakWorkspaceName)
  
          # get peak center, peak intensity and etc.
          peak_center_list = list()
          peak_intensity_list = list()
          num_peaks = peak_ws.getNumberPeaks()
          for i_peak in range(num_peaks):
              peak_i = peak_ws.getPeak(i_peak)
              center_i = peak_i.getQSampleFrame()
              intensity_i = peak_i.getIntensity()
              peak_center_list.append((center_i.X(), center_i.Y(), center_i.Z()))
              peak_intensity_list.append(intensity_i)
          # END-FOR
  
          return peak_center_list, peak_intensity_list
function_tokens: def get_weighted_peak_centres ( self ) : # get PeaksWorkspace if AnalysisDataService . doesExist ( self . _myPeakWorkspaceName ) is False : raise RuntimeError ( 'PeaksWorkspace %s does not exist.' % self . _myPeakWorkspaceName ) peak_ws = AnalysisDataService . retrieve ( self . _myPeakWorkspaceName ) # get peak center, peak intensity and etc. peak_center_list = list ( ) peak_intensity_list = list ( ) num_peaks = peak_ws . getNumberPeaks ( ) for i_peak in range ( num_peaks ) : peak_i = peak_ws . getPeak ( i_peak ) center_i = peak_i . getQSampleFrame ( ) intensity_i = peak_i . getIntensity ( ) peak_center_list . append ( ( center_i . X ( ) , center_i . Y ( ) , center_i . Z ( ) ) ) peak_intensity_list . append ( intensity_i ) # END-FOR return peak_center_list , peak_intensity_list