Table of Contents

Broaden

If G is a spectra object then G.Broaden(GammaGauss, GammaLorentz) will broaden the spectrum object G. G.Broaden is similar to the function Spectra.Broaden with the difference that it does not make a copy of the spectra object.

Example

description text

Input

Example.Quanty
dofile("definitions.Quanty")
 
-- Broaden with a Gaussian of FWHM 0.2 and a Lorenzian with variable
-- width, the interval 0 to 5.25 has FWHM=0.2. The interval 5.75,20 has
-- FWHM=0.75. The interval 5.25 to 5.75 linearly increases from 0.2 to 0.75
 
G.Print({{"file","Spectra.dat"}})
G.Broaden(0.2, {{0.0,0.2}, {5.25,0.2}, {5.75,0.75}, {20.0,0.75}})
G.Print({{"file","Spectra.Broaden.dat"}})
 
gnuplotScript = gnuplotHead .. [[
set output "Spectra.Broaden.ps"
plot "Spectra.dat"  using 1:(-$3  ) title 'T1' with lines ls  1,\
     "Spectra.Broaden.dat"  using 1:(-$3*2) title 'T1 Broaden' with lines ls 2
]]
file = io.open("Spectra.Broaden.gnuplot", "w")
file:write(gnuplotScript)
file:close()
os.execute("gnuplot Spectra.Broaden.gnuplot")
os.execute("convert -density 1024 Spectra.Broaden.ps -resize 1024 Spectra.Broaden.png")

Result

The resulting picture is:

Available functions

Available methods