parameters: (self, xlabel='2theta', ylabel=None, with_error=True)
return_statement: return xye_matrix
docstring: get the parameters from peak integration
          :param xlabel: parameter name for x value
          :param ylabel: parameter name for y value
          :param with_error: If true, then output error
          :return:
docstring_summary: get the parameters from peak integration
          :param xlabel: parameter name for x value
          :param ylabel: parameter name for y value
          :param with_error: If true, then output error
          :return:
docstring_tokens: get the parameters from peak integration : param xlabel : parameter name for x value : param ylabel : parameter name for y value : param with_error : If true then output error : return :
function: def get_peak_integration_parameters(self, xlabel='2theta', ylabel=None, with_error=True):
          """
          get the parameters from peak integration
          :param xlabel: parameter name for x value
          :param ylabel: parameter name for y value
          :param with_error: If true, then output error
          :return:
          """
          # convert all kinds of y-label to a list of strings for y-label
          if ylabel is None:
              ylabel = ['sigma']
          elif isinstance(ylabel, str):
              ylabel = [ylabel]
  
          # create list of output
          param_list = list()
          for (exp_number, scan_number) in self._myPeakInfoDict.keys():
              peak_int_info = self._myPeakInfoDict[exp_number, scan_number]
  
              # x value
              try:
                  x_value = peak_int_info.get_parameter(xlabel)[0]
              except RuntimeError as run_err:
                  print ('[ERROR] Exp {} Scan {}: {}'.format(exp_number, scan_number, run_err))
                  continue
  
              # set up
              scan_i = [x_value]
  
              for param_name in ylabel:
                  if param_name.lower() == 'scan':
                      # scan number
                      y_value = scan_number
                      scan_i.append(y_value)
                  else:
                      # parameter name
                      y_value, e_value = peak_int_info.get_parameter(param_name.lower())
                      scan_i.append(y_value)
                      if with_error:
                          scan_i.append(e_value)
              # END-FOR
              param_list.append(scan_i)
          # END-FOR
  
          if len(param_list) == 0:
              raise RuntimeError('No integrated peak is found')
  
          # convert to a matrix
          param_list.sort()
          xye_matrix = numpy.array(param_list)
  
          return xye_matrix
function_tokens: def get_peak_integration_parameters ( self , xlabel = '2theta' , ylabel = None , with_error = True ) : # convert all kinds of y-label to a list of strings for y-label if ylabel is None : ylabel = [ 'sigma' ] elif isinstance ( ylabel , str ) : ylabel = [ ylabel ] # create list of output param_list = list ( ) for ( exp_number , scan_number ) in self . _myPeakInfoDict . keys ( ) : peak_int_info = self . _myPeakInfoDict [ exp_number , scan_number ] # x value try : x_value = peak_int_info . get_parameter ( xlabel ) [ 0 ] except RuntimeError as run_err : print ( '[ERROR] Exp {} Scan {}: {}' . format ( exp_number , scan_number , run_err ) ) continue # set up scan_i = [ x_value ] for param_name in ylabel : if param_name . lower ( ) == 'scan' : # scan number y_value = scan_number scan_i . append ( y_value ) else : # parameter name y_value , e_value = peak_int_info . get_parameter ( param_name . lower ( ) ) scan_i . append ( y_value ) if with_error : scan_i . append ( e_value ) # END-FOR param_list . append ( scan_i ) # END-FOR if len ( param_list ) == 0 : raise RuntimeError ( 'No integrated peak is found' ) # convert to a matrix param_list . sort ( ) xye_matrix = numpy . array ( param_list ) return xye_matrix