Re: [Ifeffit] Differences between Larch and Artemis when performing FEFF calculations

2023-10-17 Thread Ava Rajh

Hello Matt!

thank you for the response. In putting together all the project files 
for the minimal working example I tested a bunch more .cif files of 
various materials including different graphite file, and there was no 
difference in Larch and Athena in any of them (as long as the same FEFF 
version and input settings are used) as expected.


Looking closely at the feff input file for the C.cif I was having 
trouble with, there were some differences which I haven't noticed when 
looking through them before. So as far as I am concerned, this was a 
user error on my part, as the generated input files weren't exactly the 
same. If I save the input feff file from Larch and use that in Artemis 
or the other way around, as you suggested, the results match exactly. 
The compared spectra in my previous message were calculated separately, 
exported and plotted together.


thank you for very much for the help and kind regards, Ava




Message: 1
Date: Mon, 16 Oct 2023 15:24:26 -0500
From: Matt Newville 
To: XAFS Analysis using Ifeffit 
Subject: Re: [Ifeffit] Differences between Larch and Artemis when
performing FEFF calculations
Message-ID:

Content-Type: text/plain; charset="utf-8"

Hi Ava,

I think you'll have to give us more details about what you have done.  
The
figures you show are all in R-space, so after at least some 
processing...
 So, yes, project files and/or scripts would be helpful.  Yes, there 
can be

subtle changes in the background subtraction (and in the normalization
process too) between Larch and Ifeffit/Athena/Artemis.

By default, Artemis uses Feff 6.10 and Larch uses Feff 8.  For the C K
edge, that could have a noticeable difference, especially in the 
placing of

the k=0 value, though I do not know how big that effect would be for C
(graphite?).   But also, Artemis and Larch can both read the inputs 
from

the other calculations:  it might be that this is what you have done to
make the plots, but that wasn't 100% clear to me.




On Mon, Oct 16, 2023 at 2:08?PM Ava Rajh  wrote:


Dear all!

I haven't been able to find a similar question/issue in the previous
threads, so I hope someone can help me figure out what is going on.

I am trying to fit a Carbon EXAFS spectra, using graphite as a model. 
I

am first focusing on just the first two single scattering paths, so I
calculated the theoretical paths with FEFF in Larch and tried using 
them
to fit the spectra. I was consistently getting slightly lower 
distances

than expected, but otherwise an OK fit.

The issue is, I tried to compare the analysis with a colleague who is
using Athena. At first glance the EXAFS spectra, using the exact same
parameters, looked very similar (but not exactly the exactly the same,
this I attributed to Larch using a different autobk procedure). I 
would

have however expected the theoretical paths to match exactly, if they
were calculated and plotted with the same parameters. But they were 
also

slightly different.  I then downloaded Athena and spent time trying to
find where the differences come from. If I compare the first two
calculated shells from Larch with the ones from Athena, with exactly 
the

same set of test parameters (S02 = 1, E0 = 0, dr1 = 0, s2_1 = 0, dr2 =
0, s2_2 = 0), the resulting models do not match. I made sure the paths
are calculated from the came .cif file in both cases, use FEFF6, have
the same calculated reference distances, same FT...

So, my main question is, am I missing something important in regards 
to
calculations, why would the calculated paths be different and which 
one

would be the "correct" one to use for the fit? And the other question
would be about the fact that EXAFS spectra of experimental data look
slightly different using Larch and Athena, am I right in disregarding
this, or should I dig deeper and find the source of discrepancy?

I am enclosing a plot of just the calculated first two shells from
Athena and Larch (FT: kmin =  2, kmax = 7.5, Fittting in R space, kw =
3, kWindow = Hanning, dk = 1.0, Rmin = 0.6, Rmax = 2.1) along with the
cif file I ended up using for testing the differences. If it would be
helpful, I can also provide the project files and larch script I used
for the dataset, but I am mainly interested in understanding the
differences seen in the theoretical parts first. I tested this using
Larch v 0.9.72 and Demeter 0.9.26

Thank you ver much for the help, and If I need to provide any 
additional

info please let me know.
kind regards, Ava

--
Ava Rajh___

___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


Re: [Ifeffit] Artemis fit error - chi-square and R-factors are always equal to 0

2021-03-27 Thread Ava Rajh

HI, I hope I am replying to the thread correctly.

