points.tiers.SequencePointTier(tier=[], entry_class=None)
A SequencePointTier class
SequencePointTiers have all the same methods and attributes as TierMixins and WithinMixins
Examples
from aligned_textgrid import SequencePoint, SequencePointTier
point_a = SequencePoint((0,"a"))
point_b = SequencePoint((1, "b"))
point_tier = SequencePointTier([point_a, point_b])
print(point_tier)
Sequence Point tier of SequencePoint;
print(point_tier.sequence_list)
[Class SequencePoint, label: a; tier_index: 0, Class SequencePoint, label: b; tier_index: 1]
Attributes
| entry_class |
Type[SequencePoint] |
The class of entries within the tier |
| name |
str |
The name of the tier |
| times |
np.array |
The times of points in the tier |
| labels |
list[str, …] |
The labels of points in the tier |
| xmin |
float |
The time of the first point in the tier |
| xmax |
float |
The time of the last point in the tier |
| [] |
float |
Indexable and iterable |
Methods
get_nearest_point
points.tiers.SequencePointTier.get_nearest_point(time)
Returns nearest point
Parameters
| time |
float |
time at which to get the nearest point |
required |
get_nearest_point_index
points.tiers.SequencePointTier.get_nearest_point_index(time)
Returns the index of the closest point to time
Parameters
| time |
float |
The time at which to get the nearest point |
required |
Returns
|
int |
The index of the nearest point within the tier |
return_tier
points.tiers.SequencePointTier.return_tier(name=None)
Returns SequencePointTier as a praatio PointTier
Returns
|
PointTier |
A praatio point tier |
save_as_tg
points.tiers.SequencePointTier.save_as_tg(save_path)
Saves the current point tier as a textgrid
Parameters
| save_path |
str |
path to where you want to save the textgrid. |
required |