!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
define real xgauss[100] ygauss[100]
let xgauss[i] i-50
let ygauss exp(-((xgauss-15)*2*sqrt(log(2))/10)^2)
!
clear  
limit /var xgauss ygauss
box
connect xgauss ygauss
label "X" /x
label "Y" /y
draw text 0 1 "Gaussian Fit" 5 /char 8
!
gauss xgauss ygauss /guess 10 0 10 /fixed no no yes
say "Gaussian Parameters:"
say "Area: 10.64, Position: 15, Width: 10"
pause
!
let ygauss 0.25*exp(-((xgauss-15)*2*sqrt(log(2))/40)^2)
let ygauss ygauss+0.005*xgauss+2
!
clear
limit /var xgauss ygauss
box
connect xgauss ygauss
label "X" /x
label "Y" /y
draw text 0 1 "Gaussian + 1st Order Baseline Fit" 5 /char 8
!
gauss xgauss ygauss /base /guess 10 0 40 0 0
say "Gaussian + Base Parameters:"
say "Area: 10.64, Position: 15, Width: 40, Offset: 2, Slope: 0.005"
pause
!
let ygauss       -0.250*exp(-((xgauss+15)*2*sqrt(log(2))/10)^2)
let ygauss ygauss+0.375*exp(-((xgauss-20)*2*sqrt(log(2))/15)^2)
let ygauss ygauss+0.005*xgauss+2
!
clear
limit /var xgauss ygauss
box
connect xgauss ygauss
label "X" /x
label "Y" /y
draw text 0 1 "2 Gaussian + 1st Order Baseline Fit" 5 /char 8
!
gauss xgauss ygauss /dual /guess -2.5 0 11 -1 30 1 0 0
say "2 Gaussian + Base Parameters:"
say "Area1:       -2.66, Position1:           -15, Width1:         10"
say "Area2/Area1: -2.25, Position2-Position1: +35, Width2/Width1: 1.5"
say "Offset: 2, Slope: 0.005"
pause
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
