iracema.core.segment¶
This module contain classes used to manipulate segments and slice TimeSeries objects using them.
-
class
iracema.core.segment.
Segment
(start, end)[source]¶ Bases:
object
The objects generated from this class are used to retrieve excerpts from time-series.
Hint
This class is also available at the main package level as
iracema.Segment
.- Parameters
start (ir.Point) – Point corresponding to the start of the segment.
end (ir.Point) – Point corresponding to the end of the segment.
-
property
duration
¶
-
property
start_time
¶
-
property
end_time
¶
-
class
iracema.core.segment.
SegmentList
(segments=None)[source]¶ Bases:
collections.abc.MutableSequence
List of segments.
Hint
This class is also available at the main package level as
iracema.SegmentList
.-
map_indexes
(time_series)[source]¶ Return an array of tuples with the indexes of
time_series
that correspond to the segments in the list.
-
add_segment
(start, end)[source]¶ Instantiate a segment with the given start and end and add to the list.
-