[GSAS-II] Updates to GSAS-II
Toby, Brian H.
toby at anl.gov
Fri Dec 30 16:57:39 CST 2022
Hi GSAS-II users,
Sorry for a long e-mail, but there have been some significant changes to GSAS-II in recent weeks. If you don’t want the details, the short version would be that (A) you may need to reinstall GSAS-II from the latest version of the gsas2full installer and (B) please report any errors that take place after that.
The changes are related to the programming environment that is used to run GSAS-II. Our code requires Python and some add-on packages (wxpython for the GUI, matplolib for most of the graphics, numpy for much of the math,…) and most of you use our self-installer that places all this on your computer. The Help->Update command then will update the GSAS-II code, but not Python or the associated packages. We have mostly been working with an older version of Python (3.7) and its associated packages, but the latest version of Python is now 3.11. Alas, Python 3.10 and 3.11 with the latest versions of some of the add-on packages give errors with GSAS-II code that used to work fine. We could continue to postpone Python updates, but to do that would mean that eventually GSAS-II will only run with software that is no longer being distributed. Bob and I have decided that we will move to recent versions of Python and then fix the bugs that arise from that. To make our lives a bit easier, we are no longer going to support Python 2.7 and 3.6, and accordingly the out-of-date packages used with those Python versions. The reason for this is that in some places in our code we have to write two sets of commands, one for older Python/packages and one for modern ones. Assuming that GSAS-II will run in an environment is nearly up-to-date simplifies coding and testing. I have also recently prepared new versions of the gsas2full self-installer with recent versions of Python and the needed packages for: Intel-compatible 64-bit Windows, 64-bit Linux, 64-bit MacOS; 64-bit Raspberry Pi (ARM). We cannot supply a self-installer for ARM (“Apple Silicon”) Macs, but do have simple installation instructions for that platform (it can also use the self-installer for Intel Macs, but this runs slower). Likewise, there are simple instructions for the standard (32-bit) Raspberry Pi OS. Alas, we can no longer supply self-installers for 32-bit Windows and 32-bit Linux because the conda packages we need are not being prepared available for those platforms, but there are older self-installers for them which will likely continue to work for a while.
In the process of updating, we have also seen internal incompatibilities between Python and some of the packages. For example, wxPython 4.1.1 (one version before the latest) has some bugs with Python 3.10 and 3.11. This shows up when running GSAS-II, but we can’t fix it since it is not in our code. The latest version of wxPython (4.2.0) also has some minor bugs that cause text entry widgets to show up as very small on the Mac and perhaps in Linux. GSAS-II has been modified to avoid the problem (at least in most places.)
As of GSAS-II version ~5444, if you have an older version of Python installed, or if you have a package version that we are not recommending (such as wxPython 4.1.1), you will be warned when you do your next update. If you have used a GSAS-II self installer from the last year or two, you probably will not see this warning for some time to come, but eventually we will retire Python 3.7. If you do see it the message, you may be able to continue making the update, but it would be a good idea to plan to reinstall in the next few months. To do this, simply install the latest gsas2full package or if you know your way around conda, you can use the conda install command. You do not need to delete the old installation first, though setting up access to two different installations at the same time can be a bit complex.
Another more minor change is due to most operating systems now offering a “dark” display mode, which features (mostly) white printing on a black background. This is said to be easier on the eyes and our sleep cycles. GSAS-II did not work in dark mode previously, but most of that has now been fixed (but only tested on Macs). Since GSAS-II now has a huge number of options & windows, Bob and I cannot test everything. We depend on users to report problems so we can fix them. Another issue is that the standard Matplotlib “Paired” color map for images has changed to something much less useful. We now supply our own GSPaired map. For older projects, you may need to select this color map.
If you have problems with GSAS-II, please keep us posted, particularly if you have updated to the latest Python & packages. Things I fear may show up are with the new self-installers: (1) “dark mode” display errors, where white text can’t be read against a white background (or black on black); (2) text entry widgets that are only one or two letters wide instead of the typical 6-10 letters and (3) errors where python complains that a float value has been supplied to a function that wants an int argument, with a very verbose error message in the console (terminal/cmd) window. As always, please only report errors after testing that the error occurs after installing the most recent update to GSAS-II. Giving us a picture of the screen and the text in the console may be enough for us to find the error, but usually a copy of the .gpx file is needed to reproduce your error. We may ask that you reinstall GSAS-II and test with the latest Python/package versions, if you have not done this.
Brian
More information about the GSAS-II
mailing list