Summary
ImageSeries.device is optional — I think this makes sense as ImageSeries is a generic type used for image data where a recording device may not always be applicable. However, OnePhotonSeries and TwoPhotonSeries always represent data acquired from a specific microscope, and should require a device link.
Currently both types inherit the optional device link (quantity: '?') from ImageSeries without overriding it, meaning a schema-valid OnePhotonSeries or TwoPhotonSeries can exist with no device link. This is inconsistent with ImagingPlane, ElectrodeGroup, IntracellularElectrode, and OptogeneticStimulusSite, all of which have required device links.
Proposed fix
Add a links: block to OnePhotonSeries and TwoPhotonSeries in nwb.ophys.yaml that re-declares the device link with quantity: 1 to explicitly make it required:
links:
- name: device
quantity: 1
doc: Link to the Device object (e.g. microscope) used to acquire this image series.
Note: quantity: 1 must be stated explicitly. For inherited field overrides, the parent's quantity: '?' persists unless replaced — omitting quantity only defaults to required for freshly defined fields, not overrides.
Open questions
- Should any other
ImageSeries subtypes (e.g. OpticalSeries) also require device?
Summary
ImageSeries.deviceis optional — I think this makes sense asImageSeriesis a generic type used for image data where a recording device may not always be applicable. However,OnePhotonSeriesandTwoPhotonSeriesalways represent data acquired from a specific microscope, and should require a device link.Currently both types inherit the optional
devicelink (quantity: '?') fromImageSerieswithout overriding it, meaning a schema-validOnePhotonSeriesorTwoPhotonSeriescan exist with no device link. This is inconsistent withImagingPlane,ElectrodeGroup,IntracellularElectrode, andOptogeneticStimulusSite, all of which have required device links.Proposed fix
Add a
links:block toOnePhotonSeriesandTwoPhotonSeriesinnwb.ophys.yamlthat re-declares thedevicelink withquantity: 1to explicitly make it required:Note:
quantity: 1must be stated explicitly. For inherited field overrides, the parent'squantity: '?'persists unless replaced — omittingquantityonly defaults to required for freshly defined fields, not overrides.Open questions
ImageSeriessubtypes (e.g.OpticalSeries) also require device?