oruebel / ndx-icephys-meta

NWB extensions for origanizing intracellular electrophysiology metadata
Other
6 stars 0 forks source link

Extract complex VectorData to its own type: TimeSeriesRef #60

Closed rly closed 3 years ago

rly commented 4 years ago

The IntracellularStimuliTable and IntracellularResponsesTable types both have a dataset:

- name: stimulus
  neurodata_type_inc: VectorData
  dtype:
  - name: idx_start
    dtype: int32
    doc: Start index into the TimeSeries 'data' and 'timestamp' datasets of the
      referenced TimeSeries. The first dimension of those arrays is always time.
  - name: count
    dtype: int32
    doc: Number of data samples available in this time series, during this epoch
  - name: timeseries
    dtype:
      target_type: TimeSeries
      reftype: object
    doc: The TimeSeries that this index applies to
  doc: Column storing the reference to the recorded stimulus for the recording
    (rows)

Aside from the name and docstring, this is the same as the definition for the 'timeseries' column of the TimeIntervals table. Since this exact structure would now be used three times in the schema, I think this should be its own type named something like TimeSeriesRef or TimeSeriesColumn and included in the table, e.g.:

- name: stimulus
  neurodata_type_inc: TimeSeriesRef
  doc: Column storing the reference to the recorded stimulus for the recording
    (rows)
oruebel commented 4 years ago

I agree that this will be useful to do. My main question is how we deal with this with regard to backward compatibility?

rly commented 4 years ago

For the new tables, I don't see an issue with creating a new type. For the existing TimeIntervals table, we may have to wait until the next major version of the schema to update it to use the new type...

oruebel commented 4 years ago

Sounds reasonable