[GSAS-II] Question about loading multi-histogram data into GSASIIscriptable
Ivo Alxneit
ivo.alxneit at psi.ch
Fri Feb 1 01:14:46 CST 2019
Hi Long Yang
Hi all
I have a similar problem here. I cannot load a gpx file saved by GSAS-II
in scriptable. I tried with a project containing a single phase and a
single powder diffraction histogram as well as a project containing a
single phase and mny histograms for sequential refinement.
I am on Linux and GSAS-II installed via conda.
Any help appreciated.
Ivo
IPython console in Spyder
Python 3.7.1 | packaged by conda-forge | (default, Nov 13 2018, 18:33:04)
Type "copyright", "credits" or "license" for more information.
IPython 7.2.0 -- An enhanced Interactive Python.
In [1]: import os,sys
In [2]: sys.path.insert(0,"/home/alxneit/share/miniconda3/envs/gsas/GSASII")
In [3]: import GSASIIscriptable as G2sc
GSAS-II binary directory:
/home/alxneit/share/miniconda3/envs/gsas/GSASII/bindist
6 values read from config file
/home/alxneit/share/miniconda3/envs/gsas/GSASII/config.py
In [4]: p = G2sc.G2Project("s.gpx")
Traceback (most recent call last):
File "<ipython-input-5-f663e6e6a7f4>", line 1, in <module>
p = G2sc.G2Project("s.gpx")
File
"/home/alxneit/share/miniconda3/envs/gsas/GSASII/GSASIIscriptable.py",
line 1264, in __init__
self.data, self.names = LoadDictFromProjFile(gpxfile)
File
"/home/alxneit/share/miniconda3/envs/gsas/GSASII/GSASIIscriptable.py",
line 675, in LoadDictFromProjFile
raise IOError("Error reading file "+str(ProjFile)+". This is not a
GSAS-II .gpx file")
OSError: Error reading file s.gpx. This is not a GSAS-II .gpx file
(gsas) alxneit at triolite:~$ gsas s.gpx
GSAS-II binary directory:
/home/alxneit/share/miniconda3/envs/gsas/GSASII/bindist
6 values read from config file
/home/alxneit/share/miniconda3/envs/gsas/GSASII/config.py
Python module versions loaded:
Python: 3.7.2
wx: 4.0.4
matplotlib: 3.0.2
numpy: 1.15.4
scipy: 1.1.0
OpenGL: 3.1.1a1
PIL.Image: 5.4.1
Platform: linux 64bit x86_64
This is GSAS-II revision 3785
GLib-GIO-Message: 13:15:42.229: Using the 'memory' GSettings backend.
Your settings will not be saved or shared with other applications.
loading from file: s.gpx
GPX load successful. Last saved with GSAS-II revision 3785
(gsas) alxneit at triolite:~$
(gsas) alxneit at triolite:~$ conda list
# packages in environment at /home/alxneit/share/miniconda3/envs/gsas:
#
# Name Version Build Channel
apr 1.6.3 he40df45_0
asn1crypto 0.24.0 py37_0
blas 1.0 mkl
ca-certificates 2018.12.5 0
cairo 1.14.12 h8948797_3
certifi 2018.11.29 py37_0
cffi 1.11.5 py37he75722e_1
chardet 3.0.4 py37_1
conda 4.5.12 py37_0
conda-env 2.6.0 1
cryptography 2.4.2 py37h1ba5d50_0
cycler 0.10.0 py37_0
cyrus-sasl 2.1.26 h82bf5a1_4
dbus 1.13.6 h746ee38_0
expat 2.2.6 he6710b0_0
fontconfig 2.13.0 h9420a91_0
freetype 2.9.1 h8a8886c_1
fribidi 1.0.5 h7b6447c_0
gettext 0.19.8.1 hd7bead4_3
glib 2.56.2 hd408876_0
graphite2 1.3.13 h23475e2_0
gsas2pkg 1.0.6 0 briantoby
gst-plugins-base 1.14.0 hbbd80ab_1
gstreamer 1.14.0 hb453b48_1
h5py 2.9.0 py37h7918eee_0
harfbuzz 1.8.8 hffaf4a1_0
hdf5 1.10.4 hb1b8bf9_0
icu 58.2 h9c2bf20_1
idna 2.8 py37_0
imageio 2.4.1 py37_0
intel-openmp 2019.1 144
jpeg 9b h024ee3a_2
kiwisolver 1.0.1 py37hf484d3e_0
krb5 1.16.1 h173b8e3_7
libdb 6.1.26 he6710b0_0
libedit 3.1.20181209 hc058e9b_0
libffi 3.2.1 hd88cf55_4
libgcc-ng 8.2.0 hdf63c60_1
libgfortran-ng 7.3.0 hdf63c60_0
libglu 9.0.0 hf484d3e_1
libntlm 1.4 h14c3975_2
libpng 1.6.36 hbc83047_0
libstdcxx-ng 8.2.0 hdf63c60_1
libtiff 4.0.10 h2733197_1001
libutf8proc 2.1.1 h14c3975_0
libuuid 1.0.3 h1bed415_2
libxcb 1.13 h1bed415_1
libxml2 2.9.9 he19cac6_0
lz4-c 1.8.1.2 h14c3975_0
matplotlib 3.0.2 py37h5429711_0
mkl 2019.1 144
mkl_fft 1.0.10 py37ha843d7b_0
mkl_random 1.0.2 py37hd81dba3_0
ncurses 6.1 he6710b0_1
numpy 1.15.4 py37h7e9f1db_0
numpy-base 1.15.4 py37hde5b4d6_0
olefile 0.46 py37_0
openssl 1.1.1a h7b6447c_0
pango 1.42.4 h049681c_0
pcre 8.42 h439df22_0
pillow 5.4.1 py37h34e0f95_0
pip 18.1 py37_0
pixman 0.36.0 h7b6447c_0
pycosat 0.6.3 py37h14c3975_0
pycparser 2.19 py37_0
pyopengl 3.1.1a1 py37_0
pyopenssl 18.0.0 py37_0
pyparsing 2.3.1 py37_0
pyqt 5.9.2 py37h05f1152_2
pysocks 1.6.8 py37_0
python 3.7.2 h0371630_0
python-dateutil 2.7.5 py37_0
pytz 2018.9 py37_0
qt 5.9.7 h5867ecd_1
readline 7.0 h7b6447c_5
requests 2.21.0 py37_0
ruamel_yaml 0.15.46 py37h14c3975_0
scipy 1.1.0 py37h7c811a0_2
serf 1.3.9 h1c830df_0
setuptools 40.6.3 py37_0
sip 4.19.8 py37hf484d3e_0
six 1.12.0 py37_0
sqlite 3.26.0 h7b6447c_0
svn 1.10.2 h52f66ed_0
tk 8.6.8 hbc83047_0
tornado 5.1.1 py37h7b6447c_0
urllib3 1.24.1 py37_0
wheel 0.32.3 py37_0
wxpython 4.0.4 py37hc99224d_0
xz 5.2.4 h14c3975_4
yaml 0.1.7 had09818_2
zlib 1.2.11 h7b6447c_3
On 31.01.19 20:13, Long Yang via GSAS-II wrote:
> Hi all,
>
> I am new to GSAS-II scriptable. I am trying to load the powder histogram data using `gpx.add_powder_histogram` but failed. The data file contains 6 banks TOF histograms together in one file. If use GSAS-II GUI, it can be loaded perfectly as in GSAS, but not work in GSASIIscriptable. The traceback is shown below.
>
> Anyone knows how to do it?
> Or do I have to cut the file into 6 pieces of individual files that one file is one bank histogram?
>
> Thank you!
>
> Bests,
> Long Yang
>
> Traceback (most recent call last):
> File "si.py", line 31, in <module>
> hist = gpx.add_powder_histogram("nomad_si_data.gsa","NOMAD_2018A_shifter_20180606.instprm",fmthint="GSAS powder")
> File "/Users/Dragon/anaconda/envs/gsas2/GSASII/GSASIIscriptable.py", line 1324, in add_powder_histogram
> pwdrreaders = import_generic(datafile, PwdrDataReaders,fmthint=fmthint)
> File "/Users/Dragon/anaconda/envs/gsas2/GSASII/GSASIIscriptable.py", line 991, in import_generic
> raise G2ImportException("Not sure what data to select")
> GSASIIscriptable.G2ImportException: Not sure what data to select
> _______________________________________________
> GSAS-II mailing list
> GSAS-II at aps.anl.gov
> https://mailman.aps.anl.gov/mailman/listinfo/gsas-ii
>
--
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: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.aps.anl.gov/pipermail/gsas-ii/attachments/20190201/779dbbfa/attachment.sig>
More information about the GSAS-II
mailing list