Commit 499a1918 authored by payno's avatar payno
Browse files

[_Acquisition] improvement: only give the input_file relative to the outpufile

parent 2991a961
Pipeline #36080 passed with stage
in 20 seconds
......@@ -807,12 +807,10 @@ class _Acquisition:
output_file + '::/' + data_path))
# in order to have relative links output_file and data_path should be
# relative
output_file = os.path.relpath(output_file, os.getcwd())
input_file_path = os.path.relpath(input_file_path, os.getcwd())
# first retrieve the data and create some virtual dataset.
self._preprocess_frames(input_file_path, output_file=output_file)
with HDF5File(output_file, 'a') as h5_file:
entry = h5_file.require_group(data_path)
entry.attrs["NX_class"] = u"NXentry"
......@@ -824,7 +822,7 @@ class _Acquisition:
def _preprocess_frames(self, input_file_path):
def _preprocess_frames(self, input_file_path, output_file):
"""parse all frames of the different steps and retrieve data,
# TODO: make sure those are ordered or use the 'scan_numbers' ?
......@@ -911,7 +909,9 @@ class _Acquisition:
_image_key_control.extend([image_key_control.value] * n_frame)
_image_key.extend([image_key.value] * n_frame)
# create virtual source (getting ready for writing)
v_source = h5py.VirtualSource(input_file_path,
rel_input = os.path.relpath(input_file_path,
v_source = h5py.VirtualSource(rel_input,, shape=shape)
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