xraypy/xraylarch

Exporting fit results

Opened this issue · 2 comments

Hi there,

I'm working with Larix (0.9.74) for XAS data analysis and so far it is a great experience!
Intuitive to use and well documented.

One thing I could not figure out yet is how to plot/export the fit results from multiple fits in one file.
An example is LCF of multiple spectra, where Athena allows for a plot of the fraction of each component vs. the spectra that were fitted. In Larch I couldn't find this option.
Another instance would be to export the fitted parameters from multiple FEFF fits in a single file.
In the "Show Fit Results" window, only one fit at a time can be accessed, and the fitted parameters have to be exported for each group individually.
Ideally, one could select multiple fits from the data tree on the left and export the corresponding values altogether.

I hope I'm not overseeing something obvious here...

Many thanks for your comments/help in advance!

@MBmabe Hm, I guess we don't (yet?) have a way in the GUI to make such a plot.
You can export all the fit statistics and results to a CSV file with "Save Statistics Report for All Fitted Groups" menu item from the "Linear Combination Results" window. That will include the weights of each component along with the statistics.

I guess there are a few different visualizations one might want here:

  • a bar graph with weights for different spectra -- maybe only work for a few (up to 5?) spectra at a time.
  • a plot of "fraction of N components" with spectra ID on the x-axis, but I can imagine the user would want to set the order of those samples as it encodes some sample condition.

Are those the sorts of things you were looking for, or did you have something else in mind?

Hi Matt,
thank you for your reply!
For the LCF part, this is what I was looking for. For the EXAFS fittings, I couldn't find a similar function (exporting the fit results for selected fits from all fitted groups) yet...

Regarding your question, I'd like to give a bit more context:
We are doing time-resolved XAS experiments, where catalysts are monitored under operating conditions.
Such experiments can result in large datasets (>100 spectra).
Eventually, one would like to extract fit results for each spectrum vs. time, where the timestamps could be extracted from the file headers for example.
I'm aware that this is quite a specific application, and not a feature that all users of XAS processing software need.

Thank you for your further comments in advance. I'm curious to know whether similar requests have reached you so far.