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
137 stars 64 forks source link

Arbitrary unit in Y scale with stacking offset + too small sigma2 #348

Open duoduoss opened 2 years ago

duoduoss commented 2 years ago

Hello:

I am wondering whether it is possible to remove the scales when using Y offset, to make the Y axis arbitrary and keep the axis title?

Plus, I got very small sigma2 (e-9, e-10,...) in path fitting, and no uncertainties (standard errors). If I fixed sigma2 to a value such as 1e-4 or 1e-5 and fitting others, the standard errors showed up again. Does this indicate that the model and fitting are wrong? Is there any reasonable range for sigma2, especially the lower limit?

Thank you in advance, Best regards

newville commented 2 years ago

@duoduoss

I am wondering whether it is possible to remove the scales when using Y offset, to make the Y axis arbitrary and keep the axis title? I am sort of -1 on this, or at least would want more description of the use-case. I think that currently none of the 2d plots are easily made to not show values along the X and Y axes. These are important information and "unlabeled axes" will often get flagged as incomplete.

Plus, I got very small sigma2 (e-9, e-10,...) in path fitting, and no uncertainties (standard errors). If I fixed sigma2 to a value such as 1e-4 or 1e-5 and fitting others, the standard errors showed up again. Does this indicate that the model and fitting are wrong? Is there any reasonable range for sigma2, especially the lower limit?

Can you attach a fitting script? (a "project file" with fitting info is being planned, but doesn't exist yet). I would guess that sigma2 is being sent to 0 because the amplitude (N*S02) isn't big enough.

duoduoss commented 2 years ago

@newville Hello, Matthew,

For the Y offset, Yes, you are totally right! There are important information included in scales. I asked because sometime when I showed the normalized spectra with Y offset to highlight the different spectra features, I got asked why their absorption coefficients were so "different". So I was thinking of putting the axis title to something like "stacked normalized mu(E) / a. u.", like the in-situ or operando XRD stacking plots. Probably I asked a meaningless question.

For the fitting, Yes, the amplitude is very small. The spectra was measured on our lab instrument. Unfortunately we don't have a metal foil for this element to check the S02. Please see the attached project file. ZrO2_lab.zip

Thank you very much!