NeurodataWithoutBorders / matnwb

A Matlab interface for reading and writing NWB files
BSD 2-Clause "Simplified" License
50 stars 32 forks source link

Heterogeneous Arrays not Supported #212

Closed lawrence-mbf closed 4 years ago

lawrence-mbf commented 4 years ago

Particularly for Intracellular Ephys subclasses. This can cause issues since MatNWB currently assumes that cell arrays are cellstrings. It's currently not possible to create an array of CurrentClampStimulusSeries and CurrentClampSeries objects in MATLAB. You need a cell array.

bendichter commented 4 years ago

I don't think HDF5 supports heterogeneous arrays

bendichter commented 4 years ago

Do you mean compound datatypes?

lawrence-mbf commented 4 years ago

@bendichter I should clarify. It's currently not possible to create an array of CurrentClampStimulusSeries and CurrentClampSeries objects in MATLAB despite them both being PatchClampSeries. You need a cell array to store it. Right now, MatNWB assumes cell arrays are cell strings. I'm testing a fix right now where the MetaClass simply inherits from matlab.mixins.Heterogeneous so that this can be done.

lawrence-mbf commented 4 years ago

Ah, I forget, that's having high-level types in an array doesn't make sense either. Nevermind.