Hi Jesse,

Sorry for the trouble.  I see the same behavior with your data.   What is 
happening is that the first data point for the "mu_fluo_det0" array (and the 
"fluo_det0" array, and a few other arrays too) is NaN.   That looks to be the 
case for most, if not every scan in this file.  That is messing up the pr-edge 
and normalization calculation.  Basically, `pre_edge()` is removing the point 
with the NaN from the normalization array, leaving it one point short, and the 
plotting routines then give up trying to plot x and y arrays of different sizes.

We generally try to be tolerant of and handle NaNs, but we are failing in this 
case.  I think we can fix this.  I’ve started looking at it and am trying to 
decide on the best strategy here.


From: Ifeffit <ifeffit-boun...@millenia.cars.aps.anl.gov> on behalf of jesse 
walters <thegeoje...@gmail.com>
Sent: Wednesday, April 10, 2024 7:22 AM
To: ifeffit@millenia.cars.aps.anl.gov <ifeffit@millenia.cars.aps.anl.gov>
Cc: Francesco Ressico <francesco.ressi...@unibo.it>
Subject: [Ifeffit] Difficulty with normalization of XAS spectra

This Message Is From an External Sender
This message came from outside your organization.

Hi all,

I have some spectra collected by a collaborator, Francesco Ressico, a PhD 
student at Uni Bologna,  (see attached .h5 file below) and we are having 
trouble normalizing the Fe K edge spectra. The data are for serpentine group 
minerals and were collected in fluorescence mode. In the attached file, the 
correct X array value is 'energy_enc', the data type is 'xas', and the y array 
should be 'mu_fluo_det0'. The spectra are already normalized for the incoming 
beam energy (although this can also be done using 'flou_det0/i0'). There are 
multiple spectra in the file, any one of them can be chosen to test the 

After loading the spectra, I am able to plot the raw spectra correctly (see 
attached). But when I try to normalize the pre and post edge regions and plot 
the normalized spectra, the software only gives a blank plot. I have tried 
changing the normalization type, polynomial type, range, etc for both the pre 
and post edge, but nothing seems to work. I also tested different spectra, but 
with similar results.

Does anyone have suggestions for how these data can be normalized?

The h5 file is too large, so here is a dropbox link 

Jesse Walters

Jesse B. Walters
Ambizione Fellow
Institut für Geologie
Universität Bern
Ifeffit mailing list
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit

Reply via email to