annotations
DASCore annotations: labelled geometry over the dimensions of patch data.
An annotation set describes data – picks, events, noisy hours, vehicle lines – in the frame of the patches it was made on. Facts about the fiber itself belong to the inventory instead, in optical distance; see dascore.core.inventory.
A set is dataframe-backed, one row per annotation. Columns name the dimensions a row constrains: <dim>_min/<dim>_max state a half-open range, a bare <dim> states a point, and a dimension no column names is unconstrained. Those columns hold coordinates – numbers, times or durations – since that is what a bound is compared as. Paths and polygons keep their vertices in a second, tidy frame keyed by annotation id, and every row keeps a bounding region so table operations work whatever its geometry is.
Any other column is an extra the annotation carries, with one exception: a column whose name begins with an underscore is the author’s own record keeping. A set never holds one, so it stays where it was written and no reader looks for meaning in it.
Functions
| Name | Description |
|---|---|
| annotation_set_to_csv | Return the annotations as CSV text, optionally writing it to a path. |
| annotation_set_to_dataframe | Return the annotations as a dataframe. |
| annotation_set_to_parquet | Write the annotations as one parquet file. |
| annotation_set_to_vertices | Return the vertices of every path and polygon as a tidy dataframe. |
| read_dimension | Read a dimension column as the numbers or times its cells state. |
| read_ordinal | Read the vertex order column as the numbers it states. |
| save_annotation_set | Write the set to a directory, creating it if needed. |
Classes
| Name | Description |
|---|---|
| Annotation | One annotation: a geometry, what it says, and who it belongs to. |
| AnnotationBasis | Base for the curves a path’s vertices may be regenerated from. |
| AnnotationColumn | What a set says about one of its columns. |
| AnnotationSet | An immutable, dataframe-backed set of annotations over patch dimensions. |
| AnnotationSetAttrs | The attributes of an annotation set: what it describes and how. |
| Line | A straight line between two points. |
| Moveout | The arrival time of a wavefront along the fiber, as a function of distance. |
| Path | An open sequence of vertices, e.g. a pick or a vehicle track. |
| Polygon | A closed sequence of vertices bounding an area. |
| Region | Per-dimension bounds: the box an annotation occupies. |