distro release 2.1.1

This commit is contained in:
2020-06-09 12:31:05 +02:00
parent b7390cb46f
commit ef9d08e5f5
168 changed files with 3286 additions and 1205 deletions

View File

@ -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