What you see is "not" what you get: help
Hi folks, I´ve been working on Xanes peaks fitting with Athena (last version) and I found a strange behaviour. I get a "good" fit looking to the Graphics Window of Athena and to the minimized parameters (R-factor, etc). However, when I use the data of the fit generated by Athena "write a log file" feature and plot them in Origin, the fit looks bad! In order to get a "good looking" fit in Origin I have to change the parameters ad-hoc in Athena fitting dialog box. When I do this, the fit looks bad in Athena Graphics window and better in Origin. The values that are inserted ad-hoc in Athena are not the optimized ones from the fitting procedure output. I have attached the log file from Athena fit and two figures: a PS figure from Athena and a JPG figure from Origin. It resembles that the generated data from Athena are not exactly these ones that I see in the Graphics window! I´m looking for help from someone out there. Kind regards, Ismael. -- Ismael Leandro Graff Departamento de Física - UFPR Centro Politécnico, CP 19044 81531-990, Curitiba, Brazil. Tel: +55 41 3361 3427 Fax: +55 41 3361 3418
I would find it helpful to have a simplified Athena project file so that we can understand your problem. Can you send one? Cheers, Shelly -----Original Message----- From: ifeffit-bounces@millenia.cars.aps.anl.gov on behalf of Ismael Graff Sent: Thu 7/9/2009 1:52 PM To: ifeffit@millenia.cars.aps.anl.gov Subject: [Ifeffit] What you see is "not" what you get: help Hi folks, I´ve been working on Xanes peaks fitting with Athena (last version) and I found a strange behaviour. I get a "good" fit looking to the Graphics Window of Athena and to the minimized parameters (R-factor, etc). However, when I use the data of the fit generated by Athena "write a log file" feature and plot them in Origin, the fit looks bad! In order to get a "good looking" fit in Origin I have to change the parameters ad-hoc in Athena fitting dialog box. When I do this, the fit looks bad in Athena Graphics window and better in Origin. The values that are inserted ad-hoc in Athena are not the optimized ones from the fitting procedure output. I have attached the log file from Athena fit and two figures: a PS figure from Athena and a JPG figure from Origin. It resembles that the generated data from Athena are not exactly these ones that I see in the Graphics window! I´m looking for help from someone out there. Kind regards, Ismael. -- Ismael Leandro Graff Departamento de Física - UFPR Centro Politécnico, CP 19044 81531-990, Curitiba, Brazil. Tel: +55 41 3361 3427 Fax: +55 41 3361 3418
Dear All, I think I understand the point here. Ismael, please correct me if I'm wrong. 1) The experimental data is imported into Athena and fitted through the "peak fitting with lineshapes" feature. The fitting looks very good in Athena - the red curve matches the experimental spectrum well, as seen in the file "plot athena.ps" attached on Ismael's previous email. So far, so good. 2) But then Ismael needs to plot the data and the fit in another program, because he wants high-quality graphs for journal publications. That's where the problem starts. He clicks on the "write a log file" button in the peak fit page in Athena and generates a .log file where the fitting results - both the functions/parameters and the columns for mu(E), experimental data, fit and each component - are included. That would be file "fitting results.log" attached to Ismael's previous email, which can be read in any text editor. 3) But when Ismael plots the data from the "fitting results.log" file into Origin (or whatever), there is a significantly higher mismatch between the experimental spectrum and the fit, as shown in the file "graph origin.jpg". I guess that's what prompted Ismael to write "What you see is "not" what you get", since the graph in Origin looks different from the graph in Athena. 4) If we pay close attention to both graphs, we can see that the experimental spectrum peaks at different mu(E) values: in "plot athena.ps" it peaks at ~ 2.3 while in "graph origin.jpg" it peaks at ~ 2.5. The fit, on the other hand, peaks at ~ 2.3 in both graphs. 5) Thus, my guess is that when Athena exports the data through the "write a log file" button in the peak fit page it spits out the raw mu(E) instead of the normalized mu(E). That's why there seems to be a mismatch in Origin: while in the Athena graph the experimental data is plotted as normalized mu(E), in the exported file and the origin graph we have the raw mu(E). The fit doesn't seem to change, but it was optimized for the normalized mu(E) and doesn't match the raw mu(E) that well. 6) One easy workaround would be exporting just the experimental data as normalized mu(E) through the "file" dialog in Athena and then overlaying it on the same graph with the fit exported through the "fitting results.log" file. Cheers, Leandro Ismael Graff wrote:
Hi folks,
I´ve been working on Xanes peaks fitting with Athena (last version) and I found a strange behaviour. I get a "good" fit looking to the Graphics Window of Athena and to the minimized parameters (R-factor, etc). However, when I use the data of the fit generated by Athena "write a log file" feature and plot them in Origin, the fit looks bad! In order to get a "good looking" fit in Origin I have to change the parameters ad-hoc in Athena fitting dialog box. When I do this, the fit looks bad in Athena Graphics window and better in Origin. The values that are inserted ad-hoc in Athena are not the optimized ones from the fitting procedure output. I have attached the log file from Athena fit and two figures: a PS figure from Athena and a JPG figure from Origin. It resembles that the generated data from Athena are not exactly these ones that I see in the Graphics window!
I´m looking for help from someone out there.
Kind regards, Ismael.
------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________ Ifeffit mailing list Ifeffit@millenia.cars.aps.anl.gov http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Ismael, Well.... I did something very silly. As Leandro surmised, Athena writes mu(E) rather normalized mu(E) to the peak fitting log file. I am rather perplexed as to how I did not notice that before.... I guess you get what you pay for, eh? ;-) Anyway, the problem is fixed in svn. I will rebuild the athena executable next week and make an update. In the meantime Leandro suggested a fairly simple work-around, which I too would recommend. B -- Bruce Ravel ----------------------------------- bravel@bnl.gov National Institute of Standards and Technology Synchrotron Methods Group at Brookhaven National Laboratory Building 535A Upton NY, 11973 My homepage: http://cars9.uchicago.edu/~ravel EXAFS software: http://cars9.uchicago.edu/~ravel/software/exafs/ -----Original Message----- From: ifeffit-bounces@millenia.cars.aps.anl.gov on behalf of Ismael Graff Sent: Thu 7/9/2009 2:52 PM To: ifeffit@millenia.cars.aps.anl.gov Subject: [Ifeffit] What you see is "not" what you get: help Hi folks, I´ve been working on Xanes peaks fitting with Athena (last version) and I found a strange behaviour. I get a "good" fit looking to the Graphics Window of Athena and to the minimized parameters (R-factor, etc). However, when I use the data of the fit generated by Athena "write a log file" feature and plot them in Origin, the fit looks bad! In order to get a "good looking" fit in Origin I have to change the parameters ad-hoc in Athena fitting dialog box. When I do this, the fit looks bad in Athena Graphics window and better in Origin. The values that are inserted ad-hoc in Athena are not the optimized ones from the fitting procedure output. I have attached the log file from Athena fit and two figures: a PS figure from Athena and a JPG figure from Origin. It resembles that the generated data from Athena are not exactly these ones that I see in the Graphics window! I´m looking for help from someone out there. Kind regards, Ismael. -- Ismael Leandro Graff Departamento de Física - UFPR Centro Politécnico, CP 19044 81531-990, Curitiba, Brazil. Tel: +55 41 3361 3427 Fax: +55 41 3361 3418
Dear Bruce, with the suggestion of Leandro I can do what I want to. So, thanks again Leandro for your help! This is just a very small bug that may happen, Athena and friends programs work very well in my opinion! I have to thank you Bruce, and also your colleagues (Matt Newville and others), to make such programs available for free. It is very important for the dissemination of science all over the world. As Dr. Abdus Salam (physics Nobel laureate in 1979) said: "Scientific thought is the common heritage of mankind" All the best, Ismael.
Ismael,
Well.... I did something very silly. As Leandro surmised, Athena writes mu(E) rather normalized mu(E) to the peak fitting log file. I am rather perplexed as to how I did not notice that before.... I guess you get what you pay for, eh? ;-)
Anyway, the problem is fixed in svn. I will rebuild the athena executable next week and make an update. In the meantime Leandro suggested a fairly simple work-around, which I too would recommend.
B
-- Bruce Ravel ----------------------------------- bravel@bnl.gov
National Institute of Standards and Technology Synchrotron Methods Group at Brookhaven National Laboratory Building 535A Upton NY, 11973
My homepage: http://cars9.uchicago.edu/~ravel EXAFS software: http://cars9.uchicago.edu/~ravel/software/exafs/
-----Original Message----- From: ifeffit-bounces@millenia.cars.aps.anl.gov on behalf of Ismael Graff Sent: Thu 7/9/2009 2:52 PM To: ifeffit@millenia.cars.aps.anl.gov Subject: [Ifeffit] What you see is "not" what you get: help
Hi folks,
I´ve been working on Xanes peaks fitting with Athena (last version) and I found a strange behaviour. I get a "good" fit looking to the Graphics Window of Athena and to the minimized parameters (R-factor, etc). However, when I use the data of the fit generated by Athena "write a log file" feature and plot them in Origin, the fit looks bad! In order to get a "good looking" fit in Origin I have to change the parameters ad-hoc in Athena fitting dialog box. When I do this, the fit looks bad in Athena Graphics window and better in Origin. The values that are inserted ad-hoc in Athena are not the optimized ones from the fitting procedure output. I have attached the log file from Athena fit and two figures: a PS figure from Athena and a JPG figure from Origin. It resembles that the generated data from Athena are not exactly these ones that I see in the Graphics window!
I´m looking for help from someone out there.
Kind regards, Ismael.
-- Ismael Leandro Graff
Departamento de Física - UFPR Centro Politécnico, CP 19044 81531-990, Curitiba, Brazil. Tel: +55 41 3361 3427 Fax: +55 41 3361 3418
_______________________________________________ Ifeffit mailing list Ifeffit@millenia.cars.aps.anl.gov http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
-- Ismael Leandro Graff Departamento de Física - UFPR Centro Politécnico, CP 19044 81531-990, Curitiba, Brazil. Tel: +55 41 3361 3427 Fax: +55 41 3361 3418
participants (4)
-
Ismael Graff
-
Kelly, Shelly
-
Leandro L. Araujo
-
Ravel, Bruce