Superimposing Scattering Profiles

5 views
Skip to first unread message

Matthias Zeug

unread,
May 26, 2021, 7:21:10 AM5/26/21
to BioXTAS RAW
Hi all,

I wondered if you could help clear up a question, for which I unfortunately can't find the complete answers in the docs https://bioxtas-raw.readthedocs.io/en/latest/manual/The_Manipulation_Panel_and_Main_Plot_Window.html?highlight=superimpose#superimposing-data.

 My question would be if RAW also considers the experimental errors of the scattering curves when superimposing them. Also, it is somehow possible to obtain the x^2 value of the fit?

 Thank you very much.

 Best,

 Matthias

Jesse Hopkins

unread,
May 26, 2021, 9:08:12 AM5/26/21
to bioxt...@googlegroups.com
Hi Matthias,

RAW does just a simple linear least squares fit for the superposition (forcing offset or scale to be zero, if you’re just doing a scaled or offset superposition respectively), and it is not error weighted. Unfortunately, there’s no way in RAW to get the chi^2 value of the difference between the datasets. It’s been a while since I looked at this code (years), but having it be error weighted wouldn’t be hard, and is probably a good idea.

If you’re interested in making your own method to do this, if you use python it would be pretty simple to use the RAW API to load in your .dat files, and then probably something like the scipy.optimize.curve_fit to do the actual error weighted fitting.

All the best.

- Jesse

----
Jesse Hopkins, PhD
Beamline Scientist
BioCAT, Sector 18
Advanced Photon Source

--
You received this message because you are subscribed to the Google Groups "BioXTAS RAW" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioxtas_raw...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioxtas_raw/ccee9d97-fb9c-4874-9aa8-9611f8944dd8n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages