Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feffit with an array of uncertainty in chi(k) #133

Open
bruceravel opened this issue Mar 11, 2016 · 5 comments
Open

feffit with an array of uncertainty in chi(k) #133

bruceravel opened this issue Mar 11, 2016 · 5 comments

Comments

@bruceravel
Copy link
Contributor

Matt,

In the doc, you say Though usually ϵ is taken to be a scalar value, it can be specfied as an array (of the same length as χ(k)) if more accurate measures for the uncertainty of the data is available.

I was doing some code diving, but wasn't able to figure out the syntax for this. Could you provide an example. Just explaining how to modify this would be quite enough to get me started.

Thanks!
B

@newville
Copy link
Member

@bruceravel yeah, that seems broken. I think the right behavior should be to allow 'epsilon_k' as a keyword arg to feffit_dataset(), and allow this to either be a scalar value or an array that is the same length as k and chi -- the uncertainty at each k point. Will fix.

@newville
Copy link
Member

@bruceravel should be fixed now. Essentially, if a data group has epsilon_k as either a scalar or array the same length as k then that is used for the fit. Or you can now specify epsilon_k in feffit_dataset().

@bruceravel
Copy link
Contributor Author

Matt, looking at the example Feffit_01.lar, I was surprised that the array-valued cu.epsilon_k only had an impact on the evaluation of chi-square. The best fit values and uncertainties of the 4 parameters were identical to 6 digits.

Am I thinking about this wrongly? I certainly don't expect a big change for Cu foil data. But I would have thought that, with a non-integer value for epsilon, the numerical convergence of the fit would have resulted in differences in the smaller decimal places of the parameters.

@newville
Copy link
Member

@bruceravel Hm, yeah something seems wrong. Will investigate.

@newville
Copy link
Member

@bruceravel Ah, yes, I see that epsilon_r is set to its mean value. And that's because I don't know how to transform an array of epsilon(k) to an array of epsilon(R). Parseval only says that the squares of the integrals are the same, not what the spectrum looks like in each space....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants