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.00000000 [0.95] enot = 5.29826510 # +/- 0.00000000 [0] delrIn11 = 0.00235278 # +/- 0.00000000 [0] ssIn11 = 0.00155959 # +/- 0.00000000 [0.00300] delrCe1 = -0.00231455 # +/- 0.00000000 [0] ssCe1 = 0.00192778 # +/- 0.00000000 [0.00300] delrIn11In11 = 0.02070081 # +/- 0.00000000 [0] delrIr1 = -0.00435502 # +/- 0.00000000 [0] ssIr1 = 0.00386517 # +/- 0.00000000 [0.00300] delrIn31 = 0.00648507 # +/- 0.00000000 [0] ssIn31 = 0.00669602 # +/- 0.00000000 [0.00300] delrIn12 = 0.00255704 # +/- 0.00000000 [0] ssIn12 = 0.00305432 # +/- 0.00000000 [0.00300]
def parameters: b = 0.80000000 # [min(max(0.8,amp),1.0)]
-- Bruce Ravel ------------------------------------ bravel@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