-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem accessing values - nxvalue and nxlinks #74
Comments
That is puzzling. In principle both point to the same object. I have two questions that might help clarify the issue for me.
|
/raw_entry/instrument/detectors/xreye_x is all in an external file. If I try... the first time I call this I get the nxdata error as above but |
The API caches the value once it's been read, and won't try to read it from the file again. I will try to replicate this with some dummy data. |
I've tried to reproduce the issue, but I seem to be able to access values embedded in linked groups using both reference patterns. I should have asked what version of the nexusformat API you are using. Just type 'nxversion' in the IPython shell. If it's a recent version, then I might have to look at the file itself if there is a way for me to access it. |
Hi, nx.nxversion is 0.4.18 I've put some example files onto our anonymous ftp: Apologies for the size - 1Gb I couldn't find a smaller set but thought it was also worth replicating the structure. |
I'll have a look when I'm back at work on Monday. |
Hi, |
I have downloaded the files, but I can't see inside the 'raw_entry' link because it is an absolute file reference, and I can't create a /dis directory on my laptop. I can't check it today, but I should be able to copy it to a linux server tomorrow where I can put the 'dis' directory at root level. |
It will work on windows (I'm running on windows) D:\dls\i14....etc.. Python can deal with the linux/ win naming differences and it reads the paths etc. correctly (I'm running python3). |
Hi,
I'm using a nexus file with links to external files.....
The file has "entry" - > which is processed data in the file and "raw_entry" which points to an external file.
If I try and access the external file via:
fin["raw_entry/instrument/detectors/xreye_x"].nxvalue
this works but...
fin["raw_entry"]["instrument"]["detectors"]["xreye_x"].nxvalue fails...
C:\ProgramData\Anaconda3\lib\site-packages\nexusformat\nexus\tree.py in nxvalue(self)
2711 If unmodified values are required, use the 'nxdata' property.
2712 """
-> 2713 _value = self.nxdata
2714 if _value is None:
2715 return None
C:\ProgramData\Anaconda3\lib\site-packages\nexusformat\nexus\tree.py in getattr(self, name)
4087 return self.attrs[name]
4088 else:
-> 4089 raise NeXusError("'"+name+"' not in "+self.nxpath)
4090
4091 def getitem(self, key):
NeXusError: 'nxdata' not in /raw_entry/instrument/detectors/xreye_x
Doing the same thing with "entry" seems fine so it seems to be related to the external file or nxlink ?
Paul
The text was updated successfully, but these errors were encountered: