xraypy / xraylarch

Larch: Applications and Python Library for Data Analysis of X-ray Absorption Spectroscopy (XAS, XANES, XAFS, EXAFS), X-ray Fluorescence (XRF) Spectroscopy and Imaging, and more.
https://xraypy.github.io/xraylarch
Other
127 stars 62 forks source link

multiple set fitting doesn't capture the fitting parameters correctly on Linux system #490

Open kaifengZheng opened 5 months ago

kaifengZheng commented 5 months ago

Dear Xraylarch community, I'm using Larch to fit multiple datasets at the same time. It works well on my windows 11 computer. However, it doesn't work correctly on my linux computer(Ubuntu 22.04.3 LTS). I implemented the fitting by using the Cu example in Larch example folder as an example. Instead of using the same parameters for all datasets, I assigned different variables for Einstein temperature, denoted theta1, theta2, and theta3, and set them to vary, as shown in the picture below. image However, I got the result only theta3 is in the vary mod, but the program automatically to turn theta1 and theta2 to the fixed mod. This doesn't happen on my Windows computer. Here is the report: image

In addition, I attemped to add the fix_unused_variables=False option in feffit function. image Although a warning was prompted to say "Feffit Warning: unused variables: theta1, theta2", the fitting is running successfully without misunderstanding parameters: image

I'm really curious what happens in the codes. Is any different setting for Linux and Windows? In the attachment, I send all the files I used for the test as a compressed file.

multi_fitting.zip

Best regards, Kaifeng Zheng

newville commented 5 months ago

@kaifengZheng Thanks for the report and sorry for the trouble. I can confirm that I see that too. I think I have a fix, but want to run some more tests. I hope to get a fix post later today or tomorrow.

kaifengZheng commented 5 months ago

Thank you very much, Matt!