parameters: (self, value)
docstring: Define the background function.
          Args:
              value: an instance of function.Background class or a list of instances
                  in a multi-spectrum case
docstring_summary: Define the background function.
          Args:
              value: an instance of function.Background class or a list of instances
                  in a multi-spectrum case
docstring_tokens: Define the background function . Args : value : an instance of function . Background class or a list of instances in a multi - spectrum case
function: def background(self, value):
          """
          Define the background function.
          Args:
              value: an instance of function.Background class or a list of instances
                  in a multi-spectrum case
          """
          if self._background is not None:
              raise ValueError('Background has been set already')
          if not hasattr(value, 'toString'):
              raise TypeError('Expected a Background object, found %s' % str(value))
          if not self._isMultiSpectrum:
              fun_str = value.toString() + ';' + str(self.function)
              self.function = FunctionFactory.createInitialized(fun_str)
              self._background = self._makeBackgroundObject(value)
              self._setPeaks()
          else:
              self.function.setAttributeValue("Background", value.toString())
              self._background = []
              for ispec in range(self.NumberOfSpectra):
                  prefix = 'f%s.' % ispec
                  self._background.append(self._makeBackgroundObject(value, prefix))
function_tokens: def background ( self , value ) : if self . _background is not None : raise ValueError ( 'Background has been set already' ) if not hasattr ( value , 'toString' ) : raise TypeError ( 'Expected a Background object, found %s' % str ( value ) ) if not self . _isMultiSpectrum : fun_str = value . toString ( ) + ';' + str ( self . function ) self . function = FunctionFactory . createInitialized ( fun_str ) self . _background = self . _makeBackgroundObject ( value ) self . _setPeaks ( ) else : self . function . setAttributeValue ( "Background" , value . toString ( ) ) self . _background = [ ] for ispec in range ( self . NumberOfSpectra ) : prefix = 'f%s.' % ispec self . _background . append ( self . _makeBackgroundObject ( value , prefix ) )