[GSAS-II] Bug in export of sequential results
Ivo Alxneit
ivo.alxneit at psi.ch
Thu Mar 28 11:00:39 CDT 2019
Dear all,
Exporting results of sequential refinements fails for histograms that do
not use all phases. Exporting (text, but CSV probably the same) WgtFract
of the attached gpx-files produces the errors below.
0:* -> fine
1:* -> error, one line in text file
2:* -> error, empty text file
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.2
wx: 4.0.4
matplotlib: 3.0.2
numpy: 1.15.4
scipy: 1.2.0
OpenGL: 3.1.1a1
PIL.Image: 5.4.1
Platform: linux 64bit x86_64
This is GSAS-II revision 3861
Starting Sequential Refinement
Refining with PWDR data_1690.xye
wR = 45.82%, chi**2 = 41803.6, reduced chi**2 = 32.84, last
delta chi = 0.0035
Refining with PWDR data_2850.xye
wR = 47.51%, chi**2 = 44309.8, reduced chi**2 = 34.81, last
delta chi = 0.0007
Read from file:/home/alxneit/local_data/gsas_test3/test.bak2.gpx
Save to file :/home/alxneit/local_data/gsas_test3/test.gpx
GPX file merge completed
Sequential refinement results are in file:
/home/alxneit/local_data/gsas_test3/test.lst
***** Sequential refinement successful *****
GPX load successful. Last saved with GSAS-II revision 3861
Traceback (most recent call last):
File
"/fast_home/alxneit/miniconda3/envs/gsas/GSASII/GSASIIdataGUI.py", line
6233, in OnSaveSelSeq
WriteSeq()
File
"/fast_home/alxneit/miniconda3/envs/gsas/GSASII/GSASIIdataGUI.py", line
6191, in WriteSeq
line += ' %12.6f %12.6f '%(saveData[col][row],saveSigs[col][row])
TypeError: must be real number, not NoneType
Traceback (most recent call last):
File
"/fast_home/alxneit/miniconda3/envs/gsas/GSASII/GSASIIdataGUI.py", line
6233, in OnSaveSelSeq
WriteSeq()
File
"/fast_home/alxneit/miniconda3/envs/gsas/GSASII/GSASIIdataGUI.py", line
6191, in WriteSeq
line += ' %12.6f %12.6f '%(saveData[col][row],saveSigs[col][row])
TypeError: must be real number, not NoneType
The fix is probably to write one or two zeros to the file to fill the
collumn, so
if col in havesig:
try:
line += ' %12.6f %12.6f
'%(saveData[col][row],saveSigs[col][row])
except TypeError:
line += '0.0 0.0'
else:
try
line += ' %12.6f '%saveData[col][row]
except TypeError:
line += '0.0'
and similar in Write_CSV()
gruss
--
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 --------------
A non-text attachment was scrubbed...
Name: test.gpx
Type: application/octet-stream
Size: 606792 bytes
Desc: not available
URL: <http://mailman.aps.anl.gov/pipermail/gsas-ii/attachments/20190328/4f0d0507/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/20190328/4f0d0507/attachment-0001.sig>
More information about the GSAS-II
mailing list