Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
kmap
xsocs
Commits
a66db8fe
Commit
a66db8fe
authored
Apr 05, 2018
by
Thomas Vincent
Browse files
Add alternative name in master
parent
3d243e93
Changes
1
Hide whitespace changes
Inline
Side-by-side
xsocs/io/XsocsH5.py
View file @
a66db8fe
...
...
@@ -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__'
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment