Skip to content
Snippets Groups Projects
Commit 887dc48b authored by Francois POLACK's avatar Francois POLACK
Browse files

fix: Nexus_save: Add the measurement entry in the root default path

                  as defined in the standard
parent de5e78db
Branches
No related tags found
No related merge requests found
...@@ -693,7 +693,7 @@ class HeightMap(object): ...@@ -693,7 +693,7 @@ class HeightMap(object):
#Create the measurement NXentry as complying to NXmetrology definition #Create the measurement NXentry as complying to NXmetrology definition
entry=NXentry(detrended,rawdata,sample,instrument, name='measurement1') entry=NXentry(detrended,rawdata,sample,instrument, name='measurement1')
entry.definition=NXattr('NXmetrology') entry.definition=NXattr('NXmetrology')
# add the data group as link to detrended group and set it as default # add the data group as link to detrended group and set the default path
entry.data=NXlink(detrended) entry.data=NXlink(detrended)
entry.data.set_default() entry.data.set_default()
# add a the source data to the process group as alink # add a the source data to the process group as alink
...@@ -713,7 +713,10 @@ class HeightMap(object): ...@@ -713,7 +713,10 @@ class HeightMap(object):
# erase the old file if any and write the NeXus tree to the file # erase the old file if any and write the NeXus tree to the file
if Path(fname).exists(): if Path(fname).exists():
Path(fname).unlink() Path(fname).unlink()
entry.save(fname) #put the measurement entry in the default path
root=NXroot(entry)
entry.set_default()
root.save(fname)
def add_drawing(parent,filename): def add_drawing(parent,filename):
ext=Path(filename).suffix ext=Path(filename).suffix
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment