Skip to content

Commit 1bd8613

Browse files
committed
fix metadata collection
1 parent 4a4d582 commit 1bd8613

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

sed/loader/mpes/loader.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ def hdf5_to_dataframe(
9898
search_pattern="Stream",
9999
)
100100

101-
test_proc.close()
102-
103101
column_names = [alias_dict.get(group, group) for group in group_names]
104102

105103
if time_stamps:
@@ -137,6 +135,8 @@ def hdf5_to_dataframe(
137135

138136
array_stack = da.concatenate(arrays, axis=1).T
139137

138+
test_proc.close()
139+
140140
return ddf.from_dask_array(array_stack, columns=column_names)
141141

142142

@@ -188,8 +188,6 @@ def hdf5_to_timed_dataframe(
188188
search_pattern="Stream",
189189
)
190190

191-
test_proc.close()
192-
193191
column_names = [alias_dict.get(group, group) for group in group_names]
194192

195193
if time_stamps:
@@ -226,6 +224,8 @@ def hdf5_to_timed_dataframe(
226224

227225
array_stack = da.concatenate(arrays, axis=1).T
228226

227+
test_proc.close()
228+
229229
return ddf.from_dask_array(array_stack, columns=column_names)
230230

231231

@@ -720,16 +720,16 @@ def get_start_and_end_time(self) -> Tuple[float, float]:
720720
Returns:
721721
Tuple[float, float]: A tuple containing the start and end time stamps
722722
"""
723-
h5file = load_h5_in_memory(self.files[0])
723+
h5filename = self.files[0]
724724
timestamps = hdf5_to_array(
725-
h5file,
725+
h5filename=h5filename,
726726
group_names=self._config["dataframe"]["hdf5_groupnames"],
727727
time_stamps=True,
728728
)
729729
ts_from = timestamps[-1][1]
730-
h5file = load_h5_in_memory(self.files[-1])
730+
h5filename = self.files[-1]
731731
timestamps = hdf5_to_array(
732-
h5file,
732+
h5filename=h5filename,
733733
group_names=self._config["dataframe"]["hdf5_groupnames"],
734734
time_stamps=True,
735735
)

0 commit comments

Comments
 (0)