Skip to content

Commit

Permalink
[ref] It is now possible to record the time label from a stream using…
Browse files Browse the repository at this point in the history
… the Hdf_recorder Block
  • Loading branch information
WeisLeDocto committed Mar 7, 2023
1 parent f956199 commit 4ccdd67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crappy/inout/t7Streamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def get_stream(self) -> Optional[List[np.ndarray]]:
data.shape[0]) / self._scan_rate
self._n_points += data.shape[0]

return [t, data]
return [t[:, np.newaxis], data]

def stop_stream(self) -> None:
"""Stops the stream if it was started."""
Expand Down
2 changes: 1 addition & 1 deletion crappy/modifier/demux.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ def evaluate(self, data: Dict[str, np.ndarray]) -> Dict[str, Any]:
if self._mean:
data[self._time_label] = np.mean(data[self._time_label])
else:
data[self._time_label] = data[self._time_label][0]
data[self._time_label] = np.squeeze(data[self._time_label])[0]

return data

0 comments on commit 4ccdd67

Please sign in to comment.