Skip to content

radiens_core.models.time_range

TimeRange — a concrete time range in stream time.

Classes

TimeRange

Bases: BaseModel

A concrete time range in stream time.

ATTRIBUTE DESCRIPTION
sec

Start and end [start, end) in seconds of stream time, measured from when acquisition streaming started. A recording starts at the stream time recording began, so sec[0] is usually not 0; offset windows from it.

TYPE: tuple[float, float]

timestamp

Start and end sample indices [start, end), sec * fs.

TYPE: tuple[int, int]

fs

Sampling rate in Hz.

TYPE: float

dur_sec

Duration in seconds.

TYPE: float

walltime_str

Wall-clock time of the range's start, in UTC.

TYPE: str

n

Number of samples.

TYPE: int

Attributes

walltime property
walltime: datetime

walltime_str as a timezone-aware UTC datetime.