GroupTimestamp
timelines.GroupTimestamp(
coordinates,
source_id,
row_index=-1,
source=None,
is_interpolated=False,
conversion_maps=True,
)
A synchronized instant across all timelines in a group.
This is a view object created from a row in the group’s timestamp table. Not stored directly - the table is the source of truth.
Attributes
| coordinates |
dict[str, Coordinate] |
Dictionary mapping timeline IDs to canonical coordinates. Null table cells are omitted. |
| row_index |
int |
Index of this timestamp in the source table. -1 indicates an interpolated timestamp (not from a table row). |
Examples
>>> ts = group.get_timestamp_at_index(0)
>>> ts.get_coordinate_for("dgt1:1", format="float")
0.0
>>> ts.present_timelines # Which timelines have values here
['dgt1:1', 'audio:1']
See Also
TimeStamp: The unified timestamp class from timetoalign.core.
Methods
get_conversion_for
timelines.GroupTimestamp.get_conversion_for(key)
Return a conversion-map value by selector.
Parameters
| key |
str |
Conversion-map name, ID, selector, or target-unit name. |
required |
Returns
|
object |
The map result without numeric projection. |
Raises
|
KeyError |
If no eligible conversion matches. |
get_unit
timelines.GroupTimestamp.get_unit(
unit,
*,
timeline_id=None,
format='id_coordinate',
rounding='round',
)
Get the row coordinate converted to a specific unit.
Parameters
| unit |
TimeUnit |
The target unit for conversion. |
required |
| timeline_id |
str | None |
Optional stored member to select explicitly. |
None |
| format |
CoordinateFormat |
Requested coordinate output format. |
'id_coordinate' |
| rounding |
Rounding |
Integral projection mode. |
'round' |
Returns
|
CoordinateResult | pd.Series |
Converted coordinate projection. |
Raises
|
KeyError |
If no selected coordinate or eligible map exists. |