An immutable, dataframe-backed set of annotations over patch dimensions.
Parameters
Parameter
Description
data
A dataframe, or anything a dataframe can be built from, holding one row per annotation.
dims
The patch dimensions the annotations are stated in. Required unless attrs states them. The columns spelling one hold numbers, times or durations; text which merely looks like a number is refused, since a bound stated in it compares by its spelling.
vertices
A tidy frame of one row per vertex, with id, seq and one column per dimension. Required by every path and polygon row.
attrs
The set’s attributes; dims and the keywords below override it.
creation_info
What produced the annotations, and when.
acquisition_key
Inventory identity of the data the annotations were made on. The producer supplies it; AnnotationSet.from_patch will take it off a patch once the spool integration lands.
history
Processing performed on that data, in PatchAttrs.history’s shape.
columns
Documentation for columns, keyed by name.
Examples
import pandas as pdimport dascore as dcframe = pd.DataFrame( {"group": ["event"], "distance_min": [10.0], "distance_max": [80.0]})picks = dc.AnnotationSet(frame, dims=("time", "distance"))len(picks), picks[0].grouppicks[0].region.bounds["distance"]