-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Here I am reporting the inconsistent behavior between the GSAS-II scriptable and the GUI. In short, when I simulate the powder diffraction pattern with GSAS-II scriptable with a CIF and an instrument parameter file and afterwards I perform the Rietveld refinement with GSAS-II GUI using the simulated data, the same CIF and instrument parameter file, I would assume a nearly perfect refinement without doing anything. However, it seems that is not the case -- the difference between the initial fitting and the simulated data does not seem be explainable by the rounding error of the involved calculations. Here below are details about how to reproduce.
-
Use the
run_gsasii.pyscript included in the package below to simulate a powder diffraction pattern, using the CIFSTO_Parent.cifand instrument parameter filepowgen_profile_lwf.instprm-- both are included in the package below.One needs to replace the file paths on the top part of the script with their own specifics.
-
With the shared script as is, running the script would create the simulated data file
STO_Parent_neutron_powder_calc.txt. Next, start GSAS-II GUI and import the data asfrom Topas xys/qye or 2th Fit2D chi/qchi file. When asked for the instrument parameter file, choose the one included in the package below, namelypowgen_profile_lwf.instprmwhich was used for the data simulation above. -
Then import the CIF
STO_Parent.cifand attach it to the imported histogram above. -
With all default settings, just start the refinement and initially we would see a big mismatch between the calculated pattern and the observed pattern (the simulated data), which is really not expected since basically we are refining against 'itself'.
-
In the instrument parameter file used,
zeroanddifbparameters are both 0 and by default they are not refined. If we enable both of them to be refined, we would get an expected nearly perfect refinement. Still there are some mismatch, but that is kind of expected since we would always have some rounding errors when performing the calculation back and forth.The included GSAS-II project file is with
zeroanddifbparameters refined and we can see the fitting quality is nearly perfect. If we set both to be 0 and disable the refinement for both of them, we will see the obvious mismatch between the calculated and observed patterns.