This PR introduces the AlignedDynamicTable type, which inherits from DynamicTable but may itself contain a collection of additional DynamicTables that define "sub-categories" in the table. All tables within the AlignedDynamicTable type must align with the main table, i.e., all tables must have the same number of rows and rows must correspond to each other by index!
Using this new type, the IntracellularRecordingsTable type is updated so that the stimulus, response, and electrode are stored as separate DynamicTables within the IntracellularRecordingsTable. This approach has the advantage that we do not require DynamicTableRegions to link all these tables together and at the same time separates the stimulus, response, and electrode so that we can add dynamic metadata for each category. Since each of these is stored in a separate DynamicTable it is feasible the store metadata fields with the same name for each of these, which would not be possible if the data were stored in a single DynamicTable with sub-categories. At the same, time, the number of datasets we need is the same, so that the overhead compared to a single DynamicTable is minimal.
There are some API changes compared to the previous version but I think they should be reasonable. E.g., the example notebook is working without major changes. The main details that change is how to add new columns to the IntracellularRecordingsTable and how the Pandas dataframes look on read.
All tests are passing now and this should work now. There are still a few TODO items but most refer to adding more tests.
This PR introduces the
AlignedDynamicTable
type, which inherits fromDynamicTable
but may itself contain a collection of additionalDynamicTables
that define "sub-categories" in the table. All tables within theAlignedDynamicTable
type must align with the main table, i.e., all tables must have the same number of rows and rows must correspond to each other by index!Using this new type, the
IntracellularRecordingsTable
type is updated so that thestimulus
,response
, andelectrode
are stored as separateDynamicTables
within theIntracellularRecordingsTable
. This approach has the advantage that we do not requireDynamicTableRegions
to link all these tables together and at the same time separates thestimulus
,response
, andelectrode
so that we can add dynamic metadata for each category. Since each of these is stored in a separate DynamicTable it is feasible the store metadata fields with the same name for each of these, which would not be possible if the data were stored in a single DynamicTable with sub-categories. At the same, time, the number of datasets we need is the same, so that the overhead compared to a single DynamicTable is minimal.There are some API changes compared to the previous version but I think they should be reasonable. E.g., the example notebook is working without major changes. The main details that change is how to add new columns to the
IntracellularRecordingsTable
and how the Pandas dataframes look on read.All tests are passing now and this should work now. There are still a few TODO items but most refer to adding more tests.
Fix #31