[Nexus] Questions about the usage of NeXpy in Python
Osborn, Raymond
rosborn at anl.gov
Tue Sep 27 16:52:10 BST 2016
Dear Jiemin,
Thanks for your inquiry. I think you have encountered a bug in the nexusformat package, which occurs when the ‘target’ attribute of a linked object in the HDF5 file is encoded as a fixed-length unicode string. This is a perfectly valid way of storing the attribute, so I’m puzzled that it hasn’t shown up before, but I will try to issue a bug-fix release as soon as possible to v0.4.5. If you install it, it shouldn’t be necessary to update NeXpy itself, just the nexusformat package, i.e.,
pip install -U nexusformat
NeXpy is designed to be run directly from the command line, rather than from within a Python shell. If you are using a Cygwin or other emulation shell, it should be possible to just type ‘nexpy’, because ‘pip’ should have installed the launch script somewhere in your path.
With regards,
Ray
On Sep 26, 2016, at 4:25 PM, jiemin.li at diamond.ac.uk<mailto:jiemin.li at diamond.ac.uk> wrote:
Dear Contributor of NeXpy:
Thank you very much for your continuous effort on this package, so that people whose occupation is related to scientific research would be able to work in a more efficient way. I deeply appreciate your work.
I’m a PhD student at Diamond Light Source and just make use of Python to analysis our data. At present, I’m not very familiar with Python. Here, I came across two problems as trying to use NeXpy package in Python. I have tried to search the answers online. But few information about NeXpy can be found, maybe because it is just a new baby in the big family of Python. So I have no choice but to seek your help. Here are my question:
(1) I have followed the instruction from website: https://github.com/nexpy/nexpy to install nexpy successfully by utilizing the pip command of Python in cmd of Windows7. And I also install the relating packages: <jupyter>, <Ipython>, <h5py>, <numpy>, <scipy>, <matplotlib>, <lmfit> ,<spec2nexus>. But when I try to use NeXpy to extract the tree of our data in Python Console, some problems emerge. See the attached .PNG figures. From the figure1, it demonstrates that file of tree.py does exist in the nexus file of nexusformat package. But from the figure2, there is no attribute-tree of object-a which I have created by utilizing nxload function.
So could you please help me to point out how I should do?
(2) When I type nexus in Python Console, it doesn’t display the nexus GUI. So how can I invoke the nexus GUI in Python Console?
That’s all.
Thank you very much for your time on these issues. And I look forward to hearing from you.
Best regards,
Jiemin
PhD Student
Diamond Light Source
--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
<1.PNG><2.PNG>_______________________________________________
NeXus mailing list
NeXus at nexusformat.org<mailto:NeXus at nexusformat.org>
http://lists.nexusformat.org/mailman/listinfo/nexus
--
Ray Osborn, Senior Scientist
Materials Science Division
Argonne National Laboratory
Argonne, IL 60439, USA
Phone: +1 (630) 252-9011
Email: ROsborn at anl.gov<mailto:ROsborn at anl.gov>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nexusformat.org/pipermail/nexus/attachments/20160927/10ae6d31/attachment.html>
More information about the NeXus
mailing list