From 0a150d6bc282a10f96b69a6526dff49f4043b37d Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 5 Aug 2024 16:06:05 -0700 Subject: [PATCH] update models --- .../pydantic/core/v2_2_0/core_nwb_base.py | 6 +- .../pydantic/core/v2_2_0/core_nwb_behavior.py | 16 +- .../pydantic/core/v2_2_0/core_nwb_ecephys.py | 55 +++- .../pydantic/core/v2_2_0/core_nwb_epoch.py | 14 +- .../pydantic/core/v2_2_0/core_nwb_file.py | 44 ++- .../pydantic/core/v2_2_0/core_nwb_icephys.py | 73 ++++- .../pydantic/core/v2_2_0/core_nwb_image.py | 26 +- .../pydantic/core/v2_2_0/core_nwb_misc.py | 41 ++- .../pydantic/core/v2_2_0/core_nwb_ogen.py | 19 ++ .../pydantic/core/v2_2_0/core_nwb_ophys.py | 40 ++- .../core/v2_2_0/core_nwb_retinotopy.py | 50 +++- .../models/pydantic/core/v2_2_0/namespace.py | 1 + .../pydantic/core/v2_2_1/core_nwb_base.py | 6 +- .../pydantic/core/v2_2_1/core_nwb_behavior.py | 16 +- .../pydantic/core/v2_2_1/core_nwb_ecephys.py | 55 +++- .../pydantic/core/v2_2_1/core_nwb_epoch.py | 14 +- .../pydantic/core/v2_2_1/core_nwb_file.py | 44 ++- .../pydantic/core/v2_2_1/core_nwb_icephys.py | 73 ++++- .../pydantic/core/v2_2_1/core_nwb_image.py | 26 +- .../pydantic/core/v2_2_1/core_nwb_misc.py | 41 ++- .../pydantic/core/v2_2_1/core_nwb_ogen.py | 19 ++ .../pydantic/core/v2_2_1/core_nwb_ophys.py | 40 ++- .../core/v2_2_1/core_nwb_retinotopy.py | 50 +++- .../models/pydantic/core/v2_2_1/namespace.py | 1 + .../pydantic/core/v2_2_2/core_nwb_base.py | 6 +- .../pydantic/core/v2_2_2/core_nwb_behavior.py | 16 +- .../pydantic/core/v2_2_2/core_nwb_ecephys.py | 55 +++- .../pydantic/core/v2_2_2/core_nwb_epoch.py | 16 +- .../pydantic/core/v2_2_2/core_nwb_file.py | 44 ++- .../pydantic/core/v2_2_2/core_nwb_icephys.py | 73 ++++- .../pydantic/core/v2_2_2/core_nwb_image.py | 26 +- .../pydantic/core/v2_2_2/core_nwb_misc.py | 43 ++- .../pydantic/core/v2_2_2/core_nwb_ogen.py | 19 ++ .../pydantic/core/v2_2_2/core_nwb_ophys.py | 173 ++++++++++- .../core/v2_2_2/core_nwb_retinotopy.py | 14 +- .../models/pydantic/core/v2_2_2/namespace.py | 5 + .../pydantic/core/v2_2_4/core_nwb_base.py | 6 +- .../pydantic/core/v2_2_4/core_nwb_behavior.py | 16 +- .../pydantic/core/v2_2_4/core_nwb_ecephys.py | 55 +++- .../pydantic/core/v2_2_4/core_nwb_epoch.py | 16 +- .../pydantic/core/v2_2_4/core_nwb_file.py | 44 ++- .../pydantic/core/v2_2_4/core_nwb_icephys.py | 73 ++++- .../pydantic/core/v2_2_4/core_nwb_image.py | 26 +- .../pydantic/core/v2_2_4/core_nwb_misc.py | 43 ++- .../pydantic/core/v2_2_4/core_nwb_ogen.py | 19 ++ .../pydantic/core/v2_2_4/core_nwb_ophys.py | 201 ++++++++++++- .../core/v2_2_4/core_nwb_retinotopy.py | 14 +- .../models/pydantic/core/v2_2_4/namespace.py | 4 + .../pydantic/core/v2_2_5/core_nwb_base.py | 6 +- .../pydantic/core/v2_2_5/core_nwb_behavior.py | 16 +- .../pydantic/core/v2_2_5/core_nwb_ecephys.py | 55 +++- .../pydantic/core/v2_2_5/core_nwb_epoch.py | 16 +- .../pydantic/core/v2_2_5/core_nwb_file.py | 44 ++- .../pydantic/core/v2_2_5/core_nwb_icephys.py | 73 ++++- .../pydantic/core/v2_2_5/core_nwb_image.py | 26 +- .../pydantic/core/v2_2_5/core_nwb_misc.py | 43 ++- .../pydantic/core/v2_2_5/core_nwb_ogen.py | 19 ++ .../pydantic/core/v2_2_5/core_nwb_ophys.py | 181 +++++++++++- .../core/v2_2_5/core_nwb_retinotopy.py | 14 +- .../models/pydantic/core/v2_2_5/namespace.py | 4 + .../pydantic/core/v2_3_0/core_nwb_base.py | 6 +- .../pydantic/core/v2_3_0/core_nwb_behavior.py | 16 +- .../pydantic/core/v2_3_0/core_nwb_ecephys.py | 55 +++- .../pydantic/core/v2_3_0/core_nwb_epoch.py | 16 +- .../pydantic/core/v2_3_0/core_nwb_file.py | 44 ++- .../pydantic/core/v2_3_0/core_nwb_icephys.py | 73 ++++- .../pydantic/core/v2_3_0/core_nwb_image.py | 54 +++- .../pydantic/core/v2_3_0/core_nwb_misc.py | 64 +++- .../pydantic/core/v2_3_0/core_nwb_ogen.py | 19 ++ .../pydantic/core/v2_3_0/core_nwb_ophys.py | 190 +++++++++++- .../core/v2_3_0/core_nwb_retinotopy.py | 14 +- .../models/pydantic/core/v2_3_0/namespace.py | 4 + .../pydantic/core/v2_4_0/core_nwb_base.py | 8 +- .../pydantic/core/v2_4_0/core_nwb_behavior.py | 16 +- .../pydantic/core/v2_4_0/core_nwb_ecephys.py | 55 +++- .../pydantic/core/v2_4_0/core_nwb_epoch.py | 16 +- .../pydantic/core/v2_4_0/core_nwb_file.py | 44 ++- .../pydantic/core/v2_4_0/core_nwb_icephys.py | 125 +++++++- .../pydantic/core/v2_4_0/core_nwb_image.py | 54 +++- .../pydantic/core/v2_4_0/core_nwb_misc.py | 64 +++- .../pydantic/core/v2_4_0/core_nwb_ogen.py | 19 ++ .../pydantic/core/v2_4_0/core_nwb_ophys.py | 190 +++++++++++- .../core/v2_4_0/core_nwb_retinotopy.py | 14 +- .../models/pydantic/core/v2_4_0/namespace.py | 4 + .../pydantic/core/v2_5_0/core_nwb_base.py | 25 +- .../pydantic/core/v2_5_0/core_nwb_behavior.py | 16 +- .../pydantic/core/v2_5_0/core_nwb_ecephys.py | 55 +++- .../pydantic/core/v2_5_0/core_nwb_epoch.py | 21 +- .../pydantic/core/v2_5_0/core_nwb_file.py | 44 ++- .../pydantic/core/v2_5_0/core_nwb_icephys.py | 125 +++++++- .../pydantic/core/v2_5_0/core_nwb_image.py | 71 ++++- .../pydantic/core/v2_5_0/core_nwb_misc.py | 64 +++- .../pydantic/core/v2_5_0/core_nwb_ogen.py | 19 ++ .../pydantic/core/v2_5_0/core_nwb_ophys.py | 190 +++++++++++- .../core/v2_5_0/core_nwb_retinotopy.py | 14 +- .../models/pydantic/core/v2_5_0/namespace.py | 4 + .../core/v2_6_0_alpha/core_nwb_base.py | 25 +- .../core/v2_6_0_alpha/core_nwb_behavior.py | 16 +- .../core/v2_6_0_alpha/core_nwb_ecephys.py | 55 +++- .../core/v2_6_0_alpha/core_nwb_epoch.py | 21 +- .../core/v2_6_0_alpha/core_nwb_file.py | 44 ++- .../core/v2_6_0_alpha/core_nwb_icephys.py | 125 +++++++- .../core/v2_6_0_alpha/core_nwb_image.py | 64 +++- .../core/v2_6_0_alpha/core_nwb_misc.py | 64 +++- .../core/v2_6_0_alpha/core_nwb_ogen.py | 19 ++ .../core/v2_6_0_alpha/core_nwb_ophys.py | 208 ++++++++++++- .../core/v2_6_0_alpha/core_nwb_retinotopy.py | 14 +- .../pydantic/core/v2_6_0_alpha/namespace.py | 4 + .../pydantic/core/v2_7_0/core_nwb_base.py | 25 +- .../pydantic/core/v2_7_0/core_nwb_behavior.py | 16 +- .../pydantic/core/v2_7_0/core_nwb_ecephys.py | 55 +++- .../pydantic/core/v2_7_0/core_nwb_epoch.py | 21 +- .../pydantic/core/v2_7_0/core_nwb_file.py | 44 ++- .../pydantic/core/v2_7_0/core_nwb_icephys.py | 132 ++++++++- .../pydantic/core/v2_7_0/core_nwb_image.py | 71 ++++- .../pydantic/core/v2_7_0/core_nwb_misc.py | 64 +++- .../pydantic/core/v2_7_0/core_nwb_ogen.py | 19 ++ .../pydantic/core/v2_7_0/core_nwb_ophys.py | 208 ++++++++++++- .../core/v2_7_0/core_nwb_retinotopy.py | 14 +- .../models/pydantic/core/v2_7_0/namespace.py | 4 + .../hdmf_common/v1_1_3/hdmf_common_table.py | 6 +- .../hdmf_common/v1_5_0/hdmf_common_base.py | 2 +- .../hdmf_common/v1_5_0/hdmf_common_table.py | 8 +- .../hdmf_common/v1_8_0/hdmf_common_base.py | 2 +- .../hdmf_common/v1_8_0/hdmf_common_table.py | 8 +- .../v0_1_0/hdmf_experimental_experimental.py | 2 +- .../v0_5_0/hdmf_experimental_experimental.py | 2 +- .../linkml/core/v2_2_0/core.nwb.base.yaml | 12 +- .../linkml/core/v2_2_0/core.nwb.behavior.yaml | 32 +- .../linkml/core/v2_2_0/core.nwb.ecephys.yaml | 51 +++- .../linkml/core/v2_2_0/core.nwb.epoch.yaml | 6 + .../linkml/core/v2_2_0/core.nwb.file.yaml | 49 +++- .../linkml/core/v2_2_0/core.nwb.icephys.yaml | 29 +- .../linkml/core/v2_2_0/core.nwb.image.yaml | 26 +- .../linkml/core/v2_2_0/core.nwb.misc.yaml | 31 +- .../linkml/core/v2_2_0/core.nwb.ogen.yaml | 22 ++ .../linkml/core/v2_2_0/core.nwb.ophys.yaml | 53 +++- .../core/v2_2_0/core.nwb.retinotopy.yaml | 26 +- .../linkml/core/v2_2_1/core.nwb.base.yaml | 12 +- .../linkml/core/v2_2_1/core.nwb.behavior.yaml | 32 +- .../linkml/core/v2_2_1/core.nwb.ecephys.yaml | 51 +++- .../linkml/core/v2_2_1/core.nwb.epoch.yaml | 6 + .../linkml/core/v2_2_1/core.nwb.file.yaml | 49 +++- .../linkml/core/v2_2_1/core.nwb.icephys.yaml | 29 +- .../linkml/core/v2_2_1/core.nwb.image.yaml | 26 +- .../linkml/core/v2_2_1/core.nwb.misc.yaml | 31 +- .../linkml/core/v2_2_1/core.nwb.ogen.yaml | 22 ++ .../linkml/core/v2_2_1/core.nwb.ophys.yaml | 53 +++- .../core/v2_2_1/core.nwb.retinotopy.yaml | 26 +- .../linkml/core/v2_2_2/core.nwb.base.yaml | 12 +- .../linkml/core/v2_2_2/core.nwb.behavior.yaml | 32 +- .../linkml/core/v2_2_2/core.nwb.ecephys.yaml | 51 +++- .../linkml/core/v2_2_2/core.nwb.epoch.yaml | 6 + .../linkml/core/v2_2_2/core.nwb.file.yaml | 49 +++- .../linkml/core/v2_2_2/core.nwb.icephys.yaml | 29 +- .../linkml/core/v2_2_2/core.nwb.image.yaml | 26 +- .../linkml/core/v2_2_2/core.nwb.misc.yaml | 31 +- .../linkml/core/v2_2_2/core.nwb.ogen.yaml | 22 ++ .../linkml/core/v2_2_2/core.nwb.ophys.yaml | 248 +++++++++++++++- .../core/v2_2_2/core.nwb.retinotopy.yaml | 28 +- .../linkml/core/v2_2_4/core.nwb.base.yaml | 12 +- .../linkml/core/v2_2_4/core.nwb.behavior.yaml | 32 +- .../linkml/core/v2_2_4/core.nwb.ecephys.yaml | 51 +++- .../linkml/core/v2_2_4/core.nwb.epoch.yaml | 6 + .../linkml/core/v2_2_4/core.nwb.file.yaml | 49 +++- .../linkml/core/v2_2_4/core.nwb.icephys.yaml | 29 +- .../linkml/core/v2_2_4/core.nwb.image.yaml | 26 +- .../linkml/core/v2_2_4/core.nwb.misc.yaml | 31 +- .../linkml/core/v2_2_4/core.nwb.ogen.yaml | 22 ++ .../linkml/core/v2_2_4/core.nwb.ophys.yaml | 256 +++++++++++++++- .../core/v2_2_4/core.nwb.retinotopy.yaml | 28 +- .../linkml/core/v2_2_5/core.nwb.base.yaml | 12 +- .../linkml/core/v2_2_5/core.nwb.behavior.yaml | 32 +- .../linkml/core/v2_2_5/core.nwb.ecephys.yaml | 51 +++- .../linkml/core/v2_2_5/core.nwb.epoch.yaml | 6 + .../linkml/core/v2_2_5/core.nwb.file.yaml | 49 +++- .../linkml/core/v2_2_5/core.nwb.icephys.yaml | 29 +- .../linkml/core/v2_2_5/core.nwb.image.yaml | 26 +- .../linkml/core/v2_2_5/core.nwb.misc.yaml | 31 +- .../linkml/core/v2_2_5/core.nwb.ogen.yaml | 22 ++ .../linkml/core/v2_2_5/core.nwb.ophys.yaml | 262 ++++++++++++++++- .../core/v2_2_5/core.nwb.retinotopy.yaml | 28 +- .../linkml/core/v2_3_0/core.nwb.base.yaml | 12 +- .../linkml/core/v2_3_0/core.nwb.behavior.yaml | 32 +- .../linkml/core/v2_3_0/core.nwb.ecephys.yaml | 51 +++- .../linkml/core/v2_3_0/core.nwb.epoch.yaml | 6 + .../linkml/core/v2_3_0/core.nwb.file.yaml | 49 +++- .../linkml/core/v2_3_0/core.nwb.icephys.yaml | 29 +- .../linkml/core/v2_3_0/core.nwb.image.yaml | 37 ++- .../linkml/core/v2_3_0/core.nwb.misc.yaml | 40 ++- .../linkml/core/v2_3_0/core.nwb.ogen.yaml | 22 ++ .../linkml/core/v2_3_0/core.nwb.ophys.yaml | 262 ++++++++++++++++- .../core/v2_3_0/core.nwb.retinotopy.yaml | 28 +- .../linkml/core/v2_4_0/core.nwb.base.yaml | 12 +- .../linkml/core/v2_4_0/core.nwb.behavior.yaml | 32 +- .../linkml/core/v2_4_0/core.nwb.ecephys.yaml | 51 +++- .../linkml/core/v2_4_0/core.nwb.epoch.yaml | 6 + .../linkml/core/v2_4_0/core.nwb.file.yaml | 49 +++- .../linkml/core/v2_4_0/core.nwb.icephys.yaml | 47 ++- .../linkml/core/v2_4_0/core.nwb.image.yaml | 37 ++- .../linkml/core/v2_4_0/core.nwb.misc.yaml | 40 ++- .../linkml/core/v2_4_0/core.nwb.ogen.yaml | 22 ++ .../linkml/core/v2_4_0/core.nwb.ophys.yaml | 262 ++++++++++++++++- .../core/v2_4_0/core.nwb.retinotopy.yaml | 28 +- .../linkml/core/v2_5_0/core.nwb.base.yaml | 23 +- .../linkml/core/v2_5_0/core.nwb.behavior.yaml | 32 +- .../linkml/core/v2_5_0/core.nwb.ecephys.yaml | 51 +++- .../linkml/core/v2_5_0/core.nwb.epoch.yaml | 9 + .../linkml/core/v2_5_0/core.nwb.file.yaml | 49 +++- .../linkml/core/v2_5_0/core.nwb.icephys.yaml | 47 ++- .../linkml/core/v2_5_0/core.nwb.image.yaml | 48 ++- .../linkml/core/v2_5_0/core.nwb.misc.yaml | 40 ++- .../linkml/core/v2_5_0/core.nwb.ogen.yaml | 22 ++ .../linkml/core/v2_5_0/core.nwb.ophys.yaml | 262 ++++++++++++++++- .../core/v2_5_0/core.nwb.retinotopy.yaml | 28 +- .../core/v2_6_0_alpha/core.nwb.base.yaml | 23 +- .../core/v2_6_0_alpha/core.nwb.behavior.yaml | 32 +- .../core/v2_6_0_alpha/core.nwb.ecephys.yaml | 51 +++- .../core/v2_6_0_alpha/core.nwb.epoch.yaml | 9 + .../core/v2_6_0_alpha/core.nwb.file.yaml | 49 +++- .../core/v2_6_0_alpha/core.nwb.icephys.yaml | 47 ++- .../core/v2_6_0_alpha/core.nwb.image.yaml | 48 ++- .../core/v2_6_0_alpha/core.nwb.misc.yaml | 40 ++- .../core/v2_6_0_alpha/core.nwb.ogen.yaml | 22 ++ .../core/v2_6_0_alpha/core.nwb.ophys.yaml | 273 +++++++++++++++++- .../v2_6_0_alpha/core.nwb.retinotopy.yaml | 28 +- .../linkml/core/v2_7_0/core.nwb.base.yaml | 23 +- .../linkml/core/v2_7_0/core.nwb.behavior.yaml | 32 +- .../linkml/core/v2_7_0/core.nwb.ecephys.yaml | 51 +++- .../linkml/core/v2_7_0/core.nwb.epoch.yaml | 9 + .../linkml/core/v2_7_0/core.nwb.file.yaml | 49 +++- .../linkml/core/v2_7_0/core.nwb.icephys.yaml | 50 +++- .../linkml/core/v2_7_0/core.nwb.image.yaml | 48 ++- .../linkml/core/v2_7_0/core.nwb.misc.yaml | 40 ++- .../linkml/core/v2_7_0/core.nwb.ogen.yaml | 22 ++ .../linkml/core/v2_7_0/core.nwb.ophys.yaml | 273 +++++++++++++++++- .../core/v2_7_0/core.nwb.retinotopy.yaml | 28 +- .../hdmf_common/v1_1_3/hdmf-common.table.yaml | 8 +- .../hdmf_common/v1_5_0/hdmf-common.base.yaml | 4 +- .../hdmf_common/v1_5_0/hdmf-common.table.yaml | 8 +- .../hdmf_common/v1_8_0/hdmf-common.base.yaml | 4 +- .../hdmf_common/v1_8_0/hdmf-common.table.yaml | 8 +- 242 files changed, 9341 insertions(+), 1449 deletions(-) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_base.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_base.py index 17d7363..7557e3c 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_base.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_base.py @@ -87,7 +87,7 @@ class Image(NWBData): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -189,7 +189,7 @@ class TimeSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], Any], NDArray[Shape["* num_times, * num_dim2"], Any], @@ -241,7 +241,7 @@ class ProcessingModule(NWBContainer): {"from_schema": "core.nwb.base", "tree_root": True} ) - children: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( + value: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( None, json_schema_extra={ "linkml_meta": {"any_of": [{"range": "NWBDataInterface"}, {"range": "DynamicTable"}]} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_behavior.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_behavior.py index c258f24..8d5d808 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_behavior.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_behavior.py @@ -131,7 +131,7 @@ class SpatialSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. The default value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -148,7 +148,7 @@ class BehavioralEpochs(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[IntervalSeries]] = Field( + value: Optional[List[IntervalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "IntervalSeries"}]}} ) name: str = Field(...) @@ -163,7 +163,7 @@ class BehavioralEvents(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -178,7 +178,7 @@ class BehavioralTimeSeries(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -193,7 +193,7 @@ class PupilTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -208,7 +208,7 @@ class EyeTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -223,7 +223,7 @@ class CompassDirection(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -238,7 +238,7 @@ class Position(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_ecephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_ecephys.py index 22d4a40..34f77fd 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_ecephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_ecephys.py @@ -16,6 +16,7 @@ from pydantic import ( ValidationInfo, BeforeValidator, ) +from ...core.v2_2_0.core_nwb_device import Device from ...core.v2_2_0.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -116,7 +117,12 @@ class ElectricalSeries(TimeSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -179,7 +185,12 @@ class SpikeEventSeries(ElectricalSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -256,7 +267,12 @@ class FeatureExtraction(NWBDataInterface): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) @@ -287,6 +303,15 @@ class EventDetection(NWBDataInterface): description="""Timestamps of events, in seconds.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_events"}]}}}, ) + source_electricalseries: Union[ElectricalSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ElectricalSeries"}, {"range": "string"}], + } + }, + ) class EventWaveform(NWBDataInterface): @@ -298,7 +323,7 @@ class EventWaveform(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[SpikeEventSeries]] = Field( + value: Optional[List[SpikeEventSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpikeEventSeries"}]}} ) name: str = Field(...) @@ -313,7 +338,7 @@ class FilteredEphys(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -328,7 +353,7 @@ class LFP(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -352,6 +377,15 @@ class ElectrodeGroup(NWBContainer): position: Optional[ElectrodeGroupPosition] = Field( None, description="""stereotaxic or common framework coordinates""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class ElectrodeGroupPosition(ConfiguredBaseModel): @@ -406,6 +440,15 @@ class ClusterWaveforms(NWBDataInterface): } }, ) + clustering_interface: Union[Clustering, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Clustering"}, {"range": "string"}], + } + }, + ) class Clustering(NWBDataInterface): diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_epoch.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_epoch.py index 1cf2bb7..8627b8a 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_epoch.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_epoch.py @@ -127,7 +127,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for tags.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries: Optional[TimeIntervalsTimeseries] = Field( @@ -137,7 +142,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_file.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_file.py index 8acf5f9..15fdadc 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_file.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_file.py @@ -7,7 +7,6 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np -from ...core.v2_2_0.core_nwb_epoch import TimeIntervals from ...core.v2_2_0.core_nwb_misc import Units from ...core.v2_2_0.core_nwb_device import Device from ...core.v2_2_0.core_nwb_ogen import OptogeneticStimulusSite @@ -22,6 +21,7 @@ from ...core.v2_2_0.core_nwb_ecephys import ElectrodeGroup from numpydantic import NDArray, Shape from ...hdmf_common.v1_1_0.hdmf_common_table import DynamicTable, VectorData, VectorIndex from ...core.v2_2_0.core_nwb_icephys import IntracellularElectrode, SweepTable +from ...core.v2_2_0.core_nwb_epoch import TimeIntervals metamodel_version = "None" version = "2.2.0" @@ -158,19 +158,9 @@ class NWBFile(NWBContainer): ..., description="""Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under 'general'. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.""", ) - intervals: Optional[List[TimeIntervals]] = Field( + intervals: Optional[NWBFileIntervals] = Field( None, description="""Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.""", - json_schema_extra={ - "linkml_meta": { - "any_of": [ - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - ] - } - }, ) units: Optional[Units] = Field(None, description="""Data about sorted spike units.""") @@ -544,6 +534,35 @@ class GeneralIntracellularEphys(ConfiguredBaseModel): ) +class NWBFileIntervals(ConfiguredBaseModel): + """ + Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.file"}) + + name: Literal["intervals"] = Field( + "intervals", + json_schema_extra={ + "linkml_meta": {"equals_string": "intervals", "ifabsent": "string(intervals)"} + }, + ) + epochs: Optional[TimeIntervals] = Field( + None, + description="""Divisions in time marking experimental stages or sub-divisions of a single recording session.""", + ) + trials: Optional[TimeIntervals] = Field( + None, description="""Repeated experimental events that have a logical grouping.""" + ) + invalid_times: Optional[TimeIntervals] = Field( + None, description="""Time intervals that should be removed from analysis.""" + ) + time_intervals: Optional[List[TimeIntervals]] = Field( + None, + description="""Optional additional table(s) for describing other experimental time intervals.""", + ) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model NWBFile.model_rebuild() @@ -554,3 +573,4 @@ Subject.model_rebuild() GeneralExtracellularEphys.model_rebuild() ExtracellularEphysElectrodes.model_rebuild() GeneralIntracellularEphys.model_rebuild() +NWBFileIntervals.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_icephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_icephys.py index 8d6da27..1242dfc 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_icephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_icephys.py @@ -11,6 +11,7 @@ from ...core.v2_2_0.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_2_0.core_nwb_device import Device from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar from pydantic import ( BaseModel, @@ -117,6 +118,15 @@ class PatchClampSeries(TimeSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -164,7 +174,7 @@ class PatchClampSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times"], float]] = Field( + value: Optional[NDArray[Shape["* num_times"], float]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} ) @@ -195,6 +205,15 @@ class CurrentClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -271,6 +290,15 @@ class IZeroClampSeries(CurrentClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -324,6 +352,15 @@ class CurrentClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -416,6 +453,15 @@ class VoltageClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -648,6 +694,15 @@ class VoltageClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -724,6 +779,15 @@ class IntracellularElectrode(NWBContainer): slice: Optional[str] = Field( None, description="""Information about slice used for recording.""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class SweepTable(DynamicTable): @@ -752,7 +816,12 @@ class SweepTable(DynamicTable): ..., description="""Index for series.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_image.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_image.py index db8401b..8f16e8e 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_image.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_image.py @@ -75,7 +75,7 @@ class GrayscaleImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -98,7 +98,7 @@ class RGBImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -121,7 +121,7 @@ class RGBAImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -208,7 +208,7 @@ class ImageSeriesExternalFile(ConfiguredBaseModel): None, description="""Each external image may contain one or more consecutive frames of the full ImageSeries. This attribute serves as an index to indicate which frames each file contains, to faciliate random access. The 'starting_frame' attribute, hence, contains a list of frame numbers within the full ImageSeries of the first frame of each file listed in the parent 'external_file' dataset. Zero-based indexing is used (hence, the first element will always be zero). For example, if the 'external_file' dataset has three paths to files and the first file has 5 frames, the second file has 10 frames, and the third file has 20 frames, then this attribute will have values [0, 5, 15]. If there is a single external file that holds all of the frames of the ImageSeries (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0].""", ) - array: Optional[NDArray[Shape["* num_files"], str]] = Field( + value: Optional[NDArray[Shape["* num_files"], str]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_files"}]}}} ) @@ -223,6 +223,15 @@ class ImageMaskSeries(ImageSeries): ) name: str = Field(...) + masked_imageseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) data: Optional[ Union[ NDArray[Shape["* frame, * x, * y"], float], @@ -362,6 +371,15 @@ class IndexSeries(TimeSeries): description="""Index of the frame in the referenced ImageSeries.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + indexed_timeseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_misc.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_misc.py index 968660d..9c79866 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_misc.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_misc.py @@ -167,7 +167,7 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): None, description="""Since there can be different units for different features, store the units in 'feature_units'. The default value for this attribute is \"see 'feature_units'\".""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -287,6 +287,15 @@ class DecompositionSeries(TimeSeries): ..., description="""Table for describing the bands that this series was generated from. There should be one row in this table for each band.""", ) + source_timeseries: Optional[Union[TimeSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "TimeSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -334,7 +343,7 @@ class DecompositionSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( + value: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -428,7 +437,12 @@ class Units(DynamicTable): None, description="""Index into the spike_times dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) spike_times: Optional[UnitsSpikeTimes] = Field( @@ -438,7 +452,12 @@ class Units(DynamicTable): None, description="""Index into the obs_intervals dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) obs_intervals: Optional[NDArray[Shape["* num_intervals, 2 start_end"], float]] = Field( @@ -459,14 +478,24 @@ class Units(DynamicTable): None, description="""Index into electrodes.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrodes: Named[Optional[DynamicTableRegion]] = Field( None, description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrode_group: Optional[List[ElectrodeGroup]] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_ogen.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_ogen.py index 02043ad..f75e675 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_ogen.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_ogen.py @@ -14,6 +14,7 @@ from ...core.v2_2_0.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_2_0.core_nwb_device import Device metamodel_version = "None" version = "2.2.0" @@ -81,6 +82,15 @@ class OptogeneticSeries(TimeSeries): description="""Applied power for optogenetic stimulus, in watts.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + site: Union[OptogeneticStimulusSite, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "OptogeneticStimulusSite"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -129,6 +139,15 @@ class OptogeneticStimulusSite(NWBContainer): ..., description="""Location of the stimulation site. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) # Model rebuild diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_ophys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_ophys.py index 44b5845..062517f 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_ophys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_ophys.py @@ -17,6 +17,7 @@ from pydantic import ( BeforeValidator, ) from ...hdmf_common.v1_1_0.hdmf_common_table import DynamicTableRegion, DynamicTable +from ...core.v2_2_0.core_nwb_device import Device from numpydantic import NDArray, Shape from ...core.v2_2_0.core_nwb_base import ( TimeSeriesStartingTime, @@ -117,6 +118,15 @@ class TwoPhotonSeries(ImageSeries): field_of_view: Optional[ Union[NDArray[Shape["2 width_height"], float], NDArray[Shape["3 width_height"], float]] ] = Field(None, description="""Width, height and depth of image, or imaged area, in meters.""") + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) data: Optional[ Union[ NDArray[Shape["* frame, * x, * y"], float], @@ -185,7 +195,12 @@ class RoiResponseSeries(TimeSeries): ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) description: Optional[str] = Field(None, description="""Description of the time series.""") @@ -229,7 +244,7 @@ class DfOverF(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -244,7 +259,7 @@ class Fluorescence(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -259,7 +274,7 @@ class ImageSegmentation(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[DynamicTable]] = Field( + value: Optional[List[DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) name: str = Field(...) @@ -302,6 +317,15 @@ class ImagingPlane(NWBContainer): optical_channel: OpticalChannel = Field( ..., description="""An optical channel used to record from an imaging plane.""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class ImagingPlaneManifold(ConfiguredBaseModel): @@ -325,7 +349,7 @@ class ImagingPlaneManifold(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. The default value is 'meters'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* height, * width, 3 x_y_z"], float], NDArray[Shape["* height, * width, * depth, 3 x_y_z"], float], @@ -349,7 +373,7 @@ class ImagingPlaneOriginCoords(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Measurement units for origin_coords. The default value is 'meters'.""" ) - array: Optional[NDArray[Shape["2 x_y, 3 x_y_z"], float]] = Field( + value: Optional[NDArray[Shape["2 x_y, 3 x_y_z"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -380,7 +404,7 @@ class ImagingPlaneGridSpacing(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Measurement units for grid_spacing. The default value is 'meters'.""" ) - array: Optional[NDArray[Shape["2 x_y, 3 x_y_z"], float]] = Field( + value: Optional[NDArray[Shape["2 x_y, 3 x_y_z"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -416,7 +440,7 @@ class MotionCorrection(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[NWBDataInterface]] = Field( + value: Optional[List[NWBDataInterface]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "NWBDataInterface"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_retinotopy.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_retinotopy.py index 7155a0fc..dcb153d 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_retinotopy.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/core_nwb_retinotopy.py @@ -101,7 +101,7 @@ class RetinotopyMap(NWBData): description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""", ) field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""") - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -122,7 +122,7 @@ class AxisMap(RetinotopyMap): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -161,7 +161,7 @@ class RetinotopyImage(GrayscaleImage): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -187,35 +187,60 @@ class ImagingRetinotopy(NWBDataInterface): ..., description="""Phase response to stimulus on the first measured axis.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) axis_1_power_map: Named[Optional[AxisMap]] = Field( None, description="""Power response on the first measured axis. Response is scaled so 0.0 is no power in the response and 1.0 is maximum relative power.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) axis_2_phase_map: Named[AxisMap] = Field( ..., description="""Phase response to stimulus on the second measured axis.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) axis_2_power_map: Named[Optional[AxisMap]] = Field( None, description="""Power response to stimulus on the second measured axis.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) sign_map: Named[RetinotopyMap] = Field( ..., description="""Sine of the angle between the direction of the gradient in axis_1 and axis_2.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) axis_descriptions: NDArray[Shape["2 num_axes"], str] = Field( @@ -235,7 +260,12 @@ class ImagingRetinotopy(NWBDataInterface): ..., description="""Gray-scale anatomical image of cortical surface. Array structure: [rows][columns]""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) @@ -273,7 +303,7 @@ class ImagingRetinotopyFocalDepthImage(RetinotopyImage): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/namespace.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/namespace.py index 6ee8d4e..0456ea1 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/namespace.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_0/namespace.py @@ -133,6 +133,7 @@ from ...core.v2_2_0.core_nwb_file import ( GeneralExtracellularEphys, ExtracellularEphysElectrodes, GeneralIntracellularEphys, + NWBFileIntervals, ) from ...core.v2_2_0.core_nwb_epoch import TimeIntervals, TimeIntervalsTimeseries diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_base.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_base.py index c37673c..228d72f 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_base.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_base.py @@ -87,7 +87,7 @@ class Image(NWBData): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -189,7 +189,7 @@ class TimeSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], Any], NDArray[Shape["* num_times, * num_dim2"], Any], @@ -241,7 +241,7 @@ class ProcessingModule(NWBContainer): {"from_schema": "core.nwb.base", "tree_root": True} ) - children: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( + value: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( None, json_schema_extra={ "linkml_meta": {"any_of": [{"range": "NWBDataInterface"}, {"range": "DynamicTable"}]} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_behavior.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_behavior.py index 5020dfe..25d55da 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_behavior.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_behavior.py @@ -131,7 +131,7 @@ class SpatialSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. The default value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -148,7 +148,7 @@ class BehavioralEpochs(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[IntervalSeries]] = Field( + value: Optional[List[IntervalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "IntervalSeries"}]}} ) name: str = Field(...) @@ -163,7 +163,7 @@ class BehavioralEvents(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -178,7 +178,7 @@ class BehavioralTimeSeries(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -193,7 +193,7 @@ class PupilTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -208,7 +208,7 @@ class EyeTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -223,7 +223,7 @@ class CompassDirection(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -238,7 +238,7 @@ class Position(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_ecephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_ecephys.py index d8ed535..eaee082 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_ecephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_ecephys.py @@ -16,6 +16,7 @@ from pydantic import ( ValidationInfo, BeforeValidator, ) +from ...core.v2_2_1.core_nwb_device import Device from ...core.v2_2_1.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -116,7 +117,12 @@ class ElectricalSeries(TimeSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -179,7 +185,12 @@ class SpikeEventSeries(ElectricalSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -256,7 +267,12 @@ class FeatureExtraction(NWBDataInterface): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) @@ -287,6 +303,15 @@ class EventDetection(NWBDataInterface): description="""Timestamps of events, in seconds.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_events"}]}}}, ) + source_electricalseries: Union[ElectricalSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ElectricalSeries"}, {"range": "string"}], + } + }, + ) class EventWaveform(NWBDataInterface): @@ -298,7 +323,7 @@ class EventWaveform(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[SpikeEventSeries]] = Field( + value: Optional[List[SpikeEventSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpikeEventSeries"}]}} ) name: str = Field(...) @@ -313,7 +338,7 @@ class FilteredEphys(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -328,7 +353,7 @@ class LFP(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -352,6 +377,15 @@ class ElectrodeGroup(NWBContainer): position: Optional[ElectrodeGroupPosition] = Field( None, description="""stereotaxic or common framework coordinates""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class ElectrodeGroupPosition(ConfiguredBaseModel): @@ -406,6 +440,15 @@ class ClusterWaveforms(NWBDataInterface): } }, ) + clustering_interface: Union[Clustering, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Clustering"}, {"range": "string"}], + } + }, + ) class Clustering(NWBDataInterface): diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_epoch.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_epoch.py index 0113b4d..b80640c 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_epoch.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_epoch.py @@ -127,7 +127,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for tags.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries: Optional[TimeIntervalsTimeseries] = Field( @@ -137,7 +142,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_file.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_file.py index f2eb79e..092eaf4 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_file.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_file.py @@ -7,7 +7,6 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np -from ...core.v2_2_1.core_nwb_epoch import TimeIntervals from ...core.v2_2_1.core_nwb_misc import Units from ...core.v2_2_1.core_nwb_device import Device from ...core.v2_2_1.core_nwb_ogen import OptogeneticStimulusSite @@ -22,6 +21,7 @@ from ...core.v2_2_1.core_nwb_ecephys import ElectrodeGroup from numpydantic import NDArray, Shape from ...hdmf_common.v1_1_2.hdmf_common_table import DynamicTable, VectorData, VectorIndex from ...core.v2_2_1.core_nwb_icephys import IntracellularElectrode, SweepTable +from ...core.v2_2_1.core_nwb_epoch import TimeIntervals metamodel_version = "None" version = "2.2.1" @@ -158,19 +158,9 @@ class NWBFile(NWBContainer): ..., description="""Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under 'general'. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.""", ) - intervals: Optional[List[TimeIntervals]] = Field( + intervals: Optional[NWBFileIntervals] = Field( None, description="""Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.""", - json_schema_extra={ - "linkml_meta": { - "any_of": [ - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - ] - } - }, ) units: Optional[Units] = Field(None, description="""Data about sorted spike units.""") @@ -544,6 +534,35 @@ class GeneralIntracellularEphys(ConfiguredBaseModel): ) +class NWBFileIntervals(ConfiguredBaseModel): + """ + Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.file"}) + + name: Literal["intervals"] = Field( + "intervals", + json_schema_extra={ + "linkml_meta": {"equals_string": "intervals", "ifabsent": "string(intervals)"} + }, + ) + epochs: Optional[TimeIntervals] = Field( + None, + description="""Divisions in time marking experimental stages or sub-divisions of a single recording session.""", + ) + trials: Optional[TimeIntervals] = Field( + None, description="""Repeated experimental events that have a logical grouping.""" + ) + invalid_times: Optional[TimeIntervals] = Field( + None, description="""Time intervals that should be removed from analysis.""" + ) + time_intervals: Optional[List[TimeIntervals]] = Field( + None, + description="""Optional additional table(s) for describing other experimental time intervals.""", + ) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model NWBFile.model_rebuild() @@ -554,3 +573,4 @@ Subject.model_rebuild() GeneralExtracellularEphys.model_rebuild() ExtracellularEphysElectrodes.model_rebuild() GeneralIntracellularEphys.model_rebuild() +NWBFileIntervals.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_icephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_icephys.py index 3cea17f..0109b14 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_icephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_icephys.py @@ -11,6 +11,7 @@ from ...core.v2_2_1.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_2_1.core_nwb_device import Device from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar from pydantic import ( BaseModel, @@ -117,6 +118,15 @@ class PatchClampSeries(TimeSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -164,7 +174,7 @@ class PatchClampSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times"], float]] = Field( + value: Optional[NDArray[Shape["* num_times"], float]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} ) @@ -195,6 +205,15 @@ class CurrentClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -271,6 +290,15 @@ class IZeroClampSeries(CurrentClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -324,6 +352,15 @@ class CurrentClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -416,6 +453,15 @@ class VoltageClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -648,6 +694,15 @@ class VoltageClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -724,6 +779,15 @@ class IntracellularElectrode(NWBContainer): slice: Optional[str] = Field( None, description="""Information about slice used for recording.""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class SweepTable(DynamicTable): @@ -752,7 +816,12 @@ class SweepTable(DynamicTable): ..., description="""Index for series.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_image.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_image.py index 89e4978..e831ea1 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_image.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_image.py @@ -75,7 +75,7 @@ class GrayscaleImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -98,7 +98,7 @@ class RGBImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -121,7 +121,7 @@ class RGBAImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -208,7 +208,7 @@ class ImageSeriesExternalFile(ConfiguredBaseModel): None, description="""Each external image may contain one or more consecutive frames of the full ImageSeries. This attribute serves as an index to indicate which frames each file contains, to faciliate random access. The 'starting_frame' attribute, hence, contains a list of frame numbers within the full ImageSeries of the first frame of each file listed in the parent 'external_file' dataset. Zero-based indexing is used (hence, the first element will always be zero). For example, if the 'external_file' dataset has three paths to files and the first file has 5 frames, the second file has 10 frames, and the third file has 20 frames, then this attribute will have values [0, 5, 15]. If there is a single external file that holds all of the frames of the ImageSeries (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0].""", ) - array: Optional[NDArray[Shape["* num_files"], str]] = Field( + value: Optional[NDArray[Shape["* num_files"], str]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_files"}]}}} ) @@ -223,6 +223,15 @@ class ImageMaskSeries(ImageSeries): ) name: str = Field(...) + masked_imageseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) data: Optional[ Union[ NDArray[Shape["* frame, * x, * y"], float], @@ -362,6 +371,15 @@ class IndexSeries(TimeSeries): description="""Index of the frame in the referenced ImageSeries.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + indexed_timeseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_misc.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_misc.py index 5d1881f..19c418d 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_misc.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_misc.py @@ -167,7 +167,7 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): None, description="""Since there can be different units for different features, store the units in 'feature_units'. The default value for this attribute is \"see 'feature_units'\".""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -287,6 +287,15 @@ class DecompositionSeries(TimeSeries): ..., description="""Table for describing the bands that this series was generated from. There should be one row in this table for each band.""", ) + source_timeseries: Optional[Union[TimeSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "TimeSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -334,7 +343,7 @@ class DecompositionSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( + value: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -428,7 +437,12 @@ class Units(DynamicTable): None, description="""Index into the spike_times dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) spike_times: Optional[UnitsSpikeTimes] = Field( @@ -438,7 +452,12 @@ class Units(DynamicTable): None, description="""Index into the obs_intervals dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) obs_intervals: Optional[NDArray[Shape["* num_intervals, 2 start_end"], float]] = Field( @@ -459,14 +478,24 @@ class Units(DynamicTable): None, description="""Index into electrodes.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrodes: Named[Optional[DynamicTableRegion]] = Field( None, description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrode_group: Optional[List[ElectrodeGroup]] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_ogen.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_ogen.py index 26c3fc8..37ff5c3 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_ogen.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_ogen.py @@ -14,6 +14,7 @@ from ...core.v2_2_1.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_2_1.core_nwb_device import Device metamodel_version = "None" version = "2.2.1" @@ -81,6 +82,15 @@ class OptogeneticSeries(TimeSeries): description="""Applied power for optogenetic stimulus, in watts.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + site: Union[OptogeneticStimulusSite, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "OptogeneticStimulusSite"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -129,6 +139,15 @@ class OptogeneticStimulusSite(NWBContainer): ..., description="""Location of the stimulation site. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) # Model rebuild diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_ophys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_ophys.py index 2ed7469..ba8d78a 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_ophys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_ophys.py @@ -17,6 +17,7 @@ from pydantic import ( BeforeValidator, ) from ...hdmf_common.v1_1_2.hdmf_common_table import DynamicTableRegion, DynamicTable +from ...core.v2_2_1.core_nwb_device import Device from numpydantic import NDArray, Shape from ...core.v2_2_1.core_nwb_base import ( TimeSeriesStartingTime, @@ -117,6 +118,15 @@ class TwoPhotonSeries(ImageSeries): field_of_view: Optional[ Union[NDArray[Shape["2 width_height"], float], NDArray[Shape["3 width_height"], float]] ] = Field(None, description="""Width, height and depth of image, or imaged area, in meters.""") + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) data: Optional[ Union[ NDArray[Shape["* frame, * x, * y"], float], @@ -185,7 +195,12 @@ class RoiResponseSeries(TimeSeries): ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) description: Optional[str] = Field(None, description="""Description of the time series.""") @@ -229,7 +244,7 @@ class DfOverF(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -244,7 +259,7 @@ class Fluorescence(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -259,7 +274,7 @@ class ImageSegmentation(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[DynamicTable]] = Field( + value: Optional[List[DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) name: str = Field(...) @@ -302,6 +317,15 @@ class ImagingPlane(NWBContainer): optical_channel: OpticalChannel = Field( ..., description="""An optical channel used to record from an imaging plane.""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class ImagingPlaneManifold(ConfiguredBaseModel): @@ -325,7 +349,7 @@ class ImagingPlaneManifold(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. The default value is 'meters'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* height, * width, 3 x_y_z"], float], NDArray[Shape["* height, * width, * depth, 3 x_y_z"], float], @@ -349,7 +373,7 @@ class ImagingPlaneOriginCoords(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Measurement units for origin_coords. The default value is 'meters'.""" ) - array: Optional[NDArray[Shape["2 x_y, 3 x_y_z"], float]] = Field( + value: Optional[NDArray[Shape["2 x_y, 3 x_y_z"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -380,7 +404,7 @@ class ImagingPlaneGridSpacing(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Measurement units for grid_spacing. The default value is 'meters'.""" ) - array: Optional[NDArray[Shape["2 x_y, 3 x_y_z"], float]] = Field( + value: Optional[NDArray[Shape["2 x_y, 3 x_y_z"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -416,7 +440,7 @@ class MotionCorrection(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[NWBDataInterface]] = Field( + value: Optional[List[NWBDataInterface]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "NWBDataInterface"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_retinotopy.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_retinotopy.py index 7095d7e..98f0ede 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_retinotopy.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/core_nwb_retinotopy.py @@ -101,7 +101,7 @@ class RetinotopyMap(NWBData): description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""", ) field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""") - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -122,7 +122,7 @@ class AxisMap(RetinotopyMap): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -161,7 +161,7 @@ class RetinotopyImage(GrayscaleImage): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -187,35 +187,60 @@ class ImagingRetinotopy(NWBDataInterface): ..., description="""Phase response to stimulus on the first measured axis.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) axis_1_power_map: Named[Optional[AxisMap]] = Field( None, description="""Power response on the first measured axis. Response is scaled so 0.0 is no power in the response and 1.0 is maximum relative power.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) axis_2_phase_map: Named[AxisMap] = Field( ..., description="""Phase response to stimulus on the second measured axis.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) axis_2_power_map: Named[Optional[AxisMap]] = Field( None, description="""Power response to stimulus on the second measured axis.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) sign_map: Named[RetinotopyMap] = Field( ..., description="""Sine of the angle between the direction of the gradient in axis_1 and axis_2.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) axis_descriptions: NDArray[Shape["2 num_axes"], str] = Field( @@ -235,7 +260,12 @@ class ImagingRetinotopy(NWBDataInterface): ..., description="""Gray-scale anatomical image of cortical surface. Array structure: [rows][columns]""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) @@ -273,7 +303,7 @@ class ImagingRetinotopyFocalDepthImage(RetinotopyImage): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/namespace.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/namespace.py index 5ef5e82..c5d3cba 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/namespace.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_1/namespace.py @@ -133,6 +133,7 @@ from ...core.v2_2_1.core_nwb_file import ( GeneralExtracellularEphys, ExtracellularEphysElectrodes, GeneralIntracellularEphys, + NWBFileIntervals, ) from ...core.v2_2_1.core_nwb_epoch import TimeIntervals, TimeIntervalsTimeseries diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_base.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_base.py index 0b34abd..14eaf16 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_base.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_base.py @@ -87,7 +87,7 @@ class Image(NWBData): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -189,7 +189,7 @@ class TimeSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], Any], NDArray[Shape["* num_times, * num_dim2"], Any], @@ -241,7 +241,7 @@ class ProcessingModule(NWBContainer): {"from_schema": "core.nwb.base", "tree_root": True} ) - children: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( + value: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( None, json_schema_extra={ "linkml_meta": {"any_of": [{"range": "NWBDataInterface"}, {"range": "DynamicTable"}]} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_behavior.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_behavior.py index 3b1a5fb..d19da8f 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_behavior.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_behavior.py @@ -131,7 +131,7 @@ class SpatialSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. The default value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -148,7 +148,7 @@ class BehavioralEpochs(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[IntervalSeries]] = Field( + value: Optional[List[IntervalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "IntervalSeries"}]}} ) name: str = Field(...) @@ -163,7 +163,7 @@ class BehavioralEvents(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -178,7 +178,7 @@ class BehavioralTimeSeries(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -193,7 +193,7 @@ class PupilTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -208,7 +208,7 @@ class EyeTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -223,7 +223,7 @@ class CompassDirection(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -238,7 +238,7 @@ class Position(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_ecephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_ecephys.py index ac58cf4..06bad97 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_ecephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_ecephys.py @@ -16,6 +16,7 @@ from pydantic import ( ValidationInfo, BeforeValidator, ) +from ...core.v2_2_2.core_nwb_device import Device from ...core.v2_2_2.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -116,7 +117,12 @@ class ElectricalSeries(TimeSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -179,7 +185,12 @@ class SpikeEventSeries(ElectricalSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -256,7 +267,12 @@ class FeatureExtraction(NWBDataInterface): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) @@ -287,6 +303,15 @@ class EventDetection(NWBDataInterface): description="""Timestamps of events, in seconds.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_events"}]}}}, ) + source_electricalseries: Union[ElectricalSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ElectricalSeries"}, {"range": "string"}], + } + }, + ) class EventWaveform(NWBDataInterface): @@ -298,7 +323,7 @@ class EventWaveform(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[SpikeEventSeries]] = Field( + value: Optional[List[SpikeEventSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpikeEventSeries"}]}} ) name: str = Field(...) @@ -313,7 +338,7 @@ class FilteredEphys(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -328,7 +353,7 @@ class LFP(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -352,6 +377,15 @@ class ElectrodeGroup(NWBContainer): position: Optional[ElectrodeGroupPosition] = Field( None, description="""stereotaxic or common framework coordinates""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class ElectrodeGroupPosition(ConfiguredBaseModel): @@ -406,6 +440,15 @@ class ClusterWaveforms(NWBDataInterface): } }, ) + clustering_interface: Union[Clustering, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Clustering"}, {"range": "string"}], + } + }, + ) class Clustering(NWBDataInterface): diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_epoch.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_epoch.py index 31d8da0..11b17cf 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_epoch.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_epoch.py @@ -127,7 +127,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for tags.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries: Optional[TimeIntervalsTimeseries] = Field( @@ -137,7 +142,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -187,7 +197,7 @@ class TimeIntervalsTimeseries(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_file.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_file.py index 4479d53..128b7a4 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_file.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_file.py @@ -7,7 +7,6 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np -from ...core.v2_2_2.core_nwb_epoch import TimeIntervals from ...core.v2_2_2.core_nwb_misc import Units from ...core.v2_2_2.core_nwb_device import Device from ...core.v2_2_2.core_nwb_ogen import OptogeneticStimulusSite @@ -22,6 +21,7 @@ from ...core.v2_2_2.core_nwb_ecephys import ElectrodeGroup from numpydantic import NDArray, Shape from ...hdmf_common.v1_1_3.hdmf_common_table import DynamicTable, VectorData, VectorIndex from ...core.v2_2_2.core_nwb_icephys import IntracellularElectrode, SweepTable +from ...core.v2_2_2.core_nwb_epoch import TimeIntervals metamodel_version = "None" version = "2.2.2" @@ -158,19 +158,9 @@ class NWBFile(NWBContainer): ..., description="""Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under 'general'. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.""", ) - intervals: Optional[List[TimeIntervals]] = Field( + intervals: Optional[NWBFileIntervals] = Field( None, description="""Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.""", - json_schema_extra={ - "linkml_meta": { - "any_of": [ - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - ] - } - }, ) units: Optional[Units] = Field(None, description="""Data about sorted spike units.""") @@ -544,6 +534,35 @@ class GeneralIntracellularEphys(ConfiguredBaseModel): ) +class NWBFileIntervals(ConfiguredBaseModel): + """ + Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.file"}) + + name: Literal["intervals"] = Field( + "intervals", + json_schema_extra={ + "linkml_meta": {"equals_string": "intervals", "ifabsent": "string(intervals)"} + }, + ) + epochs: Optional[TimeIntervals] = Field( + None, + description="""Divisions in time marking experimental stages or sub-divisions of a single recording session.""", + ) + trials: Optional[TimeIntervals] = Field( + None, description="""Repeated experimental events that have a logical grouping.""" + ) + invalid_times: Optional[TimeIntervals] = Field( + None, description="""Time intervals that should be removed from analysis.""" + ) + time_intervals: Optional[List[TimeIntervals]] = Field( + None, + description="""Optional additional table(s) for describing other experimental time intervals.""", + ) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model NWBFile.model_rebuild() @@ -554,3 +573,4 @@ Subject.model_rebuild() GeneralExtracellularEphys.model_rebuild() ExtracellularEphysElectrodes.model_rebuild() GeneralIntracellularEphys.model_rebuild() +NWBFileIntervals.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_icephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_icephys.py index c34073a..d48fcbd 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_icephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_icephys.py @@ -11,6 +11,7 @@ from ...core.v2_2_2.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_2_2.core_nwb_device import Device from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar from pydantic import ( BaseModel, @@ -117,6 +118,15 @@ class PatchClampSeries(TimeSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -164,7 +174,7 @@ class PatchClampSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times"], float]] = Field( + value: Optional[NDArray[Shape["* num_times"], float]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} ) @@ -195,6 +205,15 @@ class CurrentClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -271,6 +290,15 @@ class IZeroClampSeries(CurrentClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -324,6 +352,15 @@ class CurrentClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -416,6 +453,15 @@ class VoltageClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -648,6 +694,15 @@ class VoltageClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -724,6 +779,15 @@ class IntracellularElectrode(NWBContainer): slice: Optional[str] = Field( None, description="""Information about slice used for recording.""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class SweepTable(DynamicTable): @@ -752,7 +816,12 @@ class SweepTable(DynamicTable): ..., description="""Index for series.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_image.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_image.py index 92928c5..b161444 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_image.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_image.py @@ -75,7 +75,7 @@ class GrayscaleImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -98,7 +98,7 @@ class RGBImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -121,7 +121,7 @@ class RGBAImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -208,7 +208,7 @@ class ImageSeriesExternalFile(ConfiguredBaseModel): None, description="""Each external image may contain one or more consecutive frames of the full ImageSeries. This attribute serves as an index to indicate which frames each file contains, to faciliate random access. The 'starting_frame' attribute, hence, contains a list of frame numbers within the full ImageSeries of the first frame of each file listed in the parent 'external_file' dataset. Zero-based indexing is used (hence, the first element will always be zero). For example, if the 'external_file' dataset has three paths to files and the first file has 5 frames, the second file has 10 frames, and the third file has 20 frames, then this attribute will have values [0, 5, 15]. If there is a single external file that holds all of the frames of the ImageSeries (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0].""", ) - array: Optional[NDArray[Shape["* num_files"], str]] = Field( + value: Optional[NDArray[Shape["* num_files"], str]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_files"}]}}} ) @@ -223,6 +223,15 @@ class ImageMaskSeries(ImageSeries): ) name: str = Field(...) + masked_imageseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) data: Optional[ Union[ NDArray[Shape["* frame, * x, * y"], float], @@ -360,6 +369,15 @@ class IndexSeries(TimeSeries): description="""Index of the frame in the referenced ImageSeries.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + indexed_timeseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_misc.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_misc.py index 5f1e06a..cfdfb58 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_misc.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_misc.py @@ -167,7 +167,7 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): None, description="""Since there can be different units for different features, store the units in 'feature_units'. The default value for this attribute is \"see 'feature_units'\".""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -287,6 +287,15 @@ class DecompositionSeries(TimeSeries): ..., description="""Table for describing the bands that this series was generated from. There should be one row in this table for each band.""", ) + source_timeseries: Optional[Union[TimeSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "TimeSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -334,7 +343,7 @@ class DecompositionSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( + value: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -428,7 +437,12 @@ class Units(DynamicTable): None, description="""Index into the spike_times dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) spike_times: Optional[UnitsSpikeTimes] = Field( @@ -438,7 +452,12 @@ class Units(DynamicTable): None, description="""Index into the obs_intervals dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) obs_intervals: Optional[NDArray[Shape["* num_intervals, 2 start_end"], float]] = Field( @@ -459,14 +478,24 @@ class Units(DynamicTable): None, description="""Index into electrodes.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrodes: Named[Optional[DynamicTableRegion]] = Field( None, description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrode_group: Optional[List[ElectrodeGroup]] = Field( @@ -524,7 +553,7 @@ class UnitsSpikeTimes(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_ogen.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_ogen.py index b34d130..2b0d4f5 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_ogen.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_ogen.py @@ -14,6 +14,7 @@ from ...core.v2_2_2.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_2_2.core_nwb_device import Device metamodel_version = "None" version = "2.2.2" @@ -81,6 +82,15 @@ class OptogeneticSeries(TimeSeries): description="""Applied power for optogenetic stimulus, in watts.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + site: Union[OptogeneticStimulusSite, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "OptogeneticStimulusSite"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -129,6 +139,15 @@ class OptogeneticStimulusSite(NWBContainer): ..., description="""Location of the stimulation site. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) # Model rebuild diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_ophys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_ophys.py index 3fe9760..e4c1979 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_ophys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_ophys.py @@ -16,8 +16,9 @@ from pydantic import ( ValidationInfo, BeforeValidator, ) -from numpydantic import NDArray, Shape from ...hdmf_common.v1_1_3.hdmf_common_table import DynamicTableRegion, DynamicTable +from ...core.v2_2_2.core_nwb_device import Device +from numpydantic import NDArray, Shape from ...core.v2_2_2.core_nwb_base import ( TimeSeriesStartingTime, TimeSeriesSync, @@ -117,6 +118,15 @@ class TwoPhotonSeries(ImageSeries): field_of_view: Optional[ Union[NDArray[Shape["2 width_height"], float], NDArray[Shape["3 width_height"], float]] ] = Field(None, description="""Width, height and depth of image, or imaged area, in meters.""") + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) data: Optional[ Union[ NDArray[Shape["* frame, * x, * y"], float], @@ -185,7 +195,12 @@ class RoiResponseSeries(TimeSeries): ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) description: Optional[str] = Field(None, description="""Description of the time series.""") @@ -229,7 +244,7 @@ class DfOverF(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -244,7 +259,7 @@ class Fluorescence(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -259,7 +274,7 @@ class ImageSegmentation(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[DynamicTable]] = Field( + value: Optional[List[DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) name: str = Field(...) @@ -274,10 +289,146 @@ class ImagingPlane(NWBContainer): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[NWBContainer]] = Field( - None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "NWBContainer"}]}} - ) name: str = Field(...) + description: Optional[str] = Field(None, description="""Description of the imaging plane.""") + excitation_lambda: float = Field(..., description="""Excitation wavelength, in nm.""") + imaging_rate: float = Field(..., description="""Rate that images are acquired, in Hz.""") + indicator: str = Field(..., description="""Calcium indicator.""") + location: str = Field( + ..., + description="""Location of the imaging plane. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", + ) + manifold: Optional[ImagingPlaneManifold] = Field( + None, + description="""DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing.""", + ) + origin_coords: Optional[ImagingPlaneOriginCoords] = Field( + None, + description="""Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma).""", + ) + grid_spacing: Optional[ImagingPlaneGridSpacing] = Field( + None, + description="""Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid.""", + ) + reference_frame: Optional[str] = Field( + None, + description="""Describes reference frame of origin_coords and grid_spacing. For example, this can be a text description of the anatomical location and orientation of the grid defined by origin_coords and grid_spacing or the vectors needed to transform or rotate the grid to a common anatomical axis (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and grid_spacing. If origin_coords and grid_spacing are not present, then this field is not required. For example, if the microscope takes 10 x 10 x 2 images, where the first value of the data matrix (index (0, 0, 0)) corresponds to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means more anterior, larger numbers in y means more rightward, and larger numbers in z means more ventral, then enter the following -- origin_coords = (-1.2, -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = \"Origin coordinates are relative to bregma. First dimension corresponds to anterior-posterior axis (larger index = more anterior). Second dimension corresponds to medial-lateral axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral axis (larger index = more ventral).\"""", + ) + optical_channel: List[OpticalChannel] = Field( + ..., description="""An optical channel used to record from an imaging plane.""" + ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) + + +class ImagingPlaneManifold(ConfiguredBaseModel): + """ + DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["manifold"] = Field( + "manifold", + json_schema_extra={ + "linkml_meta": {"equals_string": "manifold", "ifabsent": "string(manifold)"} + }, + ) + conversion: Optional[float] = Field( + None, + description="""Scalar to multiply each element in data to convert it to the specified 'unit'. If the data are stored in acquisition system units or other units that require a conversion to be interpretable, multiply the data by 'conversion' to convert the data to the specified 'unit'. e.g. if the data acquisition system stores values in this object as pixels from x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then the 'conversion' multiplier to get from raw data acquisition pixel units to meters is 2/1000.""", + ) + unit: Optional[str] = Field( + None, + description="""Base unit of measurement for working with the data. The default value is 'meters'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* height, * width, 3 x_y_z"], float], + NDArray[Shape["* height, * width, * depth, 3 x_y_z"], float], + ] + ] = Field(None) + + +class ImagingPlaneOriginCoords(ConfiguredBaseModel): + """ + Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma). + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["origin_coords"] = Field( + "origin_coords", + json_schema_extra={ + "linkml_meta": {"equals_string": "origin_coords", "ifabsent": "string(origin_coords)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for origin_coords. The default value is 'meters'.""" + ) + value: Optional[NDArray[Shape["2 x_y, 3 x_y_z"], float]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "array": { + "dimensions": [ + {"alias": "x_y", "exact_cardinality": 2}, + {"alias": "x_y_z", "exact_cardinality": 3}, + ] + } + } + }, + ) + + +class ImagingPlaneGridSpacing(ConfiguredBaseModel): + """ + Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["grid_spacing"] = Field( + "grid_spacing", + json_schema_extra={ + "linkml_meta": {"equals_string": "grid_spacing", "ifabsent": "string(grid_spacing)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for grid_spacing. The default value is 'meters'.""" + ) + value: Optional[NDArray[Shape["2 x_y, 3 x_y_z"], float]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "array": { + "dimensions": [ + {"alias": "x_y", "exact_cardinality": 2}, + {"alias": "x_y_z", "exact_cardinality": 3}, + ] + } + } + }, + ) + + +class OpticalChannel(NWBContainer): + """ + An optical channel used to record from an imaging plane. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: str = Field(...) + description: str = Field(..., description="""Description or other notes about the channel.""") + emission_lambda: float = Field(..., description="""Emission wavelength for channel, in nm.""") class MotionCorrection(NWBDataInterface): @@ -289,7 +440,7 @@ class MotionCorrection(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[NWBDataInterface]] = Field( + value: Optional[List[NWBDataInterface]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "NWBDataInterface"}]}} ) name: str = Field(...) @@ -303,4 +454,8 @@ DfOverF.model_rebuild() Fluorescence.model_rebuild() ImageSegmentation.model_rebuild() ImagingPlane.model_rebuild() +ImagingPlaneManifold.model_rebuild() +ImagingPlaneOriginCoords.model_rebuild() +ImagingPlaneGridSpacing.model_rebuild() +OpticalChannel.model_rebuild() MotionCorrection.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_retinotopy.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_retinotopy.py index 8ba1ae3..c2d0c5f 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_retinotopy.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/core_nwb_retinotopy.py @@ -135,7 +135,7 @@ class ImagingRetinotopyAxis1PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -167,7 +167,7 @@ class ImagingRetinotopyAxis1PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -199,7 +199,7 @@ class ImagingRetinotopyAxis2PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -231,7 +231,7 @@ class ImagingRetinotopyAxis2PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -268,7 +268,7 @@ class ImagingRetinotopyFocalDepthImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -294,7 +294,7 @@ class ImagingRetinotopySignMap(ConfiguredBaseModel): description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""", ) field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""") - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -330,7 +330,7 @@ class ImagingRetinotopyVasculatureImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/namespace.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/namespace.py index 8a011e2..7b96622 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/namespace.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_2/namespace.py @@ -52,6 +52,10 @@ from ...core.v2_2_2.core_nwb_ophys import ( Fluorescence, ImageSegmentation, ImagingPlane, + ImagingPlaneManifold, + ImagingPlaneOriginCoords, + ImagingPlaneGridSpacing, + OpticalChannel, MotionCorrection, ) from ...core.v2_2_2.core_nwb_device import Device @@ -132,6 +136,7 @@ from ...core.v2_2_2.core_nwb_file import ( GeneralExtracellularEphys, ExtracellularEphysElectrodes, GeneralIntracellularEphys, + NWBFileIntervals, ) from ...core.v2_2_2.core_nwb_epoch import TimeIntervals, TimeIntervalsTimeseries diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_base.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_base.py index 8b60948..bb4ef4e 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_base.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_base.py @@ -87,7 +87,7 @@ class Image(NWBData): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -189,7 +189,7 @@ class TimeSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], Any], NDArray[Shape["* num_times, * num_dim2"], Any], @@ -241,7 +241,7 @@ class ProcessingModule(NWBContainer): {"from_schema": "core.nwb.base", "tree_root": True} ) - children: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( + value: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( None, json_schema_extra={ "linkml_meta": {"any_of": [{"range": "NWBDataInterface"}, {"range": "DynamicTable"}]} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_behavior.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_behavior.py index 6bd2d26..093f0b8 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_behavior.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_behavior.py @@ -131,7 +131,7 @@ class SpatialSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. The default value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -148,7 +148,7 @@ class BehavioralEpochs(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[IntervalSeries]] = Field( + value: Optional[List[IntervalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "IntervalSeries"}]}} ) name: str = Field(...) @@ -163,7 +163,7 @@ class BehavioralEvents(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -178,7 +178,7 @@ class BehavioralTimeSeries(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -193,7 +193,7 @@ class PupilTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -208,7 +208,7 @@ class EyeTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -223,7 +223,7 @@ class CompassDirection(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -238,7 +238,7 @@ class Position(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_ecephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_ecephys.py index 8e8528b..0138a95 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_ecephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_ecephys.py @@ -16,6 +16,7 @@ from pydantic import ( ValidationInfo, BeforeValidator, ) +from ...core.v2_2_4.core_nwb_device import Device from ...core.v2_2_4.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -116,7 +117,12 @@ class ElectricalSeries(TimeSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -179,7 +185,12 @@ class SpikeEventSeries(ElectricalSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -256,7 +267,12 @@ class FeatureExtraction(NWBDataInterface): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) @@ -287,6 +303,15 @@ class EventDetection(NWBDataInterface): description="""Timestamps of events, in seconds.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_events"}]}}}, ) + source_electricalseries: Union[ElectricalSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ElectricalSeries"}, {"range": "string"}], + } + }, + ) class EventWaveform(NWBDataInterface): @@ -298,7 +323,7 @@ class EventWaveform(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[SpikeEventSeries]] = Field( + value: Optional[List[SpikeEventSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpikeEventSeries"}]}} ) name: str = Field(...) @@ -313,7 +338,7 @@ class FilteredEphys(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -328,7 +353,7 @@ class LFP(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -352,6 +377,15 @@ class ElectrodeGroup(NWBContainer): position: Optional[ElectrodeGroupPosition] = Field( None, description="""stereotaxic or common framework coordinates""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class ElectrodeGroupPosition(ConfiguredBaseModel): @@ -406,6 +440,15 @@ class ClusterWaveforms(NWBDataInterface): } }, ) + clustering_interface: Union[Clustering, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Clustering"}, {"range": "string"}], + } + }, + ) class Clustering(NWBDataInterface): diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_epoch.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_epoch.py index 4f1a792..60ec786 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_epoch.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_epoch.py @@ -127,7 +127,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for tags.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries: Optional[TimeIntervalsTimeseries] = Field( @@ -137,7 +142,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -187,7 +197,7 @@ class TimeIntervalsTimeseries(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_file.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_file.py index 22f8f82..0b716c0 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_file.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_file.py @@ -7,7 +7,6 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np -from ...core.v2_2_4.core_nwb_epoch import TimeIntervals from ...core.v2_2_4.core_nwb_misc import Units from ...core.v2_2_4.core_nwb_device import Device from ...core.v2_2_4.core_nwb_ogen import OptogeneticStimulusSite @@ -16,6 +15,7 @@ from ...core.v2_2_4.core_nwb_ecephys import ElectrodeGroup from numpydantic import NDArray, Shape from ...hdmf_common.v1_1_3.hdmf_common_table import DynamicTable, VectorData, VectorIndex from ...core.v2_2_4.core_nwb_icephys import IntracellularElectrode, SweepTable +from ...core.v2_2_4.core_nwb_epoch import TimeIntervals from ...core.v2_2_4.core_nwb_base import ( NWBData, NWBContainer, @@ -174,19 +174,9 @@ class NWBFile(NWBContainer): ..., description="""Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under 'general'. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.""", ) - intervals: Optional[List[TimeIntervals]] = Field( + intervals: Optional[NWBFileIntervals] = Field( None, description="""Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.""", - json_schema_extra={ - "linkml_meta": { - "any_of": [ - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - ] - } - }, ) units: Optional[Units] = Field(None, description="""Data about sorted spike units.""") @@ -522,6 +512,35 @@ class GeneralIntracellularEphys(ConfiguredBaseModel): ) +class NWBFileIntervals(ConfiguredBaseModel): + """ + Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.file"}) + + name: Literal["intervals"] = Field( + "intervals", + json_schema_extra={ + "linkml_meta": {"equals_string": "intervals", "ifabsent": "string(intervals)"} + }, + ) + epochs: Optional[TimeIntervals] = Field( + None, + description="""Divisions in time marking experimental stages or sub-divisions of a single recording session.""", + ) + trials: Optional[TimeIntervals] = Field( + None, description="""Repeated experimental events that have a logical grouping.""" + ) + invalid_times: Optional[TimeIntervals] = Field( + None, description="""Time intervals that should be removed from analysis.""" + ) + time_intervals: Optional[List[TimeIntervals]] = Field( + None, + description="""Optional additional table(s) for describing other experimental time intervals.""", + ) + + class LabMetaData(NWBContainer): """ Lab-specific meta-data. @@ -579,5 +598,6 @@ GeneralSourceScript.model_rebuild() GeneralExtracellularEphys.model_rebuild() ExtracellularEphysElectrodes.model_rebuild() GeneralIntracellularEphys.model_rebuild() +NWBFileIntervals.model_rebuild() LabMetaData.model_rebuild() Subject.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_icephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_icephys.py index f0a8769..0af6814 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_icephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_icephys.py @@ -11,6 +11,7 @@ from ...core.v2_2_4.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_2_4.core_nwb_device import Device from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar from pydantic import ( BaseModel, @@ -117,6 +118,15 @@ class PatchClampSeries(TimeSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -164,7 +174,7 @@ class PatchClampSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times"], float]] = Field( + value: Optional[NDArray[Shape["* num_times"], float]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} ) @@ -195,6 +205,15 @@ class CurrentClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -271,6 +290,15 @@ class IZeroClampSeries(CurrentClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -324,6 +352,15 @@ class CurrentClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -416,6 +453,15 @@ class VoltageClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -648,6 +694,15 @@ class VoltageClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -724,6 +779,15 @@ class IntracellularElectrode(NWBContainer): slice: Optional[str] = Field( None, description="""Information about slice used for recording.""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class SweepTable(DynamicTable): @@ -752,7 +816,12 @@ class SweepTable(DynamicTable): ..., description="""Index for series.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_image.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_image.py index 09f7cf1..a1ababb 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_image.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_image.py @@ -75,7 +75,7 @@ class GrayscaleImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -98,7 +98,7 @@ class RGBImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -121,7 +121,7 @@ class RGBAImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -208,7 +208,7 @@ class ImageSeriesExternalFile(ConfiguredBaseModel): None, description="""Each external image may contain one or more consecutive frames of the full ImageSeries. This attribute serves as an index to indicate which frames each file contains, to faciliate random access. The 'starting_frame' attribute, hence, contains a list of frame numbers within the full ImageSeries of the first frame of each file listed in the parent 'external_file' dataset. Zero-based indexing is used (hence, the first element will always be zero). For example, if the 'external_file' dataset has three paths to files and the first file has 5 frames, the second file has 10 frames, and the third file has 20 frames, then this attribute will have values [0, 5, 15]. If there is a single external file that holds all of the frames of the ImageSeries (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0].""", ) - array: Optional[NDArray[Shape["* num_files"], str]] = Field( + value: Optional[NDArray[Shape["* num_files"], str]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_files"}]}}} ) @@ -223,6 +223,15 @@ class ImageMaskSeries(ImageSeries): ) name: str = Field(...) + masked_imageseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) data: Optional[ Union[ NDArray[Shape["* frame, * x, * y"], float], @@ -360,6 +369,15 @@ class IndexSeries(TimeSeries): description="""Index of the frame in the referenced ImageSeries.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + indexed_timeseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_misc.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_misc.py index 9cd8b01..51b8cfc 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_misc.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_misc.py @@ -167,7 +167,7 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): None, description="""Since there can be different units for different features, store the units in 'feature_units'. The default value for this attribute is \"see 'feature_units'\".""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -287,6 +287,15 @@ class DecompositionSeries(TimeSeries): ..., description="""Table for describing the bands that this series was generated from. There should be one row in this table for each band.""", ) + source_timeseries: Optional[Union[TimeSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "TimeSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -334,7 +343,7 @@ class DecompositionSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( + value: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -428,7 +437,12 @@ class Units(DynamicTable): None, description="""Index into the spike_times dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) spike_times: Optional[UnitsSpikeTimes] = Field( @@ -438,7 +452,12 @@ class Units(DynamicTable): None, description="""Index into the obs_intervals dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) obs_intervals: Optional[NDArray[Shape["* num_intervals, 2 start_end"], float]] = Field( @@ -459,14 +478,24 @@ class Units(DynamicTable): None, description="""Index into electrodes.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrodes: Named[Optional[DynamicTableRegion]] = Field( None, description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrode_group: Optional[List[ElectrodeGroup]] = Field( @@ -524,7 +553,7 @@ class UnitsSpikeTimes(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_ogen.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_ogen.py index 6f6995d..73f6642 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_ogen.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_ogen.py @@ -14,6 +14,7 @@ from ...core.v2_2_4.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_2_4.core_nwb_device import Device metamodel_version = "None" version = "2.2.4" @@ -81,6 +82,15 @@ class OptogeneticSeries(TimeSeries): description="""Applied power for optogenetic stimulus, in watts.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + site: Union[OptogeneticStimulusSite, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "OptogeneticStimulusSite"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -129,6 +139,15 @@ class OptogeneticStimulusSite(NWBContainer): ..., description="""Location of the stimulation site. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) # Model rebuild diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_ophys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_ophys.py index 8506e83..3c2ebd8 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_ophys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_ophys.py @@ -21,8 +21,8 @@ from ...hdmf_common.v1_1_3.hdmf_common_table import ( VectorIndex, VectorData, ) +from ...core.v2_2_4.core_nwb_device import Device from numpydantic import NDArray, Shape -from ...core.v2_2_4.core_nwb_image import ImageSeries, ImageSeriesExternalFile from ...core.v2_2_4.core_nwb_base import ( TimeSeriesStartingTime, TimeSeriesSync, @@ -30,6 +30,7 @@ from ...core.v2_2_4.core_nwb_base import ( NWBDataInterface, NWBContainer, ) +from ...core.v2_2_4.core_nwb_image import ImageSeries, ImageSeriesExternalFile metamodel_version = "None" version = "2.2.4" @@ -122,6 +123,15 @@ class TwoPhotonSeries(ImageSeries): field_of_view: Optional[ Union[NDArray[Shape["2 width_height"], float], NDArray[Shape["3 width_height"], float]] ] = Field(None, description="""Width, height and depth of image, or imaged area, in meters.""") + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) data: Optional[ Union[ NDArray[Shape["* frame, * x, * y"], float], @@ -190,7 +200,12 @@ class RoiResponseSeries(TimeSeries): ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) description: Optional[str] = Field(None, description="""Description of the time series.""") @@ -234,7 +249,7 @@ class DfOverF(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -249,7 +264,7 @@ class Fluorescence(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -264,7 +279,7 @@ class ImageSegmentation(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[PlaneSegmentation]] = Field( + value: Optional[List[PlaneSegmentation]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "PlaneSegmentation"}]}} ) name: str = Field(...) @@ -288,7 +303,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into pixel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( @@ -299,7 +319,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into voxel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( @@ -311,6 +336,15 @@ class PlaneSegmentation(DynamicTable): description="""Image stacks that the segmentation masks apply to.""", json_schema_extra={"linkml_meta": {"any_of": [{"range": "ImageSeries"}]}}, ) + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) colnames: Optional[str] = Field( None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""", @@ -347,7 +381,7 @@ class PlaneSegmentationImageMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -376,7 +410,7 @@ class PlaneSegmentationPixelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -406,7 +440,7 @@ class PlaneSegmentationVoxelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -425,10 +459,137 @@ class ImagingPlane(NWBContainer): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[OpticalChannel]] = Field( - None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "OpticalChannel"}]}} - ) name: str = Field(...) + description: Optional[str] = Field(None, description="""Description of the imaging plane.""") + excitation_lambda: float = Field(..., description="""Excitation wavelength, in nm.""") + imaging_rate: Optional[float] = Field( + None, + description="""Rate that images are acquired, in Hz. If the corresponding TimeSeries is present, the rate should be stored there instead.""", + ) + indicator: str = Field(..., description="""Calcium indicator.""") + location: str = Field( + ..., + description="""Location of the imaging plane. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", + ) + manifold: Optional[ImagingPlaneManifold] = Field( + None, + description="""DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing.""", + ) + origin_coords: Optional[ImagingPlaneOriginCoords] = Field( + None, + description="""Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma).""", + ) + grid_spacing: Optional[ImagingPlaneGridSpacing] = Field( + None, + description="""Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid.""", + ) + reference_frame: Optional[str] = Field( + None, + description="""Describes reference frame of origin_coords and grid_spacing. For example, this can be a text description of the anatomical location and orientation of the grid defined by origin_coords and grid_spacing or the vectors needed to transform or rotate the grid to a common anatomical axis (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and grid_spacing. If origin_coords and grid_spacing are not present, then this field is not required. For example, if the microscope takes 10 x 10 x 2 images, where the first value of the data matrix (index (0, 0, 0)) corresponds to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means more anterior, larger numbers in y means more rightward, and larger numbers in z means more ventral, then enter the following -- origin_coords = (-1.2, -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = \"Origin coordinates are relative to bregma. First dimension corresponds to anterior-posterior axis (larger index = more anterior). Second dimension corresponds to medial-lateral axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral axis (larger index = more ventral).\"""", + ) + optical_channel: List[OpticalChannel] = Field( + ..., description="""An optical channel used to record from an imaging plane.""" + ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) + + +class ImagingPlaneManifold(ConfiguredBaseModel): + """ + DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["manifold"] = Field( + "manifold", + json_schema_extra={ + "linkml_meta": {"equals_string": "manifold", "ifabsent": "string(manifold)"} + }, + ) + conversion: Optional[float] = Field( + None, + description="""Scalar to multiply each element in data to convert it to the specified 'unit'. If the data are stored in acquisition system units or other units that require a conversion to be interpretable, multiply the data by 'conversion' to convert the data to the specified 'unit'. e.g. if the data acquisition system stores values in this object as pixels from x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then the 'conversion' multiplier to get from raw data acquisition pixel units to meters is 2/1000.""", + ) + unit: Optional[str] = Field( + None, + description="""Base unit of measurement for working with the data. The default value is 'meters'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* height, * width, 3 x_y_z"], float], + NDArray[Shape["* height, * width, * depth, 3 x_y_z"], float], + ] + ] = Field(None) + + +class ImagingPlaneOriginCoords(ConfiguredBaseModel): + """ + Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma). + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["origin_coords"] = Field( + "origin_coords", + json_schema_extra={ + "linkml_meta": {"equals_string": "origin_coords", "ifabsent": "string(origin_coords)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for origin_coords. The default value is 'meters'.""" + ) + value: Optional[NDArray[Shape["2 x_y, 3 x_y_z"], float]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "array": { + "dimensions": [ + {"alias": "x_y", "exact_cardinality": 2}, + {"alias": "x_y_z", "exact_cardinality": 3}, + ] + } + } + }, + ) + + +class ImagingPlaneGridSpacing(ConfiguredBaseModel): + """ + Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["grid_spacing"] = Field( + "grid_spacing", + json_schema_extra={ + "linkml_meta": {"equals_string": "grid_spacing", "ifabsent": "string(grid_spacing)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for grid_spacing. The default value is 'meters'.""" + ) + value: Optional[NDArray[Shape["2 x_y, 3 x_y_z"], float]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "array": { + "dimensions": [ + {"alias": "x_y", "exact_cardinality": 2}, + {"alias": "x_y_z", "exact_cardinality": 3}, + ] + } + } + }, + ) class OpticalChannel(NWBContainer): @@ -454,7 +615,7 @@ class MotionCorrection(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[CorrectedImageStack]] = Field( + value: Optional[List[CorrectedImageStack]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "CorrectedImageStack"}]}} ) name: str = Field(...) @@ -477,6 +638,15 @@ class CorrectedImageStack(NWBDataInterface): ..., description="""Stores the x,y delta necessary to align each frame to the common coordinates, for example, to align each frame to a reference image.""", ) + original: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) # Model rebuild @@ -491,6 +661,9 @@ PlaneSegmentationImageMask.model_rebuild() PlaneSegmentationPixelMask.model_rebuild() PlaneSegmentationVoxelMask.model_rebuild() ImagingPlane.model_rebuild() +ImagingPlaneManifold.model_rebuild() +ImagingPlaneOriginCoords.model_rebuild() +ImagingPlaneGridSpacing.model_rebuild() OpticalChannel.model_rebuild() MotionCorrection.model_rebuild() CorrectedImageStack.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_retinotopy.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_retinotopy.py index e1dfcb7..fc5368f 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_retinotopy.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/core_nwb_retinotopy.py @@ -135,7 +135,7 @@ class ImagingRetinotopyAxis1PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -167,7 +167,7 @@ class ImagingRetinotopyAxis1PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -199,7 +199,7 @@ class ImagingRetinotopyAxis2PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -231,7 +231,7 @@ class ImagingRetinotopyAxis2PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -268,7 +268,7 @@ class ImagingRetinotopyFocalDepthImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -294,7 +294,7 @@ class ImagingRetinotopySignMap(ConfiguredBaseModel): description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""", ) field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""") - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -330,7 +330,7 @@ class ImagingRetinotopyVasculatureImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/namespace.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/namespace.py index 83cb593..2017869 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/namespace.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_4/namespace.py @@ -56,6 +56,9 @@ from ...core.v2_2_4.core_nwb_ophys import ( PlaneSegmentationPixelMask, PlaneSegmentationVoxelMask, ImagingPlane, + ImagingPlaneManifold, + ImagingPlaneOriginCoords, + ImagingPlaneGridSpacing, OpticalChannel, MotionCorrection, CorrectedImageStack, @@ -138,6 +141,7 @@ from ...core.v2_2_4.core_nwb_file import ( GeneralExtracellularEphys, ExtracellularEphysElectrodes, GeneralIntracellularEphys, + NWBFileIntervals, LabMetaData, Subject, ) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_base.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_base.py index 4e739b3..64796e9 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_base.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_base.py @@ -87,7 +87,7 @@ class Image(NWBData): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -189,7 +189,7 @@ class TimeSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], Any], NDArray[Shape["* num_times, * num_dim2"], Any], @@ -241,7 +241,7 @@ class ProcessingModule(NWBContainer): {"from_schema": "core.nwb.base", "tree_root": True} ) - children: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( + value: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( None, json_schema_extra={ "linkml_meta": {"any_of": [{"range": "NWBDataInterface"}, {"range": "DynamicTable"}]} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_behavior.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_behavior.py index 01ed338..77b111a 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_behavior.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_behavior.py @@ -131,7 +131,7 @@ class SpatialSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. The default value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -148,7 +148,7 @@ class BehavioralEpochs(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[IntervalSeries]] = Field( + value: Optional[List[IntervalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "IntervalSeries"}]}} ) name: str = Field(...) @@ -163,7 +163,7 @@ class BehavioralEvents(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -178,7 +178,7 @@ class BehavioralTimeSeries(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -193,7 +193,7 @@ class PupilTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -208,7 +208,7 @@ class EyeTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -223,7 +223,7 @@ class CompassDirection(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -238,7 +238,7 @@ class Position(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_ecephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_ecephys.py index ef56d6a..99b6083 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_ecephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_ecephys.py @@ -16,6 +16,7 @@ from pydantic import ( ValidationInfo, BeforeValidator, ) +from ...core.v2_2_5.core_nwb_device import Device from ...core.v2_2_5.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -116,7 +117,12 @@ class ElectricalSeries(TimeSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -179,7 +185,12 @@ class SpikeEventSeries(ElectricalSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -256,7 +267,12 @@ class FeatureExtraction(NWBDataInterface): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) @@ -287,6 +303,15 @@ class EventDetection(NWBDataInterface): description="""Timestamps of events, in seconds.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_events"}]}}}, ) + source_electricalseries: Union[ElectricalSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ElectricalSeries"}, {"range": "string"}], + } + }, + ) class EventWaveform(NWBDataInterface): @@ -298,7 +323,7 @@ class EventWaveform(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[SpikeEventSeries]] = Field( + value: Optional[List[SpikeEventSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpikeEventSeries"}]}} ) name: str = Field(...) @@ -313,7 +338,7 @@ class FilteredEphys(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -328,7 +353,7 @@ class LFP(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -352,6 +377,15 @@ class ElectrodeGroup(NWBContainer): position: Optional[ElectrodeGroupPosition] = Field( None, description="""stereotaxic or common framework coordinates""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class ElectrodeGroupPosition(ConfiguredBaseModel): @@ -406,6 +440,15 @@ class ClusterWaveforms(NWBDataInterface): } }, ) + clustering_interface: Union[Clustering, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Clustering"}, {"range": "string"}], + } + }, + ) class Clustering(NWBDataInterface): diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_epoch.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_epoch.py index 9ce71f4..ad80c60 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_epoch.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_epoch.py @@ -127,7 +127,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for tags.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries: Optional[TimeIntervalsTimeseries] = Field( @@ -137,7 +142,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -187,7 +197,7 @@ class TimeIntervalsTimeseries(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_file.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_file.py index 9f6c0c9..a0344e1 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_file.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_file.py @@ -7,7 +7,6 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np -from ...core.v2_2_5.core_nwb_epoch import TimeIntervals from ...core.v2_2_5.core_nwb_misc import Units from ...core.v2_2_5.core_nwb_device import Device from ...core.v2_2_5.core_nwb_ogen import OptogeneticStimulusSite @@ -16,6 +15,7 @@ from ...core.v2_2_5.core_nwb_ecephys import ElectrodeGroup from numpydantic import NDArray, Shape from ...hdmf_common.v1_1_3.hdmf_common_table import DynamicTable, VectorData, VectorIndex from ...core.v2_2_5.core_nwb_icephys import IntracellularElectrode, SweepTable +from ...core.v2_2_5.core_nwb_epoch import TimeIntervals from ...core.v2_2_5.core_nwb_base import ( NWBData, NWBContainer, @@ -174,19 +174,9 @@ class NWBFile(NWBContainer): ..., description="""Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under 'general'. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.""", ) - intervals: Optional[List[TimeIntervals]] = Field( + intervals: Optional[NWBFileIntervals] = Field( None, description="""Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.""", - json_schema_extra={ - "linkml_meta": { - "any_of": [ - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - ] - } - }, ) units: Optional[Units] = Field(None, description="""Data about sorted spike units.""") @@ -522,6 +512,35 @@ class GeneralIntracellularEphys(ConfiguredBaseModel): ) +class NWBFileIntervals(ConfiguredBaseModel): + """ + Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.file"}) + + name: Literal["intervals"] = Field( + "intervals", + json_schema_extra={ + "linkml_meta": {"equals_string": "intervals", "ifabsent": "string(intervals)"} + }, + ) + epochs: Optional[TimeIntervals] = Field( + None, + description="""Divisions in time marking experimental stages or sub-divisions of a single recording session.""", + ) + trials: Optional[TimeIntervals] = Field( + None, description="""Repeated experimental events that have a logical grouping.""" + ) + invalid_times: Optional[TimeIntervals] = Field( + None, description="""Time intervals that should be removed from analysis.""" + ) + time_intervals: Optional[List[TimeIntervals]] = Field( + None, + description="""Optional additional table(s) for describing other experimental time intervals.""", + ) + + class LabMetaData(NWBContainer): """ Lab-specific meta-data. @@ -579,5 +598,6 @@ GeneralSourceScript.model_rebuild() GeneralExtracellularEphys.model_rebuild() ExtracellularEphysElectrodes.model_rebuild() GeneralIntracellularEphys.model_rebuild() +NWBFileIntervals.model_rebuild() LabMetaData.model_rebuild() Subject.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_icephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_icephys.py index 795f4b4..0cdf6b1 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_icephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_icephys.py @@ -11,6 +11,7 @@ from ...core.v2_2_5.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_2_5.core_nwb_device import Device from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar from pydantic import ( BaseModel, @@ -117,6 +118,15 @@ class PatchClampSeries(TimeSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -164,7 +174,7 @@ class PatchClampSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times"], float]] = Field( + value: Optional[NDArray[Shape["* num_times"], float]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} ) @@ -195,6 +205,15 @@ class CurrentClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -271,6 +290,15 @@ class IZeroClampSeries(CurrentClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -324,6 +352,15 @@ class CurrentClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -416,6 +453,15 @@ class VoltageClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -648,6 +694,15 @@ class VoltageClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -724,6 +779,15 @@ class IntracellularElectrode(NWBContainer): slice: Optional[str] = Field( None, description="""Information about slice used for recording.""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class SweepTable(DynamicTable): @@ -752,7 +816,12 @@ class SweepTable(DynamicTable): ..., description="""Index for series.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_image.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_image.py index 7b0a102..e6790fa 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_image.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_image.py @@ -75,7 +75,7 @@ class GrayscaleImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -98,7 +98,7 @@ class RGBImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -121,7 +121,7 @@ class RGBAImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -208,7 +208,7 @@ class ImageSeriesExternalFile(ConfiguredBaseModel): None, description="""Each external image may contain one or more consecutive frames of the full ImageSeries. This attribute serves as an index to indicate which frames each file contains, to faciliate random access. The 'starting_frame' attribute, hence, contains a list of frame numbers within the full ImageSeries of the first frame of each file listed in the parent 'external_file' dataset. Zero-based indexing is used (hence, the first element will always be zero). For example, if the 'external_file' dataset has three paths to files and the first file has 5 frames, the second file has 10 frames, and the third file has 20 frames, then this attribute will have values [0, 5, 15]. If there is a single external file that holds all of the frames of the ImageSeries (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0].""", ) - array: Optional[NDArray[Shape["* num_files"], str]] = Field( + value: Optional[NDArray[Shape["* num_files"], str]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_files"}]}}} ) @@ -223,6 +223,15 @@ class ImageMaskSeries(ImageSeries): ) name: str = Field(...) + masked_imageseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) data: Optional[ Union[ NDArray[Shape["* frame, * x, * y"], float], @@ -360,6 +369,15 @@ class IndexSeries(TimeSeries): description="""Index of the frame in the referenced ImageSeries.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + indexed_timeseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_misc.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_misc.py index 6fff7db..c3f845e 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_misc.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_misc.py @@ -167,7 +167,7 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): None, description="""Since there can be different units for different features, store the units in 'feature_units'. The default value for this attribute is \"see 'feature_units'\".""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -287,6 +287,15 @@ class DecompositionSeries(TimeSeries): ..., description="""Table for describing the bands that this series was generated from. There should be one row in this table for each band.""", ) + source_timeseries: Optional[Union[TimeSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "TimeSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -334,7 +343,7 @@ class DecompositionSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( + value: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -428,7 +437,12 @@ class Units(DynamicTable): None, description="""Index into the spike_times dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) spike_times: Optional[UnitsSpikeTimes] = Field( @@ -438,7 +452,12 @@ class Units(DynamicTable): None, description="""Index into the obs_intervals dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) obs_intervals: Optional[NDArray[Shape["* num_intervals, 2 start_end"], float]] = Field( @@ -459,14 +478,24 @@ class Units(DynamicTable): None, description="""Index into electrodes.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrodes: Named[Optional[DynamicTableRegion]] = Field( None, description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrode_group: Optional[List[ElectrodeGroup]] = Field( @@ -524,7 +553,7 @@ class UnitsSpikeTimes(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_ogen.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_ogen.py index d6c46a3..c30f06b 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_ogen.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_ogen.py @@ -14,6 +14,7 @@ from ...core.v2_2_5.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_2_5.core_nwb_device import Device metamodel_version = "None" version = "2.2.5" @@ -81,6 +82,15 @@ class OptogeneticSeries(TimeSeries): description="""Applied power for optogenetic stimulus, in watts.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + site: Union[OptogeneticStimulusSite, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "OptogeneticStimulusSite"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -129,6 +139,15 @@ class OptogeneticStimulusSite(NWBContainer): ..., description="""Location of the stimulation site. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) # Model rebuild diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_ophys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_ophys.py index 32129b6..6849817 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_ophys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_ophys.py @@ -21,8 +21,8 @@ from ...hdmf_common.v1_1_3.hdmf_common_table import ( VectorIndex, VectorData, ) +from ...core.v2_2_5.core_nwb_device import Device from numpydantic import NDArray, Shape -from ...core.v2_2_5.core_nwb_image import ImageSeries, ImageSeriesExternalFile from ...core.v2_2_5.core_nwb_base import ( TimeSeriesStartingTime, TimeSeriesSync, @@ -30,6 +30,7 @@ from ...core.v2_2_5.core_nwb_base import ( NWBDataInterface, NWBContainer, ) +from ...core.v2_2_5.core_nwb_image import ImageSeries, ImageSeriesExternalFile metamodel_version = "None" version = "2.2.5" @@ -124,6 +125,15 @@ class TwoPhotonSeries(ImageSeries): NDArray[Shape["2 width_height"], float], NDArray[Shape["3 width_height_depth"], float] ] ] = Field(None, description="""Width, height and depth of image, or imaged area, in meters.""") + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) data: Optional[ Union[ NDArray[Shape["* frame, * x, * y"], float], @@ -192,7 +202,12 @@ class RoiResponseSeries(TimeSeries): ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) description: Optional[str] = Field(None, description="""Description of the time series.""") @@ -236,7 +251,7 @@ class DfOverF(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -251,7 +266,7 @@ class Fluorescence(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -266,7 +281,7 @@ class ImageSegmentation(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[PlaneSegmentation]] = Field( + value: Optional[List[PlaneSegmentation]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "PlaneSegmentation"}]}} ) name: str = Field(...) @@ -290,7 +305,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into pixel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( @@ -301,7 +321,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into voxel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( @@ -313,6 +338,15 @@ class PlaneSegmentation(DynamicTable): description="""Image stacks that the segmentation masks apply to.""", json_schema_extra={"linkml_meta": {"any_of": [{"range": "ImageSeries"}]}}, ) + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) colnames: Optional[str] = Field( None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""", @@ -349,7 +383,7 @@ class PlaneSegmentationImageMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -378,7 +412,7 @@ class PlaneSegmentationPixelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -408,7 +442,7 @@ class PlaneSegmentationVoxelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -427,10 +461,117 @@ class ImagingPlane(NWBContainer): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[OpticalChannel]] = Field( - None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "OpticalChannel"}]}} - ) name: str = Field(...) + description: Optional[str] = Field(None, description="""Description of the imaging plane.""") + excitation_lambda: float = Field(..., description="""Excitation wavelength, in nm.""") + imaging_rate: Optional[float] = Field( + None, + description="""Rate that images are acquired, in Hz. If the corresponding TimeSeries is present, the rate should be stored there instead.""", + ) + indicator: str = Field(..., description="""Calcium indicator.""") + location: str = Field( + ..., + description="""Location of the imaging plane. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", + ) + manifold: Optional[ImagingPlaneManifold] = Field( + None, + description="""DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing.""", + ) + origin_coords: Optional[ImagingPlaneOriginCoords] = Field( + None, + description="""Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma).""", + ) + grid_spacing: Optional[ImagingPlaneGridSpacing] = Field( + None, + description="""Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid.""", + ) + reference_frame: Optional[str] = Field( + None, + description="""Describes reference frame of origin_coords and grid_spacing. For example, this can be a text description of the anatomical location and orientation of the grid defined by origin_coords and grid_spacing or the vectors needed to transform or rotate the grid to a common anatomical axis (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and grid_spacing. If origin_coords and grid_spacing are not present, then this field is not required. For example, if the microscope takes 10 x 10 x 2 images, where the first value of the data matrix (index (0, 0, 0)) corresponds to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means more anterior, larger numbers in y means more rightward, and larger numbers in z means more ventral, then enter the following -- origin_coords = (-1.2, -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = \"Origin coordinates are relative to bregma. First dimension corresponds to anterior-posterior axis (larger index = more anterior). Second dimension corresponds to medial-lateral axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral axis (larger index = more ventral).\"""", + ) + optical_channel: List[OpticalChannel] = Field( + ..., description="""An optical channel used to record from an imaging plane.""" + ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) + + +class ImagingPlaneManifold(ConfiguredBaseModel): + """ + DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["manifold"] = Field( + "manifold", + json_schema_extra={ + "linkml_meta": {"equals_string": "manifold", "ifabsent": "string(manifold)"} + }, + ) + conversion: Optional[float] = Field( + None, + description="""Scalar to multiply each element in data to convert it to the specified 'unit'. If the data are stored in acquisition system units or other units that require a conversion to be interpretable, multiply the data by 'conversion' to convert the data to the specified 'unit'. e.g. if the data acquisition system stores values in this object as pixels from x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then the 'conversion' multiplier to get from raw data acquisition pixel units to meters is 2/1000.""", + ) + unit: Optional[str] = Field( + None, + description="""Base unit of measurement for working with the data. The default value is 'meters'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* height, * width, 3 x_y_z"], float], + NDArray[Shape["* height, * width, * depth, 3 x_y_z"], float], + ] + ] = Field(None) + + +class ImagingPlaneOriginCoords(ConfiguredBaseModel): + """ + Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma). + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["origin_coords"] = Field( + "origin_coords", + json_schema_extra={ + "linkml_meta": {"equals_string": "origin_coords", "ifabsent": "string(origin_coords)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for origin_coords. The default value is 'meters'.""" + ) + value: Optional[Union[NDArray[Shape["2 x_y"], float], NDArray[Shape["3 x_y_z"], float]]] = ( + Field(None) + ) + + +class ImagingPlaneGridSpacing(ConfiguredBaseModel): + """ + Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["grid_spacing"] = Field( + "grid_spacing", + json_schema_extra={ + "linkml_meta": {"equals_string": "grid_spacing", "ifabsent": "string(grid_spacing)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for grid_spacing. The default value is 'meters'.""" + ) + value: Optional[Union[NDArray[Shape["2 x_y"], float], NDArray[Shape["3 x_y_z"], float]]] = ( + Field(None) + ) class OpticalChannel(NWBContainer): @@ -456,7 +597,7 @@ class MotionCorrection(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[CorrectedImageStack]] = Field( + value: Optional[List[CorrectedImageStack]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "CorrectedImageStack"}]}} ) name: str = Field(...) @@ -479,6 +620,15 @@ class CorrectedImageStack(NWBDataInterface): ..., description="""Stores the x,y delta necessary to align each frame to the common coordinates, for example, to align each frame to a reference image.""", ) + original: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) # Model rebuild @@ -493,6 +643,9 @@ PlaneSegmentationImageMask.model_rebuild() PlaneSegmentationPixelMask.model_rebuild() PlaneSegmentationVoxelMask.model_rebuild() ImagingPlane.model_rebuild() +ImagingPlaneManifold.model_rebuild() +ImagingPlaneOriginCoords.model_rebuild() +ImagingPlaneGridSpacing.model_rebuild() OpticalChannel.model_rebuild() MotionCorrection.model_rebuild() CorrectedImageStack.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_retinotopy.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_retinotopy.py index fe8df70..79dacf3 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_retinotopy.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/core_nwb_retinotopy.py @@ -135,7 +135,7 @@ class ImagingRetinotopyAxis1PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -167,7 +167,7 @@ class ImagingRetinotopyAxis1PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -199,7 +199,7 @@ class ImagingRetinotopyAxis2PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -231,7 +231,7 @@ class ImagingRetinotopyAxis2PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -268,7 +268,7 @@ class ImagingRetinotopyFocalDepthImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -294,7 +294,7 @@ class ImagingRetinotopySignMap(ConfiguredBaseModel): description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""", ) field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""") - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -330,7 +330,7 @@ class ImagingRetinotopyVasculatureImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/namespace.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/namespace.py index efff00e..56b42a0 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/namespace.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_2_5/namespace.py @@ -56,6 +56,9 @@ from ...core.v2_2_5.core_nwb_ophys import ( PlaneSegmentationPixelMask, PlaneSegmentationVoxelMask, ImagingPlane, + ImagingPlaneManifold, + ImagingPlaneOriginCoords, + ImagingPlaneGridSpacing, OpticalChannel, MotionCorrection, CorrectedImageStack, @@ -138,6 +141,7 @@ from ...core.v2_2_5.core_nwb_file import ( GeneralExtracellularEphys, ExtracellularEphysElectrodes, GeneralIntracellularEphys, + NWBFileIntervals, LabMetaData, Subject, ) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_base.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_base.py index 5d6e07d..c3683bc 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_base.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_base.py @@ -92,7 +92,7 @@ class Image(NWBData): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -198,7 +198,7 @@ class TimeSeriesData(ConfiguredBaseModel): None, description="""Optionally describe the continuity of the data. Can be \"continuous\", \"instantaneous\", or \"step\". For example, a voltage trace would be \"continuous\", because samples are recorded from a continuous process. An array of lick times would be \"instantaneous\", because the data represents distinct moments in time. Times of image presentations would be \"step\" because the picture remains the same until the next timepoint. This field is optional, but is useful in providing information about the underlying data. It may inform the way this data is interpreted, the way it is visualized, and what analysis methods are applicable.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], Any], NDArray[Shape["* num_times, * num_dim2"], Any], @@ -250,7 +250,7 @@ class ProcessingModule(NWBContainer): {"from_schema": "core.nwb.base", "tree_root": True} ) - children: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( + value: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( None, json_schema_extra={ "linkml_meta": {"any_of": [{"range": "NWBDataInterface"}, {"range": "DynamicTable"}]} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_behavior.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_behavior.py index 94f5843..a469b16 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_behavior.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_behavior.py @@ -131,7 +131,7 @@ class SpatialSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. The default value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -148,7 +148,7 @@ class BehavioralEpochs(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[IntervalSeries]] = Field( + value: Optional[List[IntervalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "IntervalSeries"}]}} ) name: str = Field(...) @@ -163,7 +163,7 @@ class BehavioralEvents(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -178,7 +178,7 @@ class BehavioralTimeSeries(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -193,7 +193,7 @@ class PupilTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -208,7 +208,7 @@ class EyeTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -223,7 +223,7 @@ class CompassDirection(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -238,7 +238,7 @@ class Position(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_ecephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_ecephys.py index c0b9368..19de749 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_ecephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_ecephys.py @@ -16,6 +16,7 @@ from pydantic import ( ValidationInfo, BeforeValidator, ) +from ...core.v2_3_0.core_nwb_device import Device from ...core.v2_3_0.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -120,7 +121,12 @@ class ElectricalSeries(TimeSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -187,7 +193,12 @@ class SpikeEventSeries(ElectricalSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -264,7 +275,12 @@ class FeatureExtraction(NWBDataInterface): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) @@ -295,6 +311,15 @@ class EventDetection(NWBDataInterface): description="""Timestamps of events, in seconds.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_events"}]}}}, ) + source_electricalseries: Union[ElectricalSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ElectricalSeries"}, {"range": "string"}], + } + }, + ) class EventWaveform(NWBDataInterface): @@ -306,7 +331,7 @@ class EventWaveform(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[SpikeEventSeries]] = Field( + value: Optional[List[SpikeEventSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpikeEventSeries"}]}} ) name: str = Field(...) @@ -321,7 +346,7 @@ class FilteredEphys(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -336,7 +361,7 @@ class LFP(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -360,6 +385,15 @@ class ElectrodeGroup(NWBContainer): position: Optional[ElectrodeGroupPosition] = Field( None, description="""stereotaxic or common framework coordinates""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class ElectrodeGroupPosition(ConfiguredBaseModel): @@ -414,6 +448,15 @@ class ClusterWaveforms(NWBDataInterface): } }, ) + clustering_interface: Union[Clustering, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Clustering"}, {"range": "string"}], + } + }, + ) class Clustering(NWBDataInterface): diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_epoch.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_epoch.py index 1466993..adfa639 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_epoch.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_epoch.py @@ -127,7 +127,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for tags.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries: Optional[TimeIntervalsTimeseries] = Field( @@ -137,7 +142,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -184,7 +194,7 @@ class TimeIntervalsTimeseries(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_file.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_file.py index 499296e..03e0af6 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_file.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_file.py @@ -7,7 +7,6 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np -from ...core.v2_3_0.core_nwb_epoch import TimeIntervals from ...core.v2_3_0.core_nwb_misc import Units from ...core.v2_3_0.core_nwb_device import Device from ...core.v2_3_0.core_nwb_ogen import OptogeneticStimulusSite @@ -16,6 +15,7 @@ from ...core.v2_3_0.core_nwb_ecephys import ElectrodeGroup from numpydantic import NDArray, Shape from ...hdmf_common.v1_5_0.hdmf_common_table import DynamicTable, VectorData from ...core.v2_3_0.core_nwb_icephys import IntracellularElectrode, SweepTable +from ...core.v2_3_0.core_nwb_epoch import TimeIntervals from ...core.v2_3_0.core_nwb_base import ( NWBData, NWBContainer, @@ -174,19 +174,9 @@ class NWBFile(NWBContainer): ..., description="""Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under 'general'. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.""", ) - intervals: Optional[List[TimeIntervals]] = Field( + intervals: Optional[NWBFileIntervals] = Field( None, description="""Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.""", - json_schema_extra={ - "linkml_meta": { - "any_of": [ - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - ] - } - }, ) units: Optional[Units] = Field(None, description="""Data about sorted spike units.""") @@ -519,6 +509,35 @@ class GeneralIntracellularEphys(ConfiguredBaseModel): ) +class NWBFileIntervals(ConfiguredBaseModel): + """ + Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.file"}) + + name: Literal["intervals"] = Field( + "intervals", + json_schema_extra={ + "linkml_meta": {"equals_string": "intervals", "ifabsent": "string(intervals)"} + }, + ) + epochs: Optional[TimeIntervals] = Field( + None, + description="""Divisions in time marking experimental stages or sub-divisions of a single recording session.""", + ) + trials: Optional[TimeIntervals] = Field( + None, description="""Repeated experimental events that have a logical grouping.""" + ) + invalid_times: Optional[TimeIntervals] = Field( + None, description="""Time intervals that should be removed from analysis.""" + ) + time_intervals: Optional[List[TimeIntervals]] = Field( + None, + description="""Optional additional table(s) for describing other experimental time intervals.""", + ) + + class LabMetaData(NWBContainer): """ Lab-specific meta-data. @@ -577,5 +596,6 @@ GeneralSourceScript.model_rebuild() GeneralExtracellularEphys.model_rebuild() ExtracellularEphysElectrodes.model_rebuild() GeneralIntracellularEphys.model_rebuild() +NWBFileIntervals.model_rebuild() LabMetaData.model_rebuild() Subject.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_icephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_icephys.py index db95e72..2c8abe2 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_icephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_icephys.py @@ -11,6 +11,7 @@ from ...core.v2_3_0.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_3_0.core_nwb_device import Device from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar from pydantic import ( BaseModel, @@ -117,6 +118,15 @@ class PatchClampSeries(TimeSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -164,7 +174,7 @@ class PatchClampSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times"], float]] = Field( + value: Optional[NDArray[Shape["* num_times"], float]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} ) @@ -195,6 +205,15 @@ class CurrentClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -272,6 +291,15 @@ class IZeroClampSeries(CurrentClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -325,6 +353,15 @@ class CurrentClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -417,6 +454,15 @@ class VoltageClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -649,6 +695,15 @@ class VoltageClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -725,6 +780,15 @@ class IntracellularElectrode(NWBContainer): slice: Optional[str] = Field( None, description="""Information about slice used for recording.""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class SweepTable(DynamicTable): @@ -753,7 +817,12 @@ class SweepTable(DynamicTable): ..., description="""Index for series.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_image.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_image.py index 356fc99..fbe685b 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_image.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_image.py @@ -7,6 +7,7 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np +from ...core.v2_3_0.core_nwb_device import Device from numpydantic import NDArray, Shape from ...core.v2_3_0.core_nwb_base import Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync @@ -75,7 +76,7 @@ class GrayscaleImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -98,7 +99,7 @@ class RGBImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -121,7 +122,7 @@ class RGBAImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -159,6 +160,15 @@ class ImageSeries(TimeSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -208,7 +218,7 @@ class ImageSeriesExternalFile(ConfiguredBaseModel): None, description="""Each external image may contain one or more consecutive frames of the full ImageSeries. This attribute serves as an index to indicate which frames each file contains, to faciliate random access. The 'starting_frame' attribute, hence, contains a list of frame numbers within the full ImageSeries of the first frame of each file listed in the parent 'external_file' dataset. Zero-based indexing is used (hence, the first element will always be zero). For example, if the 'external_file' dataset has three paths to files and the first file has 5 frames, the second file has 10 frames, and the third file has 20 frames, then this attribute will have values [0, 5, 15]. If there is a single external file that holds all of the frames of the ImageSeries (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0].""", ) - array: Optional[NDArray[Shape["* num_files"], str]] = Field( + value: Optional[NDArray[Shape["* num_files"], str]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_files"}]}}} ) @@ -223,6 +233,15 @@ class ImageMaskSeries(ImageSeries): ) name: str = Field(...) + masked_imageseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) data: Optional[ Union[ NDArray[Shape["* frame, * x, * y"], float], @@ -242,6 +261,15 @@ class ImageMaskSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -313,6 +341,15 @@ class OpticalSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -360,6 +397,15 @@ class IndexSeries(TimeSeries): description="""Index of the frame in the referenced ImageSeries.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + indexed_timeseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_misc.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_misc.py index 01fcbf8..cbc95a2 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_misc.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_misc.py @@ -167,7 +167,7 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): None, description="""Since there can be different units for different features, store the units in 'feature_units'. The default value for this attribute is \"see 'feature_units'\".""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -287,13 +287,27 @@ class DecompositionSeries(TimeSeries): None, description="""DynamicTableRegion pointer to the channels that this decomposition series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) bands: DecompositionSeriesBands = Field( ..., description="""Table for describing the bands that this series was generated from. There should be one row in this table for each band.""", ) + source_timeseries: Optional[Union[TimeSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "TimeSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -341,7 +355,7 @@ class DecompositionSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( + value: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -432,7 +446,12 @@ class Units(DynamicTable): None, description="""Index into the spike_times dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) spike_times: Optional[UnitsSpikeTimes] = Field( @@ -442,7 +461,12 @@ class Units(DynamicTable): None, description="""Index into the obs_intervals dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) obs_intervals: Optional[NDArray[Shape["* num_intervals, 2 start_end"], float]] = Field( @@ -463,14 +487,24 @@ class Units(DynamicTable): None, description="""Index into electrodes.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrodes: Named[Optional[DynamicTableRegion]] = Field( None, description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrode_group: Optional[List[ElectrodeGroup]] = Field( @@ -501,14 +535,24 @@ class Units(DynamicTable): None, description="""Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) waveforms_index_index: Named[Optional[VectorIndex]] = Field( None, description="""Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -548,7 +592,7 @@ class UnitsSpikeTimes(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_ogen.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_ogen.py index aa52534..aa317fb 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_ogen.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_ogen.py @@ -14,6 +14,7 @@ from ...core.v2_3_0.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_3_0.core_nwb_device import Device metamodel_version = "None" version = "2.3.0" @@ -81,6 +82,15 @@ class OptogeneticSeries(TimeSeries): description="""Applied power for optogenetic stimulus, in watts.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + site: Union[OptogeneticStimulusSite, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "OptogeneticStimulusSite"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -129,6 +139,15 @@ class OptogeneticStimulusSite(NWBContainer): ..., description="""Location of the stimulation site. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) # Model rebuild diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_ophys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_ophys.py index 7de8e48..48ffbff 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_ophys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_ophys.py @@ -21,8 +21,8 @@ from ...hdmf_common.v1_5_0.hdmf_common_table import ( VectorIndex, VectorData, ) +from ...core.v2_3_0.core_nwb_device import Device from numpydantic import NDArray, Shape -from ...core.v2_3_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile from ...core.v2_3_0.core_nwb_base import ( TimeSeriesStartingTime, TimeSeriesSync, @@ -30,6 +30,7 @@ from ...core.v2_3_0.core_nwb_base import ( NWBDataInterface, NWBContainer, ) +from ...core.v2_3_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile metamodel_version = "None" version = "2.3.0" @@ -124,6 +125,15 @@ class TwoPhotonSeries(ImageSeries): NDArray[Shape["2 width_height"], float], NDArray[Shape["3 width_height_depth"], float] ] ] = Field(None, description="""Width, height and depth of image, or imaged area, in meters.""") + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) data: Optional[ Union[ NDArray[Shape["* frame, * x, * y"], float], @@ -143,6 +153,15 @@ class TwoPhotonSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -192,7 +211,12 @@ class RoiResponseSeries(TimeSeries): ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) description: Optional[str] = Field(None, description="""Description of the time series.""") @@ -236,7 +260,7 @@ class DfOverF(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -251,7 +275,7 @@ class Fluorescence(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -266,7 +290,7 @@ class ImageSegmentation(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[PlaneSegmentation]] = Field( + value: Optional[List[PlaneSegmentation]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "PlaneSegmentation"}]}} ) name: str = Field(...) @@ -290,7 +314,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into pixel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( @@ -301,7 +330,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into voxel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( @@ -313,6 +347,15 @@ class PlaneSegmentation(DynamicTable): description="""Image stacks that the segmentation masks apply to.""", json_schema_extra={"linkml_meta": {"any_of": [{"range": "ImageSeries"}]}}, ) + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) colnames: Optional[str] = Field( None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""", @@ -346,7 +389,7 @@ class PlaneSegmentationImageMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -375,7 +418,7 @@ class PlaneSegmentationPixelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -405,7 +448,7 @@ class PlaneSegmentationVoxelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -424,10 +467,117 @@ class ImagingPlane(NWBContainer): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[OpticalChannel]] = Field( - None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "OpticalChannel"}]}} - ) name: str = Field(...) + description: Optional[str] = Field(None, description="""Description of the imaging plane.""") + excitation_lambda: float = Field(..., description="""Excitation wavelength, in nm.""") + imaging_rate: Optional[float] = Field( + None, + description="""Rate that images are acquired, in Hz. If the corresponding TimeSeries is present, the rate should be stored there instead.""", + ) + indicator: str = Field(..., description="""Calcium indicator.""") + location: str = Field( + ..., + description="""Location of the imaging plane. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", + ) + manifold: Optional[ImagingPlaneManifold] = Field( + None, + description="""DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing.""", + ) + origin_coords: Optional[ImagingPlaneOriginCoords] = Field( + None, + description="""Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma).""", + ) + grid_spacing: Optional[ImagingPlaneGridSpacing] = Field( + None, + description="""Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid.""", + ) + reference_frame: Optional[str] = Field( + None, + description="""Describes reference frame of origin_coords and grid_spacing. For example, this can be a text description of the anatomical location and orientation of the grid defined by origin_coords and grid_spacing or the vectors needed to transform or rotate the grid to a common anatomical axis (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and grid_spacing. If origin_coords and grid_spacing are not present, then this field is not required. For example, if the microscope takes 10 x 10 x 2 images, where the first value of the data matrix (index (0, 0, 0)) corresponds to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means more anterior, larger numbers in y means more rightward, and larger numbers in z means more ventral, then enter the following -- origin_coords = (-1.2, -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = \"Origin coordinates are relative to bregma. First dimension corresponds to anterior-posterior axis (larger index = more anterior). Second dimension corresponds to medial-lateral axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral axis (larger index = more ventral).\"""", + ) + optical_channel: List[OpticalChannel] = Field( + ..., description="""An optical channel used to record from an imaging plane.""" + ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) + + +class ImagingPlaneManifold(ConfiguredBaseModel): + """ + DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["manifold"] = Field( + "manifold", + json_schema_extra={ + "linkml_meta": {"equals_string": "manifold", "ifabsent": "string(manifold)"} + }, + ) + conversion: Optional[float] = Field( + None, + description="""Scalar to multiply each element in data to convert it to the specified 'unit'. If the data are stored in acquisition system units or other units that require a conversion to be interpretable, multiply the data by 'conversion' to convert the data to the specified 'unit'. e.g. if the data acquisition system stores values in this object as pixels from x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then the 'conversion' multiplier to get from raw data acquisition pixel units to meters is 2/1000.""", + ) + unit: Optional[str] = Field( + None, + description="""Base unit of measurement for working with the data. The default value is 'meters'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* height, * width, 3 x_y_z"], float], + NDArray[Shape["* height, * width, * depth, 3 x_y_z"], float], + ] + ] = Field(None) + + +class ImagingPlaneOriginCoords(ConfiguredBaseModel): + """ + Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma). + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["origin_coords"] = Field( + "origin_coords", + json_schema_extra={ + "linkml_meta": {"equals_string": "origin_coords", "ifabsent": "string(origin_coords)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for origin_coords. The default value is 'meters'.""" + ) + value: Optional[Union[NDArray[Shape["2 x_y"], float], NDArray[Shape["3 x_y_z"], float]]] = ( + Field(None) + ) + + +class ImagingPlaneGridSpacing(ConfiguredBaseModel): + """ + Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["grid_spacing"] = Field( + "grid_spacing", + json_schema_extra={ + "linkml_meta": {"equals_string": "grid_spacing", "ifabsent": "string(grid_spacing)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for grid_spacing. The default value is 'meters'.""" + ) + value: Optional[Union[NDArray[Shape["2 x_y"], float], NDArray[Shape["3 x_y_z"], float]]] = ( + Field(None) + ) class OpticalChannel(NWBContainer): @@ -453,7 +603,7 @@ class MotionCorrection(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[CorrectedImageStack]] = Field( + value: Optional[List[CorrectedImageStack]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "CorrectedImageStack"}]}} ) name: str = Field(...) @@ -476,6 +626,15 @@ class CorrectedImageStack(NWBDataInterface): ..., description="""Stores the x,y delta necessary to align each frame to the common coordinates, for example, to align each frame to a reference image.""", ) + original: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) # Model rebuild @@ -490,6 +649,9 @@ PlaneSegmentationImageMask.model_rebuild() PlaneSegmentationPixelMask.model_rebuild() PlaneSegmentationVoxelMask.model_rebuild() ImagingPlane.model_rebuild() +ImagingPlaneManifold.model_rebuild() +ImagingPlaneOriginCoords.model_rebuild() +ImagingPlaneGridSpacing.model_rebuild() OpticalChannel.model_rebuild() MotionCorrection.model_rebuild() CorrectedImageStack.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_retinotopy.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_retinotopy.py index 2f9da18..3f2c3c9 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_retinotopy.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/core_nwb_retinotopy.py @@ -135,7 +135,7 @@ class ImagingRetinotopyAxis1PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -167,7 +167,7 @@ class ImagingRetinotopyAxis1PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -199,7 +199,7 @@ class ImagingRetinotopyAxis2PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -231,7 +231,7 @@ class ImagingRetinotopyAxis2PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -268,7 +268,7 @@ class ImagingRetinotopyFocalDepthImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -294,7 +294,7 @@ class ImagingRetinotopySignMap(ConfiguredBaseModel): description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""", ) field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""") - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -330,7 +330,7 @@ class ImagingRetinotopyVasculatureImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/namespace.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/namespace.py index 9669627..fe306d5 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/namespace.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_3_0/namespace.py @@ -59,6 +59,9 @@ from ...core.v2_3_0.core_nwb_ophys import ( PlaneSegmentationPixelMask, PlaneSegmentationVoxelMask, ImagingPlane, + ImagingPlaneManifold, + ImagingPlaneOriginCoords, + ImagingPlaneGridSpacing, OpticalChannel, MotionCorrection, CorrectedImageStack, @@ -141,6 +144,7 @@ from ...core.v2_3_0.core_nwb_file import ( GeneralExtracellularEphys, ExtracellularEphysElectrodes, GeneralIntracellularEphys, + NWBFileIntervals, LabMetaData, Subject, ) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_base.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_base.py index 1dac0d5..38da923 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_base.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_base.py @@ -102,7 +102,7 @@ class TimeSeriesReferenceVectorData(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -126,7 +126,7 @@ class Image(NWBData): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -232,7 +232,7 @@ class TimeSeriesData(ConfiguredBaseModel): None, description="""Optionally describe the continuity of the data. Can be \"continuous\", \"instantaneous\", or \"step\". For example, a voltage trace would be \"continuous\", because samples are recorded from a continuous process. An array of lick times would be \"instantaneous\", because the data represents distinct moments in time. Times of image presentations would be \"step\" because the picture remains the same until the next timepoint. This field is optional, but is useful in providing information about the underlying data. It may inform the way this data is interpreted, the way it is visualized, and what analysis methods are applicable.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], Any], NDArray[Shape["* num_times, * num_dim2"], Any], @@ -284,7 +284,7 @@ class ProcessingModule(NWBContainer): {"from_schema": "core.nwb.base", "tree_root": True} ) - children: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( + value: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( None, json_schema_extra={ "linkml_meta": {"any_of": [{"range": "NWBDataInterface"}, {"range": "DynamicTable"}]} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_behavior.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_behavior.py index 6077059..2d75ba0 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_behavior.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_behavior.py @@ -131,7 +131,7 @@ class SpatialSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. The default value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -148,7 +148,7 @@ class BehavioralEpochs(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[IntervalSeries]] = Field( + value: Optional[List[IntervalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "IntervalSeries"}]}} ) name: str = Field(...) @@ -163,7 +163,7 @@ class BehavioralEvents(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -178,7 +178,7 @@ class BehavioralTimeSeries(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -193,7 +193,7 @@ class PupilTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -208,7 +208,7 @@ class EyeTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -223,7 +223,7 @@ class CompassDirection(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -238,7 +238,7 @@ class Position(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_ecephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_ecephys.py index 978abba..7099d5a 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_ecephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_ecephys.py @@ -16,6 +16,7 @@ from pydantic import ( ValidationInfo, BeforeValidator, ) +from ...core.v2_4_0.core_nwb_device import Device from ...core.v2_4_0.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -120,7 +121,12 @@ class ElectricalSeries(TimeSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -187,7 +193,12 @@ class SpikeEventSeries(ElectricalSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -264,7 +275,12 @@ class FeatureExtraction(NWBDataInterface): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) @@ -295,6 +311,15 @@ class EventDetection(NWBDataInterface): description="""Timestamps of events, in seconds.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_events"}]}}}, ) + source_electricalseries: Union[ElectricalSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ElectricalSeries"}, {"range": "string"}], + } + }, + ) class EventWaveform(NWBDataInterface): @@ -306,7 +331,7 @@ class EventWaveform(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[SpikeEventSeries]] = Field( + value: Optional[List[SpikeEventSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpikeEventSeries"}]}} ) name: str = Field(...) @@ -321,7 +346,7 @@ class FilteredEphys(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -336,7 +361,7 @@ class LFP(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -360,6 +385,15 @@ class ElectrodeGroup(NWBContainer): position: Optional[ElectrodeGroupPosition] = Field( None, description="""stereotaxic or common framework coordinates""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class ElectrodeGroupPosition(ConfiguredBaseModel): @@ -414,6 +448,15 @@ class ClusterWaveforms(NWBDataInterface): } }, ) + clustering_interface: Union[Clustering, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Clustering"}, {"range": "string"}], + } + }, + ) class Clustering(NWBDataInterface): diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_epoch.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_epoch.py index 0cd6107..3a0c3fb 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_epoch.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_epoch.py @@ -127,7 +127,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for tags.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries: Optional[TimeIntervalsTimeseries] = Field( @@ -137,7 +142,12 @@ class TimeIntervals(DynamicTable): None, description="""Index for timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -184,7 +194,7 @@ class TimeIntervalsTimeseries(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_file.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_file.py index 6f128d3..de70d34 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_file.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_file.py @@ -7,7 +7,6 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np -from ...core.v2_4_0.core_nwb_epoch import TimeIntervals from ...core.v2_4_0.core_nwb_misc import Units from ...core.v2_4_0.core_nwb_device import Device from ...core.v2_4_0.core_nwb_ogen import OptogeneticStimulusSite @@ -24,6 +23,7 @@ from ...core.v2_4_0.core_nwb_icephys import ( RepetitionsTable, ExperimentalConditionsTable, ) +from ...core.v2_4_0.core_nwb_epoch import TimeIntervals from ...core.v2_4_0.core_nwb_base import ( NWBData, NWBContainer, @@ -182,19 +182,9 @@ class NWBFile(NWBContainer): ..., description="""Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under 'general'. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.""", ) - intervals: Optional[List[TimeIntervals]] = Field( + intervals: Optional[NWBFileIntervals] = Field( None, description="""Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.""", - json_schema_extra={ - "linkml_meta": { - "any_of": [ - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - ] - } - }, ) units: Optional[Units] = Field(None, description="""Data about sorted spike units.""") @@ -548,6 +538,35 @@ class GeneralIntracellularEphys(ConfiguredBaseModel): ) +class NWBFileIntervals(ConfiguredBaseModel): + """ + Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.file"}) + + name: Literal["intervals"] = Field( + "intervals", + json_schema_extra={ + "linkml_meta": {"equals_string": "intervals", "ifabsent": "string(intervals)"} + }, + ) + epochs: Optional[TimeIntervals] = Field( + None, + description="""Divisions in time marking experimental stages or sub-divisions of a single recording session.""", + ) + trials: Optional[TimeIntervals] = Field( + None, description="""Repeated experimental events that have a logical grouping.""" + ) + invalid_times: Optional[TimeIntervals] = Field( + None, description="""Time intervals that should be removed from analysis.""" + ) + time_intervals: Optional[List[TimeIntervals]] = Field( + None, + description="""Optional additional table(s) for describing other experimental time intervals.""", + ) + + class LabMetaData(NWBContainer): """ Lab-specific meta-data. @@ -606,5 +625,6 @@ GeneralSourceScript.model_rebuild() GeneralExtracellularEphys.model_rebuild() ExtracellularEphysElectrodes.model_rebuild() GeneralIntracellularEphys.model_rebuild() +NWBFileIntervals.model_rebuild() LabMetaData.model_rebuild() Subject.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_icephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_icephys.py index 760097b..8d6b370 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_icephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_icephys.py @@ -5,6 +5,7 @@ from enum import Enum import re import sys import numpy as np +from ...core.v2_4_0.core_nwb_device import Device from ...core.v2_4_0.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -124,6 +125,15 @@ class PatchClampSeries(TimeSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -171,7 +181,7 @@ class PatchClampSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times"], float]] = Field( + value: Optional[NDArray[Shape["* num_times"], float]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} ) @@ -202,6 +212,15 @@ class CurrentClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -279,6 +298,15 @@ class IZeroClampSeries(CurrentClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -332,6 +360,15 @@ class CurrentClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -424,6 +461,15 @@ class VoltageClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -656,6 +702,15 @@ class VoltageClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -732,6 +787,15 @@ class IntracellularElectrode(NWBContainer): slice: Optional[str] = Field( None, description="""Information about slice used for recording.""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class SweepTable(DynamicTable): @@ -760,7 +824,12 @@ class SweepTable(DynamicTable): ..., description="""Index for series.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -827,7 +896,12 @@ class IntracellularStimuliTable(DynamicTable): ..., description="""Column storing the reference to the recorded stimulus for the recording (rows).""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -861,7 +935,12 @@ class IntracellularResponsesTable(DynamicTable): ..., description="""Column storing the reference to the recorded response for the recording (rows)""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -909,7 +988,7 @@ class IntracellularRecordingsTable(AlignedDynamicTable): responses: IntracellularResponsesTable = Field( ..., description="""Table for storing intracellular response related metadata.""" ) - children: Optional[List[DynamicTable]] = Field( + value: Optional[List[DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) colnames: Optional[str] = Field( @@ -952,7 +1031,12 @@ class SimultaneousRecordingsTable(DynamicTable): ..., description="""Index dataset for the recordings column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -992,7 +1076,7 @@ class SimultaneousRecordingsTableRecordings(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -1028,7 +1112,12 @@ class SequentialRecordingsTable(DynamicTable): ..., description="""Index dataset for the simultaneous_recordings column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) stimulus_type: NDArray[Any, str] = Field( @@ -1080,7 +1169,7 @@ class SequentialRecordingsTableSimultaneousRecordings(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -1113,7 +1202,12 @@ class RepetitionsTable(DynamicTable): ..., description="""Index dataset for the sequential_recordings column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -1156,7 +1250,7 @@ class RepetitionsTableSequentialRecordings(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -1191,7 +1285,12 @@ class ExperimentalConditionsTable(DynamicTable): ..., description="""Index dataset for the repetitions column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -1231,7 +1330,7 @@ class ExperimentalConditionsTableRepetitions(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_image.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_image.py index e940464..249545b 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_image.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_image.py @@ -7,6 +7,7 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np +from ...core.v2_4_0.core_nwb_device import Device from numpydantic import NDArray, Shape from ...core.v2_4_0.core_nwb_base import Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync @@ -75,7 +76,7 @@ class GrayscaleImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -98,7 +99,7 @@ class RGBImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -121,7 +122,7 @@ class RGBAImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -159,6 +160,15 @@ class ImageSeries(TimeSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -208,7 +218,7 @@ class ImageSeriesExternalFile(ConfiguredBaseModel): None, description="""Each external image may contain one or more consecutive frames of the full ImageSeries. This attribute serves as an index to indicate which frames each file contains, to faciliate random access. The 'starting_frame' attribute, hence, contains a list of frame numbers within the full ImageSeries of the first frame of each file listed in the parent 'external_file' dataset. Zero-based indexing is used (hence, the first element will always be zero). For example, if the 'external_file' dataset has three paths to files and the first file has 5 frames, the second file has 10 frames, and the third file has 20 frames, then this attribute will have values [0, 5, 15]. If there is a single external file that holds all of the frames of the ImageSeries (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0].""", ) - array: Optional[NDArray[Shape["* num_files"], str]] = Field( + value: Optional[NDArray[Shape["* num_files"], str]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_files"}]}}} ) @@ -223,6 +233,15 @@ class ImageMaskSeries(ImageSeries): ) name: str = Field(...) + masked_imageseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) data: Union[ NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] ] = Field( @@ -242,6 +261,15 @@ class ImageMaskSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -313,6 +341,15 @@ class OpticalSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -360,6 +397,15 @@ class IndexSeries(TimeSeries): description="""Index of the frame in the referenced ImageSeries.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + indexed_timeseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_misc.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_misc.py index 540d30f..804a7c2 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_misc.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_misc.py @@ -167,7 +167,7 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): None, description="""Since there can be different units for different features, store the units in 'feature_units'. The default value for this attribute is \"see 'feature_units'\".""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -287,13 +287,27 @@ class DecompositionSeries(TimeSeries): None, description="""DynamicTableRegion pointer to the channels that this decomposition series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) bands: DecompositionSeriesBands = Field( ..., description="""Table for describing the bands that this series was generated from. There should be one row in this table for each band.""", ) + source_timeseries: Optional[Union[TimeSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "TimeSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -341,7 +355,7 @@ class DecompositionSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( + value: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -432,7 +446,12 @@ class Units(DynamicTable): None, description="""Index into the spike_times dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) spike_times: Optional[UnitsSpikeTimes] = Field( @@ -442,7 +461,12 @@ class Units(DynamicTable): None, description="""Index into the obs_intervals dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) obs_intervals: Optional[NDArray[Shape["* num_intervals, 2 start_end"], float]] = Field( @@ -463,14 +487,24 @@ class Units(DynamicTable): None, description="""Index into electrodes.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrodes: Named[Optional[DynamicTableRegion]] = Field( None, description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrode_group: Optional[List[ElectrodeGroup]] = Field( @@ -501,14 +535,24 @@ class Units(DynamicTable): None, description="""Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) waveforms_index_index: Named[Optional[VectorIndex]] = Field( None, description="""Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -548,7 +592,7 @@ class UnitsSpikeTimes(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_ogen.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_ogen.py index 8c72013..1720289 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_ogen.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_ogen.py @@ -14,6 +14,7 @@ from ...core.v2_4_0.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_4_0.core_nwb_device import Device metamodel_version = "None" version = "2.4.0" @@ -81,6 +82,15 @@ class OptogeneticSeries(TimeSeries): description="""Applied power for optogenetic stimulus, in watts.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + site: Union[OptogeneticStimulusSite, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "OptogeneticStimulusSite"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -129,6 +139,15 @@ class OptogeneticStimulusSite(NWBContainer): ..., description="""Location of the stimulation site. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) # Model rebuild diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_ophys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_ophys.py index 24dd9a9..9fabdb8 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_ophys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_ophys.py @@ -21,8 +21,8 @@ from ...hdmf_common.v1_5_0.hdmf_common_table import ( VectorIndex, VectorData, ) +from ...core.v2_4_0.core_nwb_device import Device from numpydantic import NDArray, Shape -from ...core.v2_4_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile from ...core.v2_4_0.core_nwb_base import ( TimeSeriesStartingTime, TimeSeriesSync, @@ -30,6 +30,7 @@ from ...core.v2_4_0.core_nwb_base import ( NWBDataInterface, NWBContainer, ) +from ...core.v2_4_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile metamodel_version = "None" version = "2.4.0" @@ -124,6 +125,15 @@ class TwoPhotonSeries(ImageSeries): NDArray[Shape["2 width_height"], float], NDArray[Shape["3 width_height_depth"], float] ] ] = Field(None, description="""Width, height and depth of image, or imaged area, in meters.""") + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) data: Union[ NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] ] = Field( @@ -143,6 +153,15 @@ class TwoPhotonSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -192,7 +211,12 @@ class RoiResponseSeries(TimeSeries): ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) description: Optional[str] = Field(None, description="""Description of the time series.""") @@ -236,7 +260,7 @@ class DfOverF(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -251,7 +275,7 @@ class Fluorescence(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -266,7 +290,7 @@ class ImageSegmentation(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[PlaneSegmentation]] = Field( + value: Optional[List[PlaneSegmentation]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "PlaneSegmentation"}]}} ) name: str = Field(...) @@ -290,7 +314,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into pixel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( @@ -301,7 +330,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into voxel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( @@ -313,6 +347,15 @@ class PlaneSegmentation(DynamicTable): description="""Image stacks that the segmentation masks apply to.""", json_schema_extra={"linkml_meta": {"any_of": [{"range": "ImageSeries"}]}}, ) + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) colnames: Optional[str] = Field( None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""", @@ -346,7 +389,7 @@ class PlaneSegmentationImageMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -375,7 +418,7 @@ class PlaneSegmentationPixelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -405,7 +448,7 @@ class PlaneSegmentationVoxelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -424,10 +467,117 @@ class ImagingPlane(NWBContainer): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[OpticalChannel]] = Field( - None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "OpticalChannel"}]}} - ) name: str = Field(...) + description: Optional[str] = Field(None, description="""Description of the imaging plane.""") + excitation_lambda: float = Field(..., description="""Excitation wavelength, in nm.""") + imaging_rate: Optional[float] = Field( + None, + description="""Rate that images are acquired, in Hz. If the corresponding TimeSeries is present, the rate should be stored there instead.""", + ) + indicator: str = Field(..., description="""Calcium indicator.""") + location: str = Field( + ..., + description="""Location of the imaging plane. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", + ) + manifold: Optional[ImagingPlaneManifold] = Field( + None, + description="""DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing.""", + ) + origin_coords: Optional[ImagingPlaneOriginCoords] = Field( + None, + description="""Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma).""", + ) + grid_spacing: Optional[ImagingPlaneGridSpacing] = Field( + None, + description="""Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid.""", + ) + reference_frame: Optional[str] = Field( + None, + description="""Describes reference frame of origin_coords and grid_spacing. For example, this can be a text description of the anatomical location and orientation of the grid defined by origin_coords and grid_spacing or the vectors needed to transform or rotate the grid to a common anatomical axis (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and grid_spacing. If origin_coords and grid_spacing are not present, then this field is not required. For example, if the microscope takes 10 x 10 x 2 images, where the first value of the data matrix (index (0, 0, 0)) corresponds to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means more anterior, larger numbers in y means more rightward, and larger numbers in z means more ventral, then enter the following -- origin_coords = (-1.2, -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = \"Origin coordinates are relative to bregma. First dimension corresponds to anterior-posterior axis (larger index = more anterior). Second dimension corresponds to medial-lateral axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral axis (larger index = more ventral).\"""", + ) + optical_channel: List[OpticalChannel] = Field( + ..., description="""An optical channel used to record from an imaging plane.""" + ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) + + +class ImagingPlaneManifold(ConfiguredBaseModel): + """ + DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["manifold"] = Field( + "manifold", + json_schema_extra={ + "linkml_meta": {"equals_string": "manifold", "ifabsent": "string(manifold)"} + }, + ) + conversion: Optional[float] = Field( + None, + description="""Scalar to multiply each element in data to convert it to the specified 'unit'. If the data are stored in acquisition system units or other units that require a conversion to be interpretable, multiply the data by 'conversion' to convert the data to the specified 'unit'. e.g. if the data acquisition system stores values in this object as pixels from x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then the 'conversion' multiplier to get from raw data acquisition pixel units to meters is 2/1000.""", + ) + unit: Optional[str] = Field( + None, + description="""Base unit of measurement for working with the data. The default value is 'meters'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* height, * width, 3 x_y_z"], float], + NDArray[Shape["* height, * width, * depth, 3 x_y_z"], float], + ] + ] = Field(None) + + +class ImagingPlaneOriginCoords(ConfiguredBaseModel): + """ + Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma). + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["origin_coords"] = Field( + "origin_coords", + json_schema_extra={ + "linkml_meta": {"equals_string": "origin_coords", "ifabsent": "string(origin_coords)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for origin_coords. The default value is 'meters'.""" + ) + value: Optional[Union[NDArray[Shape["2 x_y"], float], NDArray[Shape["3 x_y_z"], float]]] = ( + Field(None) + ) + + +class ImagingPlaneGridSpacing(ConfiguredBaseModel): + """ + Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["grid_spacing"] = Field( + "grid_spacing", + json_schema_extra={ + "linkml_meta": {"equals_string": "grid_spacing", "ifabsent": "string(grid_spacing)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for grid_spacing. The default value is 'meters'.""" + ) + value: Optional[Union[NDArray[Shape["2 x_y"], float], NDArray[Shape["3 x_y_z"], float]]] = ( + Field(None) + ) class OpticalChannel(NWBContainer): @@ -453,7 +603,7 @@ class MotionCorrection(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[CorrectedImageStack]] = Field( + value: Optional[List[CorrectedImageStack]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "CorrectedImageStack"}]}} ) name: str = Field(...) @@ -476,6 +626,15 @@ class CorrectedImageStack(NWBDataInterface): ..., description="""Stores the x,y delta necessary to align each frame to the common coordinates, for example, to align each frame to a reference image.""", ) + original: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) # Model rebuild @@ -490,6 +649,9 @@ PlaneSegmentationImageMask.model_rebuild() PlaneSegmentationPixelMask.model_rebuild() PlaneSegmentationVoxelMask.model_rebuild() ImagingPlane.model_rebuild() +ImagingPlaneManifold.model_rebuild() +ImagingPlaneOriginCoords.model_rebuild() +ImagingPlaneGridSpacing.model_rebuild() OpticalChannel.model_rebuild() MotionCorrection.model_rebuild() CorrectedImageStack.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_retinotopy.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_retinotopy.py index 501665e..f75b79b 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_retinotopy.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/core_nwb_retinotopy.py @@ -135,7 +135,7 @@ class ImagingRetinotopyAxis1PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -167,7 +167,7 @@ class ImagingRetinotopyAxis1PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -199,7 +199,7 @@ class ImagingRetinotopyAxis2PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -231,7 +231,7 @@ class ImagingRetinotopyAxis2PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -268,7 +268,7 @@ class ImagingRetinotopyFocalDepthImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -294,7 +294,7 @@ class ImagingRetinotopySignMap(ConfiguredBaseModel): description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""", ) field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""") - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -330,7 +330,7 @@ class ImagingRetinotopyVasculatureImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/namespace.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/namespace.py index 664e6a7..bc7052a 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/namespace.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_4_0/namespace.py @@ -60,6 +60,9 @@ from ...core.v2_4_0.core_nwb_ophys import ( PlaneSegmentationPixelMask, PlaneSegmentationVoxelMask, ImagingPlane, + ImagingPlaneManifold, + ImagingPlaneOriginCoords, + ImagingPlaneGridSpacing, OpticalChannel, MotionCorrection, CorrectedImageStack, @@ -154,6 +157,7 @@ from ...core.v2_4_0.core_nwb_file import ( GeneralExtracellularEphys, ExtracellularEphysElectrodes, GeneralIntracellularEphys, + NWBFileIntervals, LabMetaData, Subject, ) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_base.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_base.py index 96da748..0f2fc41 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_base.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_base.py @@ -126,7 +126,7 @@ class TimeSeriesReferenceVectorData(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -150,7 +150,7 @@ class Image(NWBData): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -169,8 +169,14 @@ class ImageReferences(NWBData): ) name: str = Field(...) - image: List[Image] = Field( - ..., description="""Ordered dataset of references to Image objects.""" + value: List[Image] = Field( + ..., + description="""Ordered dataset of references to Image objects.""", + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "reference"}} + } + }, ) @@ -275,7 +281,7 @@ class TimeSeriesData(ConfiguredBaseModel): None, description="""Optionally describe the continuity of the data. Can be \"continuous\", \"instantaneous\", or \"step\". For example, a voltage trace would be \"continuous\", because samples are recorded from a continuous process. An array of lick times would be \"instantaneous\", because the data represents distinct moments in time. Times of image presentations would be \"step\" because the picture remains the same until the next timepoint. This field is optional, but is useful in providing information about the underlying data. It may inform the way this data is interpreted, the way it is visualized, and what analysis methods are applicable.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], Any], NDArray[Shape["* num_times, * num_dim2"], Any], @@ -327,7 +333,7 @@ class ProcessingModule(NWBContainer): {"from_schema": "core.nwb.base", "tree_root": True} ) - children: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( + value: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( None, json_schema_extra={ "linkml_meta": {"any_of": [{"range": "NWBDataInterface"}, {"range": "DynamicTable"}]} @@ -354,7 +360,12 @@ class Images(NWBDataInterface): None, description="""Ordered dataset of references to Image objects stored in the parent group. Each Image object in the Images group should be stored once and only once, so the dataset should have the same length as the number of images.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_behavior.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_behavior.py index 246b481..ffe0f14 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_behavior.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_behavior.py @@ -131,7 +131,7 @@ class SpatialSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. The default value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, 1 x"], float], @@ -150,7 +150,7 @@ class BehavioralEpochs(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[IntervalSeries]] = Field( + value: Optional[List[IntervalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "IntervalSeries"}]}} ) name: str = Field(...) @@ -165,7 +165,7 @@ class BehavioralEvents(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -180,7 +180,7 @@ class BehavioralTimeSeries(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -195,7 +195,7 @@ class PupilTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -210,7 +210,7 @@ class EyeTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -225,7 +225,7 @@ class CompassDirection(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -240,7 +240,7 @@ class Position(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_ecephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_ecephys.py index 671682b..997828f 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_ecephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_ecephys.py @@ -16,6 +16,7 @@ from pydantic import ( ValidationInfo, BeforeValidator, ) +from ...core.v2_5_0.core_nwb_device import Device from ...core.v2_5_0.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -120,7 +121,12 @@ class ElectricalSeries(TimeSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -187,7 +193,12 @@ class SpikeEventSeries(ElectricalSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -264,7 +275,12 @@ class FeatureExtraction(NWBDataInterface): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) @@ -295,6 +311,15 @@ class EventDetection(NWBDataInterface): description="""Timestamps of events, in seconds.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_events"}]}}}, ) + source_electricalseries: Union[ElectricalSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ElectricalSeries"}, {"range": "string"}], + } + }, + ) class EventWaveform(NWBDataInterface): @@ -306,7 +331,7 @@ class EventWaveform(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[SpikeEventSeries]] = Field( + value: Optional[List[SpikeEventSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpikeEventSeries"}]}} ) name: str = Field(...) @@ -321,7 +346,7 @@ class FilteredEphys(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -336,7 +361,7 @@ class LFP(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -360,6 +385,15 @@ class ElectrodeGroup(NWBContainer): position: Optional[ElectrodeGroupPosition] = Field( None, description="""stereotaxic or common framework coordinates""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class ElectrodeGroupPosition(ConfiguredBaseModel): @@ -414,6 +448,15 @@ class ClusterWaveforms(NWBDataInterface): } }, ) + clustering_interface: Union[Clustering, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Clustering"}, {"range": "string"}], + } + }, + ) class Clustering(NWBDataInterface): diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_epoch.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_epoch.py index e728288..c399761 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_epoch.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_epoch.py @@ -127,21 +127,36 @@ class TimeIntervals(DynamicTable): None, description="""Index for tags.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries: Named[Optional[TimeSeriesReferenceVectorData]] = Field( None, description="""An index into a TimeSeries object.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries_index: Named[Optional[VectorIndex]] = Field( None, description="""Index for timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_file.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_file.py index 37dfb63..541ba5e 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_file.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_file.py @@ -7,7 +7,6 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np -from ...core.v2_5_0.core_nwb_epoch import TimeIntervals from ...core.v2_5_0.core_nwb_misc import Units from ...core.v2_5_0.core_nwb_device import Device from ...core.v2_5_0.core_nwb_ogen import OptogeneticStimulusSite @@ -24,6 +23,7 @@ from ...core.v2_5_0.core_nwb_icephys import ( RepetitionsTable, ExperimentalConditionsTable, ) +from ...core.v2_5_0.core_nwb_epoch import TimeIntervals from ...core.v2_5_0.core_nwb_base import ( NWBData, NWBContainer, @@ -183,19 +183,9 @@ class NWBFile(NWBContainer): ..., description="""Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under 'general'. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.""", ) - intervals: Optional[List[TimeIntervals]] = Field( + intervals: Optional[NWBFileIntervals] = Field( None, description="""Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.""", - json_schema_extra={ - "linkml_meta": { - "any_of": [ - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - ] - } - }, ) units: Optional[Units] = Field(None, description="""Data about sorted spike units.""") @@ -551,6 +541,35 @@ class GeneralIntracellularEphys(ConfiguredBaseModel): ) +class NWBFileIntervals(ConfiguredBaseModel): + """ + Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.file"}) + + name: Literal["intervals"] = Field( + "intervals", + json_schema_extra={ + "linkml_meta": {"equals_string": "intervals", "ifabsent": "string(intervals)"} + }, + ) + epochs: Optional[TimeIntervals] = Field( + None, + description="""Divisions in time marking experimental stages or sub-divisions of a single recording session.""", + ) + trials: Optional[TimeIntervals] = Field( + None, description="""Repeated experimental events that have a logical grouping.""" + ) + invalid_times: Optional[TimeIntervals] = Field( + None, description="""Time intervals that should be removed from analysis.""" + ) + time_intervals: Optional[List[TimeIntervals]] = Field( + None, + description="""Optional additional table(s) for describing other experimental time intervals.""", + ) + + class LabMetaData(NWBContainer): """ Lab-specific meta-data. @@ -609,5 +628,6 @@ GeneralSourceScript.model_rebuild() GeneralExtracellularEphys.model_rebuild() ExtracellularEphysElectrodes.model_rebuild() GeneralIntracellularEphys.model_rebuild() +NWBFileIntervals.model_rebuild() LabMetaData.model_rebuild() Subject.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_icephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_icephys.py index 1b741f1..b1c9fce 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_icephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_icephys.py @@ -5,6 +5,7 @@ from enum import Enum import re import sys import numpy as np +from ...core.v2_5_0.core_nwb_device import Device from ...core.v2_5_0.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -124,6 +125,15 @@ class PatchClampSeries(TimeSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -171,7 +181,7 @@ class PatchClampSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", ) - array: Optional[NDArray[Shape["* num_times"], float]] = Field( + value: Optional[NDArray[Shape["* num_times"], float]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} ) @@ -202,6 +212,15 @@ class CurrentClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -279,6 +298,15 @@ class IZeroClampSeries(CurrentClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -332,6 +360,15 @@ class CurrentClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -424,6 +461,15 @@ class VoltageClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -656,6 +702,15 @@ class VoltageClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -733,6 +788,15 @@ class IntracellularElectrode(NWBContainer): slice: Optional[str] = Field( None, description="""Information about slice used for recording.""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class SweepTable(DynamicTable): @@ -761,7 +825,12 @@ class SweepTable(DynamicTable): ..., description="""Index for series.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -828,7 +897,12 @@ class IntracellularStimuliTable(DynamicTable): ..., description="""Column storing the reference to the recorded stimulus for the recording (rows).""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -862,7 +936,12 @@ class IntracellularResponsesTable(DynamicTable): ..., description="""Column storing the reference to the recorded response for the recording (rows)""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -910,7 +989,7 @@ class IntracellularRecordingsTable(AlignedDynamicTable): responses: IntracellularResponsesTable = Field( ..., description="""Table for storing intracellular response related metadata.""" ) - children: Optional[List[DynamicTable]] = Field( + value: Optional[List[DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) colnames: Optional[str] = Field( @@ -953,7 +1032,12 @@ class SimultaneousRecordingsTable(DynamicTable): ..., description="""Index dataset for the recordings column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -993,7 +1077,7 @@ class SimultaneousRecordingsTableRecordings(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -1029,7 +1113,12 @@ class SequentialRecordingsTable(DynamicTable): ..., description="""Index dataset for the simultaneous_recordings column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) stimulus_type: NDArray[Any, str] = Field( @@ -1081,7 +1170,7 @@ class SequentialRecordingsTableSimultaneousRecordings(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -1114,7 +1203,12 @@ class RepetitionsTable(DynamicTable): ..., description="""Index dataset for the sequential_recordings column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -1157,7 +1251,7 @@ class RepetitionsTableSequentialRecordings(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -1192,7 +1286,12 @@ class ExperimentalConditionsTable(DynamicTable): ..., description="""Index dataset for the repetitions column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -1232,7 +1331,7 @@ class ExperimentalConditionsTableRepetitions(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_image.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_image.py index 209487e..91baa83 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_image.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_image.py @@ -7,8 +7,15 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np +from ...core.v2_5_0.core_nwb_device import Device from numpydantic import NDArray, Shape -from ...core.v2_5_0.core_nwb_base import Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync +from ...core.v2_5_0.core_nwb_base import ( + Image, + TimeSeries, + TimeSeriesStartingTime, + TimeSeriesSync, + Images, +) metamodel_version = "None" version = "2.5.0" @@ -75,7 +82,7 @@ class GrayscaleImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -98,7 +105,7 @@ class RGBImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -121,7 +128,7 @@ class RGBAImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -159,6 +166,15 @@ class ImageSeries(TimeSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -208,7 +224,7 @@ class ImageSeriesExternalFile(ConfiguredBaseModel): None, description="""Each external image may contain one or more consecutive frames of the full ImageSeries. This attribute serves as an index to indicate which frames each file contains, to faciliate random access. The 'starting_frame' attribute, hence, contains a list of frame numbers within the full ImageSeries of the first frame of each file listed in the parent 'external_file' dataset. Zero-based indexing is used (hence, the first element will always be zero). For example, if the 'external_file' dataset has three paths to files and the first file has 5 frames, the second file has 10 frames, and the third file has 20 frames, then this attribute will have values [0, 5, 15]. If there is a single external file that holds all of the frames of the ImageSeries (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0].""", ) - array: Optional[NDArray[Shape["* num_files"], str]] = Field( + value: Optional[NDArray[Shape["* num_files"], str]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_files"}]}}} ) @@ -223,6 +239,15 @@ class ImageMaskSeries(ImageSeries): ) name: str = Field(...) + masked_imageseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) data: Union[ NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] ] = Field( @@ -242,6 +267,15 @@ class ImageMaskSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -313,6 +347,15 @@ class OpticalSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -360,6 +403,24 @@ class IndexSeries(TimeSeries): description="""Index of the image (using zero-indexing) in the linked Images object.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + indexed_timeseries: Optional[Union[ImageSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) + indexed_images: Optional[Union[Images, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Images"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_misc.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_misc.py index 11d9e44..2ac3d3f 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_misc.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_misc.py @@ -167,7 +167,7 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): None, description="""Since there can be different units for different features, store the units in 'feature_units'. The default value for this attribute is \"see 'feature_units'\".""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -287,13 +287,27 @@ class DecompositionSeries(TimeSeries): None, description="""DynamicTableRegion pointer to the channels that this decomposition series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) bands: DecompositionSeriesBands = Field( ..., description="""Table for describing the bands that this series was generated from. There should be one row in this table for each band.""", ) + source_timeseries: Optional[Union[TimeSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "TimeSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -341,7 +355,7 @@ class DecompositionSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( + value: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -432,7 +446,12 @@ class Units(DynamicTable): None, description="""Index into the spike_times dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) spike_times: Optional[UnitsSpikeTimes] = Field( @@ -442,7 +461,12 @@ class Units(DynamicTable): None, description="""Index into the obs_intervals dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) obs_intervals: Optional[NDArray[Shape["* num_intervals, 2 start_end"], float]] = Field( @@ -463,14 +487,24 @@ class Units(DynamicTable): None, description="""Index into electrodes.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrodes: Named[Optional[DynamicTableRegion]] = Field( None, description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrode_group: Optional[List[ElectrodeGroup]] = Field( @@ -501,14 +535,24 @@ class Units(DynamicTable): None, description="""Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) waveforms_index_index: Named[Optional[VectorIndex]] = Field( None, description="""Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -548,7 +592,7 @@ class UnitsSpikeTimes(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_ogen.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_ogen.py index 88958c0..9ffaa75 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_ogen.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_ogen.py @@ -14,6 +14,7 @@ from ...core.v2_5_0.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_5_0.core_nwb_device import Device metamodel_version = "None" version = "2.5.0" @@ -81,6 +82,15 @@ class OptogeneticSeries(TimeSeries): description="""Applied power for optogenetic stimulus, in watts.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + site: Union[OptogeneticStimulusSite, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "OptogeneticStimulusSite"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -129,6 +139,15 @@ class OptogeneticStimulusSite(NWBContainer): ..., description="""Location of the stimulation site. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) # Model rebuild diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_ophys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_ophys.py index 41b48f1..01c7c0d 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_ophys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_ophys.py @@ -21,8 +21,8 @@ from ...hdmf_common.v1_5_0.hdmf_common_table import ( VectorIndex, VectorData, ) +from ...core.v2_5_0.core_nwb_device import Device from numpydantic import NDArray, Shape -from ...core.v2_5_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile from ...core.v2_5_0.core_nwb_base import ( TimeSeriesStartingTime, TimeSeriesSync, @@ -30,6 +30,7 @@ from ...core.v2_5_0.core_nwb_base import ( NWBDataInterface, NWBContainer, ) +from ...core.v2_5_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile metamodel_version = "None" version = "2.5.0" @@ -124,6 +125,15 @@ class TwoPhotonSeries(ImageSeries): NDArray[Shape["2 width_height"], float], NDArray[Shape["3 width_height_depth"], float] ] ] = Field(None, description="""Width, height and depth of image, or imaged area, in meters.""") + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) data: Union[ NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] ] = Field( @@ -143,6 +153,15 @@ class TwoPhotonSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -192,7 +211,12 @@ class RoiResponseSeries(TimeSeries): ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) description: Optional[str] = Field(None, description="""Description of the time series.""") @@ -236,7 +260,7 @@ class DfOverF(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -251,7 +275,7 @@ class Fluorescence(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -266,7 +290,7 @@ class ImageSegmentation(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[PlaneSegmentation]] = Field( + value: Optional[List[PlaneSegmentation]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "PlaneSegmentation"}]}} ) name: str = Field(...) @@ -290,7 +314,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into pixel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( @@ -301,7 +330,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into voxel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( @@ -313,6 +347,15 @@ class PlaneSegmentation(DynamicTable): description="""Image stacks that the segmentation masks apply to.""", json_schema_extra={"linkml_meta": {"any_of": [{"range": "ImageSeries"}]}}, ) + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) colnames: Optional[str] = Field( None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""", @@ -346,7 +389,7 @@ class PlaneSegmentationImageMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -375,7 +418,7 @@ class PlaneSegmentationPixelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -405,7 +448,7 @@ class PlaneSegmentationVoxelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -424,10 +467,117 @@ class ImagingPlane(NWBContainer): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[OpticalChannel]] = Field( - None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "OpticalChannel"}]}} - ) name: str = Field(...) + description: Optional[str] = Field(None, description="""Description of the imaging plane.""") + excitation_lambda: float = Field(..., description="""Excitation wavelength, in nm.""") + imaging_rate: Optional[float] = Field( + None, + description="""Rate that images are acquired, in Hz. If the corresponding TimeSeries is present, the rate should be stored there instead.""", + ) + indicator: str = Field(..., description="""Calcium indicator.""") + location: str = Field( + ..., + description="""Location of the imaging plane. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", + ) + manifold: Optional[ImagingPlaneManifold] = Field( + None, + description="""DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing.""", + ) + origin_coords: Optional[ImagingPlaneOriginCoords] = Field( + None, + description="""Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma).""", + ) + grid_spacing: Optional[ImagingPlaneGridSpacing] = Field( + None, + description="""Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid.""", + ) + reference_frame: Optional[str] = Field( + None, + description="""Describes reference frame of origin_coords and grid_spacing. For example, this can be a text description of the anatomical location and orientation of the grid defined by origin_coords and grid_spacing or the vectors needed to transform or rotate the grid to a common anatomical axis (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and grid_spacing. If origin_coords and grid_spacing are not present, then this field is not required. For example, if the microscope takes 10 x 10 x 2 images, where the first value of the data matrix (index (0, 0, 0)) corresponds to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means more anterior, larger numbers in y means more rightward, and larger numbers in z means more ventral, then enter the following -- origin_coords = (-1.2, -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = \"Origin coordinates are relative to bregma. First dimension corresponds to anterior-posterior axis (larger index = more anterior). Second dimension corresponds to medial-lateral axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral axis (larger index = more ventral).\"""", + ) + optical_channel: List[OpticalChannel] = Field( + ..., description="""An optical channel used to record from an imaging plane.""" + ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) + + +class ImagingPlaneManifold(ConfiguredBaseModel): + """ + DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["manifold"] = Field( + "manifold", + json_schema_extra={ + "linkml_meta": {"equals_string": "manifold", "ifabsent": "string(manifold)"} + }, + ) + conversion: Optional[float] = Field( + None, + description="""Scalar to multiply each element in data to convert it to the specified 'unit'. If the data are stored in acquisition system units or other units that require a conversion to be interpretable, multiply the data by 'conversion' to convert the data to the specified 'unit'. e.g. if the data acquisition system stores values in this object as pixels from x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then the 'conversion' multiplier to get from raw data acquisition pixel units to meters is 2/1000.""", + ) + unit: Optional[str] = Field( + None, + description="""Base unit of measurement for working with the data. The default value is 'meters'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* height, * width, 3 x_y_z"], float], + NDArray[Shape["* height, * width, * depth, 3 x_y_z"], float], + ] + ] = Field(None) + + +class ImagingPlaneOriginCoords(ConfiguredBaseModel): + """ + Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma). + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["origin_coords"] = Field( + "origin_coords", + json_schema_extra={ + "linkml_meta": {"equals_string": "origin_coords", "ifabsent": "string(origin_coords)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for origin_coords. The default value is 'meters'.""" + ) + value: Optional[Union[NDArray[Shape["2 x_y"], float], NDArray[Shape["3 x_y_z"], float]]] = ( + Field(None) + ) + + +class ImagingPlaneGridSpacing(ConfiguredBaseModel): + """ + Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["grid_spacing"] = Field( + "grid_spacing", + json_schema_extra={ + "linkml_meta": {"equals_string": "grid_spacing", "ifabsent": "string(grid_spacing)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for grid_spacing. The default value is 'meters'.""" + ) + value: Optional[Union[NDArray[Shape["2 x_y"], float], NDArray[Shape["3 x_y_z"], float]]] = ( + Field(None) + ) class OpticalChannel(NWBContainer): @@ -453,7 +603,7 @@ class MotionCorrection(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[CorrectedImageStack]] = Field( + value: Optional[List[CorrectedImageStack]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "CorrectedImageStack"}]}} ) name: str = Field(...) @@ -476,6 +626,15 @@ class CorrectedImageStack(NWBDataInterface): ..., description="""Stores the x,y delta necessary to align each frame to the common coordinates, for example, to align each frame to a reference image.""", ) + original: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) # Model rebuild @@ -490,6 +649,9 @@ PlaneSegmentationImageMask.model_rebuild() PlaneSegmentationPixelMask.model_rebuild() PlaneSegmentationVoxelMask.model_rebuild() ImagingPlane.model_rebuild() +ImagingPlaneManifold.model_rebuild() +ImagingPlaneOriginCoords.model_rebuild() +ImagingPlaneGridSpacing.model_rebuild() OpticalChannel.model_rebuild() MotionCorrection.model_rebuild() CorrectedImageStack.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_retinotopy.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_retinotopy.py index 167c50f..50bbf36 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_retinotopy.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/core_nwb_retinotopy.py @@ -135,7 +135,7 @@ class ImagingRetinotopyAxis1PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -167,7 +167,7 @@ class ImagingRetinotopyAxis1PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -199,7 +199,7 @@ class ImagingRetinotopyAxis2PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -231,7 +231,7 @@ class ImagingRetinotopyAxis2PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -268,7 +268,7 @@ class ImagingRetinotopyFocalDepthImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -294,7 +294,7 @@ class ImagingRetinotopySignMap(ConfiguredBaseModel): description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""", ) field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""") - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -330,7 +330,7 @@ class ImagingRetinotopyVasculatureImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/namespace.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/namespace.py index 092a338..ce0dfe0 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/namespace.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_5_0/namespace.py @@ -61,6 +61,9 @@ from ...core.v2_5_0.core_nwb_ophys import ( PlaneSegmentationPixelMask, PlaneSegmentationVoxelMask, ImagingPlane, + ImagingPlaneManifold, + ImagingPlaneOriginCoords, + ImagingPlaneGridSpacing, OpticalChannel, MotionCorrection, CorrectedImageStack, @@ -155,6 +158,7 @@ from ...core.v2_5_0.core_nwb_file import ( GeneralExtracellularEphys, ExtracellularEphysElectrodes, GeneralIntracellularEphys, + NWBFileIntervals, LabMetaData, Subject, ) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_base.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_base.py index 13a1dcf..8a9ce62 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_base.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_base.py @@ -126,7 +126,7 @@ class TimeSeriesReferenceVectorData(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -150,7 +150,7 @@ class Image(NWBData): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -169,8 +169,14 @@ class ImageReferences(NWBData): ) name: str = Field(...) - image: List[Image] = Field( - ..., description="""Ordered dataset of references to Image objects.""" + value: List[Image] = Field( + ..., + description="""Ordered dataset of references to Image objects.""", + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "reference"}} + } + }, ) @@ -275,7 +281,7 @@ class TimeSeriesData(ConfiguredBaseModel): None, description="""Optionally describe the continuity of the data. Can be \"continuous\", \"instantaneous\", or \"step\". For example, a voltage trace would be \"continuous\", because samples are recorded from a continuous process. An array of lick times would be \"instantaneous\", because the data represents distinct moments in time. Times of image presentations would be \"step\" because the picture remains the same until the next timepoint. This field is optional, but is useful in providing information about the underlying data. It may inform the way this data is interpreted, the way it is visualized, and what analysis methods are applicable.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], Any], NDArray[Shape["* num_times, * num_dim2"], Any], @@ -327,7 +333,7 @@ class ProcessingModule(NWBContainer): {"from_schema": "core.nwb.base", "tree_root": True} ) - children: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( + value: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( None, json_schema_extra={ "linkml_meta": {"any_of": [{"range": "NWBDataInterface"}, {"range": "DynamicTable"}]} @@ -354,7 +360,12 @@ class Images(NWBDataInterface): None, description="""Ordered dataset of references to Image objects stored in the parent group. Each Image object in the Images group should be stored once and only once, so the dataset should have the same length as the number of images.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_behavior.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_behavior.py index d2321dd..e4310c8 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_behavior.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_behavior.py @@ -131,7 +131,7 @@ class SpatialSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. The default value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, 1 x"], float], @@ -150,7 +150,7 @@ class BehavioralEpochs(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[IntervalSeries]] = Field( + value: Optional[List[IntervalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "IntervalSeries"}]}} ) name: str = Field(...) @@ -165,7 +165,7 @@ class BehavioralEvents(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -180,7 +180,7 @@ class BehavioralTimeSeries(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -195,7 +195,7 @@ class PupilTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -210,7 +210,7 @@ class EyeTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -225,7 +225,7 @@ class CompassDirection(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -240,7 +240,7 @@ class Position(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_ecephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_ecephys.py index 694a64f..65b1d87 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_ecephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_ecephys.py @@ -16,6 +16,7 @@ from pydantic import ( ValidationInfo, BeforeValidator, ) +from ...core.v2_6_0_alpha.core_nwb_device import Device from ...core.v2_6_0_alpha.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -120,7 +121,12 @@ class ElectricalSeries(TimeSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -187,7 +193,12 @@ class SpikeEventSeries(ElectricalSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -264,7 +275,12 @@ class FeatureExtraction(NWBDataInterface): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) @@ -295,6 +311,15 @@ class EventDetection(NWBDataInterface): description="""Timestamps of events, in seconds.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_events"}]}}}, ) + source_electricalseries: Union[ElectricalSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ElectricalSeries"}, {"range": "string"}], + } + }, + ) class EventWaveform(NWBDataInterface): @@ -306,7 +331,7 @@ class EventWaveform(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[SpikeEventSeries]] = Field( + value: Optional[List[SpikeEventSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpikeEventSeries"}]}} ) name: str = Field(...) @@ -321,7 +346,7 @@ class FilteredEphys(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -336,7 +361,7 @@ class LFP(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -360,6 +385,15 @@ class ElectrodeGroup(NWBContainer): position: Optional[ElectrodeGroupPosition] = Field( None, description="""stereotaxic or common framework coordinates""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class ElectrodeGroupPosition(ConfiguredBaseModel): @@ -414,6 +448,15 @@ class ClusterWaveforms(NWBDataInterface): } }, ) + clustering_interface: Union[Clustering, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Clustering"}, {"range": "string"}], + } + }, + ) class Clustering(NWBDataInterface): diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_epoch.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_epoch.py index 0073a74..4adcf8b 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_epoch.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_epoch.py @@ -127,21 +127,36 @@ class TimeIntervals(DynamicTable): None, description="""Index for tags.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries: Named[Optional[TimeSeriesReferenceVectorData]] = Field( None, description="""An index into a TimeSeries object.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries_index: Named[Optional[VectorIndex]] = Field( None, description="""Index for timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_file.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_file.py index ce4372c..e1521bd 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_file.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_file.py @@ -7,7 +7,6 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np -from ...core.v2_6_0_alpha.core_nwb_epoch import TimeIntervals from ...core.v2_6_0_alpha.core_nwb_misc import Units from ...core.v2_6_0_alpha.core_nwb_device import Device from ...core.v2_6_0_alpha.core_nwb_ogen import OptogeneticStimulusSite @@ -24,6 +23,7 @@ from ...core.v2_6_0_alpha.core_nwb_icephys import ( RepetitionsTable, ExperimentalConditionsTable, ) +from ...core.v2_6_0_alpha.core_nwb_epoch import TimeIntervals from ...core.v2_6_0_alpha.core_nwb_base import ( NWBData, NWBContainer, @@ -183,19 +183,9 @@ class NWBFile(NWBContainer): ..., description="""Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under 'general'. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.""", ) - intervals: Optional[List[TimeIntervals]] = Field( + intervals: Optional[NWBFileIntervals] = Field( None, description="""Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.""", - json_schema_extra={ - "linkml_meta": { - "any_of": [ - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - ] - } - }, ) units: Optional[Units] = Field(None, description="""Data about sorted spike units.""") @@ -551,6 +541,35 @@ class GeneralIntracellularEphys(ConfiguredBaseModel): ) +class NWBFileIntervals(ConfiguredBaseModel): + """ + Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.file"}) + + name: Literal["intervals"] = Field( + "intervals", + json_schema_extra={ + "linkml_meta": {"equals_string": "intervals", "ifabsent": "string(intervals)"} + }, + ) + epochs: Optional[TimeIntervals] = Field( + None, + description="""Divisions in time marking experimental stages or sub-divisions of a single recording session.""", + ) + trials: Optional[TimeIntervals] = Field( + None, description="""Repeated experimental events that have a logical grouping.""" + ) + invalid_times: Optional[TimeIntervals] = Field( + None, description="""Time intervals that should be removed from analysis.""" + ) + time_intervals: Optional[List[TimeIntervals]] = Field( + None, + description="""Optional additional table(s) for describing other experimental time intervals.""", + ) + + class LabMetaData(NWBContainer): """ Lab-specific meta-data. @@ -627,6 +646,7 @@ GeneralSourceScript.model_rebuild() GeneralExtracellularEphys.model_rebuild() ExtracellularEphysElectrodes.model_rebuild() GeneralIntracellularEphys.model_rebuild() +NWBFileIntervals.model_rebuild() LabMetaData.model_rebuild() Subject.model_rebuild() SubjectAge.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_icephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_icephys.py index c903549..9795c3a 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_icephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_icephys.py @@ -5,6 +5,7 @@ from enum import Enum import re import sys import numpy as np +from ...core.v2_6_0_alpha.core_nwb_device import Device from ...core.v2_6_0_alpha.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -124,6 +125,15 @@ class PatchClampSeries(TimeSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -171,7 +181,7 @@ class PatchClampSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", ) - array: Optional[NDArray[Shape["* num_times"], float]] = Field( + value: Optional[NDArray[Shape["* num_times"], float]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} ) @@ -202,6 +212,15 @@ class CurrentClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -279,6 +298,15 @@ class IZeroClampSeries(CurrentClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -332,6 +360,15 @@ class CurrentClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -424,6 +461,15 @@ class VoltageClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -656,6 +702,15 @@ class VoltageClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -733,6 +788,15 @@ class IntracellularElectrode(NWBContainer): slice: Optional[str] = Field( None, description="""Information about slice used for recording.""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class SweepTable(DynamicTable): @@ -761,7 +825,12 @@ class SweepTable(DynamicTable): ..., description="""Index for series.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -828,7 +897,12 @@ class IntracellularStimuliTable(DynamicTable): ..., description="""Column storing the reference to the recorded stimulus for the recording (rows).""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -862,7 +936,12 @@ class IntracellularResponsesTable(DynamicTable): ..., description="""Column storing the reference to the recorded response for the recording (rows)""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -910,7 +989,7 @@ class IntracellularRecordingsTable(AlignedDynamicTable): responses: IntracellularResponsesTable = Field( ..., description="""Table for storing intracellular response related metadata.""" ) - children: Optional[List[DynamicTable]] = Field( + value: Optional[List[DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) colnames: Optional[str] = Field( @@ -953,7 +1032,12 @@ class SimultaneousRecordingsTable(DynamicTable): ..., description="""Index dataset for the recordings column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -993,7 +1077,7 @@ class SimultaneousRecordingsTableRecordings(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -1029,7 +1113,12 @@ class SequentialRecordingsTable(DynamicTable): ..., description="""Index dataset for the simultaneous_recordings column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) stimulus_type: NDArray[Any, str] = Field( @@ -1081,7 +1170,7 @@ class SequentialRecordingsTableSimultaneousRecordings(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -1114,7 +1203,12 @@ class RepetitionsTable(DynamicTable): ..., description="""Index dataset for the sequential_recordings column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -1157,7 +1251,7 @@ class RepetitionsTableSequentialRecordings(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -1192,7 +1286,12 @@ class ExperimentalConditionsTable(DynamicTable): ..., description="""Index dataset for the repetitions column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -1232,7 +1331,7 @@ class ExperimentalConditionsTableRepetitions(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_image.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_image.py index e69ff14..dd490ec 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_image.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_image.py @@ -7,12 +7,14 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np +from ...core.v2_6_0_alpha.core_nwb_device import Device from numpydantic import NDArray, Shape from ...core.v2_6_0_alpha.core_nwb_base import ( Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync, + Images, ) metamodel_version = "None" @@ -80,7 +82,7 @@ class GrayscaleImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -103,7 +105,7 @@ class RGBImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -126,7 +128,7 @@ class RGBAImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -164,6 +166,15 @@ class ImageSeries(TimeSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -213,7 +224,7 @@ class ImageSeriesExternalFile(ConfiguredBaseModel): None, description="""Each external image may contain one or more consecutive frames of the full ImageSeries. This attribute serves as an index to indicate which frames each file contains, to faciliate random access. The 'starting_frame' attribute, hence, contains a list of frame numbers within the full ImageSeries of the first frame of each file listed in the parent 'external_file' dataset. Zero-based indexing is used (hence, the first element will always be zero). For example, if the 'external_file' dataset has three paths to files and the first file has 5 frames, the second file has 10 frames, and the third file has 20 frames, then this attribute will have values [0, 5, 15]. If there is a single external file that holds all of the frames of the ImageSeries (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0].""", ) - array: Optional[NDArray[Shape["* num_files"], str]] = Field( + value: Optional[NDArray[Shape["* num_files"], str]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_files"}]}}} ) @@ -228,6 +239,15 @@ class ImageMaskSeries(ImageSeries): ) name: str = Field(...) + masked_imageseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) data: Union[ NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] ] = Field( @@ -247,6 +267,15 @@ class ImageMaskSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -318,6 +347,15 @@ class OpticalSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -365,6 +403,24 @@ class IndexSeries(TimeSeries): description="""Index of the image (using zero-indexing) in the linked Images object.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + indexed_timeseries: Optional[Union[ImageSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) + indexed_images: Optional[Union[Images, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Images"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_misc.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_misc.py index 428c0b1..2235224 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_misc.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_misc.py @@ -167,7 +167,7 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): None, description="""Since there can be different units for different features, store the units in 'feature_units'. The default value for this attribute is \"see 'feature_units'\".""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -287,13 +287,27 @@ class DecompositionSeries(TimeSeries): None, description="""DynamicTableRegion pointer to the channels that this decomposition series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) bands: DecompositionSeriesBands = Field( ..., description="""Table for describing the bands that this series was generated from. There should be one row in this table for each band.""", ) + source_timeseries: Optional[Union[TimeSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "TimeSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -341,7 +355,7 @@ class DecompositionSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( + value: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -432,7 +446,12 @@ class Units(DynamicTable): None, description="""Index into the spike_times dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) spike_times: Optional[UnitsSpikeTimes] = Field( @@ -442,7 +461,12 @@ class Units(DynamicTable): None, description="""Index into the obs_intervals dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) obs_intervals: Optional[NDArray[Shape["* num_intervals, 2 start_end"], float]] = Field( @@ -463,14 +487,24 @@ class Units(DynamicTable): None, description="""Index into electrodes.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrodes: Named[Optional[DynamicTableRegion]] = Field( None, description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrode_group: Optional[List[ElectrodeGroup]] = Field( @@ -501,14 +535,24 @@ class Units(DynamicTable): None, description="""Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) waveforms_index_index: Named[Optional[VectorIndex]] = Field( None, description="""Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -548,7 +592,7 @@ class UnitsSpikeTimes(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_ogen.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_ogen.py index 419b1d0..b4db178 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_ogen.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_ogen.py @@ -14,6 +14,7 @@ from ...core.v2_6_0_alpha.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_6_0_alpha.core_nwb_device import Device metamodel_version = "None" version = "2.6.0-alpha" @@ -81,6 +82,15 @@ class OptogeneticSeries(TimeSeries): description="""Applied power for optogenetic stimulus, in watts.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + site: Union[OptogeneticStimulusSite, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "OptogeneticStimulusSite"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -129,6 +139,15 @@ class OptogeneticStimulusSite(NWBContainer): ..., description="""Location of the stimulation site. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) # Model rebuild diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_ophys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_ophys.py index 7693cc6..9e6c34a 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_ophys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_ophys.py @@ -21,8 +21,8 @@ from ...hdmf_common.v1_5_0.hdmf_common_table import ( VectorIndex, VectorData, ) +from ...core.v2_6_0_alpha.core_nwb_device import Device from numpydantic import NDArray, Shape -from ...core.v2_6_0_alpha.core_nwb_image import ImageSeries, ImageSeriesExternalFile from ...core.v2_6_0_alpha.core_nwb_base import ( TimeSeriesStartingTime, TimeSeriesSync, @@ -30,6 +30,7 @@ from ...core.v2_6_0_alpha.core_nwb_base import ( NWBDataInterface, NWBContainer, ) +from ...core.v2_6_0_alpha.core_nwb_image import ImageSeries, ImageSeriesExternalFile metamodel_version = "None" version = "2.6.0-alpha" @@ -129,6 +130,15 @@ class OnePhotonSeries(ImageSeries): intensity: Optional[float] = Field( None, description="""Intensity of the excitation in mW/mm^2, if known.""" ) + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) data: Union[ NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] ] = Field( @@ -148,6 +158,15 @@ class OnePhotonSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -200,6 +219,15 @@ class TwoPhotonSeries(ImageSeries): NDArray[Shape["2 width_height"], float], NDArray[Shape["3 width_height_depth"], float] ] ] = Field(None, description="""Width, height and depth of image, or imaged area, in meters.""") + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) data: Union[ NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] ] = Field( @@ -219,6 +247,15 @@ class TwoPhotonSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -268,7 +305,12 @@ class RoiResponseSeries(TimeSeries): ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) description: Optional[str] = Field(None, description="""Description of the time series.""") @@ -312,7 +354,7 @@ class DfOverF(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -327,7 +369,7 @@ class Fluorescence(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -342,7 +384,7 @@ class ImageSegmentation(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[PlaneSegmentation]] = Field( + value: Optional[List[PlaneSegmentation]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "PlaneSegmentation"}]}} ) name: str = Field(...) @@ -366,7 +408,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into pixel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( @@ -377,7 +424,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into voxel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( @@ -389,6 +441,15 @@ class PlaneSegmentation(DynamicTable): description="""Image stacks that the segmentation masks apply to.""", json_schema_extra={"linkml_meta": {"any_of": [{"range": "ImageSeries"}]}}, ) + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) colnames: Optional[str] = Field( None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""", @@ -422,7 +483,7 @@ class PlaneSegmentationImageMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -451,7 +512,7 @@ class PlaneSegmentationPixelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -481,7 +542,7 @@ class PlaneSegmentationVoxelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -500,10 +561,117 @@ class ImagingPlane(NWBContainer): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[OpticalChannel]] = Field( - None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "OpticalChannel"}]}} - ) name: str = Field(...) + description: Optional[str] = Field(None, description="""Description of the imaging plane.""") + excitation_lambda: float = Field(..., description="""Excitation wavelength, in nm.""") + imaging_rate: Optional[float] = Field( + None, + description="""Rate that images are acquired, in Hz. If the corresponding TimeSeries is present, the rate should be stored there instead.""", + ) + indicator: str = Field(..., description="""Calcium indicator.""") + location: str = Field( + ..., + description="""Location of the imaging plane. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", + ) + manifold: Optional[ImagingPlaneManifold] = Field( + None, + description="""DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing.""", + ) + origin_coords: Optional[ImagingPlaneOriginCoords] = Field( + None, + description="""Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma).""", + ) + grid_spacing: Optional[ImagingPlaneGridSpacing] = Field( + None, + description="""Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid.""", + ) + reference_frame: Optional[str] = Field( + None, + description="""Describes reference frame of origin_coords and grid_spacing. For example, this can be a text description of the anatomical location and orientation of the grid defined by origin_coords and grid_spacing or the vectors needed to transform or rotate the grid to a common anatomical axis (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and grid_spacing. If origin_coords and grid_spacing are not present, then this field is not required. For example, if the microscope takes 10 x 10 x 2 images, where the first value of the data matrix (index (0, 0, 0)) corresponds to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means more anterior, larger numbers in y means more rightward, and larger numbers in z means more ventral, then enter the following -- origin_coords = (-1.2, -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = \"Origin coordinates are relative to bregma. First dimension corresponds to anterior-posterior axis (larger index = more anterior). Second dimension corresponds to medial-lateral axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral axis (larger index = more ventral).\"""", + ) + optical_channel: List[OpticalChannel] = Field( + ..., description="""An optical channel used to record from an imaging plane.""" + ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) + + +class ImagingPlaneManifold(ConfiguredBaseModel): + """ + DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["manifold"] = Field( + "manifold", + json_schema_extra={ + "linkml_meta": {"equals_string": "manifold", "ifabsent": "string(manifold)"} + }, + ) + conversion: Optional[float] = Field( + None, + description="""Scalar to multiply each element in data to convert it to the specified 'unit'. If the data are stored in acquisition system units or other units that require a conversion to be interpretable, multiply the data by 'conversion' to convert the data to the specified 'unit'. e.g. if the data acquisition system stores values in this object as pixels from x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then the 'conversion' multiplier to get from raw data acquisition pixel units to meters is 2/1000.""", + ) + unit: Optional[str] = Field( + None, + description="""Base unit of measurement for working with the data. The default value is 'meters'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* height, * width, 3 x_y_z"], float], + NDArray[Shape["* height, * width, * depth, 3 x_y_z"], float], + ] + ] = Field(None) + + +class ImagingPlaneOriginCoords(ConfiguredBaseModel): + """ + Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma). + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["origin_coords"] = Field( + "origin_coords", + json_schema_extra={ + "linkml_meta": {"equals_string": "origin_coords", "ifabsent": "string(origin_coords)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for origin_coords. The default value is 'meters'.""" + ) + value: Optional[Union[NDArray[Shape["2 x_y"], float], NDArray[Shape["3 x_y_z"], float]]] = ( + Field(None) + ) + + +class ImagingPlaneGridSpacing(ConfiguredBaseModel): + """ + Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["grid_spacing"] = Field( + "grid_spacing", + json_schema_extra={ + "linkml_meta": {"equals_string": "grid_spacing", "ifabsent": "string(grid_spacing)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for grid_spacing. The default value is 'meters'.""" + ) + value: Optional[Union[NDArray[Shape["2 x_y"], float], NDArray[Shape["3 x_y_z"], float]]] = ( + Field(None) + ) class OpticalChannel(NWBContainer): @@ -529,7 +697,7 @@ class MotionCorrection(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[CorrectedImageStack]] = Field( + value: Optional[List[CorrectedImageStack]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "CorrectedImageStack"}]}} ) name: str = Field(...) @@ -552,6 +720,15 @@ class CorrectedImageStack(NWBDataInterface): ..., description="""Stores the x,y delta necessary to align each frame to the common coordinates, for example, to align each frame to a reference image.""", ) + original: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) # Model rebuild @@ -567,6 +744,9 @@ PlaneSegmentationImageMask.model_rebuild() PlaneSegmentationPixelMask.model_rebuild() PlaneSegmentationVoxelMask.model_rebuild() ImagingPlane.model_rebuild() +ImagingPlaneManifold.model_rebuild() +ImagingPlaneOriginCoords.model_rebuild() +ImagingPlaneGridSpacing.model_rebuild() OpticalChannel.model_rebuild() MotionCorrection.model_rebuild() CorrectedImageStack.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_retinotopy.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_retinotopy.py index ce3ae04..9dd7994 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_retinotopy.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/core_nwb_retinotopy.py @@ -135,7 +135,7 @@ class ImagingRetinotopyAxis1PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -167,7 +167,7 @@ class ImagingRetinotopyAxis1PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -199,7 +199,7 @@ class ImagingRetinotopyAxis2PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -231,7 +231,7 @@ class ImagingRetinotopyAxis2PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -268,7 +268,7 @@ class ImagingRetinotopyFocalDepthImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -294,7 +294,7 @@ class ImagingRetinotopySignMap(ConfiguredBaseModel): description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""", ) field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""") - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -330,7 +330,7 @@ class ImagingRetinotopyVasculatureImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/namespace.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/namespace.py index 9a21619..6cb7862 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/namespace.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_6_0_alpha/namespace.py @@ -62,6 +62,9 @@ from ...core.v2_6_0_alpha.core_nwb_ophys import ( PlaneSegmentationPixelMask, PlaneSegmentationVoxelMask, ImagingPlane, + ImagingPlaneManifold, + ImagingPlaneOriginCoords, + ImagingPlaneGridSpacing, OpticalChannel, MotionCorrection, CorrectedImageStack, @@ -156,6 +159,7 @@ from ...core.v2_6_0_alpha.core_nwb_file import ( GeneralExtracellularEphys, ExtracellularEphysElectrodes, GeneralIntracellularEphys, + NWBFileIntervals, LabMetaData, Subject, SubjectAge, diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_base.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_base.py index 745ac40..38c4e21 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_base.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_base.py @@ -126,7 +126,7 @@ class TimeSeriesReferenceVectorData(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -150,7 +150,7 @@ class Image(NWBData): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -169,8 +169,14 @@ class ImageReferences(NWBData): ) name: str = Field(...) - image: List[Image] = Field( - ..., description="""Ordered dataset of references to Image objects.""" + value: List[Image] = Field( + ..., + description="""Ordered dataset of references to Image objects.""", + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "reference"}} + } + }, ) @@ -275,7 +281,7 @@ class TimeSeriesData(ConfiguredBaseModel): None, description="""Optionally describe the continuity of the data. Can be \"continuous\", \"instantaneous\", or \"step\". For example, a voltage trace would be \"continuous\", because samples are recorded from a continuous process. An array of lick times would be \"instantaneous\", because the data represents distinct moments in time. Times of image presentations would be \"step\" because the picture remains the same until the next timepoint. This field is optional, but is useful in providing information about the underlying data. It may inform the way this data is interpreted, the way it is visualized, and what analysis methods are applicable.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], Any], NDArray[Shape["* num_times, * num_dim2"], Any], @@ -327,7 +333,7 @@ class ProcessingModule(NWBContainer): {"from_schema": "core.nwb.base", "tree_root": True} ) - children: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( + value: Optional[List[Union[DynamicTable, NWBDataInterface]]] = Field( None, json_schema_extra={ "linkml_meta": {"any_of": [{"range": "NWBDataInterface"}, {"range": "DynamicTable"}]} @@ -354,7 +360,12 @@ class Images(NWBDataInterface): None, description="""Ordered dataset of references to Image objects stored in the parent group. Each Image object in the Images group should be stored once and only once, so the dataset should have the same length as the number of images.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_behavior.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_behavior.py index 304d675..f1ea1a0 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_behavior.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_behavior.py @@ -131,7 +131,7 @@ class SpatialSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. The default value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, 1 x"], float], @@ -150,7 +150,7 @@ class BehavioralEpochs(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[IntervalSeries]] = Field( + value: Optional[List[IntervalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "IntervalSeries"}]}} ) name: str = Field(...) @@ -165,7 +165,7 @@ class BehavioralEvents(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -180,7 +180,7 @@ class BehavioralTimeSeries(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -195,7 +195,7 @@ class PupilTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[TimeSeries]] = Field( + value: Optional[List[TimeSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "TimeSeries"}]}} ) name: str = Field(...) @@ -210,7 +210,7 @@ class EyeTracking(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -225,7 +225,7 @@ class CompassDirection(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) @@ -240,7 +240,7 @@ class Position(NWBDataInterface): {"from_schema": "core.nwb.behavior", "tree_root": True} ) - children: Optional[List[SpatialSeries]] = Field( + value: Optional[List[SpatialSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpatialSeries"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_ecephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_ecephys.py index 4b32f60..2a92c91 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_ecephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_ecephys.py @@ -16,6 +16,7 @@ from pydantic import ( ValidationInfo, BeforeValidator, ) +from ...core.v2_7_0.core_nwb_device import Device from ...core.v2_7_0.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -120,7 +121,12 @@ class ElectricalSeries(TimeSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -187,7 +193,12 @@ class SpikeEventSeries(ElectricalSeries): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( @@ -264,7 +275,12 @@ class FeatureExtraction(NWBDataInterface): ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) @@ -295,6 +311,15 @@ class EventDetection(NWBDataInterface): description="""Timestamps of events, in seconds.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_events"}]}}}, ) + source_electricalseries: Union[ElectricalSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ElectricalSeries"}, {"range": "string"}], + } + }, + ) class EventWaveform(NWBDataInterface): @@ -306,7 +331,7 @@ class EventWaveform(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[SpikeEventSeries]] = Field( + value: Optional[List[SpikeEventSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "SpikeEventSeries"}]}} ) name: str = Field(...) @@ -321,7 +346,7 @@ class FilteredEphys(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -336,7 +361,7 @@ class LFP(NWBDataInterface): {"from_schema": "core.nwb.ecephys", "tree_root": True} ) - children: Optional[List[ElectricalSeries]] = Field( + value: Optional[List[ElectricalSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "ElectricalSeries"}]}} ) name: str = Field(...) @@ -360,6 +385,15 @@ class ElectrodeGroup(NWBContainer): position: Optional[ElectrodeGroupPosition] = Field( None, description="""stereotaxic or common framework coordinates""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class ElectrodeGroupPosition(ConfiguredBaseModel): @@ -414,6 +448,15 @@ class ClusterWaveforms(NWBDataInterface): } }, ) + clustering_interface: Union[Clustering, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Clustering"}, {"range": "string"}], + } + }, + ) class Clustering(NWBDataInterface): diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_epoch.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_epoch.py index a715324..44cc59e 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_epoch.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_epoch.py @@ -127,21 +127,36 @@ class TimeIntervals(DynamicTable): None, description="""Index for tags.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries: Named[Optional[TimeSeriesReferenceVectorData]] = Field( None, description="""An index into a TimeSeries object.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) timeseries_index: Named[Optional[VectorIndex]] = Field( None, description="""Index for timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_file.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_file.py index 0e7d234..5d2c034 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_file.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_file.py @@ -7,7 +7,6 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np -from ...core.v2_7_0.core_nwb_epoch import TimeIntervals from ...core.v2_7_0.core_nwb_misc import Units from ...core.v2_7_0.core_nwb_device import Device from ...core.v2_7_0.core_nwb_ogen import OptogeneticStimulusSite @@ -24,6 +23,7 @@ from ...core.v2_7_0.core_nwb_icephys import ( RepetitionsTable, ExperimentalConditionsTable, ) +from ...core.v2_7_0.core_nwb_epoch import TimeIntervals from ...core.v2_7_0.core_nwb_base import ( NWBData, NWBContainer, @@ -183,19 +183,9 @@ class NWBFile(NWBContainer): ..., description="""Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under 'general'. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.""", ) - intervals: Optional[List[TimeIntervals]] = Field( + intervals: Optional[NWBFileIntervals] = Field( None, description="""Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.""", - json_schema_extra={ - "linkml_meta": { - "any_of": [ - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - {"range": "TimeIntervals"}, - ] - } - }, ) units: Optional[Units] = Field(None, description="""Data about sorted spike units.""") @@ -559,6 +549,35 @@ class GeneralIntracellularEphys(ConfiguredBaseModel): ) +class NWBFileIntervals(ConfiguredBaseModel): + """ + Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.file"}) + + name: Literal["intervals"] = Field( + "intervals", + json_schema_extra={ + "linkml_meta": {"equals_string": "intervals", "ifabsent": "string(intervals)"} + }, + ) + epochs: Optional[TimeIntervals] = Field( + None, + description="""Divisions in time marking experimental stages or sub-divisions of a single recording session.""", + ) + trials: Optional[TimeIntervals] = Field( + None, description="""Repeated experimental events that have a logical grouping.""" + ) + invalid_times: Optional[TimeIntervals] = Field( + None, description="""Time intervals that should be removed from analysis.""" + ) + time_intervals: Optional[List[TimeIntervals]] = Field( + None, + description="""Optional additional table(s) for describing other experimental time intervals.""", + ) + + class LabMetaData(NWBContainer): """ Lab-specific meta-data. @@ -635,6 +654,7 @@ GeneralSourceScript.model_rebuild() GeneralExtracellularEphys.model_rebuild() ExtracellularEphysElectrodes.model_rebuild() GeneralIntracellularEphys.model_rebuild() +NWBFileIntervals.model_rebuild() LabMetaData.model_rebuild() Subject.model_rebuild() SubjectAge.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_icephys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_icephys.py index b84a7f0..23a0ff2 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_icephys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_icephys.py @@ -5,6 +5,7 @@ from enum import Enum import re import sys import numpy as np +from ...core.v2_7_0.core_nwb_device import Device from ...core.v2_7_0.core_nwb_base import ( TimeSeries, TimeSeriesStartingTime, @@ -124,6 +125,15 @@ class PatchClampSeries(TimeSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -171,7 +181,7 @@ class PatchClampSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", ) - array: Optional[NDArray[Shape["* num_times"], float]] = Field( + value: Optional[NDArray[Shape["* num_times"], float]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} ) @@ -202,6 +212,15 @@ class CurrentClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -279,6 +298,15 @@ class IZeroClampSeries(CurrentClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -332,6 +360,15 @@ class CurrentClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -424,6 +461,15 @@ class VoltageClampSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -656,6 +702,15 @@ class VoltageClampStimulusSeries(PatchClampSeries): None, description="""Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp).""", ) + electrode: Union[IntracellularElectrode, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "IntracellularElectrode"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -733,6 +788,15 @@ class IntracellularElectrode(NWBContainer): slice: Optional[str] = Field( None, description="""Information about slice used for recording.""" ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) class SweepTable(DynamicTable): @@ -761,7 +825,12 @@ class SweepTable(DynamicTable): ..., description="""Index for series.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -828,14 +897,24 @@ class IntracellularStimuliTable(DynamicTable): ..., description="""Column storing the reference to the recorded stimulus for the recording (rows).""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) stimulus_template: Named[Optional[TimeSeriesReferenceVectorData]] = Field( None, description="""Column storing the reference to the stimulus template for the recording (rows).""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -869,7 +948,12 @@ class IntracellularResponsesTable(DynamicTable): ..., description="""Column storing the reference to the recorded response for the recording (rows)""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -917,7 +1001,7 @@ class IntracellularRecordingsTable(AlignedDynamicTable): responses: IntracellularResponsesTable = Field( ..., description="""Table for storing intracellular response related metadata.""" ) - children: Optional[List[DynamicTable]] = Field( + value: Optional[List[DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) colnames: Optional[str] = Field( @@ -960,7 +1044,12 @@ class SimultaneousRecordingsTable(DynamicTable): ..., description="""Index dataset for the recordings column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -1000,7 +1089,7 @@ class SimultaneousRecordingsTableRecordings(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -1036,7 +1125,12 @@ class SequentialRecordingsTable(DynamicTable): ..., description="""Index dataset for the simultaneous_recordings column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) stimulus_type: NDArray[Any, str] = Field( @@ -1088,7 +1182,7 @@ class SequentialRecordingsTableSimultaneousRecordings(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -1121,7 +1215,12 @@ class RepetitionsTable(DynamicTable): ..., description="""Index dataset for the sequential_recordings column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -1164,7 +1263,7 @@ class RepetitionsTableSequentialRecordings(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -1199,7 +1298,12 @@ class ExperimentalConditionsTable(DynamicTable): ..., description="""Index dataset for the repetitions column.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -1239,7 +1343,7 @@ class ExperimentalConditionsTableRepetitions(DynamicTableRegion): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_image.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_image.py index 9fff36e..e43675b 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_image.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_image.py @@ -7,8 +7,15 @@ import sys from typing import Any, ClassVar, List, Literal, Dict, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator import numpy as np +from ...core.v2_7_0.core_nwb_device import Device from numpydantic import NDArray, Shape -from ...core.v2_7_0.core_nwb_base import Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync +from ...core.v2_7_0.core_nwb_base import ( + Image, + TimeSeries, + TimeSeriesStartingTime, + TimeSeriesSync, + Images, +) metamodel_version = "None" version = "2.7.0" @@ -75,7 +82,7 @@ class GrayscaleImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -98,7 +105,7 @@ class RGBImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -121,7 +128,7 @@ class RGBAImage(Image): None, description="""Pixel resolution of the image, in pixels per centimeter.""" ) description: Optional[str] = Field(None, description="""Description of the image.""") - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 r_g_b"], float], @@ -159,6 +166,15 @@ class ImageSeries(TimeSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -208,7 +224,7 @@ class ImageSeriesExternalFile(ConfiguredBaseModel): None, description="""Each external image may contain one or more consecutive frames of the full ImageSeries. This attribute serves as an index to indicate which frames each file contains, to facilitate random access. The 'starting_frame' attribute, hence, contains a list of frame numbers within the full ImageSeries of the first frame of each file listed in the parent 'external_file' dataset. Zero-based indexing is used (hence, the first element will always be zero). For example, if the 'external_file' dataset has three paths to files and the first file has 5 frames, the second file has 10 frames, and the third file has 20 frames, then this attribute will have values [0, 5, 15]. If there is a single external file that holds all of the frames of the ImageSeries (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0].""", ) - array: Optional[NDArray[Shape["* num_files"], str]] = Field( + value: Optional[NDArray[Shape["* num_files"], str]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_files"}]}}} ) @@ -223,6 +239,15 @@ class ImageMaskSeries(ImageSeries): ) name: str = Field(...) + masked_imageseries: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) data: Union[ NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] ] = Field( @@ -242,6 +267,15 @@ class ImageMaskSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -313,6 +347,15 @@ class OpticalSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -360,6 +403,24 @@ class IndexSeries(TimeSeries): description="""Index of the image (using zero-indexing) in the linked Images object.""", json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, ) + indexed_timeseries: Optional[Union[ImageSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) + indexed_images: Optional[Union[Images, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Images"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_misc.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_misc.py index 7d8bcb2..c4b1c2e 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_misc.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_misc.py @@ -167,7 +167,7 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): None, description="""Since there can be different units for different features, store the units in 'feature_units'. The default value for this attribute is \"see 'feature_units'\".""", ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_features"], float], @@ -287,13 +287,27 @@ class DecompositionSeries(TimeSeries): None, description="""DynamicTableRegion pointer to the channels that this decomposition series was generated from.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) bands: DecompositionSeriesBands = Field( ..., description="""Table for describing the bands that this series was generated from. There should be one row in this table for each band.""", ) + source_timeseries: Optional[Union[TimeSeries, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "TimeSeries"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -341,7 +355,7 @@ class DecompositionSeriesData(ConfiguredBaseModel): None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", ) - array: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( + value: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], float]] = Field( None, json_schema_extra={ "linkml_meta": { @@ -432,7 +446,12 @@ class Units(DynamicTable): None, description="""Index into the spike_times dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) spike_times: Optional[UnitsSpikeTimes] = Field( @@ -442,7 +461,12 @@ class Units(DynamicTable): None, description="""Index into the obs_intervals dataset.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) obs_intervals: Optional[NDArray[Shape["* num_intervals, 2 start_end"], float]] = Field( @@ -463,14 +487,24 @@ class Units(DynamicTable): None, description="""Index into electrodes.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrodes: Named[Optional[DynamicTableRegion]] = Field( None, description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) electrode_group: Optional[List[ElectrodeGroup]] = Field( @@ -501,14 +535,24 @@ class Units(DynamicTable): None, description="""Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) waveforms_index_index: Named[Optional[VectorIndex]] = Field( None, description="""Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) colnames: Optional[str] = Field( @@ -548,7 +592,7 @@ class UnitsSpikeTimes(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_ogen.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_ogen.py index 4e0da1a..e575a80 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_ogen.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_ogen.py @@ -14,6 +14,7 @@ from ...core.v2_7_0.core_nwb_base import ( TimeSeriesSync, NWBContainer, ) +from ...core.v2_7_0.core_nwb_device import Device metamodel_version = "None" version = "2.7.0" @@ -82,6 +83,15 @@ class OptogeneticSeries(TimeSeries): ..., description="""Applied power for optogenetic stimulus, in watts. Shape can be 1D or 2D. 2D data is meant to be used in an extension of OptogeneticSeries that defines what the second dimension represents.""", ) + site: Union[OptogeneticStimulusSite, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "OptogeneticStimulusSite"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -130,6 +140,15 @@ class OptogeneticStimulusSite(NWBContainer): ..., description="""Location of the stimulation site. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) # Model rebuild diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_ophys.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_ophys.py index 789a327..daeed24 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_ophys.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_ophys.py @@ -21,8 +21,8 @@ from ...hdmf_common.v1_8_0.hdmf_common_table import ( VectorIndex, VectorData, ) +from ...core.v2_7_0.core_nwb_device import Device from numpydantic import NDArray, Shape -from ...core.v2_7_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile from ...core.v2_7_0.core_nwb_base import ( TimeSeriesStartingTime, TimeSeriesSync, @@ -30,6 +30,7 @@ from ...core.v2_7_0.core_nwb_base import ( NWBDataInterface, NWBContainer, ) +from ...core.v2_7_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile metamodel_version = "None" version = "2.7.0" @@ -129,6 +130,15 @@ class OnePhotonSeries(ImageSeries): intensity: Optional[float] = Field( None, description="""Intensity of the excitation in mW/mm^2, if known.""" ) + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) data: Union[ NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] ] = Field( @@ -148,6 +158,15 @@ class OnePhotonSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -200,6 +219,15 @@ class TwoPhotonSeries(ImageSeries): NDArray[Shape["2 width_height"], float], NDArray[Shape["3 width_height_depth"], float] ] ] = Field(None, description="""Width, height and depth of image, or imaged area, in meters.""") + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) data: Union[ NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] ] = Field( @@ -219,6 +247,15 @@ class TwoPhotonSeries(ImageSeries): None, description="""Format of image. If this is 'external', then the attribute 'external_file' contains the path information to the image files. If this is 'raw', then the raw (single-channel) binary data is stored in the 'data' dataset. If this attribute is not present, then the default format='raw' case is assumed.""", ) + device: Optional[Union[Device, str]] = Field( + None, + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) description: Optional[str] = Field(None, description="""Description of the time series.""") comments: Optional[str] = Field( None, @@ -268,7 +305,12 @@ class RoiResponseSeries(TimeSeries): ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) description: Optional[str] = Field(None, description="""Description of the time series.""") @@ -312,7 +354,7 @@ class DfOverF(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -327,7 +369,7 @@ class Fluorescence(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[RoiResponseSeries]] = Field( + value: Optional[List[RoiResponseSeries]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "RoiResponseSeries"}]}} ) name: str = Field(...) @@ -342,7 +384,7 @@ class ImageSegmentation(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[PlaneSegmentation]] = Field( + value: Optional[List[PlaneSegmentation]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "PlaneSegmentation"}]}} ) name: str = Field(...) @@ -366,7 +408,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into pixel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( @@ -377,7 +424,12 @@ class PlaneSegmentation(DynamicTable): None, description="""Index into voxel_mask.""", json_schema_extra={ - "linkml_meta": {"annotations": {"named": {"tag": "named", "value": True}}} + "linkml_meta": { + "annotations": { + "named": {"tag": "named", "value": True}, + "source_type": {"tag": "source_type", "value": "neurodata_type_inc"}, + } + } }, ) voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( @@ -389,6 +441,15 @@ class PlaneSegmentation(DynamicTable): description="""Image stacks that the segmentation masks apply to.""", json_schema_extra={"linkml_meta": {"any_of": [{"range": "ImageSeries"}]}}, ) + imaging_plane: Union[ImagingPlane, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImagingPlane"}, {"range": "string"}], + } + }, + ) colnames: Optional[str] = Field( None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""", @@ -422,7 +483,7 @@ class PlaneSegmentationImageMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -451,7 +512,7 @@ class PlaneSegmentationPixelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -481,7 +542,7 @@ class PlaneSegmentationVoxelMask(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -500,10 +561,117 @@ class ImagingPlane(NWBContainer): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[OpticalChannel]] = Field( - None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "OpticalChannel"}]}} - ) name: str = Field(...) + description: Optional[str] = Field(None, description="""Description of the imaging plane.""") + excitation_lambda: float = Field(..., description="""Excitation wavelength, in nm.""") + imaging_rate: Optional[float] = Field( + None, + description="""Rate that images are acquired, in Hz. If the corresponding TimeSeries is present, the rate should be stored there instead.""", + ) + indicator: str = Field(..., description="""Calcium indicator.""") + location: str = Field( + ..., + description="""Location of the imaging plane. Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.""", + ) + manifold: Optional[ImagingPlaneManifold] = Field( + None, + description="""DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing.""", + ) + origin_coords: Optional[ImagingPlaneOriginCoords] = Field( + None, + description="""Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma).""", + ) + grid_spacing: Optional[ImagingPlaneGridSpacing] = Field( + None, + description="""Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid.""", + ) + reference_frame: Optional[str] = Field( + None, + description="""Describes reference frame of origin_coords and grid_spacing. For example, this can be a text description of the anatomical location and orientation of the grid defined by origin_coords and grid_spacing or the vectors needed to transform or rotate the grid to a common anatomical axis (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and grid_spacing. If origin_coords and grid_spacing are not present, then this field is not required. For example, if the microscope takes 10 x 10 x 2 images, where the first value of the data matrix (index (0, 0, 0)) corresponds to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means more anterior, larger numbers in y means more rightward, and larger numbers in z means more ventral, then enter the following -- origin_coords = (-1.2, -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = \"Origin coordinates are relative to bregma. First dimension corresponds to anterior-posterior axis (larger index = more anterior). Second dimension corresponds to medial-lateral axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral axis (larger index = more ventral).\"""", + ) + optical_channel: List[OpticalChannel] = Field( + ..., description="""An optical channel used to record from an imaging plane.""" + ) + device: Union[Device, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "Device"}, {"range": "string"}], + } + }, + ) + + +class ImagingPlaneManifold(ConfiguredBaseModel): + """ + DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["manifold"] = Field( + "manifold", + json_schema_extra={ + "linkml_meta": {"equals_string": "manifold", "ifabsent": "string(manifold)"} + }, + ) + conversion: Optional[float] = Field( + None, + description="""Scalar to multiply each element in data to convert it to the specified 'unit'. If the data are stored in acquisition system units or other units that require a conversion to be interpretable, multiply the data by 'conversion' to convert the data to the specified 'unit'. e.g. if the data acquisition system stores values in this object as pixels from x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then the 'conversion' multiplier to get from raw data acquisition pixel units to meters is 2/1000.""", + ) + unit: Optional[str] = Field( + None, + description="""Base unit of measurement for working with the data. The default value is 'meters'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* height, * width, 3 x_y_z"], float], + NDArray[Shape["* height, * width, * depth, 3 x_y_z"], float], + ] + ] = Field(None) + + +class ImagingPlaneOriginCoords(ConfiguredBaseModel): + """ + Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma). + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["origin_coords"] = Field( + "origin_coords", + json_schema_extra={ + "linkml_meta": {"equals_string": "origin_coords", "ifabsent": "string(origin_coords)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for origin_coords. The default value is 'meters'.""" + ) + value: Optional[Union[NDArray[Shape["2 x_y"], float], NDArray[Shape["3 x_y_z"], float]]] = ( + Field(None) + ) + + +class ImagingPlaneGridSpacing(ConfiguredBaseModel): + """ + Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["grid_spacing"] = Field( + "grid_spacing", + json_schema_extra={ + "linkml_meta": {"equals_string": "grid_spacing", "ifabsent": "string(grid_spacing)"} + }, + ) + unit: Optional[str] = Field( + None, description="""Measurement units for grid_spacing. The default value is 'meters'.""" + ) + value: Optional[Union[NDArray[Shape["2 x_y"], float], NDArray[Shape["3 x_y_z"], float]]] = ( + Field(None) + ) class OpticalChannel(NWBContainer): @@ -529,7 +697,7 @@ class MotionCorrection(NWBDataInterface): {"from_schema": "core.nwb.ophys", "tree_root": True} ) - children: Optional[List[CorrectedImageStack]] = Field( + value: Optional[List[CorrectedImageStack]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "CorrectedImageStack"}]}} ) name: str = Field(...) @@ -552,6 +720,15 @@ class CorrectedImageStack(NWBDataInterface): ..., description="""Stores the x,y delta necessary to align each frame to the common coordinates, for example, to align each frame to a reference image.""", ) + original: Union[ImageSeries, str] = Field( + ..., + json_schema_extra={ + "linkml_meta": { + "annotations": {"source_type": {"tag": "source_type", "value": "link"}}, + "any_of": [{"range": "ImageSeries"}, {"range": "string"}], + } + }, + ) # Model rebuild @@ -567,6 +744,9 @@ PlaneSegmentationImageMask.model_rebuild() PlaneSegmentationPixelMask.model_rebuild() PlaneSegmentationVoxelMask.model_rebuild() ImagingPlane.model_rebuild() +ImagingPlaneManifold.model_rebuild() +ImagingPlaneOriginCoords.model_rebuild() +ImagingPlaneGridSpacing.model_rebuild() OpticalChannel.model_rebuild() MotionCorrection.model_rebuild() CorrectedImageStack.model_rebuild() diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_retinotopy.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_retinotopy.py index 402cc40..40c1f40 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_retinotopy.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/core_nwb_retinotopy.py @@ -135,7 +135,7 @@ class ImagingRetinotopyAxis1PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -167,7 +167,7 @@ class ImagingRetinotopyAxis1PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -199,7 +199,7 @@ class ImagingRetinotopyAxis2PhaseMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -231,7 +231,7 @@ class ImagingRetinotopyAxis2PowerMap(ConfiguredBaseModel): unit: Optional[str] = Field( None, description="""Unit that axis data is stored in (e.g., degrees).""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -268,7 +268,7 @@ class ImagingRetinotopyFocalDepthImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -294,7 +294,7 @@ class ImagingRetinotopySignMap(ConfiguredBaseModel): description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""", ) field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""") - array: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], float]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} @@ -330,7 +330,7 @@ class ImagingRetinotopyVasculatureImage(ConfiguredBaseModel): format: Optional[str] = Field( None, description="""Format of image. Right now only 'raw' is supported.""" ) - array: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( + value: Optional[NDArray[Shape["* num_rows, * num_cols"], int]] = Field( None, json_schema_extra={ "linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}, {"alias": "num_cols"}]}} diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/namespace.py b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/namespace.py index 80b7f5e..4f98b35 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/namespace.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/core/v2_7_0/namespace.py @@ -63,6 +63,9 @@ from ...core.v2_7_0.core_nwb_ophys import ( PlaneSegmentationPixelMask, PlaneSegmentationVoxelMask, ImagingPlane, + ImagingPlaneManifold, + ImagingPlaneOriginCoords, + ImagingPlaneGridSpacing, OpticalChannel, MotionCorrection, CorrectedImageStack, @@ -157,6 +160,7 @@ from ...core.v2_7_0.core_nwb_file import ( GeneralExtracellularEphys, ExtracellularEphysElectrodes, GeneralIntracellularEphys, + NWBFileIntervals, LabMetaData, Subject, SubjectAge, diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_1_3/hdmf_common_table.py b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_1_3/hdmf_common_table.py index dbca48c..7ca0724 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_1_3/hdmf_common_table.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_1_3/hdmf_common_table.py @@ -332,7 +332,7 @@ class VectorData(VectorDataMixin): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -355,7 +355,7 @@ class VectorIndex(VectorIndexMixin): target: Optional[VectorData] = Field( None, description="""Reference to the target dataset that this index applies to.""" ) - array: Optional[NDArray[Shape["* num_rows"], Any]] = Field( + value: Optional[NDArray[Shape["* num_rows"], Any]] = Field( None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_rows"}]}}} ) @@ -390,7 +390,7 @@ class DynamicTableRegion(VectorData): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_5_0/hdmf_common_base.py b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_5_0/hdmf_common_base.py index 078665b..29c6ea2 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_5_0/hdmf_common_base.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_5_0/hdmf_common_base.py @@ -91,7 +91,7 @@ class SimpleMultiContainer(Container): {"from_schema": "hdmf-common.base", "tree_root": True} ) - children: Optional[List[Container]] = Field( + value: Optional[List[Container]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "Container"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_5_0/hdmf_common_table.py b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_5_0/hdmf_common_table.py index 9dbabc2..7df7183 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_5_0/hdmf_common_table.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_5_0/hdmf_common_table.py @@ -306,7 +306,7 @@ class VectorData(VectorDataMixin): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -332,7 +332,7 @@ class VectorIndex(VectorIndexMixin): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -372,7 +372,7 @@ class DynamicTableRegion(VectorData): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -418,7 +418,7 @@ class AlignedDynamicTable(DynamicTable): {"from_schema": "hdmf-common.table", "tree_root": True} ) - children: Optional[List[DynamicTable]] = Field( + value: Optional[List[DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_8_0/hdmf_common_base.py b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_8_0/hdmf_common_base.py index 93ec4a2..f125a10 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_8_0/hdmf_common_base.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_8_0/hdmf_common_base.py @@ -91,7 +91,7 @@ class SimpleMultiContainer(Container): {"from_schema": "hdmf-common.base", "tree_root": True} ) - children: Optional[List[Container]] = Field( + value: Optional[List[Container]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "Container"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_8_0/hdmf_common_table.py b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_8_0/hdmf_common_table.py index e9ce91d..e168269 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_8_0/hdmf_common_table.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_common/v1_8_0/hdmf_common_table.py @@ -306,7 +306,7 @@ class VectorData(VectorDataMixin): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -332,7 +332,7 @@ class VectorIndex(VectorIndexMixin): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -372,7 +372,7 @@ class DynamicTableRegion(VectorData): description: Optional[str] = Field( None, description="""Description of what this table region points to.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], @@ -418,7 +418,7 @@ class AlignedDynamicTable(DynamicTable): {"from_schema": "hdmf-common.table", "tree_root": True} ) - children: Optional[List[DynamicTable]] = Field( + value: Optional[List[DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) name: str = Field(...) diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_experimental/v0_1_0/hdmf_experimental_experimental.py b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_experimental/v0_1_0/hdmf_experimental_experimental.py index 065f135..135f2a3 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_experimental/v0_1_0/hdmf_experimental_experimental.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_experimental/v0_1_0/hdmf_experimental_experimental.py @@ -78,7 +78,7 @@ class EnumData(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_experimental/v0_5_0/hdmf_experimental_experimental.py b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_experimental/v0_5_0/hdmf_experimental_experimental.py index 13d77f3..a7e6936 100644 --- a/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_experimental/v0_5_0/hdmf_experimental_experimental.py +++ b/nwb_linkml/src/nwb_linkml/models/pydantic/hdmf_experimental/v0_5_0/hdmf_experimental_experimental.py @@ -78,7 +78,7 @@ class EnumData(VectorData): description: Optional[str] = Field( None, description="""Description of what these vectors represent.""" ) - array: Optional[ + value: Optional[ Union[ NDArray[Shape["* dim0"], Any], NDArray[Shape["* dim0, * dim1"], Any], diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.base.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.base.yaml index 11d5b6f..b2eebf1 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.base.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.base.yaml @@ -42,8 +42,8 @@ classes: name: description description: Description of the image. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -202,8 +202,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -268,8 +268,8 @@ classes: description: A collection of processed data. is_a: NWBContainer attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.behavior.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.behavior.yaml index f9539be..4e5ffa0 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.behavior.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.behavior.yaml @@ -62,8 +62,8 @@ classes: value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -89,8 +89,8 @@ classes: events. BehavioralTimeSeries is for continuous data. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -103,8 +103,8 @@ classes: for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -117,8 +117,8 @@ classes: of BehavioralEpochs for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -130,8 +130,8 @@ classes: description: Eye-tracking data, representing pupil size. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -143,8 +143,8 @@ classes: description: Eye-tracking data, representing direction of gaze. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -160,8 +160,8 @@ classes: be radians or degrees. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -173,8 +173,8 @@ classes: description: Position data, whether along the x, x/y or x/y/z axis. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.ecephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.ecephys.yaml index 758cec8..5af96b3 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.ecephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.ecephys.yaml @@ -52,6 +52,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -167,6 +170,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -211,6 +217,17 @@ classes: range: float64 required: true multivalued: false + source_electricalseries: + name: source_electricalseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ElectricalSeries + - range: string tree_root: true EventWaveform: name: EventWaveform @@ -219,8 +236,8 @@ classes: during experiment acquisition. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -242,8 +259,8 @@ classes: the ElectricalSeries. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -257,8 +274,8 @@ classes: properties should be noted in the ElectricalSeries description or comments field. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -290,6 +307,17 @@ classes: range: ElectrodeGroup__position required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ElectrodeGroup__position: name: ElectrodeGroup__position @@ -364,6 +392,17 @@ classes: range: float32 required: true multivalued: false + clustering_interface: + name: clustering_interface + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Clustering + - range: string tree_root: true Clustering: name: Clustering diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.epoch.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.epoch.yaml index bc5be75..924f069 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.epoch.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.epoch.yaml @@ -57,6 +57,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for tags. range: VectorIndex required: false @@ -73,6 +76,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for timeseries. range: VectorIndex required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.file.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.file.yaml index cad0645..3dd86fc 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.file.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.file.yaml @@ -192,14 +192,9 @@ classes: having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. - multivalued: true - inlined: true - inlined_as_list: false - any_of: - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals + range: NWBFile__intervals + required: false + multivalued: false units: name: units description: Data about sorted spike units. @@ -683,3 +678,41 @@ classes: range: SweepTable required: false multivalued: false + NWBFile__intervals: + name: NWBFile__intervals + description: Experimental intervals, whether that be logically distinct sub-experiments + having a particular scientific goal, trials (see trials subgroup) during an + experiment, or epochs (see epochs subgroup) deriving from analysis of data. + attributes: + name: + name: name + ifabsent: string(intervals) + range: string + required: true + equals_string: intervals + epochs: + name: epochs + description: Divisions in time marking experimental stages or sub-divisions + of a single recording session. + range: TimeIntervals + required: false + multivalued: false + trials: + name: trials + description: Repeated experimental events that have a logical grouping. + range: TimeIntervals + required: false + multivalued: false + invalid_times: + name: invalid_times + description: Time intervals that should be removed from analysis. + range: TimeIntervals + required: false + multivalued: false + time_intervals: + name: time_intervals + description: Optional additional table(s) for describing other experimental + time intervals. + range: TimeIntervals + required: false + multivalued: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.icephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.icephys.yaml index 6dde850..d12f7e1 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.icephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.icephys.yaml @@ -46,6 +46,17 @@ classes: range: float32 required: false multivalued: false + electrode: + name: electrode + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: IntracellularElectrode + - range: string tree_root: true PatchClampSeries__data: name: PatchClampSeries__data @@ -63,8 +74,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -492,6 +503,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true SweepTable: name: SweepTable @@ -523,6 +545,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for series. range: VectorIndex required: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.image.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.image.yaml index 4cab9c4..271f77d 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.image.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.image.yaml @@ -132,8 +132,8 @@ classes: (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0]. range: int32 - array: - name: array + value: + name: value array: dimensions: - alias: num_files @@ -151,6 +151,17 @@ classes: name: name range: string required: true + masked_imageseries: + name: masked_imageseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true OpticalSeries: name: OpticalSeries @@ -217,4 +228,15 @@ classes: range: int32 required: true multivalued: false + indexed_timeseries: + name: indexed_timeseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.misc.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.misc.yaml index e0b5dea..92edf08 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.misc.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.misc.yaml @@ -73,8 +73,8 @@ classes: the units in 'feature_units'. The default value for this attribute is "see 'feature_units'". range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -159,6 +159,17 @@ classes: range: DecompositionSeries__bands required: true multivalued: false + source_timeseries: + name: source_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: TimeSeries + - range: string tree_root: true DecompositionSeries__data: name: DecompositionSeries__data @@ -176,8 +187,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -252,6 +263,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the spike_times dataset. range: VectorIndex required: false @@ -268,6 +282,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the obs_intervals dataset. range: VectorIndex required: false @@ -289,6 +306,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into electrodes. range: VectorIndex required: false @@ -299,6 +319,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.ogen.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.ogen.yaml index 0ee27d7..4f62a54 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.ogen.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.ogen.yaml @@ -32,6 +32,17 @@ classes: range: numeric required: true multivalued: false + site: + name: site + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: OptogeneticStimulusSite + - range: string tree_root: true OptogeneticStimulusSite: name: OptogeneticStimulusSite @@ -62,4 +73,15 @@ classes: range: text required: true multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.ophys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.ophys.yaml index ca16020..d44aaa2 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.ophys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.ophys.yaml @@ -50,6 +50,17 @@ classes: dimensions: - alias: width_height exact_cardinality: 3 + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true RoiResponseSeries: name: RoiResponseSeries @@ -81,6 +92,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries. range: DynamicTableRegion @@ -94,8 +108,8 @@ classes: for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -109,8 +123,8 @@ classes: for ROIs and for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -128,8 +142,8 @@ classes: is required and ROI names should remain consistent between them. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -229,6 +243,17 @@ classes: range: OpticalChannel required: true multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ImagingPlane__manifold: name: ImagingPlane__manifold @@ -258,8 +283,8 @@ classes: description: Base unit of measurement for working with the data. The default value is 'meters'. range: text - array: - name: array + value: + name: value range: float32 any_of: - array: @@ -291,8 +316,8 @@ classes: name: unit description: Measurement units for origin_coords. The default value is 'meters'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: x_y @@ -316,8 +341,8 @@ classes: name: unit description: Measurement units for grid_spacing. The default value is 'meters'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: x_y @@ -353,8 +378,8 @@ classes: frame at each point in time is assumed to be 2-D (has only x & y dimensions).' is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.retinotopy.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.retinotopy.yaml index 900025d..f3a06cd 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.retinotopy.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_0/core.nwb.retinotopy.yaml @@ -32,8 +32,8 @@ classes: name: field_of_view description: Size of viewing area, in meters. range: float32 - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -54,8 +54,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -112,6 +112,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Phase response to stimulus on the first measured axis. range: AxisMap required: true @@ -122,6 +125,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Power response on the first measured axis. Response is scaled so 0.0 is no power in the response and 1.0 is maximum relative power. range: AxisMap @@ -133,6 +139,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Phase response to stimulus on the second measured axis. range: AxisMap required: true @@ -143,6 +152,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Power response to stimulus on the second measured axis. range: AxisMap required: false @@ -153,6 +165,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Sine of the angle between the direction of the gradient in axis_1 and axis_2. range: RetinotopyMap @@ -183,6 +198,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: 'Gray-scale anatomical image of cortical surface. Array structure: [rows][columns]' range: RetinotopyImage diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.base.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.base.yaml index 0b809d9..234bbc7 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.base.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.base.yaml @@ -42,8 +42,8 @@ classes: name: description description: Description of the image. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -202,8 +202,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -268,8 +268,8 @@ classes: description: A collection of processed data. is_a: NWBContainer attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.behavior.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.behavior.yaml index 1b5ce9c..03ba313 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.behavior.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.behavior.yaml @@ -62,8 +62,8 @@ classes: value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -89,8 +89,8 @@ classes: events. BehavioralTimeSeries is for continuous data. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -103,8 +103,8 @@ classes: for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -117,8 +117,8 @@ classes: of BehavioralEpochs for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -130,8 +130,8 @@ classes: description: Eye-tracking data, representing pupil size. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -143,8 +143,8 @@ classes: description: Eye-tracking data, representing direction of gaze. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -160,8 +160,8 @@ classes: be radians or degrees. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -173,8 +173,8 @@ classes: description: Position data, whether along the x, x/y or x/y/z axis. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.ecephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.ecephys.yaml index 280381d..2226676 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.ecephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.ecephys.yaml @@ -52,6 +52,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -167,6 +170,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -211,6 +217,17 @@ classes: range: float64 required: true multivalued: false + source_electricalseries: + name: source_electricalseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ElectricalSeries + - range: string tree_root: true EventWaveform: name: EventWaveform @@ -219,8 +236,8 @@ classes: during experiment acquisition. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -242,8 +259,8 @@ classes: the ElectricalSeries. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -257,8 +274,8 @@ classes: properties should be noted in the ElectricalSeries description or comments field. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -290,6 +307,17 @@ classes: range: ElectrodeGroup__position required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ElectrodeGroup__position: name: ElectrodeGroup__position @@ -364,6 +392,17 @@ classes: range: float32 required: true multivalued: false + clustering_interface: + name: clustering_interface + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Clustering + - range: string tree_root: true Clustering: name: Clustering diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.epoch.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.epoch.yaml index 2b2093c..1f086dc 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.epoch.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.epoch.yaml @@ -57,6 +57,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for tags. range: VectorIndex required: false @@ -73,6 +76,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for timeseries. range: VectorIndex required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.file.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.file.yaml index 8506a84..504a763 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.file.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.file.yaml @@ -192,14 +192,9 @@ classes: having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. - multivalued: true - inlined: true - inlined_as_list: false - any_of: - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals + range: NWBFile__intervals + required: false + multivalued: false units: name: units description: Data about sorted spike units. @@ -683,3 +678,41 @@ classes: range: SweepTable required: false multivalued: false + NWBFile__intervals: + name: NWBFile__intervals + description: Experimental intervals, whether that be logically distinct sub-experiments + having a particular scientific goal, trials (see trials subgroup) during an + experiment, or epochs (see epochs subgroup) deriving from analysis of data. + attributes: + name: + name: name + ifabsent: string(intervals) + range: string + required: true + equals_string: intervals + epochs: + name: epochs + description: Divisions in time marking experimental stages or sub-divisions + of a single recording session. + range: TimeIntervals + required: false + multivalued: false + trials: + name: trials + description: Repeated experimental events that have a logical grouping. + range: TimeIntervals + required: false + multivalued: false + invalid_times: + name: invalid_times + description: Time intervals that should be removed from analysis. + range: TimeIntervals + required: false + multivalued: false + time_intervals: + name: time_intervals + description: Optional additional table(s) for describing other experimental + time intervals. + range: TimeIntervals + required: false + multivalued: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.icephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.icephys.yaml index ab4153b..42fa48f 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.icephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.icephys.yaml @@ -46,6 +46,17 @@ classes: range: float32 required: false multivalued: false + electrode: + name: electrode + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: IntracellularElectrode + - range: string tree_root: true PatchClampSeries__data: name: PatchClampSeries__data @@ -63,8 +74,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -492,6 +503,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true SweepTable: name: SweepTable @@ -523,6 +545,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for series. range: VectorIndex required: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.image.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.image.yaml index 495afe3..c74d614 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.image.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.image.yaml @@ -132,8 +132,8 @@ classes: (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0]. range: int32 - array: - name: array + value: + name: value array: dimensions: - alias: num_files @@ -151,6 +151,17 @@ classes: name: name range: string required: true + masked_imageseries: + name: masked_imageseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true OpticalSeries: name: OpticalSeries @@ -217,4 +228,15 @@ classes: range: int32 required: true multivalued: false + indexed_timeseries: + name: indexed_timeseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.misc.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.misc.yaml index 758c683..82a8100 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.misc.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.misc.yaml @@ -73,8 +73,8 @@ classes: the units in 'feature_units'. The default value for this attribute is "see 'feature_units'". range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -159,6 +159,17 @@ classes: range: DecompositionSeries__bands required: true multivalued: false + source_timeseries: + name: source_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: TimeSeries + - range: string tree_root: true DecompositionSeries__data: name: DecompositionSeries__data @@ -176,8 +187,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -252,6 +263,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the spike_times dataset. range: VectorIndex required: false @@ -268,6 +282,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the obs_intervals dataset. range: VectorIndex required: false @@ -289,6 +306,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into electrodes. range: VectorIndex required: false @@ -299,6 +319,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.ogen.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.ogen.yaml index 2ffb3ae..61e640c 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.ogen.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.ogen.yaml @@ -32,6 +32,17 @@ classes: range: numeric required: true multivalued: false + site: + name: site + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: OptogeneticStimulusSite + - range: string tree_root: true OptogeneticStimulusSite: name: OptogeneticStimulusSite @@ -62,4 +73,15 @@ classes: range: text required: true multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.ophys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.ophys.yaml index cea4194..d5e6b39 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.ophys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.ophys.yaml @@ -50,6 +50,17 @@ classes: dimensions: - alias: width_height exact_cardinality: 3 + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true RoiResponseSeries: name: RoiResponseSeries @@ -81,6 +92,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries. range: DynamicTableRegion @@ -94,8 +108,8 @@ classes: for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -109,8 +123,8 @@ classes: for ROIs and for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -128,8 +142,8 @@ classes: is required and ROI names should remain consistent between them. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -229,6 +243,17 @@ classes: range: OpticalChannel required: true multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ImagingPlane__manifold: name: ImagingPlane__manifold @@ -258,8 +283,8 @@ classes: description: Base unit of measurement for working with the data. The default value is 'meters'. range: text - array: - name: array + value: + name: value range: float32 any_of: - array: @@ -291,8 +316,8 @@ classes: name: unit description: Measurement units for origin_coords. The default value is 'meters'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: x_y @@ -316,8 +341,8 @@ classes: name: unit description: Measurement units for grid_spacing. The default value is 'meters'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: x_y @@ -353,8 +378,8 @@ classes: frame at each point in time is assumed to be 2-D (has only x & y dimensions).' is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.retinotopy.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.retinotopy.yaml index bb1ba70..5a552ed 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.retinotopy.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_1/core.nwb.retinotopy.yaml @@ -32,8 +32,8 @@ classes: name: field_of_view description: Size of viewing area, in meters. range: float32 - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -54,8 +54,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -112,6 +112,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Phase response to stimulus on the first measured axis. range: AxisMap required: true @@ -122,6 +125,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Power response on the first measured axis. Response is scaled so 0.0 is no power in the response and 1.0 is maximum relative power. range: AxisMap @@ -133,6 +139,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Phase response to stimulus on the second measured axis. range: AxisMap required: true @@ -143,6 +152,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Power response to stimulus on the second measured axis. range: AxisMap required: false @@ -153,6 +165,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Sine of the angle between the direction of the gradient in axis_1 and axis_2. range: RetinotopyMap @@ -183,6 +198,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: 'Gray-scale anatomical image of cortical surface. Array structure: [rows][columns]' range: RetinotopyImage diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.base.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.base.yaml index 5ba1d46..bf4ee39 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.base.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.base.yaml @@ -42,8 +42,8 @@ classes: name: description description: Description of the image. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -202,8 +202,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -268,8 +268,8 @@ classes: description: A collection of processed data. is_a: NWBContainer attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.behavior.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.behavior.yaml index b644d87..11f271b 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.behavior.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.behavior.yaml @@ -62,8 +62,8 @@ classes: value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -89,8 +89,8 @@ classes: events. BehavioralTimeSeries is for continuous data. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -103,8 +103,8 @@ classes: for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -117,8 +117,8 @@ classes: of BehavioralEpochs for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -130,8 +130,8 @@ classes: description: Eye-tracking data, representing pupil size. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -143,8 +143,8 @@ classes: description: Eye-tracking data, representing direction of gaze. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -160,8 +160,8 @@ classes: be radians or degrees. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -173,8 +173,8 @@ classes: description: Position data, whether along the x, x/y or x/y/z axis. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.ecephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.ecephys.yaml index c96af97..83d97ad 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.ecephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.ecephys.yaml @@ -52,6 +52,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -167,6 +170,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -211,6 +217,17 @@ classes: range: float64 required: true multivalued: false + source_electricalseries: + name: source_electricalseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ElectricalSeries + - range: string tree_root: true EventWaveform: name: EventWaveform @@ -219,8 +236,8 @@ classes: during experiment acquisition. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -242,8 +259,8 @@ classes: the ElectricalSeries. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -257,8 +274,8 @@ classes: properties should be noted in the ElectricalSeries description or comments field. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -290,6 +307,17 @@ classes: range: ElectrodeGroup__position required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ElectrodeGroup__position: name: ElectrodeGroup__position @@ -364,6 +392,17 @@ classes: range: float32 required: true multivalued: false + clustering_interface: + name: clustering_interface + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Clustering + - range: string tree_root: true Clustering: name: Clustering diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.epoch.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.epoch.yaml index 47fa3e4..18c60a6 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.epoch.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.epoch.yaml @@ -57,6 +57,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for tags. range: VectorIndex required: false @@ -73,6 +76,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for timeseries. range: VectorIndex required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.file.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.file.yaml index 4d2c3f8..3a250d5 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.file.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.file.yaml @@ -192,14 +192,9 @@ classes: having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. - multivalued: true - inlined: true - inlined_as_list: false - any_of: - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals + range: NWBFile__intervals + required: false + multivalued: false units: name: units description: Data about sorted spike units. @@ -683,3 +678,41 @@ classes: range: SweepTable required: false multivalued: false + NWBFile__intervals: + name: NWBFile__intervals + description: Experimental intervals, whether that be logically distinct sub-experiments + having a particular scientific goal, trials (see trials subgroup) during an + experiment, or epochs (see epochs subgroup) deriving from analysis of data. + attributes: + name: + name: name + ifabsent: string(intervals) + range: string + required: true + equals_string: intervals + epochs: + name: epochs + description: Divisions in time marking experimental stages or sub-divisions + of a single recording session. + range: TimeIntervals + required: false + multivalued: false + trials: + name: trials + description: Repeated experimental events that have a logical grouping. + range: TimeIntervals + required: false + multivalued: false + invalid_times: + name: invalid_times + description: Time intervals that should be removed from analysis. + range: TimeIntervals + required: false + multivalued: false + time_intervals: + name: time_intervals + description: Optional additional table(s) for describing other experimental + time intervals. + range: TimeIntervals + required: false + multivalued: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.icephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.icephys.yaml index fb1361c..756714c 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.icephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.icephys.yaml @@ -46,6 +46,17 @@ classes: range: float32 required: false multivalued: false + electrode: + name: electrode + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: IntracellularElectrode + - range: string tree_root: true PatchClampSeries__data: name: PatchClampSeries__data @@ -63,8 +74,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -492,6 +503,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true SweepTable: name: SweepTable @@ -523,6 +545,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for series. range: VectorIndex required: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.image.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.image.yaml index 71cf395..7cb22bc 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.image.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.image.yaml @@ -132,8 +132,8 @@ classes: (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0]. range: int32 - array: - name: array + value: + name: value array: dimensions: - alias: num_files @@ -151,6 +151,17 @@ classes: name: name range: string required: true + masked_imageseries: + name: masked_imageseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true OpticalSeries: name: OpticalSeries @@ -236,4 +247,15 @@ classes: range: int32 required: true multivalued: false + indexed_timeseries: + name: indexed_timeseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.misc.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.misc.yaml index 9f47099..79c8173 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.misc.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.misc.yaml @@ -73,8 +73,8 @@ classes: the units in 'feature_units'. The default value for this attribute is "see 'feature_units'". range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -159,6 +159,17 @@ classes: range: DecompositionSeries__bands required: true multivalued: false + source_timeseries: + name: source_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: TimeSeries + - range: string tree_root: true DecompositionSeries__data: name: DecompositionSeries__data @@ -176,8 +187,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -252,6 +263,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the spike_times dataset. range: VectorIndex required: false @@ -268,6 +282,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the obs_intervals dataset. range: VectorIndex required: false @@ -289,6 +306,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into electrodes. range: VectorIndex required: false @@ -299,6 +319,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.ogen.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.ogen.yaml index 08cb277..f281783 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.ogen.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.ogen.yaml @@ -32,6 +32,17 @@ classes: range: numeric required: true multivalued: false + site: + name: site + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: OptogeneticStimulusSite + - range: string tree_root: true OptogeneticStimulusSite: name: OptogeneticStimulusSite @@ -62,4 +73,15 @@ classes: range: text required: true multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.ophys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.ophys.yaml index 3eafce0..727c05e 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.ophys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.ophys.yaml @@ -50,6 +50,17 @@ classes: dimensions: - alias: width_height exact_cardinality: 3 + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true RoiResponseSeries: name: RoiResponseSeries @@ -81,6 +92,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries. range: DynamicTableRegion @@ -94,8 +108,8 @@ classes: for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -109,8 +123,8 @@ classes: for ROIs and for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -128,8 +142,8 @@ classes: is required and ROI names should remain consistent between them. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -141,14 +155,222 @@ classes: description: An imaging plane and its metadata. is_a: NWBContainer attributes: - children: - name: children + name: + name: name + range: string + required: true + description: + name: description + description: Description of the imaging plane. + range: text + required: false + multivalued: false + excitation_lambda: + name: excitation_lambda + description: Excitation wavelength, in nm. + range: float32 + required: true + multivalued: false + imaging_rate: + name: imaging_rate + description: Rate that images are acquired, in Hz. + range: float32 + required: true + multivalued: false + indicator: + name: indicator + description: Calcium indicator. + range: text + required: true + multivalued: false + location: + name: location + description: Location of the imaging plane. Specify the area, layer, comments + on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use + standard atlas names for anatomical regions when possible. + range: text + required: true + multivalued: false + manifold: + name: manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents + the position of the pixel relative to the defined coordinate space. Deprecated + in favor of origin_coords and grid_spacing. + range: ImagingPlane__manifold + required: false + multivalued: false + origin_coords: + name: origin_coords + description: Physical location of the first element of the imaging plane (0, + 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for + what the physical location is relative to (e.g., bregma). + range: ImagingPlane__origin_coords + required: false + multivalued: false + grid_spacing: + name: grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also + reference_frame to interpret the grid. + range: ImagingPlane__grid_spacing + required: false + multivalued: false + reference_frame: + name: reference_frame + description: Describes reference frame of origin_coords and grid_spacing. + For example, this can be a text description of the anatomical location and + orientation of the grid defined by origin_coords and grid_spacing or the + vectors needed to transform or rotate the grid to a common anatomical axis + (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and + grid_spacing. If origin_coords and grid_spacing are not present, then this + field is not required. For example, if the microscope takes 10 x 10 x 2 + images, where the first value of the data matrix (index (0, 0, 0)) corresponds + to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is + 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means + more anterior, larger numbers in y means more rightward, and larger numbers + in z means more ventral, then enter the following -- origin_coords = (-1.2, + -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = "Origin coordinates + are relative to bregma. First dimension corresponds to anterior-posterior + axis (larger index = more anterior). Second dimension corresponds to medial-lateral + axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral + axis (larger index = more ventral)." + range: text + required: false + multivalued: false + optical_channel: + name: optical_channel + description: An optical channel used to record from an imaging plane. + range: OpticalChannel + required: true multivalued: true - inlined: true - inlined_as_list: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false any_of: - - range: NWBContainer + - range: Device + - range: string tree_root: true + ImagingPlane__manifold: + name: ImagingPlane__manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents the + position of the pixel relative to the defined coordinate space. Deprecated in + favor of origin_coords and grid_spacing. + attributes: + name: + name: name + ifabsent: string(manifold) + range: string + required: true + equals_string: manifold + conversion: + name: conversion + description: Scalar to multiply each element in data to convert it to the + specified 'unit'. If the data are stored in acquisition system units or + other units that require a conversion to be interpretable, multiply the + data by 'conversion' to convert the data to the specified 'unit'. e.g. if + the data acquisition system stores values in this object as pixels from + x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then + the 'conversion' multiplier to get from raw data acquisition pixel units + to meters is 2/1000. + range: float32 + unit: + name: unit + description: Base unit of measurement for working with the data. The default + value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: height + - alias: width + - alias: x_y_z + exact_cardinality: 3 + - array: + dimensions: + - alias: height + - alias: width + - alias: depth + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__origin_coords: + name: ImagingPlane__origin_coords + description: Physical location of the first element of the imaging plane (0, 0) + for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the + physical location is relative to (e.g., bregma). + attributes: + name: + name: name + ifabsent: string(origin_coords) + range: string + required: true + equals_string: origin_coords + unit: + name: unit + description: Measurement units for origin_coords. The default value is 'meters'. + range: text + value: + name: value + array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - alias: x_y_z + exact_cardinality: 3 + range: float32 + ImagingPlane__grid_spacing: + name: ImagingPlane__grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame + to interpret the grid. + attributes: + name: + name: name + ifabsent: string(grid_spacing) + range: string + required: true + equals_string: grid_spacing + unit: + name: unit + description: Measurement units for grid_spacing. The default value is 'meters'. + range: text + value: + name: value + array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - alias: x_y_z + exact_cardinality: 3 + range: float32 + OpticalChannel: + name: OpticalChannel + description: An optical channel used to record from an imaging plane. + is_a: NWBContainer + attributes: + name: + name: name + range: string + required: true + description: + name: description + description: Description or other notes about the channel. + range: text + required: true + multivalued: false + emission_lambda: + name: emission_lambda + description: Emission wavelength for channel, in nm. + range: float32 + required: true + multivalued: false MotionCorrection: name: MotionCorrection description: 'An image stack where all frames are shifted (registered) to a common @@ -156,8 +378,8 @@ classes: frame at each point in time is assumed to be 2-D (has only x & y dimensions).' is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.retinotopy.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.retinotopy.yaml index b4d0df4..2e53599 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.retinotopy.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_2/core.nwb.retinotopy.yaml @@ -114,8 +114,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -145,8 +145,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -175,8 +175,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -206,8 +206,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -246,8 +246,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -273,8 +273,8 @@ classes: name: field_of_view description: Size of viewing area, in meters. range: float32 - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -309,8 +309,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.base.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.base.yaml index b9b7b76..8e458a3 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.base.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.base.yaml @@ -42,8 +42,8 @@ classes: name: description description: Description of the image. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -202,8 +202,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -268,8 +268,8 @@ classes: description: A collection of processed data. is_a: NWBContainer attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.behavior.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.behavior.yaml index b2a980c..e6ae7ad 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.behavior.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.behavior.yaml @@ -62,8 +62,8 @@ classes: value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -89,8 +89,8 @@ classes: events. BehavioralTimeSeries is for continuous data. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -103,8 +103,8 @@ classes: for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -117,8 +117,8 @@ classes: of BehavioralEpochs for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -130,8 +130,8 @@ classes: description: Eye-tracking data, representing pupil size. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -143,8 +143,8 @@ classes: description: Eye-tracking data, representing direction of gaze. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -160,8 +160,8 @@ classes: be radians or degrees. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -173,8 +173,8 @@ classes: description: Position data, whether along the x, x/y or x/y/z axis. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.ecephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.ecephys.yaml index 9de48e5..8195921 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.ecephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.ecephys.yaml @@ -52,6 +52,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -167,6 +170,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -211,6 +217,17 @@ classes: range: float64 required: true multivalued: false + source_electricalseries: + name: source_electricalseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ElectricalSeries + - range: string tree_root: true EventWaveform: name: EventWaveform @@ -219,8 +236,8 @@ classes: during experiment acquisition. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -242,8 +259,8 @@ classes: the ElectricalSeries. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -257,8 +274,8 @@ classes: properties should be noted in the ElectricalSeries description or comments field. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -290,6 +307,17 @@ classes: range: ElectrodeGroup__position required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ElectrodeGroup__position: name: ElectrodeGroup__position @@ -364,6 +392,17 @@ classes: range: float32 required: true multivalued: false + clustering_interface: + name: clustering_interface + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Clustering + - range: string tree_root: true Clustering: name: Clustering diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.epoch.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.epoch.yaml index 51e899c..3365825 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.epoch.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.epoch.yaml @@ -57,6 +57,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for tags. range: VectorIndex required: false @@ -73,6 +76,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for timeseries. range: VectorIndex required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.file.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.file.yaml index 885874a..1e98c12 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.file.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.file.yaml @@ -206,14 +206,9 @@ classes: having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. - multivalued: true - inlined: true - inlined_as_list: false - any_of: - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals + range: NWBFile__intervals + required: false + multivalued: false units: name: units description: Data about sorted spike units. @@ -636,6 +631,44 @@ classes: range: SweepTable required: false multivalued: false + NWBFile__intervals: + name: NWBFile__intervals + description: Experimental intervals, whether that be logically distinct sub-experiments + having a particular scientific goal, trials (see trials subgroup) during an + experiment, or epochs (see epochs subgroup) deriving from analysis of data. + attributes: + name: + name: name + ifabsent: string(intervals) + range: string + required: true + equals_string: intervals + epochs: + name: epochs + description: Divisions in time marking experimental stages or sub-divisions + of a single recording session. + range: TimeIntervals + required: false + multivalued: false + trials: + name: trials + description: Repeated experimental events that have a logical grouping. + range: TimeIntervals + required: false + multivalued: false + invalid_times: + name: invalid_times + description: Time intervals that should be removed from analysis. + range: TimeIntervals + required: false + multivalued: false + time_intervals: + name: time_intervals + description: Optional additional table(s) for describing other experimental + time intervals. + range: TimeIntervals + required: false + multivalued: true LabMetaData: name: LabMetaData description: Lab-specific meta-data. diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.icephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.icephys.yaml index 83cf963..fc1459d 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.icephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.icephys.yaml @@ -46,6 +46,17 @@ classes: range: float32 required: false multivalued: false + electrode: + name: electrode + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: IntracellularElectrode + - range: string tree_root: true PatchClampSeries__data: name: PatchClampSeries__data @@ -63,8 +74,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -492,6 +503,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true SweepTable: name: SweepTable @@ -523,6 +545,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for series. range: VectorIndex required: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.image.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.image.yaml index dea4aa6..38a564e 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.image.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.image.yaml @@ -132,8 +132,8 @@ classes: (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0]. range: int32 - array: - name: array + value: + name: value array: dimensions: - alias: num_files @@ -151,6 +151,17 @@ classes: name: name range: string required: true + masked_imageseries: + name: masked_imageseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true OpticalSeries: name: OpticalSeries @@ -236,4 +247,15 @@ classes: range: int32 required: true multivalued: false + indexed_timeseries: + name: indexed_timeseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.misc.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.misc.yaml index 01a3ce4..62fda1f 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.misc.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.misc.yaml @@ -73,8 +73,8 @@ classes: the units in 'feature_units'. The default value for this attribute is "see 'feature_units'". range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -159,6 +159,17 @@ classes: range: DecompositionSeries__bands required: true multivalued: false + source_timeseries: + name: source_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: TimeSeries + - range: string tree_root: true DecompositionSeries__data: name: DecompositionSeries__data @@ -176,8 +187,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -252,6 +263,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the spike_times dataset. range: VectorIndex required: false @@ -268,6 +282,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the obs_intervals dataset. range: VectorIndex required: false @@ -289,6 +306,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into electrodes. range: VectorIndex required: false @@ -299,6 +319,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.ogen.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.ogen.yaml index d158d51..ec81c05 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.ogen.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.ogen.yaml @@ -32,6 +32,17 @@ classes: range: numeric required: true multivalued: false + site: + name: site + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: OptogeneticStimulusSite + - range: string tree_root: true OptogeneticStimulusSite: name: OptogeneticStimulusSite @@ -62,4 +73,15 @@ classes: range: text required: true multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.ophys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.ophys.yaml index 547d0d5..c02f6d8 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.ophys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.ophys.yaml @@ -50,6 +50,17 @@ classes: dimensions: - alias: width_height exact_cardinality: 3 + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true RoiResponseSeries: name: RoiResponseSeries @@ -81,6 +92,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries. range: DynamicTableRegion @@ -94,8 +108,8 @@ classes: for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -109,8 +123,8 @@ classes: for ROIs and for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -128,8 +142,8 @@ classes: is required and ROI names should remain consistent between them. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -158,6 +172,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into pixel_mask. range: VectorIndex required: false @@ -176,6 +193,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into voxel_mask. range: VectorIndex required: false @@ -196,6 +216,17 @@ classes: inlined_as_list: false any_of: - range: ImageSeries + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true PlaneSegmentation__image_mask: name: PlaneSegmentation__image_mask @@ -282,14 +313,202 @@ classes: description: An imaging plane and its metadata. is_a: NWBContainer attributes: - children: - name: children + name: + name: name + range: string + required: true + description: + name: description + description: Description of the imaging plane. + range: text + required: false + multivalued: false + excitation_lambda: + name: excitation_lambda + description: Excitation wavelength, in nm. + range: float32 + required: true + multivalued: false + imaging_rate: + name: imaging_rate + description: Rate that images are acquired, in Hz. If the corresponding TimeSeries + is present, the rate should be stored there instead. + range: float32 + required: false + multivalued: false + indicator: + name: indicator + description: Calcium indicator. + range: text + required: true + multivalued: false + location: + name: location + description: Location of the imaging plane. Specify the area, layer, comments + on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use + standard atlas names for anatomical regions when possible. + range: text + required: true + multivalued: false + manifold: + name: manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents + the position of the pixel relative to the defined coordinate space. Deprecated + in favor of origin_coords and grid_spacing. + range: ImagingPlane__manifold + required: false + multivalued: false + origin_coords: + name: origin_coords + description: Physical location of the first element of the imaging plane (0, + 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for + what the physical location is relative to (e.g., bregma). + range: ImagingPlane__origin_coords + required: false + multivalued: false + grid_spacing: + name: grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also + reference_frame to interpret the grid. + range: ImagingPlane__grid_spacing + required: false + multivalued: false + reference_frame: + name: reference_frame + description: Describes reference frame of origin_coords and grid_spacing. + For example, this can be a text description of the anatomical location and + orientation of the grid defined by origin_coords and grid_spacing or the + vectors needed to transform or rotate the grid to a common anatomical axis + (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and + grid_spacing. If origin_coords and grid_spacing are not present, then this + field is not required. For example, if the microscope takes 10 x 10 x 2 + images, where the first value of the data matrix (index (0, 0, 0)) corresponds + to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is + 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means + more anterior, larger numbers in y means more rightward, and larger numbers + in z means more ventral, then enter the following -- origin_coords = (-1.2, + -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = "Origin coordinates + are relative to bregma. First dimension corresponds to anterior-posterior + axis (larger index = more anterior). Second dimension corresponds to medial-lateral + axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral + axis (larger index = more ventral)." + range: text + required: false + multivalued: false + optical_channel: + name: optical_channel + description: An optical channel used to record from an imaging plane. + range: OpticalChannel + required: true multivalued: true - inlined: true - inlined_as_list: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false any_of: - - range: OpticalChannel + - range: Device + - range: string tree_root: true + ImagingPlane__manifold: + name: ImagingPlane__manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents the + position of the pixel relative to the defined coordinate space. Deprecated in + favor of origin_coords and grid_spacing. + attributes: + name: + name: name + ifabsent: string(manifold) + range: string + required: true + equals_string: manifold + conversion: + name: conversion + description: Scalar to multiply each element in data to convert it to the + specified 'unit'. If the data are stored in acquisition system units or + other units that require a conversion to be interpretable, multiply the + data by 'conversion' to convert the data to the specified 'unit'. e.g. if + the data acquisition system stores values in this object as pixels from + x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then + the 'conversion' multiplier to get from raw data acquisition pixel units + to meters is 2/1000. + range: float32 + unit: + name: unit + description: Base unit of measurement for working with the data. The default + value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: height + - alias: width + - alias: x_y_z + exact_cardinality: 3 + - array: + dimensions: + - alias: height + - alias: width + - alias: depth + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__origin_coords: + name: ImagingPlane__origin_coords + description: Physical location of the first element of the imaging plane (0, 0) + for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the + physical location is relative to (e.g., bregma). + attributes: + name: + name: name + ifabsent: string(origin_coords) + range: string + required: true + equals_string: origin_coords + unit: + name: unit + description: Measurement units for origin_coords. The default value is 'meters'. + range: text + value: + name: value + array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - alias: x_y_z + exact_cardinality: 3 + range: float32 + ImagingPlane__grid_spacing: + name: ImagingPlane__grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame + to interpret the grid. + attributes: + name: + name: name + ifabsent: string(grid_spacing) + range: string + required: true + equals_string: grid_spacing + unit: + name: unit + description: Measurement units for grid_spacing. The default value is 'meters'. + range: text + value: + name: value + array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - alias: x_y_z + exact_cardinality: 3 + range: float32 OpticalChannel: name: OpticalChannel description: An optical channel used to record from an imaging plane. @@ -319,8 +538,8 @@ classes: frame at each point in time is assumed to be 2-D (has only x & y dimensions).' is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -349,4 +568,15 @@ classes: range: TimeSeries required: true multivalued: false + original: + name: original + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.retinotopy.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.retinotopy.yaml index 77858f0..7cf81d7 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.retinotopy.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_4/core.nwb.retinotopy.yaml @@ -114,8 +114,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -145,8 +145,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -175,8 +175,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -206,8 +206,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -246,8 +246,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -273,8 +273,8 @@ classes: name: field_of_view description: Size of viewing area, in meters. range: float32 - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -309,8 +309,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.base.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.base.yaml index dbf0921..e3161a4 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.base.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.base.yaml @@ -42,8 +42,8 @@ classes: name: description description: Description of the image. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -202,8 +202,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -268,8 +268,8 @@ classes: description: A collection of processed data. is_a: NWBContainer attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.behavior.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.behavior.yaml index 5ecb8fb..65f31ca 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.behavior.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.behavior.yaml @@ -62,8 +62,8 @@ classes: value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -89,8 +89,8 @@ classes: events. BehavioralTimeSeries is for continuous data. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -103,8 +103,8 @@ classes: for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -117,8 +117,8 @@ classes: of BehavioralEpochs for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -130,8 +130,8 @@ classes: description: Eye-tracking data, representing pupil size. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -143,8 +143,8 @@ classes: description: Eye-tracking data, representing direction of gaze. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -160,8 +160,8 @@ classes: be radians or degrees. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -173,8 +173,8 @@ classes: description: Position data, whether along the x, x/y or x/y/z axis. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.ecephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.ecephys.yaml index 73148dd..9d008a1 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.ecephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.ecephys.yaml @@ -52,6 +52,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -167,6 +170,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -211,6 +217,17 @@ classes: range: float64 required: true multivalued: false + source_electricalseries: + name: source_electricalseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ElectricalSeries + - range: string tree_root: true EventWaveform: name: EventWaveform @@ -219,8 +236,8 @@ classes: during experiment acquisition. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -242,8 +259,8 @@ classes: the ElectricalSeries. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -257,8 +274,8 @@ classes: properties should be noted in the ElectricalSeries description or comments field. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -290,6 +307,17 @@ classes: range: ElectrodeGroup__position required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ElectrodeGroup__position: name: ElectrodeGroup__position @@ -364,6 +392,17 @@ classes: range: float32 required: true multivalued: false + clustering_interface: + name: clustering_interface + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Clustering + - range: string tree_root: true Clustering: name: Clustering diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.epoch.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.epoch.yaml index 13cf7c6..9a3bedf 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.epoch.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.epoch.yaml @@ -57,6 +57,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for tags. range: VectorIndex required: false @@ -73,6 +76,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for timeseries. range: VectorIndex required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.file.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.file.yaml index a0aa5f7..efe69a8 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.file.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.file.yaml @@ -206,14 +206,9 @@ classes: having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. - multivalued: true - inlined: true - inlined_as_list: false - any_of: - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals + range: NWBFile__intervals + required: false + multivalued: false units: name: units description: Data about sorted spike units. @@ -636,6 +631,44 @@ classes: range: SweepTable required: false multivalued: false + NWBFile__intervals: + name: NWBFile__intervals + description: Experimental intervals, whether that be logically distinct sub-experiments + having a particular scientific goal, trials (see trials subgroup) during an + experiment, or epochs (see epochs subgroup) deriving from analysis of data. + attributes: + name: + name: name + ifabsent: string(intervals) + range: string + required: true + equals_string: intervals + epochs: + name: epochs + description: Divisions in time marking experimental stages or sub-divisions + of a single recording session. + range: TimeIntervals + required: false + multivalued: false + trials: + name: trials + description: Repeated experimental events that have a logical grouping. + range: TimeIntervals + required: false + multivalued: false + invalid_times: + name: invalid_times + description: Time intervals that should be removed from analysis. + range: TimeIntervals + required: false + multivalued: false + time_intervals: + name: time_intervals + description: Optional additional table(s) for describing other experimental + time intervals. + range: TimeIntervals + required: false + multivalued: true LabMetaData: name: LabMetaData description: Lab-specific meta-data. diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.icephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.icephys.yaml index 015c804..4aa8c39 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.icephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.icephys.yaml @@ -46,6 +46,17 @@ classes: range: float32 required: false multivalued: false + electrode: + name: electrode + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: IntracellularElectrode + - range: string tree_root: true PatchClampSeries__data: name: PatchClampSeries__data @@ -63,8 +74,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -492,6 +503,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true SweepTable: name: SweepTable @@ -523,6 +545,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for series. range: VectorIndex required: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.image.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.image.yaml index eaa5e52..6d564d7 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.image.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.image.yaml @@ -132,8 +132,8 @@ classes: (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0]. range: int32 - array: - name: array + value: + name: value array: dimensions: - alias: num_files @@ -151,6 +151,17 @@ classes: name: name range: string required: true + masked_imageseries: + name: masked_imageseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true OpticalSeries: name: OpticalSeries @@ -236,4 +247,15 @@ classes: range: int32 required: true multivalued: false + indexed_timeseries: + name: indexed_timeseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.misc.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.misc.yaml index 115f5ac..bbfbc48 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.misc.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.misc.yaml @@ -73,8 +73,8 @@ classes: the units in 'feature_units'. The default value for this attribute is "see 'feature_units'". range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -159,6 +159,17 @@ classes: range: DecompositionSeries__bands required: true multivalued: false + source_timeseries: + name: source_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: TimeSeries + - range: string tree_root: true DecompositionSeries__data: name: DecompositionSeries__data @@ -176,8 +187,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -252,6 +263,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the spike_times dataset. range: VectorIndex required: false @@ -268,6 +282,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the obs_intervals dataset. range: VectorIndex required: false @@ -289,6 +306,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into electrodes. range: VectorIndex required: false @@ -299,6 +319,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.ogen.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.ogen.yaml index 2be6f23..08d7a0c 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.ogen.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.ogen.yaml @@ -32,6 +32,17 @@ classes: range: numeric required: true multivalued: false + site: + name: site + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: OptogeneticStimulusSite + - range: string tree_root: true OptogeneticStimulusSite: name: OptogeneticStimulusSite @@ -62,4 +73,15 @@ classes: range: text required: true multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.ophys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.ophys.yaml index 902cace..6218538 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.ophys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.ophys.yaml @@ -50,6 +50,17 @@ classes: dimensions: - alias: width_height_depth exact_cardinality: 3 + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true RoiResponseSeries: name: RoiResponseSeries @@ -81,6 +92,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries. range: DynamicTableRegion @@ -94,8 +108,8 @@ classes: for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -109,8 +123,8 @@ classes: for ROIs and for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -128,8 +142,8 @@ classes: is required and ROI names should remain consistent between them. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -158,6 +172,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into pixel_mask. range: VectorIndex required: false @@ -176,6 +193,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into voxel_mask. range: VectorIndex required: false @@ -196,6 +216,17 @@ classes: inlined_as_list: false any_of: - range: ImageSeries + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true PlaneSegmentation__image_mask: name: PlaneSegmentation__image_mask @@ -282,14 +313,208 @@ classes: description: An imaging plane and its metadata. is_a: NWBContainer attributes: - children: - name: children + name: + name: name + range: string + required: true + description: + name: description + description: Description of the imaging plane. + range: text + required: false + multivalued: false + excitation_lambda: + name: excitation_lambda + description: Excitation wavelength, in nm. + range: float32 + required: true + multivalued: false + imaging_rate: + name: imaging_rate + description: Rate that images are acquired, in Hz. If the corresponding TimeSeries + is present, the rate should be stored there instead. + range: float32 + required: false + multivalued: false + indicator: + name: indicator + description: Calcium indicator. + range: text + required: true + multivalued: false + location: + name: location + description: Location of the imaging plane. Specify the area, layer, comments + on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use + standard atlas names for anatomical regions when possible. + range: text + required: true + multivalued: false + manifold: + name: manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents + the position of the pixel relative to the defined coordinate space. Deprecated + in favor of origin_coords and grid_spacing. + range: ImagingPlane__manifold + required: false + multivalued: false + origin_coords: + name: origin_coords + description: Physical location of the first element of the imaging plane (0, + 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for + what the physical location is relative to (e.g., bregma). + range: ImagingPlane__origin_coords + required: false + multivalued: false + grid_spacing: + name: grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also + reference_frame to interpret the grid. + range: ImagingPlane__grid_spacing + required: false + multivalued: false + reference_frame: + name: reference_frame + description: Describes reference frame of origin_coords and grid_spacing. + For example, this can be a text description of the anatomical location and + orientation of the grid defined by origin_coords and grid_spacing or the + vectors needed to transform or rotate the grid to a common anatomical axis + (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and + grid_spacing. If origin_coords and grid_spacing are not present, then this + field is not required. For example, if the microscope takes 10 x 10 x 2 + images, where the first value of the data matrix (index (0, 0, 0)) corresponds + to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is + 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means + more anterior, larger numbers in y means more rightward, and larger numbers + in z means more ventral, then enter the following -- origin_coords = (-1.2, + -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = "Origin coordinates + are relative to bregma. First dimension corresponds to anterior-posterior + axis (larger index = more anterior). Second dimension corresponds to medial-lateral + axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral + axis (larger index = more ventral)." + range: text + required: false + multivalued: false + optical_channel: + name: optical_channel + description: An optical channel used to record from an imaging plane. + range: OpticalChannel + required: true multivalued: true - inlined: true - inlined_as_list: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false any_of: - - range: OpticalChannel + - range: Device + - range: string tree_root: true + ImagingPlane__manifold: + name: ImagingPlane__manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents the + position of the pixel relative to the defined coordinate space. Deprecated in + favor of origin_coords and grid_spacing. + attributes: + name: + name: name + ifabsent: string(manifold) + range: string + required: true + equals_string: manifold + conversion: + name: conversion + description: Scalar to multiply each element in data to convert it to the + specified 'unit'. If the data are stored in acquisition system units or + other units that require a conversion to be interpretable, multiply the + data by 'conversion' to convert the data to the specified 'unit'. e.g. if + the data acquisition system stores values in this object as pixels from + x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then + the 'conversion' multiplier to get from raw data acquisition pixel units + to meters is 2/1000. + range: float32 + unit: + name: unit + description: Base unit of measurement for working with the data. The default + value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: height + - alias: width + - alias: x_y_z + exact_cardinality: 3 + - array: + dimensions: + - alias: height + - alias: width + - alias: depth + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__origin_coords: + name: ImagingPlane__origin_coords + description: Physical location of the first element of the imaging plane (0, 0) + for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the + physical location is relative to (e.g., bregma). + attributes: + name: + name: name + ifabsent: string(origin_coords) + range: string + required: true + equals_string: origin_coords + unit: + name: unit + description: Measurement units for origin_coords. The default value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - array: + dimensions: + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__grid_spacing: + name: ImagingPlane__grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame + to interpret the grid. + attributes: + name: + name: name + ifabsent: string(grid_spacing) + range: string + required: true + equals_string: grid_spacing + unit: + name: unit + description: Measurement units for grid_spacing. The default value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - array: + dimensions: + - alias: x_y_z + exact_cardinality: 3 OpticalChannel: name: OpticalChannel description: An optical channel used to record from an imaging plane. @@ -319,8 +544,8 @@ classes: frame at each point in time is assumed to be 2-D (has only x & y dimensions).' is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -349,4 +574,15 @@ classes: range: TimeSeries required: true multivalued: false + original: + name: original + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.retinotopy.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.retinotopy.yaml index c3acb3f..4fe5360 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.retinotopy.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_2_5/core.nwb.retinotopy.yaml @@ -114,8 +114,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -145,8 +145,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -175,8 +175,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -206,8 +206,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -246,8 +246,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -273,8 +273,8 @@ classes: name: field_of_view description: Size of viewing area, in meters. range: float32 - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -309,8 +309,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.base.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.base.yaml index 9eff269..8249ab1 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.base.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.base.yaml @@ -43,8 +43,8 @@ classes: name: description description: Description of the image. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -215,8 +215,8 @@ classes: the way this data is interpreted, the way it is visualized, and what analysis methods are applicable. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -281,8 +281,8 @@ classes: description: A collection of processed data. is_a: NWBContainer attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.behavior.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.behavior.yaml index 59a32d3..755fecd 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.behavior.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.behavior.yaml @@ -62,8 +62,8 @@ classes: value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -89,8 +89,8 @@ classes: events. BehavioralTimeSeries is for continuous data. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -103,8 +103,8 @@ classes: for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -117,8 +117,8 @@ classes: of BehavioralEpochs for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -130,8 +130,8 @@ classes: description: Eye-tracking data, representing pupil size. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -143,8 +143,8 @@ classes: description: Eye-tracking data, representing direction of gaze. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -160,8 +160,8 @@ classes: be radians or degrees. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -173,8 +173,8 @@ classes: description: Position data, whether along the x, x/y or x/y/z axis. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.ecephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.ecephys.yaml index 888caab..4b9767f 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.ecephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.ecephys.yaml @@ -62,6 +62,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -177,6 +180,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -221,6 +227,17 @@ classes: range: float64 required: true multivalued: false + source_electricalseries: + name: source_electricalseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ElectricalSeries + - range: string tree_root: true EventWaveform: name: EventWaveform @@ -229,8 +246,8 @@ classes: during experiment acquisition. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -252,8 +269,8 @@ classes: the ElectricalSeries 'filtering' attribute. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -267,8 +284,8 @@ classes: properties should be noted in the ElectricalSeries 'filtering' attribute. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -300,6 +317,17 @@ classes: range: ElectrodeGroup__position required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ElectrodeGroup__position: name: ElectrodeGroup__position @@ -374,6 +402,17 @@ classes: range: float32 required: true multivalued: false + clustering_interface: + name: clustering_interface + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Clustering + - range: string tree_root: true Clustering: name: Clustering diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.epoch.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.epoch.yaml index 915eba7..6616781 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.epoch.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.epoch.yaml @@ -57,6 +57,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for tags. range: VectorIndex required: false @@ -73,6 +76,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for timeseries. range: VectorIndex required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.file.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.file.yaml index 5b00582..75dc8f9 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.file.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.file.yaml @@ -206,14 +206,9 @@ classes: having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. - multivalued: true - inlined: true - inlined_as_list: false - any_of: - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals + range: NWBFile__intervals + required: false + multivalued: false units: name: units description: Data about sorted spike units. @@ -637,6 +632,44 @@ classes: range: SweepTable required: false multivalued: false + NWBFile__intervals: + name: NWBFile__intervals + description: Experimental intervals, whether that be logically distinct sub-experiments + having a particular scientific goal, trials (see trials subgroup) during an + experiment, or epochs (see epochs subgroup) deriving from analysis of data. + attributes: + name: + name: name + ifabsent: string(intervals) + range: string + required: true + equals_string: intervals + epochs: + name: epochs + description: Divisions in time marking experimental stages or sub-divisions + of a single recording session. + range: TimeIntervals + required: false + multivalued: false + trials: + name: trials + description: Repeated experimental events that have a logical grouping. + range: TimeIntervals + required: false + multivalued: false + invalid_times: + name: invalid_times + description: Time intervals that should be removed from analysis. + range: TimeIntervals + required: false + multivalued: false + time_intervals: + name: time_intervals + description: Optional additional table(s) for describing other experimental + time intervals. + range: TimeIntervals + required: false + multivalued: true LabMetaData: name: LabMetaData description: Lab-specific meta-data. diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.icephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.icephys.yaml index d100eb5..9e14aec 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.icephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.icephys.yaml @@ -46,6 +46,17 @@ classes: range: float32 required: false multivalued: false + electrode: + name: electrode + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: IntracellularElectrode + - range: string tree_root: true PatchClampSeries__data: name: PatchClampSeries__data @@ -63,8 +74,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -497,6 +508,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true SweepTable: name: SweepTable @@ -528,6 +550,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for series. range: VectorIndex required: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.image.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.image.yaml index 52b587d..0b93830 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.image.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.image.yaml @@ -104,6 +104,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ImageSeries__external_file: name: ImageSeries__external_file @@ -133,8 +144,8 @@ classes: (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0]. range: int32 - array: - name: array + value: + name: value array: dimensions: - alias: num_files @@ -152,6 +163,17 @@ classes: name: name range: string required: true + masked_imageseries: + name: masked_imageseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true OpticalSeries: name: OpticalSeries @@ -237,4 +259,15 @@ classes: range: int32 required: true multivalued: false + indexed_timeseries: + name: indexed_timeseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.misc.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.misc.yaml index 1e5e813..e1d24e2 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.misc.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.misc.yaml @@ -73,8 +73,8 @@ classes: the units in 'feature_units'. The default value for this attribute is "see 'feature_units'". range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -158,6 +158,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the channels that this decomposition series was generated from. range: DynamicTableRegion @@ -170,6 +173,17 @@ classes: range: DecompositionSeries__bands required: true multivalued: false + source_timeseries: + name: source_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: TimeSeries + - range: string tree_root: true DecompositionSeries__data: name: DecompositionSeries__data @@ -187,8 +201,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -263,6 +277,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the spike_times dataset. range: VectorIndex required: false @@ -279,6 +296,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the obs_intervals dataset. range: VectorIndex required: false @@ -300,6 +320,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into electrodes. range: VectorIndex required: false @@ -310,6 +333,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion required: false @@ -390,6 +416,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail. range: VectorIndex @@ -401,6 +430,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail. range: VectorIndex diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.ogen.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.ogen.yaml index 48992da..3148b98 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.ogen.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.ogen.yaml @@ -32,6 +32,17 @@ classes: range: numeric required: true multivalued: false + site: + name: site + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: OptogeneticStimulusSite + - range: string tree_root: true OptogeneticStimulusSite: name: OptogeneticStimulusSite @@ -62,4 +73,15 @@ classes: range: text required: true multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.ophys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.ophys.yaml index 53f031e..15cb79a 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.ophys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.ophys.yaml @@ -50,6 +50,17 @@ classes: dimensions: - alias: width_height_depth exact_cardinality: 3 + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true RoiResponseSeries: name: RoiResponseSeries @@ -81,6 +92,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries. range: DynamicTableRegion @@ -94,8 +108,8 @@ classes: for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -109,8 +123,8 @@ classes: for ROIs and for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -128,8 +142,8 @@ classes: is required and ROI names should remain consistent between them. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -158,6 +172,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into pixel_mask. range: VectorIndex required: false @@ -176,6 +193,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into voxel_mask. range: VectorIndex required: false @@ -196,6 +216,17 @@ classes: inlined_as_list: false any_of: - range: ImageSeries + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true PlaneSegmentation__image_mask: name: PlaneSegmentation__image_mask @@ -282,14 +313,208 @@ classes: description: An imaging plane and its metadata. is_a: NWBContainer attributes: - children: - name: children + name: + name: name + range: string + required: true + description: + name: description + description: Description of the imaging plane. + range: text + required: false + multivalued: false + excitation_lambda: + name: excitation_lambda + description: Excitation wavelength, in nm. + range: float32 + required: true + multivalued: false + imaging_rate: + name: imaging_rate + description: Rate that images are acquired, in Hz. If the corresponding TimeSeries + is present, the rate should be stored there instead. + range: float32 + required: false + multivalued: false + indicator: + name: indicator + description: Calcium indicator. + range: text + required: true + multivalued: false + location: + name: location + description: Location of the imaging plane. Specify the area, layer, comments + on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use + standard atlas names for anatomical regions when possible. + range: text + required: true + multivalued: false + manifold: + name: manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents + the position of the pixel relative to the defined coordinate space. Deprecated + in favor of origin_coords and grid_spacing. + range: ImagingPlane__manifold + required: false + multivalued: false + origin_coords: + name: origin_coords + description: Physical location of the first element of the imaging plane (0, + 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for + what the physical location is relative to (e.g., bregma). + range: ImagingPlane__origin_coords + required: false + multivalued: false + grid_spacing: + name: grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also + reference_frame to interpret the grid. + range: ImagingPlane__grid_spacing + required: false + multivalued: false + reference_frame: + name: reference_frame + description: Describes reference frame of origin_coords and grid_spacing. + For example, this can be a text description of the anatomical location and + orientation of the grid defined by origin_coords and grid_spacing or the + vectors needed to transform or rotate the grid to a common anatomical axis + (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and + grid_spacing. If origin_coords and grid_spacing are not present, then this + field is not required. For example, if the microscope takes 10 x 10 x 2 + images, where the first value of the data matrix (index (0, 0, 0)) corresponds + to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is + 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means + more anterior, larger numbers in y means more rightward, and larger numbers + in z means more ventral, then enter the following -- origin_coords = (-1.2, + -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = "Origin coordinates + are relative to bregma. First dimension corresponds to anterior-posterior + axis (larger index = more anterior). Second dimension corresponds to medial-lateral + axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral + axis (larger index = more ventral)." + range: text + required: false + multivalued: false + optical_channel: + name: optical_channel + description: An optical channel used to record from an imaging plane. + range: OpticalChannel + required: true multivalued: true - inlined: true - inlined_as_list: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false any_of: - - range: OpticalChannel + - range: Device + - range: string tree_root: true + ImagingPlane__manifold: + name: ImagingPlane__manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents the + position of the pixel relative to the defined coordinate space. Deprecated in + favor of origin_coords and grid_spacing. + attributes: + name: + name: name + ifabsent: string(manifold) + range: string + required: true + equals_string: manifold + conversion: + name: conversion + description: Scalar to multiply each element in data to convert it to the + specified 'unit'. If the data are stored in acquisition system units or + other units that require a conversion to be interpretable, multiply the + data by 'conversion' to convert the data to the specified 'unit'. e.g. if + the data acquisition system stores values in this object as pixels from + x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then + the 'conversion' multiplier to get from raw data acquisition pixel units + to meters is 2/1000. + range: float32 + unit: + name: unit + description: Base unit of measurement for working with the data. The default + value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: height + - alias: width + - alias: x_y_z + exact_cardinality: 3 + - array: + dimensions: + - alias: height + - alias: width + - alias: depth + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__origin_coords: + name: ImagingPlane__origin_coords + description: Physical location of the first element of the imaging plane (0, 0) + for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the + physical location is relative to (e.g., bregma). + attributes: + name: + name: name + ifabsent: string(origin_coords) + range: string + required: true + equals_string: origin_coords + unit: + name: unit + description: Measurement units for origin_coords. The default value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - array: + dimensions: + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__grid_spacing: + name: ImagingPlane__grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame + to interpret the grid. + attributes: + name: + name: name + ifabsent: string(grid_spacing) + range: string + required: true + equals_string: grid_spacing + unit: + name: unit + description: Measurement units for grid_spacing. The default value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - array: + dimensions: + - alias: x_y_z + exact_cardinality: 3 OpticalChannel: name: OpticalChannel description: An optical channel used to record from an imaging plane. @@ -319,8 +544,8 @@ classes: frame at each point in time is assumed to be 2-D (has only x & y dimensions).' is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -349,4 +574,15 @@ classes: range: TimeSeries required: true multivalued: false + original: + name: original + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.retinotopy.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.retinotopy.yaml index 35c4f49..98473cb 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.retinotopy.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_3_0/core.nwb.retinotopy.yaml @@ -114,8 +114,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -145,8 +145,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -175,8 +175,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -206,8 +206,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -246,8 +246,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -273,8 +273,8 @@ classes: name: field_of_view description: Size of viewing area, in meters. range: float32 - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -309,8 +309,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.base.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.base.yaml index 8d225c1..77f05be 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.base.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.base.yaml @@ -77,8 +77,8 @@ classes: name: description description: Description of the image. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -249,8 +249,8 @@ classes: the way this data is interpreted, the way it is visualized, and what analysis methods are applicable. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -315,8 +315,8 @@ classes: description: A collection of processed data. is_a: NWBContainer attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.behavior.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.behavior.yaml index 27895f5..1ed3fa3 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.behavior.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.behavior.yaml @@ -62,8 +62,8 @@ classes: value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -89,8 +89,8 @@ classes: events. BehavioralTimeSeries is for continuous data. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -103,8 +103,8 @@ classes: for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -117,8 +117,8 @@ classes: of BehavioralEpochs for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -130,8 +130,8 @@ classes: description: Eye-tracking data, representing pupil size. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -143,8 +143,8 @@ classes: description: Eye-tracking data, representing direction of gaze. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -160,8 +160,8 @@ classes: be radians or degrees. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -173,8 +173,8 @@ classes: description: Position data, whether along the x, x/y or x/y/z axis. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.ecephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.ecephys.yaml index 00ebe6f..43a8eb9 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.ecephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.ecephys.yaml @@ -62,6 +62,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -177,6 +180,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -221,6 +227,17 @@ classes: range: float64 required: true multivalued: false + source_electricalseries: + name: source_electricalseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ElectricalSeries + - range: string tree_root: true EventWaveform: name: EventWaveform @@ -229,8 +246,8 @@ classes: during experiment acquisition. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -252,8 +269,8 @@ classes: the ElectricalSeries 'filtering' attribute. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -267,8 +284,8 @@ classes: properties should be noted in the ElectricalSeries 'filtering' attribute. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -300,6 +317,17 @@ classes: range: ElectrodeGroup__position required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ElectrodeGroup__position: name: ElectrodeGroup__position @@ -374,6 +402,17 @@ classes: range: float32 required: true multivalued: false + clustering_interface: + name: clustering_interface + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Clustering + - range: string tree_root: true Clustering: name: Clustering diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.epoch.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.epoch.yaml index 19ce0d0..512513e 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.epoch.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.epoch.yaml @@ -57,6 +57,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for tags. range: VectorIndex required: false @@ -73,6 +76,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for timeseries. range: VectorIndex required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.file.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.file.yaml index 7aade20..a1bd2ec 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.file.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.file.yaml @@ -206,14 +206,9 @@ classes: having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. - multivalued: true - inlined: true - inlined_as_list: false - any_of: - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals + range: NWBFile__intervals + required: false + multivalued: false units: name: units description: Data about sorted spike units. @@ -691,6 +686,44 @@ classes: range: ExperimentalConditionsTable required: false multivalued: false + NWBFile__intervals: + name: NWBFile__intervals + description: Experimental intervals, whether that be logically distinct sub-experiments + having a particular scientific goal, trials (see trials subgroup) during an + experiment, or epochs (see epochs subgroup) deriving from analysis of data. + attributes: + name: + name: name + ifabsent: string(intervals) + range: string + required: true + equals_string: intervals + epochs: + name: epochs + description: Divisions in time marking experimental stages or sub-divisions + of a single recording session. + range: TimeIntervals + required: false + multivalued: false + trials: + name: trials + description: Repeated experimental events that have a logical grouping. + range: TimeIntervals + required: false + multivalued: false + invalid_times: + name: invalid_times + description: Time intervals that should be removed from analysis. + range: TimeIntervals + required: false + multivalued: false + time_intervals: + name: time_intervals + description: Optional additional table(s) for describing other experimental + time intervals. + range: TimeIntervals + required: false + multivalued: true LabMetaData: name: LabMetaData description: Lab-specific meta-data. diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.icephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.icephys.yaml index 2150103..89b6b6d 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.icephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.icephys.yaml @@ -46,6 +46,17 @@ classes: range: float32 required: false multivalued: false + electrode: + name: electrode + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: IntracellularElectrode + - range: string tree_root: true PatchClampSeries__data: name: PatchClampSeries__data @@ -63,8 +74,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -497,6 +508,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true SweepTable: name: SweepTable @@ -531,6 +553,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for series. range: VectorIndex required: true @@ -575,6 +600,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Column storing the reference to the recorded stimulus for the recording (rows). range: TimeSeriesReferenceVectorData @@ -600,6 +628,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Column storing the reference to the recorded response for the recording (rows) range: TimeSeriesReferenceVectorData @@ -677,6 +708,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the recordings column. range: VectorIndex required: true @@ -727,6 +761,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the simultaneous_recordings column. range: VectorIndex required: true @@ -786,6 +823,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the sequential_recordings column. range: VectorIndex required: true @@ -833,6 +873,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the repetitions column. range: VectorIndex required: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.image.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.image.yaml index 71e1c2a..dd88ab9 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.image.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.image.yaml @@ -105,6 +105,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ImageSeries__external_file: name: ImageSeries__external_file @@ -134,8 +145,8 @@ classes: (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0]. range: int32 - array: - name: array + value: + name: value array: dimensions: - alias: num_files @@ -153,6 +164,17 @@ classes: name: name range: string required: true + masked_imageseries: + name: masked_imageseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true OpticalSeries: name: OpticalSeries @@ -238,4 +260,15 @@ classes: range: int32 required: true multivalued: false + indexed_timeseries: + name: indexed_timeseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.misc.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.misc.yaml index 5910e70..d416ce7 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.misc.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.misc.yaml @@ -73,8 +73,8 @@ classes: the units in 'feature_units'. The default value for this attribute is "see 'feature_units'". range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -158,6 +158,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the channels that this decomposition series was generated from. range: DynamicTableRegion @@ -170,6 +173,17 @@ classes: range: DecompositionSeries__bands required: true multivalued: false + source_timeseries: + name: source_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: TimeSeries + - range: string tree_root: true DecompositionSeries__data: name: DecompositionSeries__data @@ -187,8 +201,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -263,6 +277,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the spike_times dataset. range: VectorIndex required: false @@ -279,6 +296,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the obs_intervals dataset. range: VectorIndex required: false @@ -300,6 +320,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into electrodes. range: VectorIndex required: false @@ -310,6 +333,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion required: false @@ -390,6 +416,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail. range: VectorIndex @@ -401,6 +430,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail. range: VectorIndex diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.ogen.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.ogen.yaml index 4786e5d..1add778 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.ogen.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.ogen.yaml @@ -32,6 +32,17 @@ classes: range: numeric required: true multivalued: false + site: + name: site + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: OptogeneticStimulusSite + - range: string tree_root: true OptogeneticStimulusSite: name: OptogeneticStimulusSite @@ -62,4 +73,15 @@ classes: range: text required: true multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.ophys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.ophys.yaml index b76d14a..0e56b23 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.ophys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.ophys.yaml @@ -50,6 +50,17 @@ classes: dimensions: - alias: width_height_depth exact_cardinality: 3 + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true RoiResponseSeries: name: RoiResponseSeries @@ -81,6 +92,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries. range: DynamicTableRegion @@ -94,8 +108,8 @@ classes: for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -109,8 +123,8 @@ classes: for ROIs and for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -128,8 +142,8 @@ classes: is required and ROI names should remain consistent between them. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -158,6 +172,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into pixel_mask. range: VectorIndex required: false @@ -176,6 +193,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into voxel_mask. range: VectorIndex required: false @@ -196,6 +216,17 @@ classes: inlined_as_list: false any_of: - range: ImageSeries + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true PlaneSegmentation__image_mask: name: PlaneSegmentation__image_mask @@ -282,14 +313,208 @@ classes: description: An imaging plane and its metadata. is_a: NWBContainer attributes: - children: - name: children + name: + name: name + range: string + required: true + description: + name: description + description: Description of the imaging plane. + range: text + required: false + multivalued: false + excitation_lambda: + name: excitation_lambda + description: Excitation wavelength, in nm. + range: float32 + required: true + multivalued: false + imaging_rate: + name: imaging_rate + description: Rate that images are acquired, in Hz. If the corresponding TimeSeries + is present, the rate should be stored there instead. + range: float32 + required: false + multivalued: false + indicator: + name: indicator + description: Calcium indicator. + range: text + required: true + multivalued: false + location: + name: location + description: Location of the imaging plane. Specify the area, layer, comments + on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use + standard atlas names for anatomical regions when possible. + range: text + required: true + multivalued: false + manifold: + name: manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents + the position of the pixel relative to the defined coordinate space. Deprecated + in favor of origin_coords and grid_spacing. + range: ImagingPlane__manifold + required: false + multivalued: false + origin_coords: + name: origin_coords + description: Physical location of the first element of the imaging plane (0, + 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for + what the physical location is relative to (e.g., bregma). + range: ImagingPlane__origin_coords + required: false + multivalued: false + grid_spacing: + name: grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also + reference_frame to interpret the grid. + range: ImagingPlane__grid_spacing + required: false + multivalued: false + reference_frame: + name: reference_frame + description: Describes reference frame of origin_coords and grid_spacing. + For example, this can be a text description of the anatomical location and + orientation of the grid defined by origin_coords and grid_spacing or the + vectors needed to transform or rotate the grid to a common anatomical axis + (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and + grid_spacing. If origin_coords and grid_spacing are not present, then this + field is not required. For example, if the microscope takes 10 x 10 x 2 + images, where the first value of the data matrix (index (0, 0, 0)) corresponds + to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is + 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means + more anterior, larger numbers in y means more rightward, and larger numbers + in z means more ventral, then enter the following -- origin_coords = (-1.2, + -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = "Origin coordinates + are relative to bregma. First dimension corresponds to anterior-posterior + axis (larger index = more anterior). Second dimension corresponds to medial-lateral + axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral + axis (larger index = more ventral)." + range: text + required: false + multivalued: false + optical_channel: + name: optical_channel + description: An optical channel used to record from an imaging plane. + range: OpticalChannel + required: true multivalued: true - inlined: true - inlined_as_list: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false any_of: - - range: OpticalChannel + - range: Device + - range: string tree_root: true + ImagingPlane__manifold: + name: ImagingPlane__manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents the + position of the pixel relative to the defined coordinate space. Deprecated in + favor of origin_coords and grid_spacing. + attributes: + name: + name: name + ifabsent: string(manifold) + range: string + required: true + equals_string: manifold + conversion: + name: conversion + description: Scalar to multiply each element in data to convert it to the + specified 'unit'. If the data are stored in acquisition system units or + other units that require a conversion to be interpretable, multiply the + data by 'conversion' to convert the data to the specified 'unit'. e.g. if + the data acquisition system stores values in this object as pixels from + x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then + the 'conversion' multiplier to get from raw data acquisition pixel units + to meters is 2/1000. + range: float32 + unit: + name: unit + description: Base unit of measurement for working with the data. The default + value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: height + - alias: width + - alias: x_y_z + exact_cardinality: 3 + - array: + dimensions: + - alias: height + - alias: width + - alias: depth + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__origin_coords: + name: ImagingPlane__origin_coords + description: Physical location of the first element of the imaging plane (0, 0) + for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the + physical location is relative to (e.g., bregma). + attributes: + name: + name: name + ifabsent: string(origin_coords) + range: string + required: true + equals_string: origin_coords + unit: + name: unit + description: Measurement units for origin_coords. The default value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - array: + dimensions: + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__grid_spacing: + name: ImagingPlane__grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame + to interpret the grid. + attributes: + name: + name: name + ifabsent: string(grid_spacing) + range: string + required: true + equals_string: grid_spacing + unit: + name: unit + description: Measurement units for grid_spacing. The default value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - array: + dimensions: + - alias: x_y_z + exact_cardinality: 3 OpticalChannel: name: OpticalChannel description: An optical channel used to record from an imaging plane. @@ -319,8 +544,8 @@ classes: frame at each point in time is assumed to be 2-D (has only x & y dimensions).' is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -349,4 +574,15 @@ classes: range: TimeSeries required: true multivalued: false + original: + name: original + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.retinotopy.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.retinotopy.yaml index 4a62dbb..d6318e1 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.retinotopy.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_4_0/core.nwb.retinotopy.yaml @@ -114,8 +114,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -145,8 +145,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -175,8 +175,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -206,8 +206,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -246,8 +246,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -273,8 +273,8 @@ classes: name: field_of_view description: Size of viewing area, in meters. range: float32 - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -309,8 +309,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.base.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.base.yaml index ae17645..4204fe9 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.base.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.base.yaml @@ -77,8 +77,8 @@ classes: name: description description: Description of the image. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -107,8 +107,12 @@ classes: name: name range: string required: true - image: - name: image + value: + name: value + annotations: + source_type: + tag: source_type + value: reference description: Ordered dataset of references to Image objects. range: Image required: true @@ -273,8 +277,8 @@ classes: the way this data is interpreted, the way it is visualized, and what analysis methods are applicable. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -339,8 +343,8 @@ classes: description: A collection of processed data. is_a: NWBContainer attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -376,6 +380,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Ordered dataset of references to Image objects stored in the parent group. Each Image object in the Images group should be stored once and only once, so the dataset should have the same length as the number diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.behavior.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.behavior.yaml index 226b5e1..8a994a2 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.behavior.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.behavior.yaml @@ -63,8 +63,8 @@ classes: units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -101,8 +101,8 @@ classes: events. BehavioralTimeSeries is for continuous data. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -115,8 +115,8 @@ classes: for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -129,8 +129,8 @@ classes: of BehavioralEpochs for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -142,8 +142,8 @@ classes: description: Eye-tracking data, representing pupil size. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -155,8 +155,8 @@ classes: description: Eye-tracking data, representing direction of gaze. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -172,8 +172,8 @@ classes: be radians or degrees. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -185,8 +185,8 @@ classes: description: Position data, whether along the x, x/y or x/y/z axis. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.ecephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.ecephys.yaml index 2172085..bb13169 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.ecephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.ecephys.yaml @@ -62,6 +62,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -177,6 +180,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -221,6 +227,17 @@ classes: range: float64 required: true multivalued: false + source_electricalseries: + name: source_electricalseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ElectricalSeries + - range: string tree_root: true EventWaveform: name: EventWaveform @@ -229,8 +246,8 @@ classes: during experiment acquisition. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -252,8 +269,8 @@ classes: the ElectricalSeries 'filtering' attribute. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -267,8 +284,8 @@ classes: properties should be noted in the ElectricalSeries 'filtering' attribute. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -300,6 +317,17 @@ classes: range: ElectrodeGroup__position required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ElectrodeGroup__position: name: ElectrodeGroup__position @@ -374,6 +402,17 @@ classes: range: float32 required: true multivalued: false + clustering_interface: + name: clustering_interface + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Clustering + - range: string tree_root: true Clustering: name: Clustering diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.epoch.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.epoch.yaml index 8c2e102..3764b00 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.epoch.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.epoch.yaml @@ -57,6 +57,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for tags. range: VectorIndex required: false @@ -67,6 +70,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: An index into a TimeSeries object. range: TimeSeriesReferenceVectorData required: false @@ -77,6 +83,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for timeseries. range: VectorIndex required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.file.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.file.yaml index 494e7ae..eb94ee7 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.file.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.file.yaml @@ -206,14 +206,9 @@ classes: having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. - multivalued: true - inlined: true - inlined_as_list: false - any_of: - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals + range: NWBFile__intervals + required: false + multivalued: false units: name: units description: Data about sorted spike units. @@ -694,6 +689,44 @@ classes: range: ExperimentalConditionsTable required: false multivalued: false + NWBFile__intervals: + name: NWBFile__intervals + description: Experimental intervals, whether that be logically distinct sub-experiments + having a particular scientific goal, trials (see trials subgroup) during an + experiment, or epochs (see epochs subgroup) deriving from analysis of data. + attributes: + name: + name: name + ifabsent: string(intervals) + range: string + required: true + equals_string: intervals + epochs: + name: epochs + description: Divisions in time marking experimental stages or sub-divisions + of a single recording session. + range: TimeIntervals + required: false + multivalued: false + trials: + name: trials + description: Repeated experimental events that have a logical grouping. + range: TimeIntervals + required: false + multivalued: false + invalid_times: + name: invalid_times + description: Time intervals that should be removed from analysis. + range: TimeIntervals + required: false + multivalued: false + time_intervals: + name: time_intervals + description: Optional additional table(s) for describing other experimental + time intervals. + range: TimeIntervals + required: false + multivalued: true LabMetaData: name: LabMetaData description: Lab-specific meta-data. diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.icephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.icephys.yaml index dbde975..de10ce5 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.icephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.icephys.yaml @@ -46,6 +46,17 @@ classes: range: float32 required: false multivalued: false + electrode: + name: electrode + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: IntracellularElectrode + - range: string tree_root: true PatchClampSeries__data: name: PatchClampSeries__data @@ -63,8 +74,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -507,6 +518,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true SweepTable: name: SweepTable @@ -541,6 +563,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for series. range: VectorIndex required: true @@ -585,6 +610,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Column storing the reference to the recorded stimulus for the recording (rows). range: TimeSeriesReferenceVectorData @@ -610,6 +638,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Column storing the reference to the recorded response for the recording (rows) range: TimeSeriesReferenceVectorData @@ -687,6 +718,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the recordings column. range: VectorIndex required: true @@ -737,6 +771,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the simultaneous_recordings column. range: VectorIndex required: true @@ -796,6 +833,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the sequential_recordings column. range: VectorIndex required: true @@ -843,6 +883,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the repetitions column. range: VectorIndex required: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.image.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.image.yaml index 169e913..c8a9988 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.image.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.image.yaml @@ -105,6 +105,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ImageSeries__external_file: name: ImageSeries__external_file @@ -134,8 +145,8 @@ classes: (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0]. range: int32 - array: - name: array + value: + name: value array: dimensions: - alias: num_files @@ -153,6 +164,17 @@ classes: name: name range: string required: true + masked_imageseries: + name: masked_imageseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true OpticalSeries: name: OpticalSeries @@ -240,4 +262,26 @@ classes: range: uint32 required: true multivalued: false + indexed_timeseries: + name: indexed_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: ImageSeries + - range: string + indexed_images: + name: indexed_images + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: Images + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.misc.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.misc.yaml index 18d7b69..e7204ff 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.misc.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.misc.yaml @@ -73,8 +73,8 @@ classes: the units in 'feature_units'. The default value for this attribute is "see 'feature_units'". range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -158,6 +158,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the channels that this decomposition series was generated from. range: DynamicTableRegion @@ -170,6 +173,17 @@ classes: range: DecompositionSeries__bands required: true multivalued: false + source_timeseries: + name: source_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: TimeSeries + - range: string tree_root: true DecompositionSeries__data: name: DecompositionSeries__data @@ -187,8 +201,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -263,6 +277,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the spike_times dataset. range: VectorIndex required: false @@ -279,6 +296,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the obs_intervals dataset. range: VectorIndex required: false @@ -300,6 +320,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into electrodes. range: VectorIndex required: false @@ -310,6 +333,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion required: false @@ -390,6 +416,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail. range: VectorIndex @@ -401,6 +430,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail. range: VectorIndex diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.ogen.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.ogen.yaml index 25902d8..adadc3e 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.ogen.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.ogen.yaml @@ -32,6 +32,17 @@ classes: range: numeric required: true multivalued: false + site: + name: site + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: OptogeneticStimulusSite + - range: string tree_root: true OptogeneticStimulusSite: name: OptogeneticStimulusSite @@ -62,4 +73,15 @@ classes: range: text required: true multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.ophys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.ophys.yaml index ebaa877..80df95c 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.ophys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.ophys.yaml @@ -50,6 +50,17 @@ classes: dimensions: - alias: width_height_depth exact_cardinality: 3 + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true RoiResponseSeries: name: RoiResponseSeries @@ -81,6 +92,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries. range: DynamicTableRegion @@ -94,8 +108,8 @@ classes: for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -109,8 +123,8 @@ classes: for ROIs and for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -128,8 +142,8 @@ classes: is required and ROI names should remain consistent between them. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -158,6 +172,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into pixel_mask. range: VectorIndex required: false @@ -176,6 +193,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into voxel_mask. range: VectorIndex required: false @@ -196,6 +216,17 @@ classes: inlined_as_list: false any_of: - range: ImageSeries + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true PlaneSegmentation__image_mask: name: PlaneSegmentation__image_mask @@ -282,14 +313,208 @@ classes: description: An imaging plane and its metadata. is_a: NWBContainer attributes: - children: - name: children + name: + name: name + range: string + required: true + description: + name: description + description: Description of the imaging plane. + range: text + required: false + multivalued: false + excitation_lambda: + name: excitation_lambda + description: Excitation wavelength, in nm. + range: float32 + required: true + multivalued: false + imaging_rate: + name: imaging_rate + description: Rate that images are acquired, in Hz. If the corresponding TimeSeries + is present, the rate should be stored there instead. + range: float32 + required: false + multivalued: false + indicator: + name: indicator + description: Calcium indicator. + range: text + required: true + multivalued: false + location: + name: location + description: Location of the imaging plane. Specify the area, layer, comments + on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use + standard atlas names for anatomical regions when possible. + range: text + required: true + multivalued: false + manifold: + name: manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents + the position of the pixel relative to the defined coordinate space. Deprecated + in favor of origin_coords and grid_spacing. + range: ImagingPlane__manifold + required: false + multivalued: false + origin_coords: + name: origin_coords + description: Physical location of the first element of the imaging plane (0, + 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for + what the physical location is relative to (e.g., bregma). + range: ImagingPlane__origin_coords + required: false + multivalued: false + grid_spacing: + name: grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also + reference_frame to interpret the grid. + range: ImagingPlane__grid_spacing + required: false + multivalued: false + reference_frame: + name: reference_frame + description: Describes reference frame of origin_coords and grid_spacing. + For example, this can be a text description of the anatomical location and + orientation of the grid defined by origin_coords and grid_spacing or the + vectors needed to transform or rotate the grid to a common anatomical axis + (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and + grid_spacing. If origin_coords and grid_spacing are not present, then this + field is not required. For example, if the microscope takes 10 x 10 x 2 + images, where the first value of the data matrix (index (0, 0, 0)) corresponds + to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is + 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means + more anterior, larger numbers in y means more rightward, and larger numbers + in z means more ventral, then enter the following -- origin_coords = (-1.2, + -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = "Origin coordinates + are relative to bregma. First dimension corresponds to anterior-posterior + axis (larger index = more anterior). Second dimension corresponds to medial-lateral + axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral + axis (larger index = more ventral)." + range: text + required: false + multivalued: false + optical_channel: + name: optical_channel + description: An optical channel used to record from an imaging plane. + range: OpticalChannel + required: true multivalued: true - inlined: true - inlined_as_list: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false any_of: - - range: OpticalChannel + - range: Device + - range: string tree_root: true + ImagingPlane__manifold: + name: ImagingPlane__manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents the + position of the pixel relative to the defined coordinate space. Deprecated in + favor of origin_coords and grid_spacing. + attributes: + name: + name: name + ifabsent: string(manifold) + range: string + required: true + equals_string: manifold + conversion: + name: conversion + description: Scalar to multiply each element in data to convert it to the + specified 'unit'. If the data are stored in acquisition system units or + other units that require a conversion to be interpretable, multiply the + data by 'conversion' to convert the data to the specified 'unit'. e.g. if + the data acquisition system stores values in this object as pixels from + x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then + the 'conversion' multiplier to get from raw data acquisition pixel units + to meters is 2/1000. + range: float32 + unit: + name: unit + description: Base unit of measurement for working with the data. The default + value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: height + - alias: width + - alias: x_y_z + exact_cardinality: 3 + - array: + dimensions: + - alias: height + - alias: width + - alias: depth + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__origin_coords: + name: ImagingPlane__origin_coords + description: Physical location of the first element of the imaging plane (0, 0) + for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the + physical location is relative to (e.g., bregma). + attributes: + name: + name: name + ifabsent: string(origin_coords) + range: string + required: true + equals_string: origin_coords + unit: + name: unit + description: Measurement units for origin_coords. The default value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - array: + dimensions: + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__grid_spacing: + name: ImagingPlane__grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame + to interpret the grid. + attributes: + name: + name: name + ifabsent: string(grid_spacing) + range: string + required: true + equals_string: grid_spacing + unit: + name: unit + description: Measurement units for grid_spacing. The default value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - array: + dimensions: + - alias: x_y_z + exact_cardinality: 3 OpticalChannel: name: OpticalChannel description: An optical channel used to record from an imaging plane. @@ -319,8 +544,8 @@ classes: frame at each point in time is assumed to be 2-D (has only x & y dimensions).' is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -349,4 +574,15 @@ classes: range: TimeSeries required: true multivalued: false + original: + name: original + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.retinotopy.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.retinotopy.yaml index 23a305e..31a6dd3 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.retinotopy.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_5_0/core.nwb.retinotopy.yaml @@ -114,8 +114,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -145,8 +145,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -175,8 +175,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -206,8 +206,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -246,8 +246,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -273,8 +273,8 @@ classes: name: field_of_view description: Size of viewing area, in meters. range: float32 - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -309,8 +309,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.base.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.base.yaml index df86c7a..6439b29 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.base.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.base.yaml @@ -77,8 +77,8 @@ classes: name: description description: Description of the image. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -107,8 +107,12 @@ classes: name: name range: string required: true - image: - name: image + value: + name: value + annotations: + source_type: + tag: source_type + value: reference description: Ordered dataset of references to Image objects. range: Image required: true @@ -273,8 +277,8 @@ classes: the way this data is interpreted, the way it is visualized, and what analysis methods are applicable. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -339,8 +343,8 @@ classes: description: A collection of processed data. is_a: NWBContainer attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -376,6 +380,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Ordered dataset of references to Image objects stored in the parent group. Each Image object in the Images group should be stored once and only once, so the dataset should have the same length as the number diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.behavior.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.behavior.yaml index 839f43b..9174b6a 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.behavior.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.behavior.yaml @@ -63,8 +63,8 @@ classes: units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -101,8 +101,8 @@ classes: events. BehavioralTimeSeries is for continuous data. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -115,8 +115,8 @@ classes: for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -129,8 +129,8 @@ classes: of BehavioralEpochs for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -142,8 +142,8 @@ classes: description: Eye-tracking data, representing pupil size. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -155,8 +155,8 @@ classes: description: Eye-tracking data, representing direction of gaze. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -172,8 +172,8 @@ classes: be radians or degrees. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -185,8 +185,8 @@ classes: description: Position data, whether along the x, x/y or x/y/z axis. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.ecephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.ecephys.yaml index 7c95205..7145c03 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.ecephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.ecephys.yaml @@ -62,6 +62,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -177,6 +180,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -221,6 +227,17 @@ classes: range: float64 required: true multivalued: false + source_electricalseries: + name: source_electricalseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ElectricalSeries + - range: string tree_root: true EventWaveform: name: EventWaveform @@ -229,8 +246,8 @@ classes: during experiment acquisition. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -252,8 +269,8 @@ classes: the ElectricalSeries 'filtering' attribute. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -267,8 +284,8 @@ classes: properties should be noted in the ElectricalSeries 'filtering' attribute. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -300,6 +317,17 @@ classes: range: ElectrodeGroup__position required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ElectrodeGroup__position: name: ElectrodeGroup__position @@ -374,6 +402,17 @@ classes: range: float32 required: true multivalued: false + clustering_interface: + name: clustering_interface + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Clustering + - range: string tree_root: true Clustering: name: Clustering diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.epoch.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.epoch.yaml index 7e9c4fc..fb0df61 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.epoch.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.epoch.yaml @@ -57,6 +57,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for tags. range: VectorIndex required: false @@ -67,6 +70,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: An index into a TimeSeries object. range: TimeSeriesReferenceVectorData required: false @@ -77,6 +83,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for timeseries. range: VectorIndex required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.file.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.file.yaml index 6e7a701..3ddb452 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.file.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.file.yaml @@ -206,14 +206,9 @@ classes: having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. - multivalued: true - inlined: true - inlined_as_list: false - any_of: - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals + range: NWBFile__intervals + required: false + multivalued: false units: name: units description: Data about sorted spike units. @@ -694,6 +689,44 @@ classes: range: ExperimentalConditionsTable required: false multivalued: false + NWBFile__intervals: + name: NWBFile__intervals + description: Experimental intervals, whether that be logically distinct sub-experiments + having a particular scientific goal, trials (see trials subgroup) during an + experiment, or epochs (see epochs subgroup) deriving from analysis of data. + attributes: + name: + name: name + ifabsent: string(intervals) + range: string + required: true + equals_string: intervals + epochs: + name: epochs + description: Divisions in time marking experimental stages or sub-divisions + of a single recording session. + range: TimeIntervals + required: false + multivalued: false + trials: + name: trials + description: Repeated experimental events that have a logical grouping. + range: TimeIntervals + required: false + multivalued: false + invalid_times: + name: invalid_times + description: Time intervals that should be removed from analysis. + range: TimeIntervals + required: false + multivalued: false + time_intervals: + name: time_intervals + description: Optional additional table(s) for describing other experimental + time intervals. + range: TimeIntervals + required: false + multivalued: true LabMetaData: name: LabMetaData description: Lab-specific meta-data. diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.icephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.icephys.yaml index bb47c9e..c24417f 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.icephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.icephys.yaml @@ -46,6 +46,17 @@ classes: range: float32 required: false multivalued: false + electrode: + name: electrode + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: IntracellularElectrode + - range: string tree_root: true PatchClampSeries__data: name: PatchClampSeries__data @@ -63,8 +74,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -507,6 +518,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true SweepTable: name: SweepTable @@ -541,6 +563,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for series. range: VectorIndex required: true @@ -585,6 +610,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Column storing the reference to the recorded stimulus for the recording (rows). range: TimeSeriesReferenceVectorData @@ -610,6 +638,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Column storing the reference to the recorded response for the recording (rows) range: TimeSeriesReferenceVectorData @@ -687,6 +718,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the recordings column. range: VectorIndex required: true @@ -737,6 +771,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the simultaneous_recordings column. range: VectorIndex required: true @@ -796,6 +833,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the sequential_recordings column. range: VectorIndex required: true @@ -843,6 +883,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the repetitions column. range: VectorIndex required: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.image.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.image.yaml index 114ea51..4d3fcd0 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.image.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.image.yaml @@ -105,6 +105,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ImageSeries__external_file: name: ImageSeries__external_file @@ -134,8 +145,8 @@ classes: (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0]. range: int32 - array: - name: array + value: + name: value array: dimensions: - alias: num_files @@ -153,6 +164,17 @@ classes: name: name range: string required: true + masked_imageseries: + name: masked_imageseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true OpticalSeries: name: OpticalSeries @@ -240,4 +262,26 @@ classes: range: uint32 required: true multivalued: false + indexed_timeseries: + name: indexed_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: ImageSeries + - range: string + indexed_images: + name: indexed_images + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: Images + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.misc.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.misc.yaml index d47eba8..07c142e 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.misc.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.misc.yaml @@ -73,8 +73,8 @@ classes: the units in 'feature_units'. The default value for this attribute is "see 'feature_units'". range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -158,6 +158,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the channels that this decomposition series was generated from. range: DynamicTableRegion @@ -170,6 +173,17 @@ classes: range: DecompositionSeries__bands required: true multivalued: false + source_timeseries: + name: source_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: TimeSeries + - range: string tree_root: true DecompositionSeries__data: name: DecompositionSeries__data @@ -187,8 +201,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -263,6 +277,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the spike_times dataset. range: VectorIndex required: false @@ -279,6 +296,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the obs_intervals dataset. range: VectorIndex required: false @@ -300,6 +320,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into electrodes. range: VectorIndex required: false @@ -310,6 +333,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion required: false @@ -390,6 +416,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail. range: VectorIndex @@ -401,6 +430,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail. range: VectorIndex diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.ogen.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.ogen.yaml index 9d01859..93ab4af 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.ogen.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.ogen.yaml @@ -32,6 +32,17 @@ classes: range: numeric required: true multivalued: false + site: + name: site + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: OptogeneticStimulusSite + - range: string tree_root: true OptogeneticStimulusSite: name: OptogeneticStimulusSite @@ -62,4 +73,15 @@ classes: range: text required: true multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.ophys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.ophys.yaml index f1d6bc1..877b532 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.ophys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.ophys.yaml @@ -51,6 +51,17 @@ classes: name: intensity description: Intensity of the excitation in mW/mm^2, if known. range: float32 + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true TwoPhotonSeries: name: TwoPhotonSeries @@ -86,6 +97,17 @@ classes: dimensions: - alias: width_height_depth exact_cardinality: 3 + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true RoiResponseSeries: name: RoiResponseSeries @@ -117,6 +139,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries. range: DynamicTableRegion @@ -130,8 +155,8 @@ classes: for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -145,8 +170,8 @@ classes: for ROIs and for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -164,8 +189,8 @@ classes: is required and ROI names should remain consistent between them. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -194,6 +219,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into pixel_mask. range: VectorIndex required: false @@ -212,6 +240,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into voxel_mask. range: VectorIndex required: false @@ -232,6 +263,17 @@ classes: inlined_as_list: false any_of: - range: ImageSeries + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true PlaneSegmentation__image_mask: name: PlaneSegmentation__image_mask @@ -318,14 +360,208 @@ classes: description: An imaging plane and its metadata. is_a: NWBContainer attributes: - children: - name: children + name: + name: name + range: string + required: true + description: + name: description + description: Description of the imaging plane. + range: text + required: false + multivalued: false + excitation_lambda: + name: excitation_lambda + description: Excitation wavelength, in nm. + range: float32 + required: true + multivalued: false + imaging_rate: + name: imaging_rate + description: Rate that images are acquired, in Hz. If the corresponding TimeSeries + is present, the rate should be stored there instead. + range: float32 + required: false + multivalued: false + indicator: + name: indicator + description: Calcium indicator. + range: text + required: true + multivalued: false + location: + name: location + description: Location of the imaging plane. Specify the area, layer, comments + on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use + standard atlas names for anatomical regions when possible. + range: text + required: true + multivalued: false + manifold: + name: manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents + the position of the pixel relative to the defined coordinate space. Deprecated + in favor of origin_coords and grid_spacing. + range: ImagingPlane__manifold + required: false + multivalued: false + origin_coords: + name: origin_coords + description: Physical location of the first element of the imaging plane (0, + 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for + what the physical location is relative to (e.g., bregma). + range: ImagingPlane__origin_coords + required: false + multivalued: false + grid_spacing: + name: grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also + reference_frame to interpret the grid. + range: ImagingPlane__grid_spacing + required: false + multivalued: false + reference_frame: + name: reference_frame + description: Describes reference frame of origin_coords and grid_spacing. + For example, this can be a text description of the anatomical location and + orientation of the grid defined by origin_coords and grid_spacing or the + vectors needed to transform or rotate the grid to a common anatomical axis + (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and + grid_spacing. If origin_coords and grid_spacing are not present, then this + field is not required. For example, if the microscope takes 10 x 10 x 2 + images, where the first value of the data matrix (index (0, 0, 0)) corresponds + to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is + 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means + more anterior, larger numbers in y means more rightward, and larger numbers + in z means more ventral, then enter the following -- origin_coords = (-1.2, + -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = "Origin coordinates + are relative to bregma. First dimension corresponds to anterior-posterior + axis (larger index = more anterior). Second dimension corresponds to medial-lateral + axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral + axis (larger index = more ventral)." + range: text + required: false + multivalued: false + optical_channel: + name: optical_channel + description: An optical channel used to record from an imaging plane. + range: OpticalChannel + required: true multivalued: true - inlined: true - inlined_as_list: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false any_of: - - range: OpticalChannel + - range: Device + - range: string tree_root: true + ImagingPlane__manifold: + name: ImagingPlane__manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents the + position of the pixel relative to the defined coordinate space. Deprecated in + favor of origin_coords and grid_spacing. + attributes: + name: + name: name + ifabsent: string(manifold) + range: string + required: true + equals_string: manifold + conversion: + name: conversion + description: Scalar to multiply each element in data to convert it to the + specified 'unit'. If the data are stored in acquisition system units or + other units that require a conversion to be interpretable, multiply the + data by 'conversion' to convert the data to the specified 'unit'. e.g. if + the data acquisition system stores values in this object as pixels from + x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then + the 'conversion' multiplier to get from raw data acquisition pixel units + to meters is 2/1000. + range: float32 + unit: + name: unit + description: Base unit of measurement for working with the data. The default + value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: height + - alias: width + - alias: x_y_z + exact_cardinality: 3 + - array: + dimensions: + - alias: height + - alias: width + - alias: depth + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__origin_coords: + name: ImagingPlane__origin_coords + description: Physical location of the first element of the imaging plane (0, 0) + for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the + physical location is relative to (e.g., bregma). + attributes: + name: + name: name + ifabsent: string(origin_coords) + range: string + required: true + equals_string: origin_coords + unit: + name: unit + description: Measurement units for origin_coords. The default value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - array: + dimensions: + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__grid_spacing: + name: ImagingPlane__grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame + to interpret the grid. + attributes: + name: + name: name + ifabsent: string(grid_spacing) + range: string + required: true + equals_string: grid_spacing + unit: + name: unit + description: Measurement units for grid_spacing. The default value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - array: + dimensions: + - alias: x_y_z + exact_cardinality: 3 OpticalChannel: name: OpticalChannel description: An optical channel used to record from an imaging plane. @@ -355,8 +591,8 @@ classes: frame at each point in time is assumed to be 2-D (has only x & y dimensions).' is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -385,4 +621,15 @@ classes: range: TimeSeries required: true multivalued: false + original: + name: original + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.retinotopy.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.retinotopy.yaml index 629bea8..e913c0d 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.retinotopy.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_6_0_alpha/core.nwb.retinotopy.yaml @@ -114,8 +114,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -145,8 +145,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -175,8 +175,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -206,8 +206,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -246,8 +246,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -273,8 +273,8 @@ classes: name: field_of_view description: Size of viewing area, in meters. range: float32 - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -309,8 +309,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.base.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.base.yaml index b21d698..0bd5bd0 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.base.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.base.yaml @@ -77,8 +77,8 @@ classes: name: description description: Description of the image. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -107,8 +107,12 @@ classes: name: name range: string required: true - image: - name: image + value: + name: value + annotations: + source_type: + tag: source_type + value: reference description: Ordered dataset of references to Image objects. range: Image required: true @@ -273,8 +277,8 @@ classes: the way this data is interpreted, the way it is visualized, and what analysis methods are applicable. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -339,8 +343,8 @@ classes: description: A collection of processed data. is_a: NWBContainer attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -376,6 +380,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Ordered dataset of references to Image objects stored in the parent group. Each Image object in the Images group should be stored once and only once, so the dataset should have the same length as the number diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.behavior.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.behavior.yaml index 91d2841..eabccf6 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.behavior.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.behavior.yaml @@ -63,8 +63,8 @@ classes: units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'. range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -101,8 +101,8 @@ classes: events. BehavioralTimeSeries is for continuous data. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -115,8 +115,8 @@ classes: for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -129,8 +129,8 @@ classes: of BehavioralEpochs for more details. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -142,8 +142,8 @@ classes: description: Eye-tracking data, representing pupil size. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -155,8 +155,8 @@ classes: description: Eye-tracking data, representing direction of gaze. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -172,8 +172,8 @@ classes: be radians or degrees. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -185,8 +185,8 @@ classes: description: Position data, whether along the x, x/y or x/y/z axis. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.ecephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.ecephys.yaml index f9525e7..378f644 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.ecephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.ecephys.yaml @@ -62,6 +62,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -177,6 +180,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the electrodes that this time series was generated from. range: DynamicTableRegion @@ -221,6 +227,17 @@ classes: range: float64 required: true multivalued: false + source_electricalseries: + name: source_electricalseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ElectricalSeries + - range: string tree_root: true EventWaveform: name: EventWaveform @@ -229,8 +246,8 @@ classes: during experiment acquisition. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -252,8 +269,8 @@ classes: the ElectricalSeries 'filtering' attribute. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -267,8 +284,8 @@ classes: properties should be noted in the ElectricalSeries 'filtering' attribute. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -300,6 +317,17 @@ classes: range: ElectrodeGroup__position required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ElectrodeGroup__position: name: ElectrodeGroup__position @@ -374,6 +402,17 @@ classes: range: float32 required: true multivalued: false + clustering_interface: + name: clustering_interface + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Clustering + - range: string tree_root: true Clustering: name: Clustering diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.epoch.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.epoch.yaml index b4586cd..1885024 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.epoch.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.epoch.yaml @@ -57,6 +57,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for tags. range: VectorIndex required: false @@ -67,6 +70,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: An index into a TimeSeries object. range: TimeSeriesReferenceVectorData required: false @@ -77,6 +83,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for timeseries. range: VectorIndex required: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.file.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.file.yaml index f0c47ab..a0978ba 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.file.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.file.yaml @@ -206,14 +206,9 @@ classes: having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data. - multivalued: true - inlined: true - inlined_as_list: false - any_of: - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals - - range: TimeIntervals + range: NWBFile__intervals + required: false + multivalued: false units: name: units description: Data about sorted spike units. @@ -696,6 +691,44 @@ classes: range: ExperimentalConditionsTable required: false multivalued: false + NWBFile__intervals: + name: NWBFile__intervals + description: Experimental intervals, whether that be logically distinct sub-experiments + having a particular scientific goal, trials (see trials subgroup) during an + experiment, or epochs (see epochs subgroup) deriving from analysis of data. + attributes: + name: + name: name + ifabsent: string(intervals) + range: string + required: true + equals_string: intervals + epochs: + name: epochs + description: Divisions in time marking experimental stages or sub-divisions + of a single recording session. + range: TimeIntervals + required: false + multivalued: false + trials: + name: trials + description: Repeated experimental events that have a logical grouping. + range: TimeIntervals + required: false + multivalued: false + invalid_times: + name: invalid_times + description: Time intervals that should be removed from analysis. + range: TimeIntervals + required: false + multivalued: false + time_intervals: + name: time_intervals + description: Optional additional table(s) for describing other experimental + time intervals. + range: TimeIntervals + required: false + multivalued: true LabMetaData: name: LabMetaData description: Lab-specific meta-data. diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.icephys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.icephys.yaml index fffe23a..3ad625d 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.icephys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.icephys.yaml @@ -46,6 +46,17 @@ classes: range: float32 required: false multivalued: false + electrode: + name: electrode + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: IntracellularElectrode + - range: string tree_root: true PatchClampSeries__data: name: PatchClampSeries__data @@ -63,8 +74,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -507,6 +518,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true SweepTable: name: SweepTable @@ -541,6 +563,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index for series. range: VectorIndex required: true @@ -585,6 +610,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Column storing the reference to the recorded stimulus for the recording (rows). range: TimeSeriesReferenceVectorData @@ -596,6 +624,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Column storing the reference to the stimulus template for the recording (rows). range: TimeSeriesReferenceVectorData @@ -621,6 +652,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Column storing the reference to the recorded response for the recording (rows) range: TimeSeriesReferenceVectorData @@ -698,6 +732,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the recordings column. range: VectorIndex required: true @@ -748,6 +785,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the simultaneous_recordings column. range: VectorIndex required: true @@ -807,6 +847,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the sequential_recordings column. range: VectorIndex required: true @@ -854,6 +897,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index dataset for the repetitions column. range: VectorIndex required: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.image.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.image.yaml index 645839e..b87f670 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.image.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.image.yaml @@ -105,6 +105,17 @@ classes: range: text required: false multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: Device + - range: string tree_root: true ImageSeries__external_file: name: ImageSeries__external_file @@ -134,8 +145,8 @@ classes: (and so there is a single element in the 'external_file' dataset), then this attribute should have value [0]. range: int32 - array: - name: array + value: + name: value array: dimensions: - alias: num_files @@ -153,6 +164,17 @@ classes: name: name range: string required: true + masked_imageseries: + name: masked_imageseries + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true OpticalSeries: name: OpticalSeries @@ -240,4 +262,26 @@ classes: range: uint32 required: true multivalued: false + indexed_timeseries: + name: indexed_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: ImageSeries + - range: string + indexed_images: + name: indexed_images + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: Images + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.misc.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.misc.yaml index 0b95ca2..bedbbeb 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.misc.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.misc.yaml @@ -73,8 +73,8 @@ classes: the units in 'feature_units'. The default value for this attribute is "see 'feature_units'". range: text - array: - name: array + value: + name: value range: numeric any_of: - array: @@ -158,6 +158,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion pointer to the channels that this decomposition series was generated from. range: DynamicTableRegion @@ -170,6 +173,17 @@ classes: range: DecompositionSeries__bands required: true multivalued: false + source_timeseries: + name: source_timeseries + annotations: + source_type: + tag: source_type + value: link + required: false + multivalued: false + any_of: + - range: TimeSeries + - range: string tree_root: true DecompositionSeries__data: name: DecompositionSeries__data @@ -187,8 +201,8 @@ classes: values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_times @@ -263,6 +277,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the spike_times dataset. range: VectorIndex required: false @@ -279,6 +296,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the obs_intervals dataset. range: VectorIndex required: false @@ -300,6 +320,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into electrodes. range: VectorIndex required: false @@ -310,6 +333,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion required: false @@ -390,6 +416,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail. range: VectorIndex @@ -401,6 +430,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail. range: VectorIndex diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.ogen.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.ogen.yaml index 5c6344e..085004d 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.ogen.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.ogen.yaml @@ -39,6 +39,17 @@ classes: dimensions: - alias: num_times - alias: num_rois + site: + name: site + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: OptogeneticStimulusSite + - range: string tree_root: true OptogeneticStimulusSite: name: OptogeneticStimulusSite @@ -69,4 +80,15 @@ classes: range: text required: true multivalued: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: Device + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.ophys.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.ophys.yaml index b3004c8..2e5036c 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.ophys.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.ophys.yaml @@ -51,6 +51,17 @@ classes: name: intensity description: Intensity of the excitation in mW/mm^2, if known. range: float32 + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true TwoPhotonSeries: name: TwoPhotonSeries @@ -86,6 +97,17 @@ classes: dimensions: - alias: width_height_depth exact_cardinality: 3 + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true RoiResponseSeries: name: RoiResponseSeries @@ -117,6 +139,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries. range: DynamicTableRegion @@ -130,8 +155,8 @@ classes: for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -145,8 +170,8 @@ classes: for ROIs and for image planes). is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -164,8 +189,8 @@ classes: is required and ROI names should remain consistent between them. is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -194,6 +219,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into pixel_mask. range: VectorIndex required: false @@ -212,6 +240,9 @@ classes: named: tag: named value: true + source_type: + tag: source_type + value: neurodata_type_inc description: Index into voxel_mask. range: VectorIndex required: false @@ -232,6 +263,17 @@ classes: inlined_as_list: false any_of: - range: ImageSeries + imaging_plane: + name: imaging_plane + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImagingPlane + - range: string tree_root: true PlaneSegmentation__image_mask: name: PlaneSegmentation__image_mask @@ -318,14 +360,208 @@ classes: description: An imaging plane and its metadata. is_a: NWBContainer attributes: - children: - name: children + name: + name: name + range: string + required: true + description: + name: description + description: Description of the imaging plane. + range: text + required: false + multivalued: false + excitation_lambda: + name: excitation_lambda + description: Excitation wavelength, in nm. + range: float32 + required: true + multivalued: false + imaging_rate: + name: imaging_rate + description: Rate that images are acquired, in Hz. If the corresponding TimeSeries + is present, the rate should be stored there instead. + range: float32 + required: false + multivalued: false + indicator: + name: indicator + description: Calcium indicator. + range: text + required: true + multivalued: false + location: + name: location + description: Location of the imaging plane. Specify the area, layer, comments + on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use + standard atlas names for anatomical regions when possible. + range: text + required: true + multivalued: false + manifold: + name: manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents + the position of the pixel relative to the defined coordinate space. Deprecated + in favor of origin_coords and grid_spacing. + range: ImagingPlane__manifold + required: false + multivalued: false + origin_coords: + name: origin_coords + description: Physical location of the first element of the imaging plane (0, + 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for + what the physical location is relative to (e.g., bregma). + range: ImagingPlane__origin_coords + required: false + multivalued: false + grid_spacing: + name: grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also + reference_frame to interpret the grid. + range: ImagingPlane__grid_spacing + required: false + multivalued: false + reference_frame: + name: reference_frame + description: Describes reference frame of origin_coords and grid_spacing. + For example, this can be a text description of the anatomical location and + orientation of the grid defined by origin_coords and grid_spacing or the + vectors needed to transform or rotate the grid to a common anatomical axis + (e.g., AP/DV/ML). This field is necessary to interpret origin_coords and + grid_spacing. If origin_coords and grid_spacing are not present, then this + field is not required. For example, if the microscope takes 10 x 10 x 2 + images, where the first value of the data matrix (index (0, 0, 0)) corresponds + to (-1.2, -0.6, -2) mm relative to bregma, the spacing between pixels is + 0.2 mm in x, 0.2 mm in y and 0.5 mm in z, and larger numbers in x means + more anterior, larger numbers in y means more rightward, and larger numbers + in z means more ventral, then enter the following -- origin_coords = (-1.2, + -0.6, -2) grid_spacing = (0.2, 0.2, 0.5) reference_frame = "Origin coordinates + are relative to bregma. First dimension corresponds to anterior-posterior + axis (larger index = more anterior). Second dimension corresponds to medial-lateral + axis (larger index = more rightward). Third dimension corresponds to dorsal-ventral + axis (larger index = more ventral)." + range: text + required: false + multivalued: false + optical_channel: + name: optical_channel + description: An optical channel used to record from an imaging plane. + range: OpticalChannel + required: true multivalued: true - inlined: true - inlined_as_list: false + device: + name: device + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false any_of: - - range: OpticalChannel + - range: Device + - range: string tree_root: true + ImagingPlane__manifold: + name: ImagingPlane__manifold + description: DEPRECATED Physical position of each pixel. 'xyz' represents the + position of the pixel relative to the defined coordinate space. Deprecated in + favor of origin_coords and grid_spacing. + attributes: + name: + name: name + ifabsent: string(manifold) + range: string + required: true + equals_string: manifold + conversion: + name: conversion + description: Scalar to multiply each element in data to convert it to the + specified 'unit'. If the data are stored in acquisition system units or + other units that require a conversion to be interpretable, multiply the + data by 'conversion' to convert the data to the specified 'unit'. e.g. if + the data acquisition system stores values in this object as pixels from + x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then + the 'conversion' multiplier to get from raw data acquisition pixel units + to meters is 2/1000. + range: float32 + unit: + name: unit + description: Base unit of measurement for working with the data. The default + value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: height + - alias: width + - alias: x_y_z + exact_cardinality: 3 + - array: + dimensions: + - alias: height + - alias: width + - alias: depth + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__origin_coords: + name: ImagingPlane__origin_coords + description: Physical location of the first element of the imaging plane (0, 0) + for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the + physical location is relative to (e.g., bregma). + attributes: + name: + name: name + ifabsent: string(origin_coords) + range: string + required: true + equals_string: origin_coords + unit: + name: unit + description: Measurement units for origin_coords. The default value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - array: + dimensions: + - alias: x_y_z + exact_cardinality: 3 + ImagingPlane__grid_spacing: + name: ImagingPlane__grid_spacing + description: Space between pixels in (x, y) or voxels in (x, y, z) directions, + in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame + to interpret the grid. + attributes: + name: + name: name + ifabsent: string(grid_spacing) + range: string + required: true + equals_string: grid_spacing + unit: + name: unit + description: Measurement units for grid_spacing. The default value is 'meters'. + range: text + value: + name: value + range: float32 + any_of: + - array: + dimensions: + - alias: x_y + exact_cardinality: 2 + - array: + dimensions: + - alias: x_y_z + exact_cardinality: 3 OpticalChannel: name: OpticalChannel description: An optical channel used to record from an imaging plane. @@ -355,8 +591,8 @@ classes: frame at each point in time is assumed to be 2-D (has only x & y dimensions).' is_a: NWBDataInterface attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false @@ -385,4 +621,15 @@ classes: range: TimeSeries required: true multivalued: false + original: + name: original + annotations: + source_type: + tag: source_type + value: link + required: true + multivalued: false + any_of: + - range: ImageSeries + - range: string tree_root: true diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.retinotopy.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.retinotopy.yaml index 4bcc17a..f3173d3 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.retinotopy.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/core/v2_7_0/core.nwb.retinotopy.yaml @@ -114,8 +114,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -145,8 +145,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -175,8 +175,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -206,8 +206,8 @@ classes: name: unit description: Unit that axis data is stored in (e.g., degrees). range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -246,8 +246,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -273,8 +273,8 @@ classes: name: field_of_view description: Size of viewing area, in meters. range: float32 - array: - name: array + value: + name: value array: dimensions: - alias: num_rows @@ -309,8 +309,8 @@ classes: name: format description: Format of image. Right now only 'raw' is supported. range: text - array: - name: array + value: + name: value array: dimensions: - alias: num_rows diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_1_3/hdmf-common.table.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_1_3/hdmf-common.table.yaml index 48a60ac..ec35619 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_1_3/hdmf-common.table.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_1_3/hdmf-common.table.yaml @@ -55,8 +55,8 @@ classes: name: description description: Description of what these vectors represent. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -93,8 +93,8 @@ classes: name: target description: Reference to the target dataset that this index applies to. range: VectorData - array: - name: array + value: + name: value array: dimensions: - alias: num_rows diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_5_0/hdmf-common.base.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_5_0/hdmf-common.base.yaml index e57c52a..1244aae 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_5_0/hdmf-common.base.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_5_0/hdmf-common.base.yaml @@ -36,8 +36,8 @@ classes: description: A simple Container for holding onto multiple containers. is_a: Container attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_5_0/hdmf-common.table.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_5_0/hdmf-common.table.yaml index cbaf95a..aaef099 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_5_0/hdmf-common.table.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_5_0/hdmf-common.table.yaml @@ -33,8 +33,8 @@ classes: name: description description: Description of what these vectors represent. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -175,8 +175,8 @@ classes: by a separate DynamicTable stored within the group. is_a: DynamicTable attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_8_0/hdmf-common.base.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_8_0/hdmf-common.base.yaml index 0365fab..b03629e 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_8_0/hdmf-common.base.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_8_0/hdmf-common.base.yaml @@ -36,8 +36,8 @@ classes: description: A simple Container for holding onto multiple containers. is_a: Container attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false diff --git a/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_8_0/hdmf-common.table.yaml b/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_8_0/hdmf-common.table.yaml index ecd7b48..d3398c4 100644 --- a/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_8_0/hdmf-common.table.yaml +++ b/nwb_linkml/src/nwb_linkml/schema/linkml/hdmf_common/v1_8_0/hdmf-common.table.yaml @@ -33,8 +33,8 @@ classes: name: description description: Description of what these vectors represent. range: text - array: - name: array + value: + name: value range: AnyType any_of: - array: @@ -175,8 +175,8 @@ classes: by a separate DynamicTable stored within the group. is_a: DynamicTable attributes: - children: - name: children + value: + name: value multivalued: true inlined: true inlined_as_list: false