nwb-schema icon indicating copy to clipboard operation
nwb-schema copied to clipboard

Clean up TimeSeries type

Open rly opened this issue 6 years ago • 2 comments
trafficstars

description

The description of a TimeSeries is not required. If none is entered, the text "no description" is used. I think it is important for the user to provide some information about the timeseries data and so required should be true and there should be no default value.

  - name: description
    dtype: text
    doc: Description of TimeSeries
    default_value: no description
    required: false

data.resolution

Based on the documentation for the resolution attribute on the data dataset of TimeSeries, the default value should be -1.0.

  - name: data
    attributes:
    - name: resolution
      dtype: float32
      doc: 'Smallest meaningful difference between values in data, stored in the specified
        by unit. COMMENT: E.g., the change in value of the least significant bit,
        or a larger number if signal noise is known to be present. If unknown, use
        -1.0'
      default_value: 0.0
      required: false

timestamps.interval

The interval attribute on the timestamps dataset of TimeSeries is fixed to 1 and seems to have no obvious purpose or meaning. If so, it should be removed.

  - name: timestamps
    attributes:
    - name: interval
      dtype: int32
      doc: Value is '1'
      value: 1

rly avatar Jun 18 '19 17:06 rly

Update:

  1. Making description required would be a breaking change.
  2. Changing the default value for data.resolution to -1.0 as the doc states has been done.
  3. Removing interval would (probably?) be a breaking change.

rly avatar Nov 20 '19 02:11 rly

I am wondering about the control and control_description dataset/attribute. Are these being used often? It seems to me from the description that this is a convenience dataset/attribute, where the user is very free to define what it is. It also seems to be something that if useful, might be better put in a separate TimeSeries object. I am just adding this thought here, because I think the TimeSeries object would be cleaner without it.

ehennestad avatar Feb 03 '24 18:02 ehennestad