NeurodataWithoutBorders / pynwb

A Python API for working with Neurodata stored in the NWB Format
https://pynwb.readthedocs.io
Other
178 stars 84 forks source link

[Bug]: SpatialSeries.reference_frame should be optional #1985

Closed rly closed 2 weeks ago

rly commented 2 weeks ago

What happened?

The spec for SpatialSeries says that the "reference_frame" dataset is optional. However, it is a required argument in pynwb to the SpatialSeries constructor.

This is blocking a user from validating their NWB files for upload onto DANDI after creating them using MatNWB.

Steps to Reproduce

n/a

Traceback

No response

Operating System

Windows

Python Executable

Conda

Python Version

3.11

Package Versions

No response

Code of Conduct

rly commented 2 weeks ago

The situation is odd though - the constructor for SpatialSeries should not be called during validation. Only builders are needed. The error is: ConstructError: Could not construct SpatialSeries object due to: SpatialSeries.__init__: missing argument 'reference_frame'

rly commented 2 weeks ago

Never mind the last comment. NWB inspector reads the file and therefore the objects are constructed.