Thank you for your insights, I have spent a lot of time tinkering with 
installation and I have a partial solution. To first answer your 
questions:
- yes, the fit ran ok and comparing it to the same fit using ifeffit 
(done by a a machine using ifeffit that works correctly), the calculated 
parameters are almost the same, with slight differences of 10-5 order of 
magnitude. The plot after the fit also looks fine.
-the log I attached was from the example Cu data set, but the issue 
happens on every fit I try to run.
-I'm not sure about the feff.dat file used, I haven't been able to 
locate it in my installation.
- Feff6 (or Feff6l if I set it in preferences) are able to run as far as 
I can tell
-I have run the example larch scripts to which you pointed me, and most 
of them were able to run ok, with no obvious issues (the parameters 
looked ok and reduced chi-square and R vales were reported). There was 
an error in running a few of the tests something to do with PlotDisplay, 
but I'm pretty sure these aren't related issues.


To me, all of this points to some trouble Artemis has communicating with 
larch. I have tried downgrading the installation from 0.9.50 (that 
installs with pip) to 0.9.49 (that the website says is the current) and 
an even older ones but no luck.


The solution war disappointingly trivial: If I completely removed larch 
and demeter suite along with everything else I installed in the last few 
days, from my computer and tried to compile it again, this time with 
ifeffit, I finally managed to get the reduced-chi square and R values. I 
have no idea why it didn't work when I tried it a few times before 
before but now I am able to get the fit and all required parameters. It 
still doesn't work with larch, but for now, at least I'm able to get the 
results. I'll re-install Larch and tinker with it a bit more to try to 
figure out where the error was coming from and report back if I find 
anything that might help someone else facing the same issue.


Thanks again for the help
Best, Ava
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


[Ifeffit] Artemis fit error - chi-square and R-factors are always equal to 0

2021-03-26 Thread Ava Rajh

Hello,

I have recently installed Demeter suite on my LinuxMint 20 machine with 
all required dependencies met. Athena works well and Demeter passed all 
tests during installation. When running Artemis however, there is an 
issue with fits that persists with provided examples any any other 
projects I open (including the ones done by colleagues and just re-run 
on my machine).


After the fit (which completes fine and returns expected fit that looks 
ok when comparing it to experiment), when inspecting the log file, 
chi-square, reduced chi-square and R values are equal to 0 (example log 
file attached bellow). No errors accompany the fit.


I am using Larch installed with anaconda, and Artemis uses Feff6 
executable. I have re-installed Demeter and tried to get it to work with 
Ifeffit but the error persists. I have found an existing git hub thread 
dealing with similar issue 
(https://github.com/bruceravel/demeter/issues/62) but no solution that I 
could discern. Could it be an issue with my perl version (5.30.0)?


If someone has any ideas what the issue could be and how to fix it, I 
would appreciate the help. Please let me know if I can provide any 
additional information, and I apologize if there is something obvious I 
may have missed.


Sincerely,
Ava

--
Ava Rajh
 Name: Fit 4(fzexv) 
 Description : fit to cu010k
 Figure of merit : 4
 Time of fit : 2021-03-26T12:12:21  
 Environment : Demeter 0.9.26 with perl 5.03 and using Larch X.xx on 
linux
 Interface   : Artemis (Wx 0.9932)  
 Prepared by : ava@ava-PC   
 Contact :  


=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=


Independent points  : 25.401
Number of variables : 4
Chi-square  : 0.000
Reduced chi-square  : 0.000 
R-factor: 0.000 
Number of data sets : 1


Happiness = 100.00/100 color = #D8E796  
* Note: happiness is a semantic parameter and should *  
*NEVER be reported in a publication -- NEVER!*  

guess parameters:   
  ss_Cu1 =   0.00341875# +/-   0.3724 [0.00300]
  dr_Cu1 =  -0.00471435# +/-   0.00045738 [-0.00504]
  dE0=   5.41536257# +/-   0.14032983 [5.36177]
  amp=   0.89986572# +/-   0.00826589 [0.9]

set parameters: 
  N1 =   1.

Correlations between variables: 
All other correlations below 0.4

= Data set >> cu010k << 

: file= 
: name= cu010k
: k-range = 3.000 - 22.950
: dk  = 1
: k-window= Hanning
: k-weight= 3
: R-range = 1 - 3
: dR  = 0.0
: R-window= Hanning
: fitting space   = r
: background function = no
: phase correction= no
: background removal  = 
: user-supplied epsilon_k = 0
: epsilon_k by k-weight   = 3 -> 2.602e-04
: epsilon_r by k-weight   = 3 -> 3.592e-01
: R-factor by k-weight= 1 -> 0.00434,  2 -> 0.00233,  3 -> 0.00246

  nameN   S02 sigma^2   e0 delr Reff R
=
[atoms]  Cu.1 12.000   0.000   0.0   0.000  0.0  2.55270  2.55270

  nameei   third fourth
=
[atoms]  Cu.1 0.0   0.0   0.0


=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit