Re: [Ifeffit] Plot multiple fits in (D)Artemis and statistical errors

2012-11-26 Thread Bruce Ravel

Nilmar,

First off, sorry I did not respond to this part of your email earlier.
Life has been busy for me lately.  Today I am going over items in the
mailing list from the last several weeks to see what needs some
attention.

I will fix both of the issues you raised related to the fit history in
the next release, hopefully before the end of December.

At the end of your email from late October, you asked a question about
the evaluation of error bars.  The problem with the min/max method of
constraining a parameter value is that it interferes with the ability
to evaluate error bars.

This is pretty easy to understand.  Suppose that the fit really wants
the amplitude to be 0.75, but you have constrained it to be between
0.8 and 1, as shown below.  As the fit progresses, it moves "amp" to
smaller and smaller values.  Eventually, it tries a value smaller than
0.8.  Your constrained amplitude then evaluates to 0.8.  If the fit
tries an even smaller value, the result of the fit does not change.
This is the fundamental problem with the mix/max trick.

The correlations and error bars evaluate how the fit result changes as
the parameters are varied from their best fit values.  With your
min/max constraint, the fit stops changing once the value for "amp"
drops below 0.8.  If the fit doesn't change as the value of "amp"
changes, the uncertainties of the parameters cannot be evaluated.

So does that mean the min/max trick is useless?  Well, no.  It tells
you something about your fit.  Specifically, it tells you that the
value of "amp" *really* wants to be smaller than 0.8.  Which is to
say, you may need to revisit assumption about the appropriate value of
"amp". 

Can you do something better than the min/max trick?  Well, using Larch
would help -- Larch will have much more robust support for variables
with boundaries.  But Artemis does not yet use Larch.

Restraints help.  Read the answer to the first FAQ question at

  http://cars9.uchicago.edu/ifeffit/FAQ/FeffitModeling

In particular, check out the text attributed to Scott.

Hope that helps,
B

On Friday, October 26, 2012 10:42:05 AM Nilmar Camilo wrote:
> Another problem is related to the statistical errors when constraining the
> S0^2 parameter to float between two limits.  The program doesn’t return the
> error for all others parameters (but just zero as the error value) as you
> can see below:
> 
>  
> 
> guess parameters:   
>   amp=   0.79284158# +/-   0. [0.95]
>   enot   =   5.29826510# +/-   0. [0]
>   delrIn11   =   0.00235278# +/-   0. [0]
>   ssIn11 =   0.00155959# +/-   0. [0.00300]
>   delrCe1=  -0.00231455# +/-   0. [0]
>   ssCe1  =   0.00192778# +/-   0. [0.00300]
>   delrIn11In11   =   0.02070081# +/-   0. [0]
>   delrIr1=  -0.00435502# +/-   0. [0]
>   ssIr1  =   0.00386517# +/-   0. [0.00300]
>   delrIn31   =   0.00648507# +/-   0. [0]
>   ssIn31 =   0.00669602# +/-   0. [0.00300]
>   delrIn12   =   0.00255704# +/-   0. [0]
>   ssIn12 =   0.00305432# +/-   0. [0.00300]
> 
> def
> parameters:
>   b  =   0.8000# [min(max(0.8,amp),1.0)]
> 
>  


-- 

 Bruce Ravel   bra...@bnl.gov

 National Institute of Standards and Technology
 Synchrotron Methods Group at NSLS --- Beamlines U7A, X24A, X23A2
 Building 535A
 Upton NY, 11973

 Homepage:http://xafs.org/BruceRavel
 Software:https://github.com/bruceravel

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


Re: [Ifeffit] Plot multiple fits in (D)Artemis and statistical errors

2012-10-27 Thread Ravel, Bruce

Hi,

I am aware of both of these problems.  The tool for overplotting fits from the 
fit history is currently broken.  So is the tool for restoring an old fit.  
Fixing both of those is on my list of things to do.  Sorry for the 
inconvenience.

B


From: ifeffit-boun...@millenia.cars.aps.anl.gov 
[ifeffit-boun...@millenia.cars.aps.anl.gov] on behalf of Nilmar Camilo 
[nil...@fis.ufu.br]
Sent: Friday, October 26, 2012 8:42 AM
To: ifeffit@millenia.cars.aps.anl.gov
Subject: [Ifeffit] Plot multiple fits in (D)Artemis and statistical errors

Dear Bruce,

I am new in the list and really don’t know if the points raised below were 
already discussed.
In the (D)Artemis (Demeter version 0.9.13) how may I:

-  Plot different fits with the experimental data (to visually compare 
the results)

-  I don’t know if this is a (new) bug of the program but when I try to 
restore a fit the program closes. In the log file the following line is 
written: “Can't use an undefined value as a HASH reference at 
C:/Strawberry/perl/site/lib/Demeter/Fit.pm line 1558.”
Obs.:  I am running Demeter in Windows 7 (Pro).

Another problem is related to the statistical errors when constraining the S0^2 
parameter to float between two limits.  The program doesn’t return the error 
for all others parameters (but just zero as the error value) as you can see 
below:

guess parameters:
  amp=   0.79284158# +/-   0. [0.95]
  enot   =   5.29826510# +/-   0. [0]
  delrIn11   =   0.00235278# +/-   0. [0]
  ssIn11 =   0.00155959# +/-   0. [0.00300]
  delrCe1=  -0.00231455# +/-   0. [0]
  ssCe1  =   0.00192778# +/-   0. [0.00300]
  delrIn11In11   =   0.02070081# +/-   0. [0]
  delrIr1=  -0.00435502# +/-   0. [0]
  ssIr1  =   0.00386517# +/-   0. [0.00300]
  delrIn31   =   0.00648507# +/-   0. [0]
  ssIn31 =   0.00669602# +/-   0. [0.00300]
  delrIn12   =   0.00255704# +/-   0. [0]
  ssIn12 =   0.00305432# +/-   0. [0.00300]

def parameters:
  b  =   0.8000# [min(max(0.8,amp),1.0)]


Thanks so much in advance.
Nilmar


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


Re: [Ifeffit] Plot multiple fits in (D)Artemis and statistical errors

2012-10-26 Thread Christopher Patridge
Hello Nilmar,

You mention floating the so2 value between two values?  Can you constrain
that value and completely remove it from the fit?  It can usually be
reasonably determined by standards. You might also take a look at the
correlations in your fit.  As another general guideline, when posting
issues you come across, a very helpful step is to find and attach the log
file in the Demeter folder after the error occurs, such as the program
closing, which gives detailed information of the problem.  I don't remember
the exact location for the file but if you search the mailing list for the
DArtemislog or artemis log file, you should be able to find it.

You also have many parameters that you are fitting.  Could you establish
any sorts of relationships or approximations between them in order to
reduce the number?  You have ss for In and Ir which are quite close in
value as well as delrIn11   =   0.00235278 and  delrIn12
=   0.00255704# +/-   0. [0] .  You could set them equal to
each other and this can reduce the uncertainty of the fit.

buena salud,

Chris

On Fri, Oct 26, 2012 at 8:42 AM, Nilmar Camilo  wrote:

> Dear Bruce,
>
> ** **
>
> I am new in the list and really don’t know if the points raised below were
> already discussed.
>
> In the (D)Artemis (Demeter version 0.9.13) how may I:
>
> **-  **Plot different fits with the experimental data (to
> visually compare the results)
>
> **-  **I don’t know if this is a (new) bug of the program but
> when I try to restore a fit the program closes. In the log file the
> following line is written: “Can't use an undefined value as a HASH
> reference at C:/Strawberry/perl/site/lib/Demeter/Fit.pm line 1558.”
>
> Obs.:  I am running Demeter in Windows 7 (Pro).
>
> ** **
>
> Another problem is related to the statistical errors when constraining the
> S0^2 parameter to float between two limits.  The program doesn’t return the
> error for all others parameters (but just zero as the error value) as you
> can see below:
>
> ** **
>
> guess parameters:
>
>
>   amp=   0.79284158# +/-   0. [0.95]
>
>   enot   =   5.29826510# +/-   0. [0]
>
>   delrIn11   =   0.00235278# +/-   0. [0]
>
>   ssIn11 =   0.00155959# +/-   0. [0.00300]***
> *
>
>   delrCe1=  -0.00231455# +/-   0. [0]
>
>   ssCe1  =   0.00192778# +/-   0. [0.00300]***
> *
>
>   delrIn11In11   =   0.02070081# +/-   0. [0]
>
>   delrIr1=  -0.00435502# +/-   0. [0]
>
>   ssIr1  =   0.00386517# +/-   0. [0.00300]***
> *
>
>   delrIn31   =   0.00648507# +/-   0. [0]
>
>   ssIn31 =   0.00669602# +/-   0. [0.00300]***
> *
>
>   delrIn12   =   0.00255704# +/-   0. [0]
>
>   ssIn12 =   0.00305432# +/-   0. [0.00300]***
> *
>
> ** **
>
> def
> parameters:
> 
>
>   b  =   0.8000# [min(max(0.8,amp),1.0)]
>
> ** **
>
> ** **
>
> Thanks so much in advance.
>
> Nilmar
>
> ** **
>
> ___
> Ifeffit mailing list
> Ifeffit@millenia.cars.aps.anl.gov
> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
>
>


-- 
Christopher J. Patridge PhD.
Contact: (315)-529-0501
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


[Ifeffit] Plot multiple fits in (D)Artemis and statistical errors

2012-10-26 Thread Nilmar Camilo
Dear Bruce,

 

I am new in the list and really don't know if the points raised below were
already discussed.

In the (D)Artemis (Demeter version 0.9.13) how may I:

-  Plot different fits with the experimental data (to visually
compare the results)

-  I don't know if this is a (new) bug of the program but when I try
to restore a fit the program closes. In the log file the following line is
written: "Can't use an undefined value as a HASH reference at
C:/Strawberry/perl/site/lib/Demeter/Fit.pm line 1558."

Obs.:  I am running Demeter in Windows 7 (Pro).

 

Another problem is related to the statistical errors when constraining the
S0^2 parameter to float between two limits.  The program doesn't return the
error for all others parameters (but just zero as the error value) as you
can see below:

 

guess parameters:


  amp=   0.79284158# +/-   0. [0.95]

  enot   =   5.29826510# +/-   0. [0]

  delrIn11   =   0.00235278# +/-   0. [0]

  ssIn11 =   0.00155959# +/-   0. [0.00300]

  delrCe1=  -0.00231455# +/-   0. [0]

  ssCe1  =   0.00192778# +/-   0. [0.00300]

  delrIn11In11   =   0.02070081# +/-   0. [0]

  delrIr1=  -0.00435502# +/-   0. [0]

  ssIr1  =   0.00386517# +/-   0. [0.00300]

  delrIn31   =   0.00648507# +/-   0. [0]

  ssIn31 =   0.00669602# +/-   0. [0.00300]

  delrIn12   =   0.00255704# +/-   0. [0]

  ssIn12 =   0.00305432# +/-   0. [0.00300]

 

def parameters:


  b  =   0.8000# [min(max(0.8,amp),1.0)]

 

 

Thanks so much in advance.

Nilmar

 

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