Skip to content

Plate

PlateMetadata #

Bases: VersionedBase

Plate metadata see https://ngff.openmicroscopy.org/0.4/#plate-md

Group #

Bases: GroupSpec[GroupAttrs, WellGroup | GroupSpec | ArraySpec]

contains_well_group classmethod #

contains_well_group(members)

Check that .members contains a WellGroup

Source code in src/pydantic_ome_ngff/v04/plate.py
@field_validator("members", mode="after")
@classmethod
def contains_well_group(
    cls, members: WellGroup | GroupSpec | ArraySpec
) -> WellGroup | GroupSpec | ArraySpec:
    """
    Check that .members contains a WellGroup
    """
    if not any(isinstance(v, WellGroup) for v in members.values()):
        raise ValidationError
    return members