[GSAS-II] BUG report (and some fixes)

Ivo Alxneit ivo.alxneit at psi.ch
Fri May 3 08:00:57 CDT 2019


Dear all

First line is omitted in plots of sequential results. In the attached
'test.gpx' only one data point is plotted (line 2). Exports are correct,
however.

In addition I have attached a patch that fixes three typos in
GSASIIscriptable:

- add missing definition for npsind
- use correct names for images read (please verify)
- use correct keyword in function call

pylint still reports the following undefined variables/arguments that I
could not fix as I do not understand the code too well:

E1120:2768,8: G2PwdrData.fit_fixed_points: No value for argument
'fixback' in function call
E0602:3063,23: G2PwdrData.LoadProfile: Undefined variable 'bank'
E0602:3975,28: G2Image.Integrate: Undefined variable 'Controls'
E0602:3978,34: G2Image.Integrate: Undefined variable 'waves'
E0602:4025,36: G2Image.Integrate: Undefined variable 'G2pdG'
E0602:4031,36: G2Image.Integrate: Undefined variable 'G2pdG'

My config (on linux)

$ GSAS-II binary directory:
/fast_home/alxneit/miniconda3/envs/gsas/GSASII/bin
7 values read from config file /home/alxneit/.G2local/config.py
Python module versions loaded:
  Python:     3.7.3
  wx:         4.0.4
  matplotlib: 3.0.3
  numpy:      1.16.3
  scipy:      1.2.1
  OpenGL:     3.1.1a1
  PIL.Image:  6.0.0
  Platform:   linux 64bit x86_64
This is GSAS-II revision 3942

gruss / nice weekend
-- 
Dr. Ivo Alxneit
Catalysis for Energy Group
Bioenergy and Catalysis Laboratory        phone: +41 56 310 4092
Paul Scherrer Institute                     fax: +41 56 310 2688
CH-5232 Villigen                      gnupg key: 0x515E30C7
Switzerland
https://www.psi.ch/ceg/
-------------- next part --------------
--- /fast_home/alxneit/miniconda3/envs/gsas/GSASII/GSASIIscriptable.py.old	2019-05-03 13:57:14.449904027 +0200
+++ /fast_home/alxneit/miniconda3/envs/gsas/GSASII/GSASIIscriptable.py	2019-05-03 14:51:59.497329406 +0200
@@ -752,6 +752,7 @@
 '''Readers by reader type'''
 exportersByExtension = {}
 '''Specifies the list of extensions that are supported for Powder data export'''
+npsind = lambda x: np.sin(x*np.pi/180.)
 
 npsind = lambda x: np.sin(x*np.pi/180.)
 def LoadG2fil():
@@ -1366,7 +1367,7 @@
             formatName = dImgObj.data['Image Controls'].get('formatName','')
             imagefile = dImgObj.data['data'][1]
             ImageTag = None # fix this for multiimage files
-            darkImg = G2fil.RereadImageData(ImageReaderlist,imagefile,ImageTag=ImageTag,FormatName=formatName)
+            darkImage = G2fil.RereadImageData(ImageReaderlist,imagefile,ImageTag=ImageTag,FormatName=formatName)
             if darkImg is None:
                 raise Exception('Error reading dark image {}'.format(imagefile))
             sumImg += np.array(darkImage*darkScale,dtype='int32')
@@ -1377,7 +1378,7 @@
             formatName = bImgObj.data['Image Controls'].get('formatName','')
             imagefile = bImgObj.data['data'][1]
             ImageTag = None # fix this for multiimage files
-            backImg = G2fil.RereadImageData(ImageReaderlist,imagefile,ImageTag=ImageTag,FormatName=formatName)
+            backImage = G2fil.RereadImageData(ImageReaderlist,imagefile,ImageTag=ImageTag,FormatName=formatName)
             if backImage is None:
                 raise Exception('Error reading background image {}'.format(imagefile))
             if darkImg:
@@ -4083,7 +4084,7 @@
                         associated with all histograms given.
 
     """
-    proj = G2Project(gpxname=args.filename)
+    proj = G2Project(gpxfile=args.filename)
 
     hist_objs = []
     if args.histograms:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.gpx
Type: application/octet-stream
Size: 356924 bytes
Desc: not available
URL: <http://mailman.aps.anl.gov/pipermail/gsas-ii/attachments/20190503/b1d7e24e/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.aps.anl.gov/pipermail/gsas-ii/attachments/20190503/b1d7e24e/attachment-0001.sig>


More information about the GSAS-II mailing list