agencyenterprise / ndx-nirs

An NWB extension for storing Near-Infrared Spectroscopy (NIRS) data
BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

NIRSSeries should specify data dimensions and dtype #32

Open rly opened 2 years ago

rly commented 2 years ago

The class diagram for NIRSSeries says that data should have a numeric dtype and 2 dimensions (time x channels), but as far as I can tell, the schema https://github.com/agencyenterprise/ndx-nirs/blob/main/spec/ndx-nirs.extensions.yaml#L179-L186 specifies no such requirements. NIRSSeries extends TimeSeries and does not modify any properties of the "data" dataset.

To ensure that the data stored in a NIRSSeries meets the desired requirements, I recommend modifying the schema for NIRSSeries to define the "data" dataset explicitly as:

  - name: data
    dtype: numeric
    dims:
    - num_times
    - num_channels
    shape:
    - null
    - null
    doc: Recorded NIRS data.

See https://github.com/NeurodataWithoutBorders/nwb-schema/blob/dev/core/nwb.ecephys.yaml#L18-L42 and https://github.com/NeurodataWithoutBorders/nwb-schema/blob/dev/core/nwb.ecephys.yaml#L131-L141 as examples.

dsleiter commented 2 years ago

Thanks @rly, great point and thanks for the helpful suggestion on how to resolve it! We'll be sure to include this in the next version. We're planning to do more frequent updates and releases.