create Electrodes class to replace electrodes table #1205
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@ajtritt I am trying to create an
Electrodesclass to use for the electrodes table instead of aDynamicTableto solve #1204. Without being its own class, we cannot specify in PyNWB that certain columns of the electrodes table are optional.This involves changing the
ObjectMapperforNWBFilesuch that it constructs anElectrodesobject instead of aDynamicTableobject for theNWBFile.electrodesconstructor argument.I thought of a few ways to do it:
Electrodesobject from the/general/extracellular_ephys/electrodes/group builder by setting each value and creating eachVectorDataindividually, but this would be very tedious and involve a lot of hard coding.Electrodesobject from the/general/extracellular_ephys/electrodes/group builder by setting the values of theElectrodesobject to the values of theDynamicTablethat is already generated. This doesn't work because I cannot change the parent of theVectorDataclasses to the new object. That is what I have coded up in the PR here./general/extracellular_ephys/electrodes/group builder. This doesn't seem possible.Can you think of a better way to do this? Would this even be possible? Would it require substantial changes to HDMF to work?
Stepping back at the source problem, it might be easier to change how adding columns works in
DynamicTableto handle optional columns. What do you think?