Commit a66db8fe authored by Thomas Vincent's avatar Thomas Vincent
Browse files

Add alternative name in master

parent 3d243e93
......@@ -362,9 +362,18 @@ class XsocsH5Writer(XsocsH5):
class XsocsH5MasterWriter(XsocsH5Writer):
def add_entry_file(self, entry, entry_file):
def add_entry_file(self, entry, entry_file, master_entry=None):
"""Add an external link to an entry in a sub-file
:param str entry: Name of the entry in the sub-file
:param str entry_file: Name of the file the entry belongs to
:param str master_entry: Optional alternative entry name in master file
"""
if master_entry is None:
master_entry = entry
with self._get_file() as h5_file:
h5_file[entry] = _h5py.ExternalLink(entry_file, entry)
h5_file[master_entry] = _h5py.ExternalLink(entry_file, entry)
if __name__ == '__main__':
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment