Skip to content

[Feature]: Add ElectricalSeries should ensure that ElectrodeTable is added as well  #1701

Description

@oruebel

What would you like to see added to PyNWB?

See hdmf-dev/hdmf-zarr#95 (comment)

from pynwb.testing.mock.file import mock_NWBFile
from pynwb.testing.mock.ecephys import mock_ElectricalSeries
from hdmf_zarr import NWBZarrIO

nwbfile = mock_NWBFile()
nwbfile.add_acquisition(mock_ElectricalSeries())

with NWBZarrIO(path="/home/jovyan/Downloads/test_zarr.nwb", mode="w") as io:
    io.write(nwbfile)

Leading to an error because the electrodes table has not been added to the file.

Is your feature request related to a problem?

See above

What solution would you like?

Possible solutions:

  • mock_ElectricalSeries should require electrodes or create electrodes if not present
  • nwbfile.add_acquisition(electrical_series) or ElectricalSeries should ensure that when it an ElectricalSeries is added to the NWBFile that the electrodes are added as well

Do you have any interest in helping implement the feature?

Yes.

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category: bugerrors in the code or code behaviorcategory: enhancementimprovements of code or code behaviorpriority: mediumnon-critical problem and/or affecting only a small set of NWB users

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions