An immutable set of annotations, the features they compose, and bases.
Parameters
Parameter
Description
annotations
A dataframe, or anything one can be built from, of one row per located thing. Per dimension a row states <dim>, a half-open <dim>_min/<dim>_max range, or nothing (spanning it). A feature_id names the feature a row belongs to; blank, the row is its own feature. seq, part and ring order the members of a path or polygon.
features
A dataframe of one row per feature: a required id, an optional geometry (blank for a group, path, or polygon), an optional basis key, and any other columns. Features hold no coordinates; a feature_id naming no row here creates a group.
bases
A mapping of key to curve, as a model or its document, e.g. {"m1": {"object_type": "Moveout", ...}}. Only a path names one.
dims
Patch dimensions the annotations are stated in. Required unless attrs supplies them.
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 annotated data.
data_id
Identity of the annotated data.
annotation_columns
Documentation for annotations columns, keyed by name.
feature_columns
Documentation for features columns, keyed by name.
Examples
import pandas as pdimport dascore as dcpicks = pd.DataFrame( {"time": [1.0, 2.5],"phase": ["P", "S"],"feature_id": ["event_1", "event_1"], })annotations = dc.AnnotationSet(picks, dims=("distance", "time"))len(annotations) # one feature, created from the feature_idfeature = annotations["event_1"]feature.kind, len(feature.geometry.regions)