Skip to content

Make device link required in OnePhotonSeries and TwoPhotonSeries #697

Description

@ehennestad

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    category: proposalproposed enhancements or new features

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions