Skip to content

Optional metric unit for VectorData #706

Description

@h-mayorquin

There is no standard, machine-readable way to record the physical unit of a numeric DynamicTable column. A per-row quantity (a stimulus frequency in Hz, a running speed in cm/s) has nowhere structured to declare its unit today, so it gets folded into the column name or the free-text description. The motivating case is NWBEP001's EventsTable, where an event can carry a continuous numeric payload whose value and duration have clean homes but whose unit does not. There is precedent for unit-bearing columns already: TimestampVectorData and DurationVectorData both define a unit attribute fixed to "seconds".

Two options are on the table. Adding an optional unit (text) attribute directly on VectorData or create a subtype like NumericVectorData. I think the first is the best choice: zero new type, zero migration, and a reader just checks whether the attribute is present. I think this is best as it requires less churn because the unit is optional. The only downside is the semantics as unit does not make sense in some VectorData (reference columns for example).

Metadata

Metadata

Assignees

No one assigned

    Labels

    category: proposalproposed enhancements or new featurespriority: mediumnon-critical problem and/or affecting only a small set of NWB users

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions