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
Electrodes
class to use for the electrodes table instead of aDynamicTable
to 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
ObjectMapper
forNWBFile
such that it constructs anElectrodes
object instead of aDynamicTable
object for theNWBFile.electrodes
constructor argument.I thought of a few ways to do it:
Electrodes
object from the/general/extracellular_ephys/electrodes/
group builder by setting each value and creating eachVectorData
individually, but this would be very tedious and involve a lot of hard coding.Electrodes
object from the/general/extracellular_ephys/electrodes/
group builder by setting the values of theElectrodes
object to the values of theDynamicTable
that is already generated. This doesn't work because I cannot change the parent of theVectorData
classes 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
DynamicTable
to handle optional columns. What do you think?