SegmentLine
timelines.SegmentLine(**kwargs)
A timeline whose cached parameterized classes inherit the segment API.
Methods
from_segmentation
timelines.SegmentLine.from_segmentation(source, split_coords, copy_events=True)
Create a parameterized line from slices of an unchanged source.
Parameters
| source |
Timeline |
Timeline to segment (not modified). |
required |
| split_coords |
list[CoordinateSpec] |
Coordinates defining segment boundaries. k+1 coordinates create k segments. |
required |
| copy_events |
bool |
If True, copy events to their respective segments. |
True |
Returns
|
'SegmentLine' |
New SegmentLine with segments typed to match source. |
Raises
|
ValueError |
If source already has children (ambiguous nesting). |
|
ValueError |
If fewer than 2 split coordinates provided. |
|
TypeError |
If a parameterized receiver does not match the source. |