[Ifeffit] [EXTERNAL] Ifeffit Digest, Vol 235, Issue 11

Dien.Li at srnl.doe.gov Dien.Li at srnl.doe.gov
Thu Sep 15 13:04:42 CDT 2022


Please see this attachment. Thank you so much.

Dien

-----Original Message-----
From: Ifeffit <ifeffit-bounces at millenia.cars.aps.anl.gov> On Behalf Of ifeffit-request at millenia.cars.aps.anl.gov
Sent: Thursday, September 15, 2022 1:42 PM
To: ifeffit at millenia.cars.aps.anl.gov
Subject: [EXTERNAL] Ifeffit Digest, Vol 235, Issue 11

Send Ifeffit mailing list submissions to
	ifeffit at millenia.cars.aps.anl.gov

To subscribe or unsubscribe via the World Wide Web, visit
	http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
or, via email, send a message with subject or body 'help' to
	ifeffit-request at millenia.cars.aps.anl.gov

You can reach the person managing the list at
	ifeffit-owner at millenia.cars.aps.anl.gov

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Ifeffit digest..."


Today's Topics:

   1. Re: [EXTERNAL] Ifeffit Digest, Vol 235, Issue 10
      (Dien.Li at srnl.doe.gov)


----------------------------------------------------------------------

Message: 1
Date: Thu, 15 Sep 2022 17:41:19 +0000
From: "Dien.Li at srnl.doe.gov" <Dien.Li at srnl.doe.gov>
To: "ifeffit at millenia.cars.aps.anl.gov"
	<ifeffit at millenia.cars.aps.anl.gov>
Subject: Re: [Ifeffit] [EXTERNAL] Ifeffit Digest, Vol 235, Issue 10
Message-ID:
	<DM8PR09MB6232C4DEDD6CCE2CF3984655C4499 at DM8PR09MB6232.namprd09.prod.outlook.com>
	
Content-Type: text/plain; charset="us-ascii"

Hi, Matt and EXAFS experts

Thank you so much. Our sample is porous silica + PO4 ligand on surface/pore, then react with LaNO3 in solution. The model is that La is bonding with PO4 through both mono- (corner-sharing) and di-dentate (edge sharing) modes. 

Please see the attachment. The first three fits in history are fits with increasing paths, with fixed CN for the La-P11 and La-P14 path, the ss parameters are reasonable, but to fix CN at 3 for La-P14 is unreasonable, which requires La to bind with three different PO4 groups.

The last three fits are fits with increasing paths, in which CN was fitted, the fitted parameters are reasonable, EXCEPT for the negative ss parameters for the path La-P11 (edge sharing) and La-P14 (corner sharing). By the way, the length for La-P14 is +0.3 A, it is large, but not completely unreasonable, because the bond distances of La-O polyhedron may change from 2.4 to 3.1 A.

Is it possible to constrain ss parameter? If so, how to set up this constrain? Thank you so much for your further instruction.

Dien

-----Original Message-----
From: Ifeffit <ifeffit-bounces at millenia.cars.aps.anl.gov> On Behalf Of ifeffit-request at millenia.cars.aps.anl.gov
Sent: Wednesday, September 14, 2022 4:03 PM
To: ifeffit at millenia.cars.aps.anl.gov
Subject: [EXTERNAL] Ifeffit Digest, Vol 235, Issue 10

Send Ifeffit mailing list submissions to
	ifeffit at millenia.cars.aps.anl.gov

To subscribe or unsubscribe via the World Wide Web, visit
	http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
or, via email, send a message with subject or body 'help' to
	ifeffit-request at millenia.cars.aps.anl.gov

You can reach the person managing the list at
	ifeffit-owner at millenia.cars.aps.anl.gov

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Ifeffit digest..."


Today's Topics:

   1. Re: Larch: Fitting error of the objective/model function
      (Matt Newville)
   2. Re: Help for EXAFS fitting (Matt Newville)


----------------------------------------------------------------------

Message: 1
Date: Wed, 14 Sep 2022 13:28:38 -0500
From: Matt Newville <newville at cars.uchicago.edu>
To: XAFS Analysis using Ifeffit <ifeffit at millenia.cars.aps.anl.gov>
Subject: Re: [Ifeffit] Larch: Fitting error of the objective/model
	function
Message-ID:
	<CA+7ESbodGVSNHuzTHZoeb3iL-jUsWFpeYM7TqLQPkkSyMyE2DA at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Fan,

