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
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd

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.

 

--Matt

   

 

 


From: Ifeffit <ifeffit-bounces@millenia.cars.aps.anl.gov> on behalf of jesse walters <thegeojesse@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.ressico2@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 procedure.

 

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 https://www.dropbox.com/scl/fi/d8k5s67vli0mq97ac520y/COR21_79_Xastransect_79_F1_THC.h5?rlkey=33ragg4p6x9rx65t9yvi5kewe&dl=0

 

Sincerely,

Jesse Walters

 

--

Jesse B. Walters

Ambizione Fellow

Institut für Geologie 

Universität Bern