Skip to content

Commit

Permalink
propagate compression to recorder
Browse files Browse the repository at this point in the history
  • Loading branch information
orgua committed Apr 28, 2024
1 parent 3283c7c commit ad76e46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion software/python-package/shepherd_sheep/h5_recorder_pru.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def add_timestamps(self, data_iv: h5py.Group, tseries: np.ndarray) -> None:
# TODO: may be more useful on server -> so move to core-writer
if data_iv["time"].shape[0] == data_iv["voltage"].shape[0]:
return # no action needed
log.logger.info(
log.info(
"[%s] will add timestamps (omitted during run for performance)", type(self).__name__
)
self.data["values"].resize((self.position, 4))
Expand Down
4 changes: 2 additions & 2 deletions software/python-package/shepherd_sheep/h5_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def __enter__(self) -> Self:
self.gpio_grp = self.h5file.create_group("gpio")
self.pru_util_grp = self.h5file.create_group("pru_util")
# prepare recorders
self.rec_gpio = GpioRecorder(self.gpio_grp)
self.rec_pru = PruRecorder(self.pru_util_grp)
self.rec_gpio = GpioRecorder(self.gpio_grp, compression=self._compression)
self.rec_pru = PruRecorder(self.pru_util_grp, compression=self._compression)

# targets for logging-monitor # TODO: redesign? all should be kept in data_0
self.sheep_grp = self.h5file.create_group("sheep")
Expand Down

0 comments on commit ad76e46

Please sign in to comment.