uwacan.recordings.FileRecording#

class FileRecording(files, assume_sorted=False, **kwargs)[source]#

Bases: Recording

Base class for recordings using multiple files.

This class has some interface definitions and some shared logic for implementing recordings that use multiple files to store the data.

Subclasses need to implement a RecordedFile inner class, some way to read the files (typically a classmethod), and the time_data function (typically using raw_data).

class RecordedFile(filepath)[source]#

Interface class for single recording files.

This interface class defines how subclasses should implement wrappers around individual files.

Methods

check_file_continuity([start_time, ...])

Check the continuity of recorded data.

raw_data([start_time, stop_time])

Read raw data from files on disk.

raw_frames([start_time, stop_time, framesize])

Generate frames of raw data from files on disk.

select_file_name(name)

Get a recording for a specific file, by name.

select_file_time(time)

Get a recording for a specific file, by time.

subwindow([time, start, stop, center, ...])

Select a subset of the recording.

Inherited methods

time_data()

Read stored time data.

Attributes

allowable_interrupt

How long gap is allowed between files when reading.

num_channels

The number of channel in the recording, and the read data.

samplerate

The samplerate of the recording, in Hz.

time_window

A TimeWindow that covers the recording.