[Nexus] File::getStrData issue

Campbell, Stuart I. campbellsi at ornl.gov
Mon Oct 13 21:25:24 BST 2014


Sounds like this file doesn't actually conform to the NXSPE standard - the fermi should be in the instrument.

I'm off this week - but I'll try to have a look.



Sent with Good (www.good.com)
________________________________
From: Osborn, Raymond <rosborn at anl.gov>
Sent: Monday, October 13, 2014 2:21:08 PM
To: Discussion forum for the NeXus data format
Subject: Re: [Nexus] File::getStrData issue

Just for the record, the definition string is read as ‘NXSPE’ in NeXpy (on Mac OS X). It doesn’t address the main issue, which is whether the NeXus API is handling this correctly, because NeXpy uses h5py, but there’s no problem with this particular string.

As an aside, the file doesn’t contain any axis definitions (even though the axes are there), which I’ve seen before with NXSPE files, and has the NXfermi_chopper group outside the NXinstrument group, which I haven’t seen. I know that Andrei Savici has modified the NXSPE definitions within Mantid, but I don’t know if they are part of a release yet. I had some discussions with the Mantid developers at Oak Ridge recently about making standard procedures to export Mantid workspaces as valid NeXus files, so hopefully, these kinds of issues won’t be a problem soon.

With regards,
Ray

On Oct 13, 2014, at 12:07 PM, Tobias.Richter at diamond.ac.uk<mailto:Tobias.Richter at diamond.ac.uk> wrote:

Hi Owen,

What version of NeXus are you using?
The NeXus API was expecting strings to the padded with "\0". Or you could call that an off-by-one error.

I think I may have fixed that in the master branch on github. Please check with that and report.

Regards,

Tobias



-----Original Message-----
From: NeXus [mailto:nexus-bounces at nexusformat.org] On Behalf Of
owen.arnold at stfc.ac.uk<mailto:owen.arnold at stfc.ac.uk>
Sent: 13 October 2014 17:12
To: nexus at nexusformat.org<mailto:nexus at nexusformat.org>
Subject: [Nexus] File::getStrData issue

Hi,

On OSX, only, for the NXSPE file here
https://drive.google.com/file/d/0Bx07Hfz4WgYMSDAyQXpVbkE5WUk/view?usp=s
haring, the test program fails to properly extract the string data. It
should print out NXSPE, but it prints NXSP instead!

The file looks fine in HDFView, I'm not sure why it can't be extracted
properly via the APIs on OSX. Other files of this type do give the the
string correctly. If the field is corrupted, I don't know why the nexus
libraries on other OS version are OK with this.

Thanks in advance,
Owen.
















--
Scanned by iCritical.


--
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





_______________________________________________
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>





More information about the NeXus mailing list