Line

class of dascore.core.annotations
inherits from: AnnotationBasis, dascore.core.annotations._AnnotationModel, RichRepr, DascoreBaseModel, pydantic.main.BaseModel
source

Line(
    object_type: Literal[‘Line’] = Line,
    start: collections.abc.Mapping[str, Any] ,
    end: collections.abc.Mapping[str, Any] ,
)-> None

A straight line between two points.

Stated as its endpoints rather than a slope, for two reasons: a slope cannot spell a line of constant time across distance – an instant, a shot, a trigger – which is an ordinary thing to annotate; and endpoints are what a person draws when they drag from one place to another.

Methods

Name Description
extent Return the line’s endpoints, lowest first, per dimension.
model_copy Copy the model, dropping cached values the update invalidates.
new Create new instance with some attributed updated.
vertices Return count points evenly spaced from one end to the other.