Skip to content

Commit

Permalink
fix metadata collection
Browse files Browse the repository at this point in the history
  • Loading branch information
rettigl committed Dec 17, 2024
1 parent 4a4d582 commit 1bd8613
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sed/loader/mpes/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ def hdf5_to_dataframe(
search_pattern="Stream",
)

test_proc.close()

column_names = [alias_dict.get(group, group) for group in group_names]

if time_stamps:
Expand Down Expand Up @@ -137,6 +135,8 @@ def hdf5_to_dataframe(

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

test_proc.close()

return ddf.from_dask_array(array_stack, columns=column_names)


Expand Down Expand Up @@ -188,8 +188,6 @@ def hdf5_to_timed_dataframe(
search_pattern="Stream",
)

test_proc.close()

column_names = [alias_dict.get(group, group) for group in group_names]

if time_stamps:
Expand Down Expand Up @@ -226,6 +224,8 @@ def hdf5_to_timed_dataframe(

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

test_proc.close()

return ddf.from_dask_array(array_stack, columns=column_names)


Expand Down Expand Up @@ -720,16 +720,16 @@ def get_start_and_end_time(self) -> Tuple[float, float]:
Returns:
Tuple[float, float]: A tuple containing the start and end time stamps
"""
h5file = load_h5_in_memory(self.files[0])
h5filename = self.files[0]
timestamps = hdf5_to_array(
h5file,
h5filename=h5filename,
group_names=self._config["dataframe"]["hdf5_groupnames"],
time_stamps=True,
)
ts_from = timestamps[-1][1]
h5file = load_h5_in_memory(self.files[-1])
h5filename = self.files[-1]
timestamps = hdf5_to_array(
h5file,
h5filename=h5filename,
group_names=self._config["dataframe"]["hdf5_groupnames"],
time_stamps=True,
)
Expand Down

0 comments on commit 1bd8613

Please sign in to comment.