Add `DeviceModel` neurodata type
Problem
We discussed today at the NWB meeting the need in both https://github.com/catalystneuro/ndx-ophys-devices and https://github.com/catalystneuro/ndx-extracellular-channels for a neurodata type that represents the model of a device as opposed to a specific instance of a device model and the configuration of that instance.
In new NWB schema 2.8.0, we added an optional string attribute to Device: Device.model to try to handle this in a simple way. However, this could be improved.
Having a separate DeviceModel object, with model properties like manufacturer, that is linked to from Device has the following advantages:
- It deduplicates information when there are multiple instances of a device model present in a session (e.g., multiple Neuropixels 1.0 probes were used and have the same manufacturer and locations and sizes of 960 physical contacts)
- It is useful when combining data across sessions in a relational database (or archive) to say that these devices use the same model. We built this into Spyglass (ref) where there are a handful of probe types with model-level properties but many different instances of a probe type that have different configurations.
Proposed solution
Create a new DeviceModel type that has a name, manufacturer (string, required), model_number (string, required), and description (string, optional).
- Unfortunately, we added
Device.model_nameandDevice.model_numberin the 2.8.0 release, perhaps too hastily. I propose we deprecate those inDeviceand recommend users use their equivalents in the newDeviceModeltype.- Note that PyNWB has not yet released support for 2.8.0 (a release candidate is out though).
- Note that MatNWB added support for 2.8.0 in
mainbut has not yet made a release
Device.manufacturerhas been around for some time. I propose we also deprecate that and recommend users use the equivalent in the newDeviceModeltype.
An aside: Device identifiers
For cross-session and cross-experiment harmonization of devices (e.g., "find all the NWB files on DANDI that used a Neuropixels 1.0 probe"), ideally everyone uses the same DeviceModel name to represent the same real-world device model, e.g., "Neuropixels 1.0" for a Neuropixels 1.0 probe (as opposed to variations like "NP1.0" or "Neuropixels"). And ideally someone would maintain a registry of devices and their unique identifiers, like an RRID, for those devices. Not only would that aid harmonization, downstream users could use the identifier to access more thorough information about the model on an external website. ProbeInterface contains a limited library of probe models that are identified by the manufacturer and model name (so no change is needed here). We could create and maintain a registry for all NWB device models, but I think that would be a significant undertaking and responsibility, and perhaps a separate discussion.
+1 on this.
I support this proposal. Here is an example of how it could be used: PR#5