Sorry for the trouble.  That seems like a strange error to me - I don't see
why changing those expressions for E0s (even if they are  "slightly
complicated"!) should generate NaNs or Infinities.  I don't think I've seen
that happen with "feffit" fittings.   Can you send me a Larch Session File
with this fit in it?

 One suggestion is to place bounds (say +/- 20 eV) on those Parameters, say
   pars.del_e0_11=param(expr='0.5*del_e0_O+0.5*del_e0_Sr', min=-20, max=20)

But I'm not certain whether that would solve this problem.


On Wed, Sep 14, 2022 at 7:53 AM <dxfan at post.kek.jp> wrote:

> Dear All
>
>
>
> I am doing Temperature-dependent EXAFS experiment with a lot of data.
>
>
>
> Usually, we do these kinds of data fitting by several steps, like below:
>
> First, put every parameter free, and obtain the averaged value of amp.
>
> Second, set the amp to the averaged value, put other parameters free, and
> then obtain the averaged value of del_e0.
>
> Third, set the amp and del_e0 to the averaged value, and fit again.
>
>
>
> In my case, my sample is perovskite structure (Ti K-edge of SrTiO3).
>
> To increase the fitting accuracy, I use three del_e0 for O, Ti, Sr as
> suggested in paper: Haskel, D., et al. Physica B: Condensed Matter 208
> (1995): 151-153.
>
> The fitting parameters of Cubic model is this:
>
>     setattr(pars, f'alpha', param(0, vary=True))
>
>     setattr(pars, f'amp',      param(0, vary=True))
>
>     setattr(pars, f'del_e0_O',   param(0, vary=True))
>
>     setattr(pars, f'del_e0_Sr',   param(0, vary=True))
>
>     setattr(pars, f'del_e0_Ti',   param(0, vary=True))
>
>     setattr(pars, f'sig2_O',  param(.002, vary=True))
>
>     setattr(pars, f'sig2_Sr',  param(.002, vary=True))
>
>     setattr(pars, f'sig2_Ti',  param(.002, vary=True))
>
>     setattr(pars, f'sig2_Tr1', param(.002, vary=True))
>
>     setattr(pars, f'sig2_p',   param(.002, vary=True))
>
>     setattr(pars, f'sig2_Tr2', param(.002, vary=True))
>
>
>
>     #del_e0 for each path
>
>     pars.del_e0_1=param(expr='del_e0_O')
>
>     pars.del_e0_2=param(expr='del_e0_O')
>
>     pars.del_e0_3=param(expr='del_e0_Sr')
>
>     pars.del_e0_4=param(expr='del_e0_Ti')
>
>     pars.del_e0_5=param(expr='del_e0_O')
>
>     pars.del_e0_6=param(expr='0.5*del_e0_O+0.5*del_e0_Ti')
>
>     pars.del_e0_7=param(expr='(2*del_e0_O+del_e0_Ti)/3')
>
>     pars.del_e0_8=param(expr='(2*del_e0_O+del_e0_Ti)/3')
>
>     pars.del_e0_9=param(expr='(2*del_e0_O+del_e0_Ti)/3')
>
>     pars.del_e0_10=param(expr='(2*del_e0_O+del_e0_Ti)/3')
>
>     pars.del_e0_11=param(expr='0.5*del_e0_O+0.5*del_e0_Sr')
>
>
>
> In the first step, the fitting is fine, I obtained the averaged amp.
>
> However, in the second step, when I set amp to the averaged value, Error
> happens for ?some? of the data.
>
> When I use different averaged amp value, the data that happens error is
> different.
>
> The error is:
>
> Traceback (most recent call last):
>
>   File "STO16_C_2.py", line 250, in <module>
>
>     out = feffit(pars, dset)
>
>   File
> "D:\anaconda3\envs\xraylarch\lib\site-packages\larch\xafs\feffit.py", line
> 557, in feffit
>
>     result = fit.leastsq()
>
>   File "D:\anaconda3\envs\xraylarch\lib\site-packages\lmfit\minimizer.py",
> line 1689, in leastsq
>
>     lsout = scipy_leastsq(self.__residual, variables, **lskws)
>
>   File
> "D:\anaconda3\envs\xraylarch\lib\site-packages\scipy\optimize\minpack.py",
> line 423, in leastsq
>
>     retval = _minpack._lmdif(func, x0, args, full_output, ftol, xtol,
>
>   File "D:\anaconda3\envs\xraylarch\lib\site-packages\lmfit\minimizer.py",
> line 601, in __residual
>
>     return _nan_policy(np.asarray(out).ravel(),
>
>   File "D:\anaconda3\envs\xraylarch\lib\site-packages\lmfit\minimizer.py",
> line 2436, in _nan_policy
>
>     raise ValueError(msg)
>
> ValueError: NaN values detected in your input data or the output of your
> objective/model function - fitting algorithms cannot handle this! Please
> read
> https://lmfit.github.io/lmfit-py/faq.html#i-get-errors-from-nan-in-my-fit-what-can-i-do
> for more information.
>
>
>
> I don?t know what happened, can somebody help me figure this out?
>
>
>
> PS: when I use only one del_e0 for every path, no such error happens.
>
>
>
> Best regards
>
> Fan
> _______________________________________________
> Ifeffit mailing list
> Ifeffit at millenia.cars.aps.anl.gov
> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
> Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>


-- 
--Matt Newville <newville at cars.uchicago.edu> 630-327-7411
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://millenia.cars.aps.anl.gov/pipermail/ifeffit/attachments/20220914/9e661cf6/attachment-0001.htm>

------------------------------

Message: 2
Date: Wed, 14 Sep 2022 15:02:14 -0500
From: Matt Newville <newville at cars.uchicago.edu>
To: XAFS Analysis using Ifeffit <ifeffit at millenia.cars.aps.anl.gov>
Subject: Re: [Ifeffit] Help for EXAFS fitting
Message-ID:
	<CA+7ESbo4Q57h9ooSCMo-5D5azSXs8DVe01Ldk-By=TRdo+WBWg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Dien,

When I look at your project, I find that I have to add Parameters to the
GDS page for the "P1.1" path.  When I include that in the fit, the
coordination number for that Path goes to 0 (0.07 +/- 0.3) and that
"ss_P11" is -0.03 +/- 0.04.  Both "P1.1" and "P1.4" show values for "delr"
that are above 0.8 Ang, pushing them both to be at R ~ 4.0 Ang.

My guess would be that those might not be the best paths to use here.  It
does look like there is something with R ~ 3.8 Ang, but I might I
am not sure I can guess what that is...


On Fri, Sep 9, 2022 at 11:32 AM Dien.Li at srnl.doe.gov <Dien.Li at srnl.doe.gov>
wrote:

> Hi, Matt and Carlo and other EXAFS experts
>
>
>
> Attached please find a fpj data file. The basic system is silica + PO4
> ligand on surfaces, which was used for adsorption of La. We collected La
> L3-edge EAXFS data and did this fitting. I used two models of La binding as
> monodentate and bidentate. I saw the negative ss parameter. I saw this in
> some of my other EXAFS data fitting samples as well. I have two questions
> for help:
>
>    1. What might cause the negative ss parameters and how I may improve
>    this, is this caused by incorrect structure models
>    2. If we can do some ?stress? test to make sure the fitting is valid
>    and meaningful.
>
>
>
> Please you can help look at and play this data set and direct me on how to
> do this correctly, thank you so much.
>
>
>
> Dien Li
>
> Savannah River National Laboratory
>
>
> _______________________________________________
> Ifeffit mailing list
> Ifeffit at millenia.cars.aps.anl.gov
> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
> Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>


--Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://millenia.cars.aps.anl.gov/pipermail/ifeffit/attachments/20220914/f5a363b6/attachment.htm>

------------------------------

Subject: Digest Footer

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


------------------------------

End of Ifeffit Digest, Vol 235, Issue 10
****************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MMS-PP-1-La EXAFS fit_Ifeffit list.fpj
Type: application/octet-stream
Size: 880238 bytes
Desc: MMS-PP-1-La EXAFS fit_Ifeffit list.fpj
URL: <http://millenia.cars.aps.anl.gov/pipermail/ifeffit/attachments/20220915/dc9ec2c5/attachment.obj>

------------------------------

Subject: Digest Footer

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


------------------------------

End of Ifeffit Digest, Vol 235, Issue 11
****************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MMS-PP-1-La EXAFS fit_Ifeffit list.fpj
Type: application/octet-stream
Size: 879695 bytes
Desc: MMS-PP-1-La EXAFS fit_Ifeffit list.fpj
URL: <http://millenia.cars.aps.anl.gov/pipermail/ifeffit/attachments/20220915/13f7ed15/attachment-0001.obj>


More information about the Ifeffit mailing list