-
Notifications
You must be signed in to change notification settings - Fork 32
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
Fitting XRD data for thin films and superlattices #43
Comments
I agree that such functionality would be helpful. A quick fix for one particular model would be to copy the fit_xrr function for the KinematicalModel. However, in the long run this should be possible not only for the kinematical but also for the other diffraction models. As a note to myself: This is most likely best implemented in a way that all the Models become lmfit models and somehow return a list of their parameters which can then be fitted by a generic wrapper around some lmfit minimize function. The layer stack could also be such a model which has its own parameters which can be easily combined with the ones of the model in a CompositeModel. In this way even the XRR could be fitted using this generic approach. |
Unfortunately I was a bit naive with my comment. CompositeModel is not appropriate for this use-case since the parameters of the LayerStack are needed for the XRR/XRD models and can't be separated out. I can imagine a solution by dynamic generation of the model function used for lmfit.Model, but this seems not a very clean solution. |
in particular make the energy a fitable variable by recalculating the optical parameters whenever needed
This in principle should fix this issue but needs a lot of testing So far the functionality for the fitting of XRR data is equally achieved as for the fit_xrr function which will be deprecated in the next release
The mentioned commits potentially fix this issue. |
Missing things which need some more work for XRD models to fit using the new approach are:
|
This means Powder and Layer can both access this code
I consider the main points of this issue fixed. If problems with the implementation arise or specific improvements are needed (see for example issue #65) a separate issue should be opened |
It would be helpful if the kinematical diffraction model could be used to do a rough fit of formatted XRD data for thin films and superlattices in the same way that data for X-ray reflection can be fit. Being able to choose which factors are varied would be helpful as well.
The text was updated successfully, but these errors were encountered: