@@ -3494,12 +3494,25 @@ def Background(self):
34943494 def add_back_peak (self ,pos ,int ,sig ,gam ,refflags = []):
34953495 '''Adds a background peak to the Background parameters
34963496
3497+ Background in diffraction patterns is usually fit
3498+ with a slowly varying smooth function, such as a Chebyschev
3499+ polynomial, but when the background contains broad peaks
3500+ (for example from a Kapton sample container) those peaks
3501+ are usually better fit by adding extra peaks to the
3502+ smooth background function rather that providing enough
3503+ parameters to the smooth function in order fit the
3504+ peak(s). Note that background peaks are typically treated
3505+ as Gaussian only (``gam``=0) with very large ``sig``
3506+ values (>1000). Normally one should refine ``int`` and
3507+ then ``sig`` and only after the background peak is well
3508+ fit can one refine the ``pos`` value.
3509+
34973510 :param float pos: position of peak, a 2theta or TOF value
34983511 :param float int: integrated intensity of background peak, usually large
34993512 :param float sig: Gaussian width of background peak, usually large
3500- :param float gam: Lorentzian width of background peak, usually unused (small)
3513+ :param float gam: Lorentzian width of background peak, usually not used (small)
35013514 :param list refflags: a list of 1 to 4 boolean refinement flags for
3502- pos,int,sig & gam, respectively (use [0,1] to refine int only).
3515+ pos,int,sig & gam, respectively (e.g. use [0,1] to refine int only).
35033516 Defaults to [] which means nothing is refined.
35043517 '''
35053518 if 'peaksList' not in self .Background [1 ]:
0 commit comments