dmin setting in GSAS tab of Engineering UI not being respected #36618
Labels
Bug
Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing)
Diffraction
Issues and pull requests related to diffraction
ISIS Team: Diffraction
Issue and pull requests managed by the Diffraction subteam at ISIS
Milestone
Describe the bug
Found during course of #36606.
The dmin setting is used as the lower limit for the d-spacing of the reflections to be fitted - however it appears GSAS tries to fit all reflections within the bounds of the data.
To Reproduce
(0) Change dmin in the settings (cog in bottom left of UI) to 1.25 Ang (larger than default)
(1) Follow the steps 1-7 of Test 11 (Note if you already have the files you may be able to skip to step 5)
https://developer.mantidproject.org/Testing/EngineeringDiffraction/EngineeringDiffractionTestGuide.html#test-11
The graph displayed should look like this
![image](https://private-user-images.githubusercontent.com/55979119/294572809-2957670d-76e5-4d6c-a1d7-51f065ae0bd6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxNDcyODksIm5iZiI6MTcxOTE0Njk4OSwicGF0aCI6Ii81NTk3OTExOS8yOTQ1NzI4MDktMjk1NzY3MGQtNzZlNS00ZDZjLWExZDctNTFmMDY1YWUwYmQ2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIzVDEyNDk0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE5Zjg4NWQ4N2UxOGQyYTY5MTgxYzU3YWRiNzU3NmVmZTQ0ZGE2OTUyOWE2MzZlMmUyOTlkYzRlYTdlZWQyZjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.giKr8UkNToiOOKHVblks1sS183kdBRG3S9SHO61WqEU)
It can be seen that there are reflections (vertical blue lines below the data) predicted right down to the lowest extent of the data (which is about 0.5 Ang).
Again if you look at the reflections output file(ending
_reflections_1_Fe_gamma.txt
) in the GSASII folder of the save directory in the settings you can see GSAS tries to fit 26 reflections with minimum TOF 8302 mus. You can also open the .gpx fileNote the reflection generation code is working correctly,
mantid/qt/python/mantidqtinterfaces/mantidqtinterfaces/Engineering/gui/engineering_diffraction/tabs/gsas2/model.py
Line 447 in 8244e03
The variable returned
generated_reflections
has only 3 reflections.The reflections are added to the GSAS input dict/JSON string here
mantid/qt/python/mantidqtinterfaces/mantidqtinterfaces/Engineering/gui/engineering_diffraction/tabs/gsas2/call_G2sc.py
Line 54 in 8244e03
Which I have confirmed is called 3 times in debug.
If you open the .gpx file with GSAS yo uwill see the Pawley reflections have been set
![image](https://private-user-images.githubusercontent.com/55979119/294579993-fe3d90f7-a4df-4055-950d-8b936d0bbdf6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxNDcyODksIm5iZiI6MTcxOTE0Njk4OSwicGF0aCI6Ii81NTk3OTExOS8yOTQ1Nzk5OTMtZmUzZDkwZjctYTRkZi00MDU1LTk1MGQtOGI5MzZkMGJiZGY2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIzVDEyNDk0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU5ZGRhNjBmNTZiY2FhNmE1OTZhOGY1NGRkZTAzMGM3YzI5OGI1MmFkYmQxNTc4N2Q0MWRjNDA3YjBkYTM3OTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bVuAFifp1zq1lGb1bCTWhJ7zSSGk3eNlT7ROPFcM-Lo)
The dmin is retrieved here
mantid/qt/python/mantidqtinterfaces/mantidqtinterfaces/Engineering/gui/engineering_diffraction/tabs/gsas2/model.py
Line 225 in 8244e03
which gets parsed here
mantid/qt/python/mantidqtinterfaces/mantidqtinterfaces/Engineering/gui/engineering_diffraction/tabs/gsas2/model.py
Line 225 in 8244e03
but it doesn't look like it is used anywhere other than when adding the reflections here
mantid/qt/python/mantidqtinterfaces/mantidqtinterfaces/Engineering/gui/engineering_diffraction/tabs/gsas2/call_G2sc.py
Line 200 in 8244e03
Perhaps the GSAS API requires something else - like
Pawley dmin
to be set?For more details on Pawley refinement options see the GUI docs here
https://subversion.xray.aps.anl.gov/pyGSAS/trunk/help/gsasII-phase.html
Or it needs to be told to use the Pawley reflections?
See also GSAS scriptable API docs here
https://gsas-ii.readthedocs.io/en/latest/GSASIIscriptable.html#application-interface-api-summaryhttps://gsas-ii.readthedocs.io/en/latest/GSASIIscriptable.html#application-interface-api-summary
Expected behavior
It would only try and fit reflections with d-spacing > dmin
The text was updated successfully, but these errors were encountered: