[Ifeffit] problem with normalization

Bernd Griesebock griesebock at uni-wuppertal.de
Thu Aug 31 02:57:53 CDT 2006


Hi there,

I have a litte question about normalizing data using the commands that
athena uses.

I used the following commands (in an ifeffit shell), which I copied from
the ifeffit buffer from athena, but I replaced most of the values with
the corresponding variables (see at the "set" commands):

read_data(file="Rh_sample_11.dat.spektrum.00040", group=rh, no_sort)
set ___n = npts(rh.1)
set rh.energy = 1000*rh.1
set rh.xmu = (rh.2) / (rh.3)
pre_edge("rh.energy+0", rh.xmu)
erase rh.4
show e0
pre_edge("rh.energy+0", rh.xmu, e0=23228.9989104549, pre1=-150,
pre2=-30, norm_order=3, norm1=150, norm2=514.053)
spline("rh.energy+0", rh.xmu, e0=23228.9989104549, rbkg=1.0, kmin=0.5,
kmax=12.695, kweight=1, dk=0, kwindow=kaiser-bessel, pre1=-150,
pre2=-30, norm_order=3, norm1=150, norm2=514.053, clamp2=24, nclamp=5,
interp=quad)
set rh.preline = pre_offset+pre_slope*(rh.energy + 0)
set rh.postline =
norm_c0+norm_c1*(rh.energy+0.000000)+norm_c2*(rh.energy+0.000000)**2
step rh.energy e0 rh.theta
set flat_c0 =norm_c0 - pre_offset
set flat_c1 =norm_c1 - pre_slope
set flat_c2 =norm_c2
set rh.line = (flat_c0 + flat_c1*(rh.energy+0) + flat_c2*(rh.energy+0)**2)
set rh.flat = (rh.pre + (edge_step - rh.line)*rh.theta) / edge_step
set rh.fbkg = (rh.bkg-rh.preline+(edge_step-rh.line)*rh.theta)/edge_step
newplot(rh.energy+0, "1*rh.fbkg+0", xlabel="E (eV)", ylabel="norm
x\gm(E)", fg=black, bg=white, grid, gridcolor="grey82", 
xmin=23028.99891, xmax=24028.99891, style=lines, color="red", key=bkg,
title="rh_sample_11")

At this point athena plots the normalized background function with all
data points in the post edge region at arround 1. This is exactly what I
want, but in the ifeffit shell I get an error message:
** plot error: no data in y array

Ifeffit> show rh.fbkg
 rh.fbkg        =   399 pts  [-0.2709E-01:  1.205    ]

So there is data in that array! Using the following plot command:

newplot(rh.energy+0, rh.fbkg, xlabel="E (eV)", ylabel="norm x\gm(E)",
fg=black, bg=white, grid, gridcolor="grey82",  xmin=23028.99891,
xmax=24028.99891, style=lines, color="red", key=bkg, title="rh_sample_11")

plots the background function but not normalized in the sense, that the
data points in post edge region are at arround 1.

Where is my mistake??? If you need some plot examples please feel free
to ask for them.
Thank you for your help in advance.
Best regards
Bernd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://millenia.cars.aps.anl.gov/pipermail/ifeffit/attachments/20060831/f0430ae2/attachment.html>


More information about the Ifeffit mailing list