from aligned_textgrid import SequencePoint, SequenceInterval
first_point = SequencePoint((0, "first"))
print(first_point)Class SequencePoint, label: first;
Sequence Points
| Name | Type | Description | Default |
|---|---|---|---|
| point | list | tuple | Point | Self |
A list or tuple of a time and label value. | (None, None) |
Class SequencePoint, label: first;
| Name | Type | Description |
|---|---|---|
| … | All attributes and methods included in PrecedenceMixins and InTierMixins | |
| time | float | Time value associated with the point. |
| label | str | Label associated with the point |
| intier | SequencePointTier |
If the SequencePoint is within a tier, this accesses the tier. |
| fol | SequencePoint | If defined, the following SequencePoint within the same tier |
| prev | SequencePoint | If defined, the previous SequencePoint within the same tier. |
| fol_distance | float | If fol is defined, the difference between the current point and fol (should be >= 0) |
| prev_distance | float | if prev is defined, the difference between the current point and prev (should be <= 0). |
| Name | Description |
|---|---|
| distance_from | Distance from an entry |
| get_interval_at_point | Get the SequenceInterval the current point falls within |
| get_interval_index_at_time | Get the index of an interval at the point’s time |
Distance from an entry
| Name | Type | Description | Default |
|---|---|---|---|
| entry | Self | SequenceInterval |
A point or an interval to get the distance of the current point from | required |
| Name | Type | Description |
|---|---|---|
| np.array | a single value in the case of a point, a numpy array in the case of an interval. |
Get the SequenceInterval the current point falls within
| Name | Type | Description | Default |
|---|---|---|---|
| tier | SequenceTier | The sequence tier within which to look for a matching SequenceInterval | None |
| Name | Type | Description |
|---|---|---|
| SequenceInterval | The SequenceInterval within which the current point falls |
Get the index of an interval at the point’s time
| Name | Type | Description | Default |
|---|---|---|---|
| tier | SequenceTier | A SequenceTier. | None |
| Name | Type | Description |
|---|---|---|
| int | The index of the SequenceInterval within which the point falls |