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

Uncertainty propagation? #1

Open
phockett opened this issue Mar 27, 2017 · 2 comments
Open

Uncertainty propagation? #1

phockett opened this issue Mar 27, 2017 · 2 comments

Comments

@phockett
Copy link

Great code and implementation of pBasex! Really nice work, and thanks for sharing.

But... is there currently a way to do error propagation?

In a version of the original pBasex code, which I ran many years ago, experimental uncertainties could be propagated through the inversion. I think I still have the source code somewhere, so I can take a look to see how it was done if that'd be helpful.

@e-champenois
Copy link
Owner

I don't think I'll immediately have time to implement it as part of this code release, but it is possible to propagate errors using the identity Var(Ax) = AVar(x)A^T, where Var(y) represents the covariance matrix of vector y (and in fact I have done this as part of my analysis in the past). The two main steps to the inversion are finding the basis set coefficients from the raw image data and extracting the radial and angular distributions from these coefficients. Both of these steps can be represented as a matrix multiplication (and they are in the code though it is a bit convoluted), so we can turn to the above expression for getting the variance of Ax if the variance of x is known. I was planning to add a more useful tutorial to this code eventually so I will try to add this feature as well when I find the time.

@phockett
Copy link
Author

Ah, very informative, thanks. I think this tallies with what I have in the original code (which I'm just poking around in today), although there are some extra renormalisation steps in that case which I don't yet understand.

In any case, I'll probably look into it a bit further today (for my understanding, if nothing else), and let you know if I end up implementing it in cpBasex.

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

No branches or pull requests

2 participants