uwacan.recordings.SoundTrap.raw_frames#

SoundTrap.raw_frames(start_time=None, stop_time=None, framesize=None)#

Generate frames of raw data from files on disk.

This retrieves raw data samples between the start time and stop time (defaulting to times in self.time_window), and yields frames of a fixed size. The frames have no overlap - use self.rolling for overlapping frames. If no framesize is given, it defaults to yielding a single large frame with all the data. If needed, data will be loaded from several files on disk. In those cases, the file timestamps will be checked for approximate data continuity before any loading starts.

Parameters:
start_timedate-like, optional

The start of the time window to read.

stop_timedate-like, optional

The end of the time window to read.

framesizeint, optional

The number of samples to yield in each frame.

Yields:
numpy.ndarray

The frames with raw data.

Notes

This method is intended as the base data loader, mainly for internal use in the package. It’s used both to load all data within a time window, but also as an IO optimization in self.rolling` to load larger chunks of data than the desired rolling window.