Unable to edit structure parameters // Pdfgui 1.1, Anaconda Python 2.7

100 views
Skip to first unread message

Eduard Levin

unread,
Mar 28, 2016, 1:22:58 PM3/28/16
to diffpy-users
Hello!

Recently I installed pdfgui 1.1 under anaconda python.
I followed every step, i.e. installed Anaconda 2.7, installed pdfgui, checked its integrity.
All was fine until I tried to work with my data, but was unable to enter any structural data.
First, cif files are not loading. I tested them on several Rietveld software packages, and they are 100% OK.
Second, when manually editing new phase parameters, field are unlocked, but nothing happens when entering values. Literally, default values could be selected, but not changed. The fields are not greyed out in this case.

Could something be done in this case?
I'm under Windows 7 x 64.

Kind regards,
Eduard

Pavol Juhas

unread,
Mar 28, 2016, 1:47:50 PM3/28/16
to diffpy...@googlegroups.com
On Mon, Mar 28, 2016 at 09:55:54AM -0700, Eduard Levin wrote:
> Hello!
>
> Recently I installed pdfgui 1.1 under anaconda python. I followed
> every step, i.e. installed Anaconda 2.7, installed pdfgui, checked
> its integrity. All was fine until I tried to work with my data, but
> was unable to enter any structural data. First, cif files are not
> loading. I tested them on several Rietveld software packages, and
> they are 100% OK.

Hi Eduard,

Can you send me an example CIF file that is not loading in PDFgui?
PDFgui has no support for CIF-s containing several structures, but
other than that the CIF reading should work.

> Second, when manually editing new phase parameters, field are
> unlocked, but nothing happens when entering values. Literally,
> default values could be selected, but not changed. The fields are
> not greyed out in this case.
>
> Could something be done in this case?
> I'm under Windows 7 x 64.

I am aware of this problem and I am working on a fix. The wxpython
GUI library behaves differently on Windows than on Linux or Mac.
This shows up as a trouble with getting input focus with a mouse
especially for the cell parameters fields.

For now I'd suggest a workaround to first click the "Configure"
tab at the top of the "Phase Configuration" page and then
use the <Tab> and <Shift-Tab> keys to navigate between input
fields. The input cursor for some reason does not show, but
otherwise this seems to work.

Hopefully, I will get a proper fix for this issue soon.
With best regards,

Pavol

--
Dr. Pavol Juhas
Condensed Matter Physics and Materials Science Department
Brookhaven National Laboratory
P.O. Box 5000
Upton, NY 11973-5000

Eduard Levin

unread,
Mar 28, 2016, 3:04:58 PM3/28/16
to diffpy-users, pju...@bnl.gov
Hi Pavol,

thank you very much for the help!
Tabs and shift+tab seems to be working.
Please find attached cif file I was trying to import.

Kind regards,
Eduard
Al2O3-alpha.cif

Pavol Juhas

unread,
Mar 29, 2016, 4:40:21 PM3/29/16
to Eduard Levin, diffpy-users
Hi Eduard,

I have uploaded a fixed version of PDFgui to Anaconda cloud,
This should resolve the structure parameters input on Windows.
To install that version use

conda update -c diffpy diffpy.pdfgui

Let me know if there are still problems.

> Please find attached cif file I was trying to import.

This happens because CIF file contains a high-bit
copyright symbol on the second line and is in latin1
encoding. The PyCifRW library that PDFgui uses for
processing CIF data requires either plain ASCII
or an UTF-8 encoded text. Unlike latin1, UTF-8 provides
unambiguous representation for symbols and accented
characters. Please either convert your CIF file to
UTF-8 or replace the copyright symbol with "(c)", which
will in effect turn it into a plain ASCII.

PDFgui should display an error message showing read-failures
for the recognized structure formats. In my case it says

cif: 'utf8' codec can't decode byte 0xa9 in position 18:
invalid start byte

Messages referring to utf8 essentially mean CIF has either
some fancy symbols or accented characters and is not in
a valid UTF-8 encoding.

How did you obtain the CIF file?

Was it ever saved from a text editor or is it
a verbatim content from some structure database?

Thank you,

Eduard Levin

unread,
Mar 30, 2016, 2:46:59 AM3/30/16
to Eduard Levin, diffpy-users
Hi Pavol,

Thanks for the assistance!
I made a quick check. Values in the fields could be selected now. but the problem is that they couldn't be modified, when selected, just like in previous version. I still need to do this tab stuff, unfortunately.
Also, I didn't wrote it in my first post, PDFgui hangs very frequently. Even if I could enter values and import data, the software crashes frequently during fitting.

The cif file is indeed from database, ICSD.

Best regards,
Eduard

Pavol Juhas

unread,
Mar 30, 2016, 4:24:28 PM3/30/16
to diffpy...@googlegroups.com, Eduard Levin
On Wed, Mar 30, 2016 at 09:46:58AM +0300, Eduard Levin wrote:
> Hi Pavol,
>
> Thanks for the assistance!
> I made a quick check. Values in the fields could be selected now. but the
> problem is that they couldn't be modified, when selected, just like in
> previous version. I still need to do this tab stuff, unfortunately.

Hi Eduard,

I don't see this. I am using 64-bit Windows 7 with Service Pack 1
and the text inputs on the Phase Configuration page behave normally.

Please, check if you indeed have the updated version of PDFgui;
the Help --> About dialog should display "Build: 7" just under
"PDFgui 1.1". Make sure to close all instances of PDFgui when
running "conda update", because Windows is extremely finicky
about replacing any files in use.

If you indeed have the last version and there are still problems,
please send me step-by-step instructions on how to reproduce them.
Note that the first rendering of the Phase Configuration page may take
a bit of time during which the program is not responsive. Once that
delay passes it should be all back to a normal behavior.

> Also, I didn't wrote it in my first post, PDFgui hangs very frequently.
> Even if I could enter values and import data, the software crashes
> frequently during fitting.

Again, please send me a step-by-step instructions on how to reproduce
the crash. If needed you can email me your project file separately
off this conversation.

Do you get some error dialog from the GUI or
does the program terminate completely?

> The cif file is indeed from database, ICSD.

I have access to an online version of ICSD and the same CIF entry
52044 exports with a plain "(C)" and loads without any problem.
In my case the release year is 2015 rather than 2008, so I'd
guess the latin1 encoding afflicts only the older ICSD. I am
not sure it is worth the effort to support latin1-encoded CIFs;
the workaround with converting to UTF-8 or using a recent ICSD
might be easier.

Eduard Levin

unread,
Apr 4, 2016, 1:21:55 PM4/4/16
to diffpy...@googlegroups.com, Eduard Levin
Hi Pavol!

I apologize for the delay with my answer, I was between flights.
It seems that there was a problem with my installation. Also, I made one stupid thing: added an additional instance of Python 2.7. (Personal note: never install new software during late night of data collection.)
Now I made a clean install, and under "About" I can read PDFgui 1.1.1 Build 2.
Also, all issues have disappeared. At least structure parameters could be edited normally, and the software doesn't hang during least-squares refinement.
Thanks a lot for your help, and my apologies for making such a mess.

Sincerely,
Eduard

Pavol Juhas

unread,
Apr 4, 2016, 2:56:56 PM4/4/16
to DiffPy users, Eduard Levin
Hi Eduard,

No problem, I am glad it works on your side now.  Cheers,

Pavol

Reply all
Reply to author
Forward
0 new messages