distro release 2.1.1
This commit is contained in:
@ -893,3 +893,23 @@ function FermiGaussConv(pw, yw, xw) : FitFunc
|
||||
|
||||
yw = pw[2] * resultwave(xw[p] - pw[3]) + pw[0] + pw[1] * xw[p]
|
||||
end
|
||||
|
||||
|
||||
/// calculate the shirley background
|
||||
///
|
||||
///
|
||||
function ShirleyBG(w, bg, p1, p2)
|
||||
wave w
|
||||
wave bg
|
||||
variable p1, p2
|
||||
|
||||
duplicate /o w, bg
|
||||
integrate /meth=1 w /d=bg
|
||||
|
||||
variable bg1 = bg[p1]
|
||||
variable bg2 = bg[p2]
|
||||
bg -= bg1
|
||||
bg /= bg2 - bg1
|
||||
bg *= w[p2] - w[p1]
|
||||
bg += w[p1]
|
||||
end
|
||||
|
Reference in New Issue
Block a user