diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_base.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_base.py index 263d389..3a7121f 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_base.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_base.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_behavior.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_behavior.py index 5691dab..3cdb697 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_behavior.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_behavior.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_device.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_device.py index ab24817..35e469e 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_device.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_device.py @@ -21,7 +21,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_ecephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_ecephys.py index 136ec40..50c35df 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_ecephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_ecephys.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_epoch.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_epoch.py index 4ab3c01..d9e8670 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_epoch.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_epoch.py @@ -36,7 +36,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_file.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_file.py index ae16391..574b467 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_file.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_file.py @@ -40,7 +40,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_icephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_icephys.py index 439d5af..c118384 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_icephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_icephys.py @@ -42,7 +42,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_image.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_image.py index 33784d6..1f4d01f 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_image.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_image.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_misc.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_misc.py index e8a4896..97cc604 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_misc.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_misc.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_ogen.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_ogen.py index 998dda0..1fec83c 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_ogen.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_ogen.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_ophys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_ophys.py index 70db9d7..587c4a8 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_ophys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_ophys.py @@ -39,7 +39,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_retinotopy.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_retinotopy.py index 17edeec..66760ac 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_retinotopy.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/core_nwb_retinotopy.py @@ -31,7 +31,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/namespace.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/namespace.py index d4b265d..39065e8 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/namespace.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_0/namespace.py @@ -149,7 +149,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_base.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_base.py index f0f43be..d509055 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_base.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_base.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_behavior.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_behavior.py index e96918c..9520fc7 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_behavior.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_behavior.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_device.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_device.py index 80de9c0..c6c0821 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_device.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_device.py @@ -21,7 +21,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_ecephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_ecephys.py index 169dd5e..59392d2 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_ecephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_ecephys.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_epoch.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_epoch.py index ed1353e..6b07a73 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_epoch.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_epoch.py @@ -36,7 +36,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_file.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_file.py index b5a0b9b..bb40dc6 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_file.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_file.py @@ -40,7 +40,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_icephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_icephys.py index 991c1e8..e55e757 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_icephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_icephys.py @@ -42,7 +42,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_image.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_image.py index 52c10a5..ee1b247 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_image.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_image.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_misc.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_misc.py index 19a036f..4ccb41a 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_misc.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_misc.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_ogen.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_ogen.py index 609baf0..c26180e 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_ogen.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_ogen.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_ophys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_ophys.py index a951c51..27ca8a7 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_ophys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_ophys.py @@ -39,7 +39,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_retinotopy.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_retinotopy.py index 1c6f4ad..8b286c0 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_retinotopy.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/core_nwb_retinotopy.py @@ -31,7 +31,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/namespace.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/namespace.py index 7f2ade1..1000273 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/namespace.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_1/namespace.py @@ -149,7 +149,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_base.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_base.py index 956e37d..1608518 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_base.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_base.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_behavior.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_behavior.py index 271fceb..7a295d0 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_behavior.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_behavior.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_device.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_device.py index 28aa954..952fd14 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_device.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_device.py @@ -21,7 +21,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_ecephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_ecephys.py index 9664726..678627d 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_ecephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_ecephys.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_epoch.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_epoch.py index c12a965..4398b2e 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_epoch.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_epoch.py @@ -36,7 +36,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_file.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_file.py index ec66471..a754163 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_file.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_file.py @@ -40,7 +40,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_icephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_icephys.py index 9b7729d..7e8e860 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_icephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_icephys.py @@ -42,7 +42,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_image.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_image.py index 6e805b1..c6a1bdf 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_image.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_image.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_misc.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_misc.py index d80af52..6ebbb31 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_misc.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_misc.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_ogen.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_ogen.py index debdaf9..d8706fb 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_ogen.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_ogen.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_ophys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_ophys.py index e7b56da..9355878 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_ophys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_ophys.py @@ -39,7 +39,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_retinotopy.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_retinotopy.py index bfa2ad5..4a6bba8 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_retinotopy.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/core_nwb_retinotopy.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/namespace.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/namespace.py index 9ba793b..68aa1ca 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/namespace.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_2/namespace.py @@ -152,7 +152,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_base.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_base.py index 0e81486..79dbd8e 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_base.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_base.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_behavior.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_behavior.py index 42613b4..d8c8111 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_behavior.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_behavior.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_device.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_device.py index 1aeeb6c..bd4959b 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_device.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_device.py @@ -21,7 +21,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_ecephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_ecephys.py index d4f5172..d5ca311 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_ecephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_ecephys.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_epoch.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_epoch.py index 61f894b..7d0e888 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_epoch.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_epoch.py @@ -36,7 +36,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_file.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_file.py index 9167a4d..ffc9887 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_file.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_file.py @@ -41,7 +41,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_icephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_icephys.py index 8067eb7..944696c 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_icephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_icephys.py @@ -42,7 +42,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_image.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_image.py index 05c1d6e..ec713bb 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_image.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_image.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_misc.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_misc.py index 5ff807c..6fb5183 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_misc.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_misc.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_ogen.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_ogen.py index 20f6353..959ec53 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_ogen.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_ogen.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_ophys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_ophys.py index b91e448..f8b39ac 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_ophys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_ophys.py @@ -45,7 +45,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_retinotopy.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_retinotopy.py index 362bc59..271df8c 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_retinotopy.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/core_nwb_retinotopy.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/namespace.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/namespace.py index 23ec3dd..ba443d7 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/namespace.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_4/namespace.py @@ -159,7 +159,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_base.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_base.py index 86fe03f..14986e7 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_base.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_base.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_behavior.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_behavior.py index f4f5e96..686f581 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_behavior.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_behavior.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_device.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_device.py index 5abfc5d..cc5f2a1 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_device.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_device.py @@ -21,7 +21,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_ecephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_ecephys.py index 48d2503..78d83f8 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_ecephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_ecephys.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_epoch.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_epoch.py index 6a8ba5a..69289cd 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_epoch.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_epoch.py @@ -36,7 +36,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_file.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_file.py index 59aa79e..2a7b510 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_file.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_file.py @@ -41,7 +41,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_icephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_icephys.py index ee68bff..4d04eec 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_icephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_icephys.py @@ -42,7 +42,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_image.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_image.py index f3d0d5f..22bc4dc 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_image.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_image.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_misc.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_misc.py index 5faeb05..2730432 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_misc.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_misc.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_ogen.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_ogen.py index 6c81182..7a31e4c 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_ogen.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_ogen.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_ophys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_ophys.py index 98c3a53..f7e0674 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_ophys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_ophys.py @@ -45,7 +45,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_retinotopy.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_retinotopy.py index 5466646..5594f52 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_retinotopy.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/core_nwb_retinotopy.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/namespace.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/namespace.py index 5d12f36..4f78598 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/namespace.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_2_5/namespace.py @@ -159,7 +159,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_base.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_base.py index ad3c5f4..0450a89 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_base.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_base.py @@ -23,7 +23,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_behavior.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_behavior.py index 8358db6..fbf64a4 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_behavior.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_behavior.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -176,6 +176,20 @@ class SpatialSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Optional[str] = Field( "meters", 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'.""", diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_device.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_device.py index 5c0f451..08d5073 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_device.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_device.py @@ -21,7 +21,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_ecephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_ecephys.py index 2676bd5..6630b23 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_ecephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_ecephys.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -156,11 +156,12 @@ class ElectricalSeries(TimeSeries): None, description="""Filtering applied to all channels of the data. For example, if this ElectricalSeries represents high-pass-filtered data (also known as AP Band), then this value could be \"High-pass 4-pole Bessel filter at 500 Hz\". If this ElectricalSeries represents low-pass-filtered LFP data and the type of filter is unknown, then this value could be \"Low-pass filter at 300 Hz\". If a non-standard filter type is used, provide as much detail about the filter properties as possible.""", ) - data: Union[ - NDArray[Shape["* num_times"], float], - NDArray[Shape["* num_times, * num_channels"], float], - NDArray[Shape["* num_times, * num_channels, * num_samples"], float], - ] = Field(..., description="""Recorded voltage data.""") + channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( + None, + description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", + json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, + ) + data: ElectricalSeriesData = Field(..., description="""Recorded voltage data.""") electrodes: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", @@ -173,11 +174,6 @@ class ElectricalSeries(TimeSeries): } }, ) - channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( - None, - description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, - ) description: Optional[str] = Field( "no description", description="""Description of the time series.""", @@ -215,6 +211,45 @@ class ElectricalSeries(TimeSeries): ) +class ElectricalSeriesData(ConfiguredBaseModel): + """ + Recorded voltage data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ecephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["volts"] = Field( + "volts", + description="""Base unit of measurement for working with the data. This value is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and 'channel_conversion' (if present).""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + value: Optional[ + Union[ + NDArray[Shape["* num_times"], float], + NDArray[Shape["* num_times, * num_channels"], float], + NDArray[Shape["* num_times, * num_channels, * num_samples"], float], + ] + ] = Field(None) + + class SpikeEventSeries(ElectricalSeries): """ Stores snapshots/snippets of recorded spike events (i.e., threshold crossings). This may also be raw data, as reported by ephys hardware. If so, the TimeSeries::description field should describe how events were detected. All SpikeEventSeries should reside in a module (under EventWaveform interface) even if the spikes were reported and stored by hardware. All events span the same recording channels and store snapshots of equal duration. TimeSeries::data array structure: [num events] [num channels] [num samples] (or [num events] [num samples] for single electrode). @@ -225,10 +260,7 @@ class SpikeEventSeries(ElectricalSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* num_events, * num_samples"], float], - NDArray[Shape["* num_events, * num_channels, * num_samples"], float], - ] = Field(..., description="""Spike waveforms.""") + data: SpikeEventSeriesData = Field(..., description="""Spike waveforms.""") timestamps: NDArray[Shape["* num_times"], float] = Field( ..., description="""Timestamps for samples stored in data, in seconds, relative to the common experiment master-clock stored in NWBFile.timestamps_reference_time. Timestamps are required for the events. Unlike for TimeSeries, timestamps are required for SpikeEventSeries and are thus re-specified here.""", @@ -238,6 +270,11 @@ class SpikeEventSeries(ElectricalSeries): None, description="""Filtering applied to all channels of the data. For example, if this ElectricalSeries represents high-pass-filtered data (also known as AP Band), then this value could be \"High-pass 4-pole Bessel filter at 500 Hz\". If this ElectricalSeries represents low-pass-filtered LFP data and the type of filter is unknown, then this value could be \"Low-pass filter at 300 Hz\". If a non-standard filter type is used, provide as much detail about the filter properties as possible.""", ) + channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( + None, + description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", + json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, + ) electrodes: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", @@ -250,11 +287,6 @@ class SpikeEventSeries(ElectricalSeries): } }, ) - channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( - None, - description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, - ) description: Optional[str] = Field( "no description", description="""Description of the time series.""", @@ -287,6 +319,44 @@ class SpikeEventSeries(ElectricalSeries): ) +class SpikeEventSeriesData(ConfiguredBaseModel): + """ + Spike waveforms. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ecephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["volts"] = Field( + "volts", + description="""Unit of measurement for waveforms, which is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + value: Optional[ + Union[ + NDArray[Shape["* num_events, * num_samples"], float], + NDArray[Shape["* num_events, * num_channels, * num_samples"], float], + ] + ] = Field(None) + + class FeatureExtraction(NWBDataInterface): """ Features, such as PC1 and PC2, that are extracted from signals stored in a SpikeEventSeries or other source. @@ -561,7 +631,9 @@ class Clustering(NWBDataInterface): # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model ElectricalSeries.model_rebuild() +ElectricalSeriesData.model_rebuild() SpikeEventSeries.model_rebuild() +SpikeEventSeriesData.model_rebuild() FeatureExtraction.model_rebuild() EventDetection.model_rebuild() EventWaveform.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_epoch.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_epoch.py index 93ea1ba..96ec1a4 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_epoch.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_epoch.py @@ -36,7 +36,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_file.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_file.py index d692065..7cb5cb1 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_file.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_file.py @@ -25,7 +25,12 @@ from ...core.v2_3_0.core_nwb_icephys import IntracellularElectrode, SweepTable from ...core.v2_3_0.core_nwb_misc import Units from ...core.v2_3_0.core_nwb_ogen import OptogeneticStimulusSite from ...core.v2_3_0.core_nwb_ophys import ImagingPlane -from ...hdmf_common.v1_5_0.hdmf_common_table import DynamicTable, ElementIdentifiers, VectorData +from ...hdmf_common.v1_5_0.hdmf_common_table import ( + DynamicTable, + ElementIdentifiers, + VectorData, + VectorIndex, +) metamodel_version = "None" @@ -36,7 +41,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_icephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_icephys.py index 1fb2a04..6be9e7e 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_icephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_icephys.py @@ -42,7 +42,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -224,6 +224,20 @@ class PatchClampSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: str = Field( ..., 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'.""", @@ -243,12 +257,12 @@ class CurrentClampSeries(PatchClampSeries): ) name: str = Field(...) - data: CurrentClampSeriesData = Field(..., description="""Recorded voltage.""") bias_current: Optional[float] = Field(None, description="""Bias current, in amps.""") bridge_balance: Optional[float] = Field(None, description="""Bridge balance, in ohms.""") capacitance_compensation: Optional[float] = Field( None, description="""Capacitance compensation, in farads.""" ) + data: CurrentClampSeriesData = Field(..., description="""Recorded voltage.""") stimulus_description: str = Field( ..., description="""Protocol/stimulus name for this patch-clamp dataset.""" ) @@ -316,12 +330,28 @@ class CurrentClampSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["volts"] = Field( "volts", description="""Base unit of measurement for working with the data. which is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class IZeroClampSeries(CurrentClampSeries): @@ -476,6 +506,20 @@ class CurrentClampStimulusSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["amperes"] = Field( "amperes", description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", @@ -483,7 +527,9 @@ class CurrentClampStimulusSeriesData(ConfiguredBaseModel): "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} }, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class VoltageClampSeries(PatchClampSeries): @@ -496,13 +542,13 @@ class VoltageClampSeries(PatchClampSeries): ) name: str = Field(...) - data: VoltageClampSeriesData = Field(..., description="""Recorded current.""") capacitance_fast: Optional[VoltageClampSeriesCapacitanceFast] = Field( None, description="""Fast capacitance, in farads.""" ) capacitance_slow: Optional[VoltageClampSeriesCapacitanceSlow] = Field( None, description="""Slow capacitance, in farads.""" ) + data: VoltageClampSeriesData = Field(..., description="""Recorded current.""") resistance_comp_bandwidth: Optional[VoltageClampSeriesResistanceCompBandwidth] = Field( None, description="""Resistance compensation bandwidth, in hertz.""" ) @@ -574,27 +620,6 @@ class VoltageClampSeries(PatchClampSeries): ) -class VoltageClampSeriesData(ConfiguredBaseModel): - """ - Recorded current. - """ - - linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.icephys"}) - - name: Literal["data"] = Field( - "data", - json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, - ) - unit: Literal["amperes"] = Field( - "amperes", - description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", - json_schema_extra={ - "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} - }, - ) - value: Any = Field(...) - - class VoltageClampSeriesCapacitanceFast(ConfiguredBaseModel): """ Fast capacitance, in farads. @@ -647,6 +672,43 @@ class VoltageClampSeriesCapacitanceSlow(ConfiguredBaseModel): value: float = Field(...) +class VoltageClampSeriesData(ConfiguredBaseModel): + """ + Recorded current. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.icephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["amperes"] = Field( + "amperes", + description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", + json_schema_extra={ + "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} + }, + ) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class VoltageClampSeriesResistanceCompBandwidth(ConfiguredBaseModel): """ Resistance compensation bandwidth, in hertz. @@ -851,12 +913,28 @@ class VoltageClampStimulusSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["volts"] = Field( "volts", description="""Base unit of measurement for working with the data. which is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class IntracellularElectrode(NWBContainer): @@ -906,15 +984,6 @@ class SweepTable(DynamicTable): ) name: str = Field(...) - sweep_number: VectorData[NDArray[Any, int]] = Field( - ..., - description="""Sweep number of the PatchClampSeries in that row.""", - json_schema_extra={ - "linkml_meta": { - "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} - } - }, - ) series: VectorData[NDArray[Any, PatchClampSeries]] = Field( ..., description="""The PatchClampSeries with the sweep number in that row.""", @@ -936,6 +1005,15 @@ class SweepTable(DynamicTable): } }, ) + sweep_number: VectorData[NDArray[Any, int]] = Field( + ..., + description="""Sweep number of the PatchClampSeries in that row.""", + json_schema_extra={ + "linkml_meta": { + "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} + } + }, + ) colnames: List[str] = Field( ..., description="""The names of the columns in this table. This should be used to specify an order to the columns.""", @@ -958,9 +1036,9 @@ IZeroClampSeries.model_rebuild() CurrentClampStimulusSeries.model_rebuild() CurrentClampStimulusSeriesData.model_rebuild() VoltageClampSeries.model_rebuild() -VoltageClampSeriesData.model_rebuild() VoltageClampSeriesCapacitanceFast.model_rebuild() VoltageClampSeriesCapacitanceSlow.model_rebuild() +VoltageClampSeriesData.model_rebuild() VoltageClampSeriesResistanceCompBandwidth.model_rebuild() VoltageClampSeriesResistanceCompCorrection.model_rebuild() VoltageClampSeriesResistanceCompPrediction.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_image.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_image.py index 8758ca8..b080a46 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_image.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_image.py @@ -23,7 +23,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -198,12 +198,9 @@ class ImageSeries(TimeSeries): ) name: str = Field(...) - data: Optional[ - Union[ - NDArray[Shape["* frame, * x, * y"], float], - NDArray[Shape["* frame, * x, * y, * z"], float], - ] - ] = Field(None, description="""Binary data representing images across frames.""") + data: Optional[ImageSeriesData] = Field( + None, description="""Binary data representing images across frames.""" + ) dimension: Optional[NDArray[Shape["* rank"], int]] = Field( None, description="""Number of pixels on x, y, (and z) axes.""", @@ -214,8 +211,9 @@ class ImageSeries(TimeSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -263,6 +261,43 @@ class ImageSeries(TimeSeries): ) +class ImageSeriesData(ConfiguredBaseModel): + """ + Binary data representing images across frames. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + continuity: Optional[str] = Field( + 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.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* frame, * x, * y"], float], + NDArray[Shape["* frame, * x, * y, * z"], float], + ] + ] = Field(None) + + class ImageSeriesExternalFile(ConfiguredBaseModel): """ Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file. @@ -304,12 +339,9 @@ class ImageMaskSeries(ImageSeries): } }, ) - data: Optional[ - Union[ - NDArray[Shape["* frame, * x, * y"], float], - NDArray[Shape["* frame, * x, * y, * z"], float], - ] - ] = Field(None, description="""Binary data representing images across frames.""") + data: Optional[ImageSeriesData] = Field( + None, description="""Binary data representing images across frames.""" + ) dimension: Optional[NDArray[Shape["* rank"], int]] = Field( None, description="""Number of pixels on x, y, (and z) axes.""", @@ -320,8 +352,9 @@ class ImageMaskSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -379,6 +412,9 @@ class OpticalSeries(ImageSeries): ) name: str = Field(...) + data: OpticalSeriesData = Field( + ..., description="""Images presented to subject, either grayscale or RGB""" + ) distance: Optional[float] = Field( None, description="""Distance from camera/monitor to target/eye.""" ) @@ -387,10 +423,6 @@ class OpticalSeries(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.""") - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], - NDArray[Shape["* frame, * x, * y, 3 r_g_b"], float], - ] = Field(..., description="""Images presented to subject, either grayscale or RGB""") orientation: Optional[str] = Field( None, description="""Description of image relative to some reference frame (e.g., which way is up). Must also specify frame of reference.""", @@ -405,8 +437,9 @@ class OpticalSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -454,6 +487,43 @@ class OpticalSeries(ImageSeries): ) +class OpticalSeriesData(ConfiguredBaseModel): + """ + Images presented to subject, either grayscale or RGB + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* frame, * x, * y"], float], + NDArray[Shape["* frame, * x, * y, 3 r_g_b"], float], + ] + ] = Field(None) + + class IndexSeries(TimeSeries): """ Stores indices to image frames stored in an ImageSeries. The purpose of the ImageIndexSeries is to allow a static image stack to be stored somewhere, and the images in the stack to be referenced out-of-order. This can be for the display of individual images, or of movie segments (as a movie is simply a series of images). The data field stores the index of the frame in the referenced ImageSeries, and the timestamps array indicates when that image was displayed. @@ -464,10 +534,8 @@ class IndexSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], int] = Field( - ..., - description="""Index of the frame in the referenced ImageSeries.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: IndexSeriesData = Field( + ..., description="""Index of the frame in the referenced ImageSeries.""" ) indexed_timeseries: Union[ImageSeries, str] = Field( ..., @@ -515,13 +583,50 @@ class IndexSeries(TimeSeries): ) +class IndexSeriesData(ConfiguredBaseModel): + """ + Index of the frame in the referenced ImageSeries. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + continuity: Optional[str] = Field( + 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.""", + ) + value: Optional[NDArray[Shape["* num_times"], int]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model GrayscaleImage.model_rebuild() RGBImage.model_rebuild() RGBAImage.model_rebuild() ImageSeries.model_rebuild() +ImageSeriesData.model_rebuild() ImageSeriesExternalFile.model_rebuild() ImageMaskSeries.model_rebuild() OpticalSeries.model_rebuild() +OpticalSeriesData.model_rebuild() IndexSeries.model_rebuild() +IndexSeriesData.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_misc.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_misc.py index ac3b366..90ee48e 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_misc.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_misc.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -213,6 +213,20 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Optional[str] = Field( "see ", 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'\".""", @@ -236,10 +250,8 @@ class AnnotationSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], str] = Field( - ..., - description="""Annotations made during an experiment.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: AnnotationSeriesData = Field( + ..., description="""Annotations made during an experiment.""" ) description: Optional[str] = Field( "no description", @@ -278,6 +290,43 @@ class AnnotationSeries(TimeSeries): ) +class AnnotationSeriesData(ConfiguredBaseModel): + """ + Annotations made during an experiment. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: float = Field( + -1.0, + description="""Smallest meaningful difference between values in data. Annotations have no units, so the value is fixed to -1.0.""", + le=-1, + ge=-1, + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["n/a"] = Field( + "n/a", + description="""Base unit of measurement for working with the data. Annotations have no units, so the value is fixed to 'n/a'.""", + json_schema_extra={"linkml_meta": {"equals_string": "n/a", "ifabsent": "string(n/a)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], str]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class IntervalSeries(TimeSeries): """ Stores intervals of data. The timestamps field stores the beginning and end of intervals. The data field stores whether the interval just started (>0 value) or ended (<0 value). Different interval types can be represented in the same series by using multiple key values (eg, 1 for feature A, 2 for feature B, 3 for feature C, etc). The field data stores an 8-bit integer. This is largely an alias of a standard TimeSeries but that is identifiable as representing time intervals in a machine-readable way. @@ -288,10 +337,8 @@ class IntervalSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], int] = Field( - ..., - description="""Use values >0 if interval started, <0 if interval ended.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: IntervalSeriesData = Field( + ..., description="""Use values >0 if interval started, <0 if interval ended.""" ) description: Optional[str] = Field( "no description", @@ -330,6 +377,43 @@ class IntervalSeries(TimeSeries): ) +class IntervalSeriesData(ConfiguredBaseModel): + """ + Use values >0 if interval started, <0 if interval ended. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: float = Field( + -1.0, + description="""Smallest meaningful difference between values in data. Annotations have no units, so the value is fixed to -1.0.""", + le=-1, + ge=-1, + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["n/a"] = Field( + "n/a", + description="""Base unit of measurement for working with the data. Annotations have no units, so the value is fixed to 'n/a'.""", + json_schema_extra={"linkml_meta": {"equals_string": "n/a", "ifabsent": "string(n/a)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], int]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class DecompositionSeries(TimeSeries): """ Spectral analysis of a time series, e.g. of an LFP or a speech signal. @@ -417,6 +501,20 @@ class DecompositionSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: str = Field( "no unit", 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'.""", @@ -504,9 +602,18 @@ class Units(DynamicTable): ) name: str = Field("Units", json_schema_extra={"linkml_meta": {"ifabsent": "string(Units)"}}) - spike_times_index: Optional[Named[VectorIndex]] = Field( + electrode_group: Optional[VectorData[NDArray[Any, ElectrodeGroup]]] = Field( None, - description="""Index into the spike_times dataset.""", + description="""Electrode group that each spike unit came from.""", + json_schema_extra={ + "linkml_meta": { + "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} + } + }, + ) + electrodes: Optional[Named[DynamicTableRegion]] = Field( + None, + description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -516,12 +623,9 @@ class Units(DynamicTable): } }, ) - spike_times: Optional[UnitsSpikeTimes] = Field( - None, description="""Spike times for each unit.""" - ) - obs_intervals_index: Optional[Named[VectorIndex]] = Field( + electrodes_index: Optional[Named[VectorIndex]] = Field( None, - description="""Index into the obs_intervals dataset.""", + description="""Index into electrodes.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -547,9 +651,9 @@ class Units(DynamicTable): }, ) ) - electrodes_index: Optional[Named[VectorIndex]] = Field( + obs_intervals_index: Optional[Named[VectorIndex]] = Field( None, - description="""Index into electrodes.""", + description="""Index into the obs_intervals dataset.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -559,9 +663,12 @@ class Units(DynamicTable): } }, ) - electrodes: Optional[Named[DynamicTableRegion]] = Field( + spike_times: Optional[UnitsSpikeTimes] = Field( + None, description="""Spike times for each unit.""" + ) + spike_times_index: Optional[Named[VectorIndex]] = Field( None, - description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", + description="""Index into the spike_times dataset.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -571,41 +678,15 @@ class Units(DynamicTable): } }, ) - electrode_group: Optional[VectorData[NDArray[Any, ElectrodeGroup]]] = Field( - None, - description="""Electrode group that each spike unit came from.""", - json_schema_extra={ - "linkml_meta": { - "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} - } - }, + waveform_mean: Optional[UnitsWaveformMean] = Field( + None, description="""Spike waveform mean for each spike unit.""" ) - waveform_mean: Optional[ - VectorData[ - Union[ - NDArray[Shape["* num_units, * num_samples"], float], - NDArray[Shape["* num_units, * num_samples, * num_electrodes"], float], - ] - ] - ] = Field(None, description="""Spike waveform mean for each spike unit.""") - waveform_sd: Optional[ - VectorData[ - Union[ - NDArray[Shape["* num_units, * num_samples"], float], - NDArray[Shape["* num_units, * num_samples, * num_electrodes"], float], - ] - ] - ] = Field(None, description="""Spike waveform standard deviation for each spike unit.""") - waveforms: Optional[VectorData[NDArray[Shape["* num_waveforms, * num_samples"], float]]] = ( - Field( - None, - description="""Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same.""", - json_schema_extra={ - "linkml_meta": { - "array": {"dimensions": [{"alias": "num_waveforms"}, {"alias": "num_samples"}]} - } - }, - ) + waveform_sd: Optional[UnitsWaveformSd] = Field( + None, description="""Spike waveform standard deviation for each spike unit.""" + ) + waveforms: Optional[UnitsWaveforms] = Field( + None, + description="""Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same.""", ) waveforms_index: Optional[Named[VectorIndex]] = Field( None, @@ -671,14 +752,109 @@ class UnitsSpikeTimes(VectorData): ] = Field(None) +class UnitsWaveformMean(VectorData): + """ + Spike waveform mean for each spike unit. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveform_mean"] = Field( + "waveform_mean", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveform_mean", "ifabsent": "string(waveform_mean)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + +class UnitsWaveformSd(VectorData): + """ + Spike waveform standard deviation for each spike unit. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveform_sd"] = Field( + "waveform_sd", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveform_sd", "ifabsent": "string(waveform_sd)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + +class UnitsWaveforms(VectorData): + """ + Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveforms"] = Field( + "waveforms", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveforms", "ifabsent": "string(waveforms)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model AbstractFeatureSeries.model_rebuild() AbstractFeatureSeriesData.model_rebuild() AnnotationSeries.model_rebuild() +AnnotationSeriesData.model_rebuild() IntervalSeries.model_rebuild() +IntervalSeriesData.model_rebuild() DecompositionSeries.model_rebuild() DecompositionSeriesData.model_rebuild() DecompositionSeriesBands.model_rebuild() Units.model_rebuild() UnitsSpikeTimes.model_rebuild() +UnitsWaveformMean.model_rebuild() +UnitsWaveformSd.model_rebuild() +UnitsWaveforms.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_ogen.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_ogen.py index bf95c5c..e55129b 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_ogen.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_ogen.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -121,10 +121,8 @@ class OptogeneticSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], float] = Field( - ..., - description="""Applied power for optogenetic stimulus, in watts.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: OptogeneticSeriesData = Field( + ..., description="""Applied power for optogenetic stimulus, in watts.""" ) site: Union[OptogeneticStimulusSite, str] = Field( ..., @@ -172,6 +170,41 @@ class OptogeneticSeries(TimeSeries): ) +class OptogeneticSeriesData(ConfiguredBaseModel): + """ + Applied power for optogenetic stimulus, in watts. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ogen"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["watts"] = Field( + "watts", + description="""Unit of measurement for data, which is fixed to 'watts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "watts", "ifabsent": "string(watts)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class OptogeneticStimulusSite(NWBContainer): """ A site of optogenetic stimulation. @@ -202,4 +235,5 @@ class OptogeneticStimulusSite(NWBContainer): # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model OptogeneticSeries.model_rebuild() +OptogeneticSeriesData.model_rebuild() OptogeneticStimulusSite.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_ophys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_ophys.py index 670269a..f6eb103 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_ophys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_ophys.py @@ -27,7 +27,7 @@ from ...core.v2_3_0.core_nwb_base import ( TimeSeriesSync, ) from ...core.v2_3_0.core_nwb_device import Device -from ...core.v2_3_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile +from ...core.v2_3_0.core_nwb_image import ImageSeries, ImageSeriesData, ImageSeriesExternalFile from ...hdmf_common.v1_5_0.hdmf_common_table import ( DynamicTable, DynamicTableRegion, @@ -45,7 +45,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -179,12 +179,9 @@ class TwoPhotonSeries(ImageSeries): } }, ) - data: Optional[ - Union[ - NDArray[Shape["* frame, * x, * y"], float], - NDArray[Shape["* frame, * x, * y, * z"], float], - ] - ] = Field(None, description="""Binary data representing images across frames.""") + data: Optional[ImageSeriesData] = Field( + None, description="""Binary data representing images across frames.""" + ) dimension: Optional[NDArray[Shape["* rank"], int]] = Field( None, description="""Number of pixels on x, y, (and z) axes.""", @@ -195,8 +192,9 @@ class TwoPhotonSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -254,9 +252,7 @@ class RoiResponseSeries(TimeSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_rois"], float] - ] = Field(..., description="""Signals from ROIs.""") + data: RoiResponseSeriesData = Field(..., description="""Signals from ROIs.""") rois: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", @@ -306,6 +302,42 @@ class RoiResponseSeries(TimeSeries): ) +class RoiResponseSeriesData(ConfiguredBaseModel): + """ + Signals from ROIs. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + continuity: Optional[str] = Field( + 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.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_rois"], float] + ] + ] = Field(None) + + class DfOverF(NWBDataInterface): """ dF/F information about a region of interest (ROI). Storage hierarchy of dF/F should be the same as for segmentation (i.e., same names for ROIs and for image planes). @@ -372,6 +404,10 @@ class PlaneSegmentation(DynamicTable): None, description="""ROI masks for each ROI. Each image mask is the size of the original imaging plane (or volume) and members of the ROI are finite non-zero.""", ) + pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( + None, + description="""Pixel masks for each ROI: a list of indices and weights for the ROI. Pixel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", + ) pixel_mask_index: Optional[Named[VectorIndex]] = Field( None, description="""Index into pixel_mask.""", @@ -384,9 +420,9 @@ class PlaneSegmentation(DynamicTable): } }, ) - pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( + voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( None, - description="""Pixel masks for each ROI: a list of indices and weights for the ROI. Pixel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", + description="""Voxel masks for each ROI: a list of indices and weights for the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", ) voxel_mask_index: Optional[Named[VectorIndex]] = Field( None, @@ -400,10 +436,6 @@ class PlaneSegmentation(DynamicTable): } }, ) - voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( - None, - description="""Voxel masks for each ROI: a list of indices and weights for the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", - ) reference_images: Optional[Dict[str, ImageSeries]] = Field( None, description="""Image stacks that the segmentation masks apply to.""", @@ -702,6 +734,7 @@ class CorrectedImageStack(NWBDataInterface): # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model TwoPhotonSeries.model_rebuild() RoiResponseSeries.model_rebuild() +RoiResponseSeriesData.model_rebuild() DfOverF.model_rebuild() Fluorescence.model_rebuild() ImageSegmentation.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_retinotopy.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_retinotopy.py index 5c78658..38f2e67 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_retinotopy.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/core_nwb_retinotopy.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/namespace.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/namespace.py index 2125d57..a0842a1 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/namespace.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_3_0/namespace.py @@ -38,6 +38,7 @@ from ...core.v2_3_0.core_nwb_ecephys import ( ClusterWaveforms, Clustering, ElectricalSeries, + ElectricalSeriesData, ElectrodeGroup, ElectrodeGroupPosition, EventDetection, @@ -46,6 +47,7 @@ from ...core.v2_3_0.core_nwb_ecephys import ( FilteredEphys, LFP, SpikeEventSeries, + SpikeEventSeriesData, ) from ...core.v2_3_0.core_nwb_epoch import TimeIntervals, TimeIntervalsTimeseries from ...core.v2_3_0.core_nwb_file import ( @@ -87,9 +89,12 @@ from ...core.v2_3_0.core_nwb_image import ( GrayscaleImage, ImageMaskSeries, ImageSeries, + ImageSeriesData, ImageSeriesExternalFile, IndexSeries, + IndexSeriesData, OpticalSeries, + OpticalSeriesData, RGBAImage, RGBImage, ) @@ -97,14 +102,23 @@ from ...core.v2_3_0.core_nwb_misc import ( AbstractFeatureSeries, AbstractFeatureSeriesData, AnnotationSeries, + AnnotationSeriesData, DecompositionSeries, DecompositionSeriesBands, DecompositionSeriesData, IntervalSeries, + IntervalSeriesData, Units, UnitsSpikeTimes, + UnitsWaveformMean, + UnitsWaveformSd, + UnitsWaveforms, +) +from ...core.v2_3_0.core_nwb_ogen import ( + OptogeneticSeries, + OptogeneticSeriesData, + OptogeneticStimulusSite, ) -from ...core.v2_3_0.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite from ...core.v2_3_0.core_nwb_ophys import ( CorrectedImageStack, DfOverF, @@ -120,6 +134,7 @@ from ...core.v2_3_0.core_nwb_ophys import ( PlaneSegmentationPixelMask, PlaneSegmentationVoxelMask, RoiResponseSeries, + RoiResponseSeriesData, TwoPhotonSeries, ) from ...core.v2_3_0.core_nwb_retinotopy import ( @@ -161,7 +176,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_base.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_base.py index f8b6d99..0948248 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_base.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_base.py @@ -36,7 +36,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_behavior.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_behavior.py index 7c0abb8..074546e 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_behavior.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_behavior.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -176,6 +176,20 @@ class SpatialSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Optional[str] = Field( "meters", 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'.""", diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_device.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_device.py index 436d2d4..c253e9e 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_device.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_device.py @@ -21,7 +21,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_ecephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_ecephys.py index ac26b29..64c0ab0 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_ecephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_ecephys.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -156,11 +156,12 @@ class ElectricalSeries(TimeSeries): None, description="""Filtering applied to all channels of the data. For example, if this ElectricalSeries represents high-pass-filtered data (also known as AP Band), then this value could be \"High-pass 4-pole Bessel filter at 500 Hz\". If this ElectricalSeries represents low-pass-filtered LFP data and the type of filter is unknown, then this value could be \"Low-pass filter at 300 Hz\". If a non-standard filter type is used, provide as much detail about the filter properties as possible.""", ) - data: Union[ - NDArray[Shape["* num_times"], float], - NDArray[Shape["* num_times, * num_channels"], float], - NDArray[Shape["* num_times, * num_channels, * num_samples"], float], - ] = Field(..., description="""Recorded voltage data.""") + channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( + None, + description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", + json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, + ) + data: ElectricalSeriesData = Field(..., description="""Recorded voltage data.""") electrodes: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", @@ -173,11 +174,6 @@ class ElectricalSeries(TimeSeries): } }, ) - channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( - None, - description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, - ) description: Optional[str] = Field( "no description", description="""Description of the time series.""", @@ -215,6 +211,45 @@ class ElectricalSeries(TimeSeries): ) +class ElectricalSeriesData(ConfiguredBaseModel): + """ + Recorded voltage data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ecephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["volts"] = Field( + "volts", + description="""Base unit of measurement for working with the data. This value is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and 'channel_conversion' (if present).""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + value: Optional[ + Union[ + NDArray[Shape["* num_times"], float], + NDArray[Shape["* num_times, * num_channels"], float], + NDArray[Shape["* num_times, * num_channels, * num_samples"], float], + ] + ] = Field(None) + + class SpikeEventSeries(ElectricalSeries): """ Stores snapshots/snippets of recorded spike events (i.e., threshold crossings). This may also be raw data, as reported by ephys hardware. If so, the TimeSeries::description field should describe how events were detected. All SpikeEventSeries should reside in a module (under EventWaveform interface) even if the spikes were reported and stored by hardware. All events span the same recording channels and store snapshots of equal duration. TimeSeries::data array structure: [num events] [num channels] [num samples] (or [num events] [num samples] for single electrode). @@ -225,10 +260,7 @@ class SpikeEventSeries(ElectricalSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* num_events, * num_samples"], float], - NDArray[Shape["* num_events, * num_channels, * num_samples"], float], - ] = Field(..., description="""Spike waveforms.""") + data: SpikeEventSeriesData = Field(..., description="""Spike waveforms.""") timestamps: NDArray[Shape["* num_times"], float] = Field( ..., description="""Timestamps for samples stored in data, in seconds, relative to the common experiment master-clock stored in NWBFile.timestamps_reference_time. Timestamps are required for the events. Unlike for TimeSeries, timestamps are required for SpikeEventSeries and are thus re-specified here.""", @@ -238,6 +270,11 @@ class SpikeEventSeries(ElectricalSeries): None, description="""Filtering applied to all channels of the data. For example, if this ElectricalSeries represents high-pass-filtered data (also known as AP Band), then this value could be \"High-pass 4-pole Bessel filter at 500 Hz\". If this ElectricalSeries represents low-pass-filtered LFP data and the type of filter is unknown, then this value could be \"Low-pass filter at 300 Hz\". If a non-standard filter type is used, provide as much detail about the filter properties as possible.""", ) + channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( + None, + description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", + json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, + ) electrodes: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", @@ -250,11 +287,6 @@ class SpikeEventSeries(ElectricalSeries): } }, ) - channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( - None, - description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, - ) description: Optional[str] = Field( "no description", description="""Description of the time series.""", @@ -287,6 +319,44 @@ class SpikeEventSeries(ElectricalSeries): ) +class SpikeEventSeriesData(ConfiguredBaseModel): + """ + Spike waveforms. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ecephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["volts"] = Field( + "volts", + description="""Unit of measurement for waveforms, which is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + value: Optional[ + Union[ + NDArray[Shape["* num_events, * num_samples"], float], + NDArray[Shape["* num_events, * num_channels, * num_samples"], float], + ] + ] = Field(None) + + class FeatureExtraction(NWBDataInterface): """ Features, such as PC1 and PC2, that are extracted from signals stored in a SpikeEventSeries or other source. @@ -561,7 +631,9 @@ class Clustering(NWBDataInterface): # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model ElectricalSeries.model_rebuild() +ElectricalSeriesData.model_rebuild() SpikeEventSeries.model_rebuild() +SpikeEventSeriesData.model_rebuild() FeatureExtraction.model_rebuild() EventDetection.model_rebuild() EventWaveform.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_epoch.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_epoch.py index 25894a3..6904077 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_epoch.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_epoch.py @@ -36,7 +36,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_file.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_file.py index 84d5b9a..c92a64b 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_file.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_file.py @@ -33,7 +33,12 @@ from ...core.v2_4_0.core_nwb_icephys import ( from ...core.v2_4_0.core_nwb_misc import Units from ...core.v2_4_0.core_nwb_ogen import OptogeneticStimulusSite from ...core.v2_4_0.core_nwb_ophys import ImagingPlane -from ...hdmf_common.v1_5_0.hdmf_common_table import DynamicTable, ElementIdentifiers, VectorData +from ...hdmf_common.v1_5_0.hdmf_common_table import ( + DynamicTable, + ElementIdentifiers, + VectorData, + VectorIndex, +) metamodel_version = "None" @@ -44,7 +49,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_icephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_icephys.py index d4ebcb3..0fd2950 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_icephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_icephys.py @@ -45,7 +45,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -227,6 +227,20 @@ class PatchClampSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: str = Field( ..., 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'.""", @@ -246,12 +260,12 @@ class CurrentClampSeries(PatchClampSeries): ) name: str = Field(...) - data: CurrentClampSeriesData = Field(..., description="""Recorded voltage.""") bias_current: Optional[float] = Field(None, description="""Bias current, in amps.""") bridge_balance: Optional[float] = Field(None, description="""Bridge balance, in ohms.""") capacitance_compensation: Optional[float] = Field( None, description="""Capacitance compensation, in farads.""" ) + data: CurrentClampSeriesData = Field(..., description="""Recorded voltage.""") stimulus_description: str = Field( ..., description="""Protocol/stimulus name for this patch-clamp dataset.""" ) @@ -319,12 +333,28 @@ class CurrentClampSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["volts"] = Field( "volts", description="""Base unit of measurement for working with the data. which is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class IZeroClampSeries(CurrentClampSeries): @@ -479,6 +509,20 @@ class CurrentClampStimulusSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["amperes"] = Field( "amperes", description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", @@ -486,7 +530,9 @@ class CurrentClampStimulusSeriesData(ConfiguredBaseModel): "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} }, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class VoltageClampSeries(PatchClampSeries): @@ -499,13 +545,13 @@ class VoltageClampSeries(PatchClampSeries): ) name: str = Field(...) - data: VoltageClampSeriesData = Field(..., description="""Recorded current.""") capacitance_fast: Optional[VoltageClampSeriesCapacitanceFast] = Field( None, description="""Fast capacitance, in farads.""" ) capacitance_slow: Optional[VoltageClampSeriesCapacitanceSlow] = Field( None, description="""Slow capacitance, in farads.""" ) + data: VoltageClampSeriesData = Field(..., description="""Recorded current.""") resistance_comp_bandwidth: Optional[VoltageClampSeriesResistanceCompBandwidth] = Field( None, description="""Resistance compensation bandwidth, in hertz.""" ) @@ -577,27 +623,6 @@ class VoltageClampSeries(PatchClampSeries): ) -class VoltageClampSeriesData(ConfiguredBaseModel): - """ - Recorded current. - """ - - linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.icephys"}) - - name: Literal["data"] = Field( - "data", - json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, - ) - unit: Literal["amperes"] = Field( - "amperes", - description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", - json_schema_extra={ - "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} - }, - ) - value: Any = Field(...) - - class VoltageClampSeriesCapacitanceFast(ConfiguredBaseModel): """ Fast capacitance, in farads. @@ -650,6 +675,43 @@ class VoltageClampSeriesCapacitanceSlow(ConfiguredBaseModel): value: float = Field(...) +class VoltageClampSeriesData(ConfiguredBaseModel): + """ + Recorded current. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.icephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["amperes"] = Field( + "amperes", + description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", + json_schema_extra={ + "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} + }, + ) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class VoltageClampSeriesResistanceCompBandwidth(ConfiguredBaseModel): """ Resistance compensation bandwidth, in hertz. @@ -854,12 +916,28 @@ class VoltageClampStimulusSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["volts"] = Field( "volts", description="""Base unit of measurement for working with the data. which is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""", json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class IntracellularElectrode(NWBContainer): @@ -909,15 +987,6 @@ class SweepTable(DynamicTable): ) name: str = Field(...) - sweep_number: VectorData[NDArray[Any, int]] = Field( - ..., - description="""Sweep number of the PatchClampSeries in that row.""", - json_schema_extra={ - "linkml_meta": { - "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} - } - }, - ) series: VectorData[NDArray[Any, PatchClampSeries]] = Field( ..., description="""The PatchClampSeries with the sweep number in that row.""", @@ -939,6 +1008,15 @@ class SweepTable(DynamicTable): } }, ) + sweep_number: VectorData[NDArray[Any, int]] = Field( + ..., + description="""Sweep number of the PatchClampSeries in that row.""", + json_schema_extra={ + "linkml_meta": { + "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} + } + }, + ) colnames: List[str] = Field( ..., description="""The names of the columns in this table. This should be used to specify an order to the columns.""", @@ -1120,12 +1198,12 @@ class IntracellularRecordingsTable(AlignedDynamicTable): electrodes: IntracellularElectrodesTable = Field( ..., description="""Table for storing intracellular electrode related metadata.""" ) - stimuli: IntracellularStimuliTable = Field( - ..., description="""Table for storing intracellular stimulus related metadata.""" - ) responses: IntracellularResponsesTable = Field( ..., description="""Table for storing intracellular response related metadata.""" ) + stimuli: IntracellularStimuliTable = Field( + ..., description="""Table for storing intracellular stimulus related metadata.""" + ) value: Optional[Dict[str, DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) @@ -1465,9 +1543,9 @@ IZeroClampSeries.model_rebuild() CurrentClampStimulusSeries.model_rebuild() CurrentClampStimulusSeriesData.model_rebuild() VoltageClampSeries.model_rebuild() -VoltageClampSeriesData.model_rebuild() VoltageClampSeriesCapacitanceFast.model_rebuild() VoltageClampSeriesCapacitanceSlow.model_rebuild() +VoltageClampSeriesData.model_rebuild() VoltageClampSeriesResistanceCompBandwidth.model_rebuild() VoltageClampSeriesResistanceCompCorrection.model_rebuild() VoltageClampSeriesResistanceCompPrediction.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_image.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_image.py index 8fd3288..10a1d92 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_image.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_image.py @@ -23,7 +23,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -198,9 +198,7 @@ class ImageSeries(TimeSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -214,8 +212,9 @@ class ImageSeries(TimeSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -263,6 +262,43 @@ class ImageSeries(TimeSeries): ) +class ImageSeriesData(ConfiguredBaseModel): + """ + Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + continuity: Optional[str] = Field( + 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.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* frame, * x, * y"], float], + NDArray[Shape["* frame, * x, * y, * z"], float], + ] + ] = Field(None) + + class ImageSeriesExternalFile(ConfiguredBaseModel): """ Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file. @@ -304,9 +340,7 @@ class ImageMaskSeries(ImageSeries): } }, ) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -320,8 +354,9 @@ class ImageMaskSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -379,6 +414,9 @@ class OpticalSeries(ImageSeries): ) name: str = Field(...) + data: OpticalSeriesData = Field( + ..., description="""Images presented to subject, either grayscale or RGB""" + ) distance: Optional[float] = Field( None, description="""Distance from camera/monitor to target/eye.""" ) @@ -387,10 +425,6 @@ class OpticalSeries(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.""") - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], - NDArray[Shape["* frame, * x, * y, 3 r_g_b"], float], - ] = Field(..., description="""Images presented to subject, either grayscale or RGB""") orientation: Optional[str] = Field( None, description="""Description of image relative to some reference frame (e.g., which way is up). Must also specify frame of reference.""", @@ -405,8 +439,9 @@ class OpticalSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -454,6 +489,43 @@ class OpticalSeries(ImageSeries): ) +class OpticalSeriesData(ConfiguredBaseModel): + """ + Images presented to subject, either grayscale or RGB + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* frame, * x, * y"], float], + NDArray[Shape["* frame, * x, * y, 3 r_g_b"], float], + ] + ] = Field(None) + + class IndexSeries(TimeSeries): """ Stores indices to image frames stored in an ImageSeries. The purpose of the ImageIndexSeries is to allow a static image stack to be stored somewhere, and the images in the stack to be referenced out-of-order. This can be for the display of individual images, or of movie segments (as a movie is simply a series of images). The data field stores the index of the frame in the referenced ImageSeries, and the timestamps array indicates when that image was displayed. @@ -464,10 +536,8 @@ class IndexSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], int] = Field( - ..., - description="""Index of the frame in the referenced ImageSeries.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: IndexSeriesData = Field( + ..., description="""Index of the frame in the referenced ImageSeries.""" ) indexed_timeseries: Union[ImageSeries, str] = Field( ..., @@ -515,13 +585,50 @@ class IndexSeries(TimeSeries): ) +class IndexSeriesData(ConfiguredBaseModel): + """ + Index of the frame in the referenced ImageSeries. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + continuity: Optional[str] = Field( + 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.""", + ) + value: Optional[NDArray[Shape["* num_times"], int]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model GrayscaleImage.model_rebuild() RGBImage.model_rebuild() RGBAImage.model_rebuild() ImageSeries.model_rebuild() +ImageSeriesData.model_rebuild() ImageSeriesExternalFile.model_rebuild() ImageMaskSeries.model_rebuild() OpticalSeries.model_rebuild() +OpticalSeriesData.model_rebuild() IndexSeries.model_rebuild() +IndexSeriesData.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_misc.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_misc.py index 3ab6b75..3ccb411 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_misc.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_misc.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -213,6 +213,20 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Optional[str] = Field( "see ", 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'\".""", @@ -236,10 +250,8 @@ class AnnotationSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], str] = Field( - ..., - description="""Annotations made during an experiment.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: AnnotationSeriesData = Field( + ..., description="""Annotations made during an experiment.""" ) description: Optional[str] = Field( "no description", @@ -278,6 +290,43 @@ class AnnotationSeries(TimeSeries): ) +class AnnotationSeriesData(ConfiguredBaseModel): + """ + Annotations made during an experiment. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: float = Field( + -1.0, + description="""Smallest meaningful difference between values in data. Annotations have no units, so the value is fixed to -1.0.""", + le=-1, + ge=-1, + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["n/a"] = Field( + "n/a", + description="""Base unit of measurement for working with the data. Annotations have no units, so the value is fixed to 'n/a'.""", + json_schema_extra={"linkml_meta": {"equals_string": "n/a", "ifabsent": "string(n/a)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], str]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class IntervalSeries(TimeSeries): """ Stores intervals of data. The timestamps field stores the beginning and end of intervals. The data field stores whether the interval just started (>0 value) or ended (<0 value). Different interval types can be represented in the same series by using multiple key values (eg, 1 for feature A, 2 for feature B, 3 for feature C, etc). The field data stores an 8-bit integer. This is largely an alias of a standard TimeSeries but that is identifiable as representing time intervals in a machine-readable way. @@ -288,10 +337,8 @@ class IntervalSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], int] = Field( - ..., - description="""Use values >0 if interval started, <0 if interval ended.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: IntervalSeriesData = Field( + ..., description="""Use values >0 if interval started, <0 if interval ended.""" ) description: Optional[str] = Field( "no description", @@ -330,6 +377,43 @@ class IntervalSeries(TimeSeries): ) +class IntervalSeriesData(ConfiguredBaseModel): + """ + Use values >0 if interval started, <0 if interval ended. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: float = Field( + -1.0, + description="""Smallest meaningful difference between values in data. Annotations have no units, so the value is fixed to -1.0.""", + le=-1, + ge=-1, + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["n/a"] = Field( + "n/a", + description="""Base unit of measurement for working with the data. Annotations have no units, so the value is fixed to 'n/a'.""", + json_schema_extra={"linkml_meta": {"equals_string": "n/a", "ifabsent": "string(n/a)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], int]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class DecompositionSeries(TimeSeries): """ Spectral analysis of a time series, e.g. of an LFP or a speech signal. @@ -417,6 +501,20 @@ class DecompositionSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: str = Field( "no unit", 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'.""", @@ -504,9 +602,18 @@ class Units(DynamicTable): ) name: str = Field("Units", json_schema_extra={"linkml_meta": {"ifabsent": "string(Units)"}}) - spike_times_index: Optional[Named[VectorIndex]] = Field( + electrode_group: Optional[VectorData[NDArray[Any, ElectrodeGroup]]] = Field( None, - description="""Index into the spike_times dataset.""", + description="""Electrode group that each spike unit came from.""", + json_schema_extra={ + "linkml_meta": { + "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} + } + }, + ) + electrodes: Optional[Named[DynamicTableRegion]] = Field( + None, + description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -516,12 +623,9 @@ class Units(DynamicTable): } }, ) - spike_times: Optional[UnitsSpikeTimes] = Field( - None, description="""Spike times for each unit.""" - ) - obs_intervals_index: Optional[Named[VectorIndex]] = Field( + electrodes_index: Optional[Named[VectorIndex]] = Field( None, - description="""Index into the obs_intervals dataset.""", + description="""Index into electrodes.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -547,9 +651,9 @@ class Units(DynamicTable): }, ) ) - electrodes_index: Optional[Named[VectorIndex]] = Field( + obs_intervals_index: Optional[Named[VectorIndex]] = Field( None, - description="""Index into electrodes.""", + description="""Index into the obs_intervals dataset.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -559,9 +663,12 @@ class Units(DynamicTable): } }, ) - electrodes: Optional[Named[DynamicTableRegion]] = Field( + spike_times: Optional[UnitsSpikeTimes] = Field( + None, description="""Spike times for each unit.""" + ) + spike_times_index: Optional[Named[VectorIndex]] = Field( None, - description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", + description="""Index into the spike_times dataset.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -571,41 +678,15 @@ class Units(DynamicTable): } }, ) - electrode_group: Optional[VectorData[NDArray[Any, ElectrodeGroup]]] = Field( - None, - description="""Electrode group that each spike unit came from.""", - json_schema_extra={ - "linkml_meta": { - "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} - } - }, + waveform_mean: Optional[UnitsWaveformMean] = Field( + None, description="""Spike waveform mean for each spike unit.""" ) - waveform_mean: Optional[ - VectorData[ - Union[ - NDArray[Shape["* num_units, * num_samples"], float], - NDArray[Shape["* num_units, * num_samples, * num_electrodes"], float], - ] - ] - ] = Field(None, description="""Spike waveform mean for each spike unit.""") - waveform_sd: Optional[ - VectorData[ - Union[ - NDArray[Shape["* num_units, * num_samples"], float], - NDArray[Shape["* num_units, * num_samples, * num_electrodes"], float], - ] - ] - ] = Field(None, description="""Spike waveform standard deviation for each spike unit.""") - waveforms: Optional[VectorData[NDArray[Shape["* num_waveforms, * num_samples"], float]]] = ( - Field( - None, - description="""Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same.""", - json_schema_extra={ - "linkml_meta": { - "array": {"dimensions": [{"alias": "num_waveforms"}, {"alias": "num_samples"}]} - } - }, - ) + waveform_sd: Optional[UnitsWaveformSd] = Field( + None, description="""Spike waveform standard deviation for each spike unit.""" + ) + waveforms: Optional[UnitsWaveforms] = Field( + None, + description="""Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same.""", ) waveforms_index: Optional[Named[VectorIndex]] = Field( None, @@ -671,14 +752,109 @@ class UnitsSpikeTimes(VectorData): ] = Field(None) +class UnitsWaveformMean(VectorData): + """ + Spike waveform mean for each spike unit. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveform_mean"] = Field( + "waveform_mean", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveform_mean", "ifabsent": "string(waveform_mean)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + +class UnitsWaveformSd(VectorData): + """ + Spike waveform standard deviation for each spike unit. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveform_sd"] = Field( + "waveform_sd", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveform_sd", "ifabsent": "string(waveform_sd)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + +class UnitsWaveforms(VectorData): + """ + Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveforms"] = Field( + "waveforms", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveforms", "ifabsent": "string(waveforms)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model AbstractFeatureSeries.model_rebuild() AbstractFeatureSeriesData.model_rebuild() AnnotationSeries.model_rebuild() +AnnotationSeriesData.model_rebuild() IntervalSeries.model_rebuild() +IntervalSeriesData.model_rebuild() DecompositionSeries.model_rebuild() DecompositionSeriesData.model_rebuild() DecompositionSeriesBands.model_rebuild() Units.model_rebuild() UnitsSpikeTimes.model_rebuild() +UnitsWaveformMean.model_rebuild() +UnitsWaveformSd.model_rebuild() +UnitsWaveforms.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_ogen.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_ogen.py index 350a398..bddf0ea 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_ogen.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_ogen.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -121,10 +121,8 @@ class OptogeneticSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], float] = Field( - ..., - description="""Applied power for optogenetic stimulus, in watts.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: OptogeneticSeriesData = Field( + ..., description="""Applied power for optogenetic stimulus, in watts.""" ) site: Union[OptogeneticStimulusSite, str] = Field( ..., @@ -172,6 +170,41 @@ class OptogeneticSeries(TimeSeries): ) +class OptogeneticSeriesData(ConfiguredBaseModel): + """ + Applied power for optogenetic stimulus, in watts. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ogen"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["watts"] = Field( + "watts", + description="""Unit of measurement for data, which is fixed to 'watts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "watts", "ifabsent": "string(watts)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class OptogeneticStimulusSite(NWBContainer): """ A site of optogenetic stimulation. @@ -202,4 +235,5 @@ class OptogeneticStimulusSite(NWBContainer): # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model OptogeneticSeries.model_rebuild() +OptogeneticSeriesData.model_rebuild() OptogeneticStimulusSite.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_ophys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_ophys.py index 9f6e191..73f8fcd 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_ophys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_ophys.py @@ -27,7 +27,7 @@ from ...core.v2_4_0.core_nwb_base import ( TimeSeriesSync, ) from ...core.v2_4_0.core_nwb_device import Device -from ...core.v2_4_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile +from ...core.v2_4_0.core_nwb_image import ImageSeries, ImageSeriesData, ImageSeriesExternalFile from ...hdmf_common.v1_5_0.hdmf_common_table import ( DynamicTable, DynamicTableRegion, @@ -45,7 +45,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -179,9 +179,7 @@ class TwoPhotonSeries(ImageSeries): } }, ) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -195,8 +193,9 @@ class TwoPhotonSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -254,9 +253,7 @@ class RoiResponseSeries(TimeSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_rois"], float] - ] = Field(..., description="""Signals from ROIs.""") + data: RoiResponseSeriesData = Field(..., description="""Signals from ROIs.""") rois: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", @@ -306,6 +303,42 @@ class RoiResponseSeries(TimeSeries): ) +class RoiResponseSeriesData(ConfiguredBaseModel): + """ + Signals from ROIs. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + continuity: Optional[str] = Field( + 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.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_rois"], float] + ] + ] = Field(None) + + class DfOverF(NWBDataInterface): """ dF/F information about a region of interest (ROI). Storage hierarchy of dF/F should be the same as for segmentation (i.e., same names for ROIs and for image planes). @@ -372,6 +405,10 @@ class PlaneSegmentation(DynamicTable): None, description="""ROI masks for each ROI. Each image mask is the size of the original imaging plane (or volume) and members of the ROI are finite non-zero.""", ) + pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( + None, + description="""Pixel masks for each ROI: a list of indices and weights for the ROI. Pixel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", + ) pixel_mask_index: Optional[Named[VectorIndex]] = Field( None, description="""Index into pixel_mask.""", @@ -384,9 +421,9 @@ class PlaneSegmentation(DynamicTable): } }, ) - pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( + voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( None, - description="""Pixel masks for each ROI: a list of indices and weights for the ROI. Pixel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", + description="""Voxel masks for each ROI: a list of indices and weights for the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", ) voxel_mask_index: Optional[Named[VectorIndex]] = Field( None, @@ -400,10 +437,6 @@ class PlaneSegmentation(DynamicTable): } }, ) - voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( - None, - description="""Voxel masks for each ROI: a list of indices and weights for the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", - ) reference_images: Optional[Dict[str, ImageSeries]] = Field( None, description="""Image stacks that the segmentation masks apply to.""", @@ -702,6 +735,7 @@ class CorrectedImageStack(NWBDataInterface): # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model TwoPhotonSeries.model_rebuild() RoiResponseSeries.model_rebuild() +RoiResponseSeriesData.model_rebuild() DfOverF.model_rebuild() Fluorescence.model_rebuild() ImageSegmentation.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_retinotopy.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_retinotopy.py index ffc194e..60f8b4c 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_retinotopy.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/core_nwb_retinotopy.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/namespace.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/namespace.py index 620dcf2..775c660 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/namespace.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_4_0/namespace.py @@ -39,6 +39,7 @@ from ...core.v2_4_0.core_nwb_ecephys import ( ClusterWaveforms, Clustering, ElectricalSeries, + ElectricalSeriesData, ElectrodeGroup, ElectrodeGroupPosition, EventDetection, @@ -47,6 +48,7 @@ from ...core.v2_4_0.core_nwb_ecephys import ( FilteredEphys, LFP, SpikeEventSeries, + SpikeEventSeriesData, ) from ...core.v2_4_0.core_nwb_epoch import TimeIntervals, TimeIntervalsTimeseries from ...core.v2_4_0.core_nwb_file import ( @@ -100,9 +102,12 @@ from ...core.v2_4_0.core_nwb_image import ( GrayscaleImage, ImageMaskSeries, ImageSeries, + ImageSeriesData, ImageSeriesExternalFile, IndexSeries, + IndexSeriesData, OpticalSeries, + OpticalSeriesData, RGBAImage, RGBImage, ) @@ -110,14 +115,23 @@ from ...core.v2_4_0.core_nwb_misc import ( AbstractFeatureSeries, AbstractFeatureSeriesData, AnnotationSeries, + AnnotationSeriesData, DecompositionSeries, DecompositionSeriesBands, DecompositionSeriesData, IntervalSeries, + IntervalSeriesData, Units, UnitsSpikeTimes, + UnitsWaveformMean, + UnitsWaveformSd, + UnitsWaveforms, +) +from ...core.v2_4_0.core_nwb_ogen import ( + OptogeneticSeries, + OptogeneticSeriesData, + OptogeneticStimulusSite, ) -from ...core.v2_4_0.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite from ...core.v2_4_0.core_nwb_ophys import ( CorrectedImageStack, DfOverF, @@ -133,6 +147,7 @@ from ...core.v2_4_0.core_nwb_ophys import ( PlaneSegmentationPixelMask, PlaneSegmentationVoxelMask, RoiResponseSeries, + RoiResponseSeriesData, TwoPhotonSeries, ) from ...core.v2_4_0.core_nwb_retinotopy import ( @@ -174,7 +189,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_base.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_base.py index 2db9763..7dcc142 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_base.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_base.py @@ -47,7 +47,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_behavior.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_behavior.py index 89c1038..cfa3239 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_behavior.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_behavior.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -176,6 +176,24 @@ class SpatialSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Optional[str] = Field( "meters", 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'.""", diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_device.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_device.py index e4cf279..b52ccd6 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_device.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_device.py @@ -21,7 +21,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_ecephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_ecephys.py index 91c2222..0fa24fc 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_ecephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_ecephys.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -156,11 +156,12 @@ class ElectricalSeries(TimeSeries): None, description="""Filtering applied to all channels of the data. For example, if this ElectricalSeries represents high-pass-filtered data (also known as AP Band), then this value could be \"High-pass 4-pole Bessel filter at 500 Hz\". If this ElectricalSeries represents low-pass-filtered LFP data and the type of filter is unknown, then this value could be \"Low-pass filter at 300 Hz\". If a non-standard filter type is used, provide as much detail about the filter properties as possible.""", ) - data: Union[ - NDArray[Shape["* num_times"], float], - NDArray[Shape["* num_times, * num_channels"], float], - NDArray[Shape["* num_times, * num_channels, * num_samples"], float], - ] = Field(..., description="""Recorded voltage data.""") + channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( + None, + description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", + json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, + ) + data: ElectricalSeriesData = Field(..., description="""Recorded voltage data.""") electrodes: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", @@ -173,11 +174,6 @@ class ElectricalSeries(TimeSeries): } }, ) - channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( - None, - description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, - ) description: Optional[str] = Field( "no description", description="""Description of the time series.""", @@ -215,6 +211,49 @@ class ElectricalSeries(TimeSeries): ) +class ElectricalSeriesData(ConfiguredBaseModel): + """ + Recorded voltage data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ecephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["volts"] = Field( + "volts", + description="""Base unit of measurement for working with the data. This value is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion', followed by 'channel_conversion' (if present), and then add 'offset'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + value: Optional[ + Union[ + NDArray[Shape["* num_times"], float], + NDArray[Shape["* num_times, * num_channels"], float], + NDArray[Shape["* num_times, * num_channels, * num_samples"], float], + ] + ] = Field(None) + + class SpikeEventSeries(ElectricalSeries): """ Stores snapshots/snippets of recorded spike events (i.e., threshold crossings). This may also be raw data, as reported by ephys hardware. If so, the TimeSeries::description field should describe how events were detected. All SpikeEventSeries should reside in a module (under EventWaveform interface) even if the spikes were reported and stored by hardware. All events span the same recording channels and store snapshots of equal duration. TimeSeries::data array structure: [num events] [num channels] [num samples] (or [num events] [num samples] for single electrode). @@ -225,10 +264,7 @@ class SpikeEventSeries(ElectricalSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* num_events, * num_samples"], float], - NDArray[Shape["* num_events, * num_channels, * num_samples"], float], - ] = Field(..., description="""Spike waveforms.""") + data: SpikeEventSeriesData = Field(..., description="""Spike waveforms.""") timestamps: NDArray[Shape["* num_times"], float] = Field( ..., description="""Timestamps for samples stored in data, in seconds, relative to the common experiment master-clock stored in NWBFile.timestamps_reference_time. Timestamps are required for the events. Unlike for TimeSeries, timestamps are required for SpikeEventSeries and are thus re-specified here.""", @@ -238,6 +274,11 @@ class SpikeEventSeries(ElectricalSeries): None, description="""Filtering applied to all channels of the data. For example, if this ElectricalSeries represents high-pass-filtered data (also known as AP Band), then this value could be \"High-pass 4-pole Bessel filter at 500 Hz\". If this ElectricalSeries represents low-pass-filtered LFP data and the type of filter is unknown, then this value could be \"Low-pass filter at 300 Hz\". If a non-standard filter type is used, provide as much detail about the filter properties as possible.""", ) + channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( + None, + description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", + json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, + ) electrodes: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", @@ -250,11 +291,6 @@ class SpikeEventSeries(ElectricalSeries): } }, ) - channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( - None, - description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, - ) description: Optional[str] = Field( "no description", description="""Description of the time series.""", @@ -287,6 +323,48 @@ class SpikeEventSeries(ElectricalSeries): ) +class SpikeEventSeriesData(ConfiguredBaseModel): + """ + Spike waveforms. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ecephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["volts"] = Field( + "volts", + description="""Unit of measurement for waveforms, which is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + value: Optional[ + Union[ + NDArray[Shape["* num_events, * num_samples"], float], + NDArray[Shape["* num_events, * num_channels, * num_samples"], float], + ] + ] = Field(None) + + class FeatureExtraction(NWBDataInterface): """ Features, such as PC1 and PC2, that are extracted from signals stored in a SpikeEventSeries or other source. @@ -561,7 +639,9 @@ class Clustering(NWBDataInterface): # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model ElectricalSeries.model_rebuild() +ElectricalSeriesData.model_rebuild() SpikeEventSeries.model_rebuild() +SpikeEventSeriesData.model_rebuild() FeatureExtraction.model_rebuild() EventDetection.model_rebuild() EventWaveform.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_epoch.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_epoch.py index ab92eb7..94de21c 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_epoch.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_epoch.py @@ -36,7 +36,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_file.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_file.py index 6c056a6..d0e41d7 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_file.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_file.py @@ -34,7 +34,12 @@ from ...core.v2_5_0.core_nwb_icephys import ( from ...core.v2_5_0.core_nwb_misc import Units from ...core.v2_5_0.core_nwb_ogen import OptogeneticStimulusSite from ...core.v2_5_0.core_nwb_ophys import ImagingPlane -from ...hdmf_common.v1_5_0.hdmf_common_table import DynamicTable, ElementIdentifiers, VectorData +from ...hdmf_common.v1_5_0.hdmf_common_table import ( + DynamicTable, + ElementIdentifiers, + VectorData, + VectorIndex, +) metamodel_version = "None" @@ -45,7 +50,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_icephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_icephys.py index b500a82..baaa066 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_icephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_icephys.py @@ -45,7 +45,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -227,6 +227,24 @@ class PatchClampSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: str = Field( ..., 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'.""", @@ -246,12 +264,12 @@ class CurrentClampSeries(PatchClampSeries): ) name: str = Field(...) - data: CurrentClampSeriesData = Field(..., description="""Recorded voltage.""") bias_current: Optional[float] = Field(None, description="""Bias current, in amps.""") bridge_balance: Optional[float] = Field(None, description="""Bridge balance, in ohms.""") capacitance_compensation: Optional[float] = Field( None, description="""Capacitance compensation, in farads.""" ) + data: CurrentClampSeriesData = Field(..., description="""Recorded voltage.""") stimulus_description: str = Field( ..., description="""Protocol/stimulus name for this patch-clamp dataset.""" ) @@ -319,12 +337,32 @@ class CurrentClampSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["volts"] = Field( "volts", description="""Base unit of measurement for working with the data. which is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class IZeroClampSeries(CurrentClampSeries): @@ -479,6 +517,24 @@ class CurrentClampStimulusSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["amperes"] = Field( "amperes", description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", @@ -486,7 +542,9 @@ class CurrentClampStimulusSeriesData(ConfiguredBaseModel): "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} }, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class VoltageClampSeries(PatchClampSeries): @@ -499,13 +557,13 @@ class VoltageClampSeries(PatchClampSeries): ) name: str = Field(...) - data: VoltageClampSeriesData = Field(..., description="""Recorded current.""") capacitance_fast: Optional[VoltageClampSeriesCapacitanceFast] = Field( None, description="""Fast capacitance, in farads.""" ) capacitance_slow: Optional[VoltageClampSeriesCapacitanceSlow] = Field( None, description="""Slow capacitance, in farads.""" ) + data: VoltageClampSeriesData = Field(..., description="""Recorded current.""") resistance_comp_bandwidth: Optional[VoltageClampSeriesResistanceCompBandwidth] = Field( None, description="""Resistance compensation bandwidth, in hertz.""" ) @@ -577,27 +635,6 @@ class VoltageClampSeries(PatchClampSeries): ) -class VoltageClampSeriesData(ConfiguredBaseModel): - """ - Recorded current. - """ - - linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.icephys"}) - - name: Literal["data"] = Field( - "data", - json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, - ) - unit: Literal["amperes"] = Field( - "amperes", - description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", - json_schema_extra={ - "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} - }, - ) - value: Any = Field(...) - - class VoltageClampSeriesCapacitanceFast(ConfiguredBaseModel): """ Fast capacitance, in farads. @@ -650,6 +687,47 @@ class VoltageClampSeriesCapacitanceSlow(ConfiguredBaseModel): value: float = Field(...) +class VoltageClampSeriesData(ConfiguredBaseModel): + """ + Recorded current. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.icephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["amperes"] = Field( + "amperes", + description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", + json_schema_extra={ + "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} + }, + ) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class VoltageClampSeriesResistanceCompBandwidth(ConfiguredBaseModel): """ Resistance compensation bandwidth, in hertz. @@ -854,12 +932,32 @@ class VoltageClampStimulusSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["volts"] = Field( "volts", description="""Base unit of measurement for working with the data. which is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class IntracellularElectrode(NWBContainer): @@ -910,15 +1008,6 @@ class SweepTable(DynamicTable): ) name: str = Field(...) - sweep_number: VectorData[NDArray[Any, int]] = Field( - ..., - description="""Sweep number of the PatchClampSeries in that row.""", - json_schema_extra={ - "linkml_meta": { - "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} - } - }, - ) series: VectorData[NDArray[Any, PatchClampSeries]] = Field( ..., description="""The PatchClampSeries with the sweep number in that row.""", @@ -940,6 +1029,15 @@ class SweepTable(DynamicTable): } }, ) + sweep_number: VectorData[NDArray[Any, int]] = Field( + ..., + description="""Sweep number of the PatchClampSeries in that row.""", + json_schema_extra={ + "linkml_meta": { + "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} + } + }, + ) colnames: List[str] = Field( ..., description="""The names of the columns in this table. This should be used to specify an order to the columns.""", @@ -1121,12 +1219,12 @@ class IntracellularRecordingsTable(AlignedDynamicTable): electrodes: IntracellularElectrodesTable = Field( ..., description="""Table for storing intracellular electrode related metadata.""" ) - stimuli: IntracellularStimuliTable = Field( - ..., description="""Table for storing intracellular stimulus related metadata.""" - ) responses: IntracellularResponsesTable = Field( ..., description="""Table for storing intracellular response related metadata.""" ) + stimuli: IntracellularStimuliTable = Field( + ..., description="""Table for storing intracellular stimulus related metadata.""" + ) value: Optional[Dict[str, DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) @@ -1466,9 +1564,9 @@ IZeroClampSeries.model_rebuild() CurrentClampStimulusSeries.model_rebuild() CurrentClampStimulusSeriesData.model_rebuild() VoltageClampSeries.model_rebuild() -VoltageClampSeriesData.model_rebuild() VoltageClampSeriesCapacitanceFast.model_rebuild() VoltageClampSeriesCapacitanceSlow.model_rebuild() +VoltageClampSeriesData.model_rebuild() VoltageClampSeriesResistanceCompBandwidth.model_rebuild() VoltageClampSeriesResistanceCompCorrection.model_rebuild() VoltageClampSeriesResistanceCompPrediction.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_image.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_image.py index 520d249..4b9edee 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_image.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_image.py @@ -29,7 +29,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -204,9 +204,7 @@ class ImageSeries(TimeSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -220,8 +218,9 @@ class ImageSeries(TimeSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -269,6 +268,47 @@ class ImageSeries(TimeSeries): ) +class ImageSeriesData(ConfiguredBaseModel): + """ + Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + continuity: Optional[str] = Field( + 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.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* frame, * x, * y"], float], + NDArray[Shape["* frame, * x, * y, * z"], float], + ] + ] = Field(None) + + class ImageSeriesExternalFile(ConfiguredBaseModel): """ Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file. @@ -310,9 +350,7 @@ class ImageMaskSeries(ImageSeries): } }, ) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -326,8 +364,9 @@ class ImageMaskSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -385,6 +424,9 @@ class OpticalSeries(ImageSeries): ) name: str = Field(...) + data: OpticalSeriesData = Field( + ..., description="""Images presented to subject, either grayscale or RGB""" + ) distance: Optional[float] = Field( None, description="""Distance from camera/monitor to target/eye.""" ) @@ -393,10 +435,6 @@ class OpticalSeries(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.""") - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], - NDArray[Shape["* frame, * x, * y, 3 r_g_b"], float], - ] = Field(..., description="""Images presented to subject, either grayscale or RGB""") orientation: Optional[str] = Field( None, description="""Description of image relative to some reference frame (e.g., which way is up). Must also specify frame of reference.""", @@ -411,8 +449,9 @@ class OpticalSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -460,6 +499,47 @@ class OpticalSeries(ImageSeries): ) +class OpticalSeriesData(ConfiguredBaseModel): + """ + Images presented to subject, either grayscale or RGB + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* frame, * x, * y"], float], + NDArray[Shape["* frame, * x, * y, 3 r_g_b"], float], + ] + ] = Field(None) + + class IndexSeries(TimeSeries): """ Stores indices to image frames stored in an ImageSeries. The purpose of the IndexSeries is to allow a static image stack to be stored in an Images object, and the images in the stack to be referenced out-of-order. This can be for the display of individual images, or of movie segments (as a movie is simply a series of images). The data field stores the index of the frame in the referenced Images object, and the timestamps array indicates when that image was displayed. @@ -470,10 +550,8 @@ class IndexSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], int] = Field( - ..., - description="""Index of the image (using zero-indexing) in the linked Images object.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: IndexSeriesData = Field( + ..., description="""Index of the image (using zero-indexing) in the linked Images object.""" ) indexed_timeseries: Optional[Union[ImageSeries, str]] = Field( None, @@ -530,13 +608,52 @@ class IndexSeries(TimeSeries): ) +class IndexSeriesData(ConfiguredBaseModel): + """ + Index of the image (using zero-indexing) in the linked Images object. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + description="""This field is unused by IndexSeries.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field(None, description="""This field is unused by IndexSeries.""") + resolution: Optional[float] = Field( + -1.0, + description="""This field is unused by IndexSeries.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["N/A"] = Field( + "N/A", + description="""This field is unused by IndexSeries and has the value N/A.""", + json_schema_extra={"linkml_meta": {"equals_string": "N/A", "ifabsent": "string(N/A)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], int]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model GrayscaleImage.model_rebuild() RGBImage.model_rebuild() RGBAImage.model_rebuild() ImageSeries.model_rebuild() +ImageSeriesData.model_rebuild() ImageSeriesExternalFile.model_rebuild() ImageMaskSeries.model_rebuild() OpticalSeries.model_rebuild() +OpticalSeriesData.model_rebuild() IndexSeries.model_rebuild() +IndexSeriesData.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_misc.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_misc.py index 7901288..5646cd8 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_misc.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_misc.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -213,6 +213,24 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Optional[str] = Field( "see ", 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'\".""", @@ -236,10 +254,8 @@ class AnnotationSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], str] = Field( - ..., - description="""Annotations made during an experiment.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: AnnotationSeriesData = Field( + ..., description="""Annotations made during an experiment.""" ) description: Optional[str] = Field( "no description", @@ -278,6 +294,47 @@ class AnnotationSeries(TimeSeries): ) +class AnnotationSeriesData(ConfiguredBaseModel): + """ + Annotations made during an experiment. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: float = Field( + -1.0, + description="""Smallest meaningful difference between values in data. Annotations have no units, so the value is fixed to -1.0.""", + le=-1, + ge=-1, + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["n/a"] = Field( + "n/a", + description="""Base unit of measurement for working with the data. Annotations have no units, so the value is fixed to 'n/a'.""", + json_schema_extra={"linkml_meta": {"equals_string": "n/a", "ifabsent": "string(n/a)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], str]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class IntervalSeries(TimeSeries): """ Stores intervals of data. The timestamps field stores the beginning and end of intervals. The data field stores whether the interval just started (>0 value) or ended (<0 value). Different interval types can be represented in the same series by using multiple key values (eg, 1 for feature A, 2 for feature B, 3 for feature C, etc). The field data stores an 8-bit integer. This is largely an alias of a standard TimeSeries but that is identifiable as representing time intervals in a machine-readable way. @@ -288,10 +345,8 @@ class IntervalSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], int] = Field( - ..., - description="""Use values >0 if interval started, <0 if interval ended.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: IntervalSeriesData = Field( + ..., description="""Use values >0 if interval started, <0 if interval ended.""" ) description: Optional[str] = Field( "no description", @@ -330,6 +385,47 @@ class IntervalSeries(TimeSeries): ) +class IntervalSeriesData(ConfiguredBaseModel): + """ + Use values >0 if interval started, <0 if interval ended. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: float = Field( + -1.0, + description="""Smallest meaningful difference between values in data. Annotations have no units, so the value is fixed to -1.0.""", + le=-1, + ge=-1, + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["n/a"] = Field( + "n/a", + description="""Base unit of measurement for working with the data. Annotations have no units, so the value is fixed to 'n/a'.""", + json_schema_extra={"linkml_meta": {"equals_string": "n/a", "ifabsent": "string(n/a)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], int]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class DecompositionSeries(TimeSeries): """ Spectral analysis of a time series, e.g. of an LFP or a speech signal. @@ -417,6 +513,24 @@ class DecompositionSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: str = Field( "no unit", 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'.""", @@ -504,9 +618,18 @@ class Units(DynamicTable): ) name: str = Field("Units", json_schema_extra={"linkml_meta": {"ifabsent": "string(Units)"}}) - spike_times_index: Optional[Named[VectorIndex]] = Field( + electrode_group: Optional[VectorData[NDArray[Any, ElectrodeGroup]]] = Field( None, - description="""Index into the spike_times dataset.""", + description="""Electrode group that each spike unit came from.""", + json_schema_extra={ + "linkml_meta": { + "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} + } + }, + ) + electrodes: Optional[Named[DynamicTableRegion]] = Field( + None, + description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -516,12 +639,9 @@ class Units(DynamicTable): } }, ) - spike_times: Optional[UnitsSpikeTimes] = Field( - None, description="""Spike times for each unit.""" - ) - obs_intervals_index: Optional[Named[VectorIndex]] = Field( + electrodes_index: Optional[Named[VectorIndex]] = Field( None, - description="""Index into the obs_intervals dataset.""", + description="""Index into electrodes.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -547,9 +667,9 @@ class Units(DynamicTable): }, ) ) - electrodes_index: Optional[Named[VectorIndex]] = Field( + obs_intervals_index: Optional[Named[VectorIndex]] = Field( None, - description="""Index into electrodes.""", + description="""Index into the obs_intervals dataset.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -559,9 +679,12 @@ class Units(DynamicTable): } }, ) - electrodes: Optional[Named[DynamicTableRegion]] = Field( + spike_times: Optional[UnitsSpikeTimes] = Field( + None, description="""Spike times for each unit.""" + ) + spike_times_index: Optional[Named[VectorIndex]] = Field( None, - description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", + description="""Index into the spike_times dataset.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -571,41 +694,15 @@ class Units(DynamicTable): } }, ) - electrode_group: Optional[VectorData[NDArray[Any, ElectrodeGroup]]] = Field( - None, - description="""Electrode group that each spike unit came from.""", - json_schema_extra={ - "linkml_meta": { - "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} - } - }, + waveform_mean: Optional[UnitsWaveformMean] = Field( + None, description="""Spike waveform mean for each spike unit.""" ) - waveform_mean: Optional[ - VectorData[ - Union[ - NDArray[Shape["* num_units, * num_samples"], float], - NDArray[Shape["* num_units, * num_samples, * num_electrodes"], float], - ] - ] - ] = Field(None, description="""Spike waveform mean for each spike unit.""") - waveform_sd: Optional[ - VectorData[ - Union[ - NDArray[Shape["* num_units, * num_samples"], float], - NDArray[Shape["* num_units, * num_samples, * num_electrodes"], float], - ] - ] - ] = Field(None, description="""Spike waveform standard deviation for each spike unit.""") - waveforms: Optional[VectorData[NDArray[Shape["* num_waveforms, * num_samples"], float]]] = ( - Field( - None, - description="""Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same.""", - json_schema_extra={ - "linkml_meta": { - "array": {"dimensions": [{"alias": "num_waveforms"}, {"alias": "num_samples"}]} - } - }, - ) + waveform_sd: Optional[UnitsWaveformSd] = Field( + None, description="""Spike waveform standard deviation for each spike unit.""" + ) + waveforms: Optional[UnitsWaveforms] = Field( + None, + description="""Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same.""", ) waveforms_index: Optional[Named[VectorIndex]] = Field( None, @@ -671,14 +768,109 @@ class UnitsSpikeTimes(VectorData): ] = Field(None) +class UnitsWaveformMean(VectorData): + """ + Spike waveform mean for each spike unit. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveform_mean"] = Field( + "waveform_mean", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveform_mean", "ifabsent": "string(waveform_mean)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + +class UnitsWaveformSd(VectorData): + """ + Spike waveform standard deviation for each spike unit. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveform_sd"] = Field( + "waveform_sd", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveform_sd", "ifabsent": "string(waveform_sd)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + +class UnitsWaveforms(VectorData): + """ + Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveforms"] = Field( + "waveforms", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveforms", "ifabsent": "string(waveforms)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model AbstractFeatureSeries.model_rebuild() AbstractFeatureSeriesData.model_rebuild() AnnotationSeries.model_rebuild() +AnnotationSeriesData.model_rebuild() IntervalSeries.model_rebuild() +IntervalSeriesData.model_rebuild() DecompositionSeries.model_rebuild() DecompositionSeriesData.model_rebuild() DecompositionSeriesBands.model_rebuild() Units.model_rebuild() UnitsSpikeTimes.model_rebuild() +UnitsWaveformMean.model_rebuild() +UnitsWaveformSd.model_rebuild() +UnitsWaveforms.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_ogen.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_ogen.py index e39e6b2..29938d6 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_ogen.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_ogen.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -121,10 +121,8 @@ class OptogeneticSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], float] = Field( - ..., - description="""Applied power for optogenetic stimulus, in watts.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: OptogeneticSeriesData = Field( + ..., description="""Applied power for optogenetic stimulus, in watts.""" ) site: Union[OptogeneticStimulusSite, str] = Field( ..., @@ -172,6 +170,45 @@ class OptogeneticSeries(TimeSeries): ) +class OptogeneticSeriesData(ConfiguredBaseModel): + """ + Applied power for optogenetic stimulus, in watts. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ogen"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["watts"] = Field( + "watts", + description="""Unit of measurement for data, which is fixed to 'watts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "watts", "ifabsent": "string(watts)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class OptogeneticStimulusSite(NWBContainer): """ A site of optogenetic stimulation. @@ -202,4 +239,5 @@ class OptogeneticStimulusSite(NWBContainer): # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model OptogeneticSeries.model_rebuild() +OptogeneticSeriesData.model_rebuild() OptogeneticStimulusSite.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_ophys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_ophys.py index 6107f4c..ba37576 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_ophys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_ophys.py @@ -27,7 +27,7 @@ from ...core.v2_5_0.core_nwb_base import ( TimeSeriesSync, ) from ...core.v2_5_0.core_nwb_device import Device -from ...core.v2_5_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile +from ...core.v2_5_0.core_nwb_image import ImageSeries, ImageSeriesData, ImageSeriesExternalFile from ...hdmf_common.v1_5_0.hdmf_common_table import ( DynamicTable, DynamicTableRegion, @@ -45,7 +45,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -179,9 +179,7 @@ class TwoPhotonSeries(ImageSeries): } }, ) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -195,8 +193,9 @@ class TwoPhotonSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -254,9 +253,7 @@ class RoiResponseSeries(TimeSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_rois"], float] - ] = Field(..., description="""Signals from ROIs.""") + data: RoiResponseSeriesData = Field(..., description="""Signals from ROIs.""") rois: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", @@ -306,6 +303,46 @@ class RoiResponseSeries(TimeSeries): ) +class RoiResponseSeriesData(ConfiguredBaseModel): + """ + Signals from ROIs. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + continuity: Optional[str] = Field( + 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.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_rois"], float] + ] + ] = Field(None) + + class DfOverF(NWBDataInterface): """ dF/F information about a region of interest (ROI). Storage hierarchy of dF/F should be the same as for segmentation (i.e., same names for ROIs and for image planes). @@ -372,6 +409,10 @@ class PlaneSegmentation(DynamicTable): None, description="""ROI masks for each ROI. Each image mask is the size of the original imaging plane (or volume) and members of the ROI are finite non-zero.""", ) + pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( + None, + description="""Pixel masks for each ROI: a list of indices and weights for the ROI. Pixel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", + ) pixel_mask_index: Optional[Named[VectorIndex]] = Field( None, description="""Index into pixel_mask.""", @@ -384,9 +425,9 @@ class PlaneSegmentation(DynamicTable): } }, ) - pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( + voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( None, - description="""Pixel masks for each ROI: a list of indices and weights for the ROI. Pixel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", + description="""Voxel masks for each ROI: a list of indices and weights for the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", ) voxel_mask_index: Optional[Named[VectorIndex]] = Field( None, @@ -400,10 +441,6 @@ class PlaneSegmentation(DynamicTable): } }, ) - voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( - None, - description="""Voxel masks for each ROI: a list of indices and weights for the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", - ) reference_images: Optional[Dict[str, ImageSeries]] = Field( None, description="""Image stacks that the segmentation masks apply to.""", @@ -702,6 +739,7 @@ class CorrectedImageStack(NWBDataInterface): # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model TwoPhotonSeries.model_rebuild() RoiResponseSeries.model_rebuild() +RoiResponseSeriesData.model_rebuild() DfOverF.model_rebuild() Fluorescence.model_rebuild() ImageSegmentation.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_retinotopy.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_retinotopy.py index b72f7b4..82f1e30 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_retinotopy.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/core_nwb_retinotopy.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/namespace.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/namespace.py index 7aaa8a2..ff571fa 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/namespace.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_5_0/namespace.py @@ -40,6 +40,7 @@ from ...core.v2_5_0.core_nwb_ecephys import ( ClusterWaveforms, Clustering, ElectricalSeries, + ElectricalSeriesData, ElectrodeGroup, ElectrodeGroupPosition, EventDetection, @@ -48,6 +49,7 @@ from ...core.v2_5_0.core_nwb_ecephys import ( FilteredEphys, LFP, SpikeEventSeries, + SpikeEventSeriesData, ) from ...core.v2_5_0.core_nwb_epoch import TimeIntervals from ...core.v2_5_0.core_nwb_file import ( @@ -101,9 +103,12 @@ from ...core.v2_5_0.core_nwb_image import ( GrayscaleImage, ImageMaskSeries, ImageSeries, + ImageSeriesData, ImageSeriesExternalFile, IndexSeries, + IndexSeriesData, OpticalSeries, + OpticalSeriesData, RGBAImage, RGBImage, ) @@ -111,14 +116,23 @@ from ...core.v2_5_0.core_nwb_misc import ( AbstractFeatureSeries, AbstractFeatureSeriesData, AnnotationSeries, + AnnotationSeriesData, DecompositionSeries, DecompositionSeriesBands, DecompositionSeriesData, IntervalSeries, + IntervalSeriesData, Units, UnitsSpikeTimes, + UnitsWaveformMean, + UnitsWaveformSd, + UnitsWaveforms, +) +from ...core.v2_5_0.core_nwb_ogen import ( + OptogeneticSeries, + OptogeneticSeriesData, + OptogeneticStimulusSite, ) -from ...core.v2_5_0.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite from ...core.v2_5_0.core_nwb_ophys import ( CorrectedImageStack, DfOverF, @@ -134,6 +148,7 @@ from ...core.v2_5_0.core_nwb_ophys import ( PlaneSegmentationPixelMask, PlaneSegmentationVoxelMask, RoiResponseSeries, + RoiResponseSeriesData, TwoPhotonSeries, ) from ...core.v2_5_0.core_nwb_retinotopy import ( @@ -175,7 +190,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_base.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_base.py index 4837ae7..1881de9 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_base.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_base.py @@ -47,7 +47,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_behavior.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_behavior.py index 7e4ad59..9a19768 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_behavior.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_behavior.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -176,6 +176,24 @@ class SpatialSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Optional[str] = Field( "meters", 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'.""", diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_device.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_device.py index c57186b..2792e91 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_device.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_device.py @@ -21,7 +21,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_ecephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_ecephys.py index 0529035..0e59233 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_ecephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_ecephys.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -156,11 +156,12 @@ class ElectricalSeries(TimeSeries): None, description="""Filtering applied to all channels of the data. For example, if this ElectricalSeries represents high-pass-filtered data (also known as AP Band), then this value could be \"High-pass 4-pole Bessel filter at 500 Hz\". If this ElectricalSeries represents low-pass-filtered LFP data and the type of filter is unknown, then this value could be \"Low-pass filter at 300 Hz\". If a non-standard filter type is used, provide as much detail about the filter properties as possible.""", ) - data: Union[ - NDArray[Shape["* num_times"], float], - NDArray[Shape["* num_times, * num_channels"], float], - NDArray[Shape["* num_times, * num_channels, * num_samples"], float], - ] = Field(..., description="""Recorded voltage data.""") + channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( + None, + description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", + json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, + ) + data: ElectricalSeriesData = Field(..., description="""Recorded voltage data.""") electrodes: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", @@ -173,11 +174,6 @@ class ElectricalSeries(TimeSeries): } }, ) - channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( - None, - description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, - ) description: Optional[str] = Field( "no description", description="""Description of the time series.""", @@ -215,6 +211,49 @@ class ElectricalSeries(TimeSeries): ) +class ElectricalSeriesData(ConfiguredBaseModel): + """ + Recorded voltage data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ecephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["volts"] = Field( + "volts", + description="""Base unit of measurement for working with the data. This value is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion', followed by 'channel_conversion' (if present), and then add 'offset'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + value: Optional[ + Union[ + NDArray[Shape["* num_times"], float], + NDArray[Shape["* num_times, * num_channels"], float], + NDArray[Shape["* num_times, * num_channels, * num_samples"], float], + ] + ] = Field(None) + + class SpikeEventSeries(ElectricalSeries): """ Stores snapshots/snippets of recorded spike events (i.e., threshold crossings). This may also be raw data, as reported by ephys hardware. If so, the TimeSeries::description field should describe how events were detected. All SpikeEventSeries should reside in a module (under EventWaveform interface) even if the spikes were reported and stored by hardware. All events span the same recording channels and store snapshots of equal duration. TimeSeries::data array structure: [num events] [num channels] [num samples] (or [num events] [num samples] for single electrode). @@ -225,10 +264,7 @@ class SpikeEventSeries(ElectricalSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* num_events, * num_samples"], float], - NDArray[Shape["* num_events, * num_channels, * num_samples"], float], - ] = Field(..., description="""Spike waveforms.""") + data: SpikeEventSeriesData = Field(..., description="""Spike waveforms.""") timestamps: NDArray[Shape["* num_times"], float] = Field( ..., description="""Timestamps for samples stored in data, in seconds, relative to the common experiment master-clock stored in NWBFile.timestamps_reference_time. Timestamps are required for the events. Unlike for TimeSeries, timestamps are required for SpikeEventSeries and are thus re-specified here.""", @@ -238,6 +274,11 @@ class SpikeEventSeries(ElectricalSeries): None, description="""Filtering applied to all channels of the data. For example, if this ElectricalSeries represents high-pass-filtered data (also known as AP Band), then this value could be \"High-pass 4-pole Bessel filter at 500 Hz\". If this ElectricalSeries represents low-pass-filtered LFP data and the type of filter is unknown, then this value could be \"Low-pass filter at 300 Hz\". If a non-standard filter type is used, provide as much detail about the filter properties as possible.""", ) + channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( + None, + description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", + json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, + ) electrodes: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", @@ -250,11 +291,6 @@ class SpikeEventSeries(ElectricalSeries): } }, ) - channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( - None, - description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, - ) description: Optional[str] = Field( "no description", description="""Description of the time series.""", @@ -287,6 +323,48 @@ class SpikeEventSeries(ElectricalSeries): ) +class SpikeEventSeriesData(ConfiguredBaseModel): + """ + Spike waveforms. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ecephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["volts"] = Field( + "volts", + description="""Unit of measurement for waveforms, which is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + value: Optional[ + Union[ + NDArray[Shape["* num_events, * num_samples"], float], + NDArray[Shape["* num_events, * num_channels, * num_samples"], float], + ] + ] = Field(None) + + class FeatureExtraction(NWBDataInterface): """ Features, such as PC1 and PC2, that are extracted from signals stored in a SpikeEventSeries or other source. @@ -561,7 +639,9 @@ class Clustering(NWBDataInterface): # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model ElectricalSeries.model_rebuild() +ElectricalSeriesData.model_rebuild() SpikeEventSeries.model_rebuild() +SpikeEventSeriesData.model_rebuild() FeatureExtraction.model_rebuild() EventDetection.model_rebuild() EventWaveform.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_epoch.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_epoch.py index d3fa53b..fca71ae 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_epoch.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_epoch.py @@ -36,7 +36,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_file.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_file.py index 975e51c..aaea52c 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_file.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_file.py @@ -34,7 +34,12 @@ from ...core.v2_6_0_alpha.core_nwb_icephys import ( from ...core.v2_6_0_alpha.core_nwb_misc import Units from ...core.v2_6_0_alpha.core_nwb_ogen import OptogeneticStimulusSite from ...core.v2_6_0_alpha.core_nwb_ophys import ImagingPlane -from ...hdmf_common.v1_5_0.hdmf_common_table import DynamicTable, ElementIdentifiers, VectorData +from ...hdmf_common.v1_5_0.hdmf_common_table import ( + DynamicTable, + ElementIdentifiers, + VectorData, + VectorIndex, +) metamodel_version = "None" @@ -45,7 +50,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_icephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_icephys.py index 1f9c04b..17e121f 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_icephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_icephys.py @@ -45,7 +45,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -227,6 +227,24 @@ class PatchClampSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: str = Field( ..., 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'.""", @@ -246,12 +264,12 @@ class CurrentClampSeries(PatchClampSeries): ) name: str = Field(...) - data: CurrentClampSeriesData = Field(..., description="""Recorded voltage.""") bias_current: Optional[float] = Field(None, description="""Bias current, in amps.""") bridge_balance: Optional[float] = Field(None, description="""Bridge balance, in ohms.""") capacitance_compensation: Optional[float] = Field( None, description="""Capacitance compensation, in farads.""" ) + data: CurrentClampSeriesData = Field(..., description="""Recorded voltage.""") stimulus_description: str = Field( ..., description="""Protocol/stimulus name for this patch-clamp dataset.""" ) @@ -319,12 +337,32 @@ class CurrentClampSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["volts"] = Field( "volts", description="""Base unit of measurement for working with the data. which is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class IZeroClampSeries(CurrentClampSeries): @@ -479,6 +517,24 @@ class CurrentClampStimulusSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["amperes"] = Field( "amperes", description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", @@ -486,7 +542,9 @@ class CurrentClampStimulusSeriesData(ConfiguredBaseModel): "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} }, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class VoltageClampSeries(PatchClampSeries): @@ -499,13 +557,13 @@ class VoltageClampSeries(PatchClampSeries): ) name: str = Field(...) - data: VoltageClampSeriesData = Field(..., description="""Recorded current.""") capacitance_fast: Optional[VoltageClampSeriesCapacitanceFast] = Field( None, description="""Fast capacitance, in farads.""" ) capacitance_slow: Optional[VoltageClampSeriesCapacitanceSlow] = Field( None, description="""Slow capacitance, in farads.""" ) + data: VoltageClampSeriesData = Field(..., description="""Recorded current.""") resistance_comp_bandwidth: Optional[VoltageClampSeriesResistanceCompBandwidth] = Field( None, description="""Resistance compensation bandwidth, in hertz.""" ) @@ -577,27 +635,6 @@ class VoltageClampSeries(PatchClampSeries): ) -class VoltageClampSeriesData(ConfiguredBaseModel): - """ - Recorded current. - """ - - linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.icephys"}) - - name: Literal["data"] = Field( - "data", - json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, - ) - unit: Literal["amperes"] = Field( - "amperes", - description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", - json_schema_extra={ - "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} - }, - ) - value: Any = Field(...) - - class VoltageClampSeriesCapacitanceFast(ConfiguredBaseModel): """ Fast capacitance, in farads. @@ -650,6 +687,47 @@ class VoltageClampSeriesCapacitanceSlow(ConfiguredBaseModel): value: float = Field(...) +class VoltageClampSeriesData(ConfiguredBaseModel): + """ + Recorded current. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.icephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["amperes"] = Field( + "amperes", + description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", + json_schema_extra={ + "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} + }, + ) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class VoltageClampSeriesResistanceCompBandwidth(ConfiguredBaseModel): """ Resistance compensation bandwidth, in hertz. @@ -854,12 +932,32 @@ class VoltageClampStimulusSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["volts"] = Field( "volts", description="""Base unit of measurement for working with the data. which is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class IntracellularElectrode(NWBContainer): @@ -910,15 +1008,6 @@ class SweepTable(DynamicTable): ) name: str = Field(...) - sweep_number: VectorData[NDArray[Any, int]] = Field( - ..., - description="""Sweep number of the PatchClampSeries in that row.""", - json_schema_extra={ - "linkml_meta": { - "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} - } - }, - ) series: VectorData[NDArray[Any, PatchClampSeries]] = Field( ..., description="""The PatchClampSeries with the sweep number in that row.""", @@ -940,6 +1029,15 @@ class SweepTable(DynamicTable): } }, ) + sweep_number: VectorData[NDArray[Any, int]] = Field( + ..., + description="""Sweep number of the PatchClampSeries in that row.""", + json_schema_extra={ + "linkml_meta": { + "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} + } + }, + ) colnames: List[str] = Field( ..., description="""The names of the columns in this table. This should be used to specify an order to the columns.""", @@ -1121,12 +1219,12 @@ class IntracellularRecordingsTable(AlignedDynamicTable): electrodes: IntracellularElectrodesTable = Field( ..., description="""Table for storing intracellular electrode related metadata.""" ) - stimuli: IntracellularStimuliTable = Field( - ..., description="""Table for storing intracellular stimulus related metadata.""" - ) responses: IntracellularResponsesTable = Field( ..., description="""Table for storing intracellular response related metadata.""" ) + stimuli: IntracellularStimuliTable = Field( + ..., description="""Table for storing intracellular stimulus related metadata.""" + ) value: Optional[Dict[str, DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) @@ -1466,9 +1564,9 @@ IZeroClampSeries.model_rebuild() CurrentClampStimulusSeries.model_rebuild() CurrentClampStimulusSeriesData.model_rebuild() VoltageClampSeries.model_rebuild() -VoltageClampSeriesData.model_rebuild() VoltageClampSeriesCapacitanceFast.model_rebuild() VoltageClampSeriesCapacitanceSlow.model_rebuild() +VoltageClampSeriesData.model_rebuild() VoltageClampSeriesResistanceCompBandwidth.model_rebuild() VoltageClampSeriesResistanceCompCorrection.model_rebuild() VoltageClampSeriesResistanceCompPrediction.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_image.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_image.py index af69abe..e8d4430 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_image.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_image.py @@ -29,7 +29,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -204,9 +204,7 @@ class ImageSeries(TimeSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -220,8 +218,9 @@ class ImageSeries(TimeSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -269,6 +268,47 @@ class ImageSeries(TimeSeries): ) +class ImageSeriesData(ConfiguredBaseModel): + """ + Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + continuity: Optional[str] = Field( + 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.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* frame, * x, * y"], float], + NDArray[Shape["* frame, * x, * y, * z"], float], + ] + ] = Field(None) + + class ImageSeriesExternalFile(ConfiguredBaseModel): """ Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file. @@ -310,9 +350,7 @@ class ImageMaskSeries(ImageSeries): } }, ) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -326,8 +364,9 @@ class ImageMaskSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -385,6 +424,9 @@ class OpticalSeries(ImageSeries): ) name: str = Field(...) + data: OpticalSeriesData = Field( + ..., description="""Images presented to subject, either grayscale or RGB""" + ) distance: Optional[float] = Field( None, description="""Distance from camera/monitor to target/eye.""" ) @@ -393,10 +435,6 @@ class OpticalSeries(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.""") - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], - NDArray[Shape["* frame, * x, * y, 3 r_g_b"], float], - ] = Field(..., description="""Images presented to subject, either grayscale or RGB""") orientation: Optional[str] = Field( None, description="""Description of image relative to some reference frame (e.g., which way is up). Must also specify frame of reference.""", @@ -411,8 +449,9 @@ class OpticalSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -460,6 +499,47 @@ class OpticalSeries(ImageSeries): ) +class OpticalSeriesData(ConfiguredBaseModel): + """ + Images presented to subject, either grayscale or RGB + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* frame, * x, * y"], float], + NDArray[Shape["* frame, * x, * y, 3 r_g_b"], float], + ] + ] = Field(None) + + class IndexSeries(TimeSeries): """ Stores indices to image frames stored in an ImageSeries. The purpose of the IndexSeries is to allow a static image stack to be stored in an Images object, and the images in the stack to be referenced out-of-order. This can be for the display of individual images, or of movie segments (as a movie is simply a series of images). The data field stores the index of the frame in the referenced Images object, and the timestamps array indicates when that image was displayed. @@ -470,10 +550,8 @@ class IndexSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], int] = Field( - ..., - description="""Index of the image (using zero-indexing) in the linked Images object.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: IndexSeriesData = Field( + ..., description="""Index of the image (using zero-indexing) in the linked Images object.""" ) indexed_timeseries: Optional[Union[ImageSeries, str]] = Field( None, @@ -530,13 +608,52 @@ class IndexSeries(TimeSeries): ) +class IndexSeriesData(ConfiguredBaseModel): + """ + Index of the image (using zero-indexing) in the linked Images object. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + description="""This field is unused by IndexSeries.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field(None, description="""This field is unused by IndexSeries.""") + resolution: Optional[float] = Field( + -1.0, + description="""This field is unused by IndexSeries.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["N/A"] = Field( + "N/A", + description="""This field is unused by IndexSeries and has the value N/A.""", + json_schema_extra={"linkml_meta": {"equals_string": "N/A", "ifabsent": "string(N/A)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], int]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model GrayscaleImage.model_rebuild() RGBImage.model_rebuild() RGBAImage.model_rebuild() ImageSeries.model_rebuild() +ImageSeriesData.model_rebuild() ImageSeriesExternalFile.model_rebuild() ImageMaskSeries.model_rebuild() OpticalSeries.model_rebuild() +OpticalSeriesData.model_rebuild() IndexSeries.model_rebuild() +IndexSeriesData.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_misc.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_misc.py index 5c28736..4278604 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_misc.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_misc.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -213,6 +213,24 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Optional[str] = Field( "see ", 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'\".""", @@ -236,10 +254,8 @@ class AnnotationSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], str] = Field( - ..., - description="""Annotations made during an experiment.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: AnnotationSeriesData = Field( + ..., description="""Annotations made during an experiment.""" ) description: Optional[str] = Field( "no description", @@ -278,6 +294,47 @@ class AnnotationSeries(TimeSeries): ) +class AnnotationSeriesData(ConfiguredBaseModel): + """ + Annotations made during an experiment. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: float = Field( + -1.0, + description="""Smallest meaningful difference between values in data. Annotations have no units, so the value is fixed to -1.0.""", + le=-1, + ge=-1, + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["n/a"] = Field( + "n/a", + description="""Base unit of measurement for working with the data. Annotations have no units, so the value is fixed to 'n/a'.""", + json_schema_extra={"linkml_meta": {"equals_string": "n/a", "ifabsent": "string(n/a)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], str]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class IntervalSeries(TimeSeries): """ Stores intervals of data. The timestamps field stores the beginning and end of intervals. The data field stores whether the interval just started (>0 value) or ended (<0 value). Different interval types can be represented in the same series by using multiple key values (eg, 1 for feature A, 2 for feature B, 3 for feature C, etc). The field data stores an 8-bit integer. This is largely an alias of a standard TimeSeries but that is identifiable as representing time intervals in a machine-readable way. @@ -288,10 +345,8 @@ class IntervalSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], int] = Field( - ..., - description="""Use values >0 if interval started, <0 if interval ended.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: IntervalSeriesData = Field( + ..., description="""Use values >0 if interval started, <0 if interval ended.""" ) description: Optional[str] = Field( "no description", @@ -330,6 +385,47 @@ class IntervalSeries(TimeSeries): ) +class IntervalSeriesData(ConfiguredBaseModel): + """ + Use values >0 if interval started, <0 if interval ended. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: float = Field( + -1.0, + description="""Smallest meaningful difference between values in data. Annotations have no units, so the value is fixed to -1.0.""", + le=-1, + ge=-1, + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["n/a"] = Field( + "n/a", + description="""Base unit of measurement for working with the data. Annotations have no units, so the value is fixed to 'n/a'.""", + json_schema_extra={"linkml_meta": {"equals_string": "n/a", "ifabsent": "string(n/a)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], int]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class DecompositionSeries(TimeSeries): """ Spectral analysis of a time series, e.g. of an LFP or a speech signal. @@ -417,6 +513,24 @@ class DecompositionSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: str = Field( "no unit", 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'.""", @@ -504,9 +618,18 @@ class Units(DynamicTable): ) name: str = Field("Units", json_schema_extra={"linkml_meta": {"ifabsent": "string(Units)"}}) - spike_times_index: Optional[Named[VectorIndex]] = Field( + electrode_group: Optional[VectorData[NDArray[Any, ElectrodeGroup]]] = Field( None, - description="""Index into the spike_times dataset.""", + description="""Electrode group that each spike unit came from.""", + json_schema_extra={ + "linkml_meta": { + "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} + } + }, + ) + electrodes: Optional[Named[DynamicTableRegion]] = Field( + None, + description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -516,12 +639,9 @@ class Units(DynamicTable): } }, ) - spike_times: Optional[UnitsSpikeTimes] = Field( - None, description="""Spike times for each unit in seconds.""" - ) - obs_intervals_index: Optional[Named[VectorIndex]] = Field( + electrodes_index: Optional[Named[VectorIndex]] = Field( None, - description="""Index into the obs_intervals dataset.""", + description="""Index into electrodes.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -547,9 +667,9 @@ class Units(DynamicTable): }, ) ) - electrodes_index: Optional[Named[VectorIndex]] = Field( + obs_intervals_index: Optional[Named[VectorIndex]] = Field( None, - description="""Index into electrodes.""", + description="""Index into the obs_intervals dataset.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -559,9 +679,12 @@ class Units(DynamicTable): } }, ) - electrodes: Optional[Named[DynamicTableRegion]] = Field( + spike_times: Optional[UnitsSpikeTimes] = Field( + None, description="""Spike times for each unit in seconds.""" + ) + spike_times_index: Optional[Named[VectorIndex]] = Field( None, - description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", + description="""Index into the spike_times dataset.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -571,41 +694,15 @@ class Units(DynamicTable): } }, ) - electrode_group: Optional[VectorData[NDArray[Any, ElectrodeGroup]]] = Field( - None, - description="""Electrode group that each spike unit came from.""", - json_schema_extra={ - "linkml_meta": { - "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} - } - }, + waveform_mean: Optional[UnitsWaveformMean] = Field( + None, description="""Spike waveform mean for each spike unit.""" ) - waveform_mean: Optional[ - VectorData[ - Union[ - NDArray[Shape["* num_units, * num_samples"], float], - NDArray[Shape["* num_units, * num_samples, * num_electrodes"], float], - ] - ] - ] = Field(None, description="""Spike waveform mean for each spike unit.""") - waveform_sd: Optional[ - VectorData[ - Union[ - NDArray[Shape["* num_units, * num_samples"], float], - NDArray[Shape["* num_units, * num_samples, * num_electrodes"], float], - ] - ] - ] = Field(None, description="""Spike waveform standard deviation for each spike unit.""") - waveforms: Optional[VectorData[NDArray[Shape["* num_waveforms, * num_samples"], float]]] = ( - Field( - None, - description="""Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same.""", - json_schema_extra={ - "linkml_meta": { - "array": {"dimensions": [{"alias": "num_waveforms"}, {"alias": "num_samples"}]} - } - }, - ) + waveform_sd: Optional[UnitsWaveformSd] = Field( + None, description="""Spike waveform standard deviation for each spike unit.""" + ) + waveforms: Optional[UnitsWaveforms] = Field( + None, + description="""Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same.""", ) waveforms_index: Optional[Named[VectorIndex]] = Field( None, @@ -671,14 +768,109 @@ class UnitsSpikeTimes(VectorData): ] = Field(None) +class UnitsWaveformMean(VectorData): + """ + Spike waveform mean for each spike unit. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveform_mean"] = Field( + "waveform_mean", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveform_mean", "ifabsent": "string(waveform_mean)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + +class UnitsWaveformSd(VectorData): + """ + Spike waveform standard deviation for each spike unit. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveform_sd"] = Field( + "waveform_sd", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveform_sd", "ifabsent": "string(waveform_sd)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + +class UnitsWaveforms(VectorData): + """ + Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveforms"] = Field( + "waveforms", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveforms", "ifabsent": "string(waveforms)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model AbstractFeatureSeries.model_rebuild() AbstractFeatureSeriesData.model_rebuild() AnnotationSeries.model_rebuild() +AnnotationSeriesData.model_rebuild() IntervalSeries.model_rebuild() +IntervalSeriesData.model_rebuild() DecompositionSeries.model_rebuild() DecompositionSeriesData.model_rebuild() DecompositionSeriesBands.model_rebuild() Units.model_rebuild() UnitsSpikeTimes.model_rebuild() +UnitsWaveformMean.model_rebuild() +UnitsWaveformSd.model_rebuild() +UnitsWaveforms.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_ogen.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_ogen.py index 42fe82f..d94f420 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_ogen.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_ogen.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -121,10 +121,8 @@ class OptogeneticSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], float] = Field( - ..., - description="""Applied power for optogenetic stimulus, in watts.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: OptogeneticSeriesData = Field( + ..., description="""Applied power for optogenetic stimulus, in watts.""" ) site: Union[OptogeneticStimulusSite, str] = Field( ..., @@ -172,6 +170,45 @@ class OptogeneticSeries(TimeSeries): ) +class OptogeneticSeriesData(ConfiguredBaseModel): + """ + Applied power for optogenetic stimulus, in watts. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ogen"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["watts"] = Field( + "watts", + description="""Unit of measurement for data, which is fixed to 'watts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "watts", "ifabsent": "string(watts)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class OptogeneticStimulusSite(NWBContainer): """ A site of optogenetic stimulation. @@ -202,4 +239,5 @@ class OptogeneticStimulusSite(NWBContainer): # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model OptogeneticSeries.model_rebuild() +OptogeneticSeriesData.model_rebuild() OptogeneticStimulusSite.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_ophys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_ophys.py index f6acd6c..d9ba753 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_ophys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_ophys.py @@ -27,7 +27,11 @@ from ...core.v2_6_0_alpha.core_nwb_base import ( TimeSeriesSync, ) from ...core.v2_6_0_alpha.core_nwb_device import Device -from ...core.v2_6_0_alpha.core_nwb_image import ImageSeries, ImageSeriesExternalFile +from ...core.v2_6_0_alpha.core_nwb_image import ( + ImageSeries, + ImageSeriesData, + ImageSeriesExternalFile, +) from ...hdmf_common.v1_5_0.hdmf_common_table import ( DynamicTable, DynamicTableRegion, @@ -45,7 +49,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -160,21 +164,21 @@ class OnePhotonSeries(ImageSeries): ) name: str = Field(...) - pmt_gain: Optional[float] = Field(None, description="""Photomultiplier gain.""") - scan_line_rate: Optional[float] = Field( - None, - description="""Lines imaged per second. This is also stored in /general/optophysiology but is kept here as it is useful information for analysis, and so good to be stored w/ the actual data.""", + binning: Optional[int] = Field( + None, description="""Amount of pixels combined into 'bins'; could be 1, 2, 4, 8, etc.""" ) exposure_time: Optional[float] = Field( None, description="""Exposure time of the sample; often the inverse of the frequency.""" ) - binning: Optional[int] = Field( - None, description="""Amount of pixels combined into 'bins'; could be 1, 2, 4, 8, etc.""" - ) - power: Optional[float] = Field(None, description="""Power of the excitation in mW, if known.""") intensity: Optional[float] = Field( None, description="""Intensity of the excitation in mW/mm^2, if known.""" ) + pmt_gain: Optional[float] = Field(None, description="""Photomultiplier gain.""") + power: Optional[float] = Field(None, description="""Power of the excitation in mW, if known.""") + scan_line_rate: Optional[float] = Field( + None, + description="""Lines imaged per second. This is also stored in /general/optophysiology but is kept here as it is useful information for analysis, and so good to be stored w/ the actual data.""", + ) imaging_plane: Union[ImagingPlane, str] = Field( ..., json_schema_extra={ @@ -184,9 +188,7 @@ class OnePhotonSeries(ImageSeries): } }, ) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -200,8 +202,9 @@ class OnePhotonSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -278,9 +281,7 @@ class TwoPhotonSeries(ImageSeries): } }, ) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -294,8 +295,9 @@ class TwoPhotonSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -353,9 +355,7 @@ class RoiResponseSeries(TimeSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_rois"], float] - ] = Field(..., description="""Signals from ROIs.""") + data: RoiResponseSeriesData = Field(..., description="""Signals from ROIs.""") rois: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", @@ -405,6 +405,46 @@ class RoiResponseSeries(TimeSeries): ) +class RoiResponseSeriesData(ConfiguredBaseModel): + """ + Signals from ROIs. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + continuity: Optional[str] = Field( + 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.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_rois"], float] + ] + ] = Field(None) + + class DfOverF(NWBDataInterface): """ dF/F information about a region of interest (ROI). Storage hierarchy of dF/F should be the same as for segmentation (i.e., same names for ROIs and for image planes). @@ -471,6 +511,10 @@ class PlaneSegmentation(DynamicTable): None, description="""ROI masks for each ROI. Each image mask is the size of the original imaging plane (or volume) and members of the ROI are finite non-zero.""", ) + pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( + None, + description="""Pixel masks for each ROI: a list of indices and weights for the ROI. Pixel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", + ) pixel_mask_index: Optional[Named[VectorIndex]] = Field( None, description="""Index into pixel_mask.""", @@ -483,9 +527,9 @@ class PlaneSegmentation(DynamicTable): } }, ) - pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( + voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( None, - description="""Pixel masks for each ROI: a list of indices and weights for the ROI. Pixel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", + description="""Voxel masks for each ROI: a list of indices and weights for the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", ) voxel_mask_index: Optional[Named[VectorIndex]] = Field( None, @@ -499,10 +543,6 @@ class PlaneSegmentation(DynamicTable): } }, ) - voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( - None, - description="""Voxel masks for each ROI: a list of indices and weights for the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", - ) reference_images: Optional[Dict[str, ImageSeries]] = Field( None, description="""Image stacks that the segmentation masks apply to.""", @@ -802,6 +842,7 @@ class CorrectedImageStack(NWBDataInterface): OnePhotonSeries.model_rebuild() TwoPhotonSeries.model_rebuild() RoiResponseSeries.model_rebuild() +RoiResponseSeriesData.model_rebuild() DfOverF.model_rebuild() Fluorescence.model_rebuild() ImageSegmentation.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_retinotopy.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_retinotopy.py index 3a085f7..f0ac913 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_retinotopy.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/core_nwb_retinotopy.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/namespace.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/namespace.py index 21b7046..df0db47 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/namespace.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_6_0_alpha/namespace.py @@ -40,6 +40,7 @@ from ...core.v2_6_0_alpha.core_nwb_ecephys import ( ClusterWaveforms, Clustering, ElectricalSeries, + ElectricalSeriesData, ElectrodeGroup, ElectrodeGroupPosition, EventDetection, @@ -48,6 +49,7 @@ from ...core.v2_6_0_alpha.core_nwb_ecephys import ( FilteredEphys, LFP, SpikeEventSeries, + SpikeEventSeriesData, ) from ...core.v2_6_0_alpha.core_nwb_epoch import TimeIntervals from ...core.v2_6_0_alpha.core_nwb_file import ( @@ -102,9 +104,12 @@ from ...core.v2_6_0_alpha.core_nwb_image import ( GrayscaleImage, ImageMaskSeries, ImageSeries, + ImageSeriesData, ImageSeriesExternalFile, IndexSeries, + IndexSeriesData, OpticalSeries, + OpticalSeriesData, RGBAImage, RGBImage, ) @@ -112,14 +117,23 @@ from ...core.v2_6_0_alpha.core_nwb_misc import ( AbstractFeatureSeries, AbstractFeatureSeriesData, AnnotationSeries, + AnnotationSeriesData, DecompositionSeries, DecompositionSeriesBands, DecompositionSeriesData, IntervalSeries, + IntervalSeriesData, Units, UnitsSpikeTimes, + UnitsWaveformMean, + UnitsWaveformSd, + UnitsWaveforms, +) +from ...core.v2_6_0_alpha.core_nwb_ogen import ( + OptogeneticSeries, + OptogeneticSeriesData, + OptogeneticStimulusSite, ) -from ...core.v2_6_0_alpha.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite from ...core.v2_6_0_alpha.core_nwb_ophys import ( CorrectedImageStack, DfOverF, @@ -136,6 +150,7 @@ from ...core.v2_6_0_alpha.core_nwb_ophys import ( PlaneSegmentationPixelMask, PlaneSegmentationVoxelMask, RoiResponseSeries, + RoiResponseSeriesData, TwoPhotonSeries, ) from ...core.v2_6_0_alpha.core_nwb_retinotopy import ( @@ -177,7 +192,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_base.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_base.py index a645a2f..5a67fdf 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_base.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_base.py @@ -47,7 +47,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_behavior.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_behavior.py index 836c2e2..a67672a 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_behavior.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_behavior.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -176,6 +176,24 @@ class SpatialSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Optional[str] = Field( "meters", 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'.""", diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_device.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_device.py index 59b53c8..8a24ab1 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_device.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_device.py @@ -21,7 +21,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_ecephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_ecephys.py index dc96a98..195633b 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_ecephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_ecephys.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -156,11 +156,12 @@ class ElectricalSeries(TimeSeries): None, description="""Filtering applied to all channels of the data. For example, if this ElectricalSeries represents high-pass-filtered data (also known as AP Band), then this value could be \"High-pass 4-pole Bessel filter at 500 Hz\". If this ElectricalSeries represents low-pass-filtered LFP data and the type of filter is unknown, then this value could be \"Low-pass filter at 300 Hz\". If a non-standard filter type is used, provide as much detail about the filter properties as possible.""", ) - data: Union[ - NDArray[Shape["* num_times"], float], - NDArray[Shape["* num_times, * num_channels"], float], - NDArray[Shape["* num_times, * num_channels, * num_samples"], float], - ] = Field(..., description="""Recorded voltage data.""") + channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( + None, + description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", + json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, + ) + data: ElectricalSeriesData = Field(..., description="""Recorded voltage data.""") electrodes: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", @@ -173,11 +174,6 @@ class ElectricalSeries(TimeSeries): } }, ) - channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( - None, - description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, - ) description: Optional[str] = Field( "no description", description="""Description of the time series.""", @@ -215,6 +211,49 @@ class ElectricalSeries(TimeSeries): ) +class ElectricalSeriesData(ConfiguredBaseModel): + """ + Recorded voltage data. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ecephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["volts"] = Field( + "volts", + description="""Base unit of measurement for working with the data. This value is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion', followed by 'channel_conversion' (if present), and then add 'offset'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + value: Optional[ + Union[ + NDArray[Shape["* num_times"], float], + NDArray[Shape["* num_times, * num_channels"], float], + NDArray[Shape["* num_times, * num_channels, * num_samples"], float], + ] + ] = Field(None) + + class SpikeEventSeries(ElectricalSeries): """ Stores snapshots/snippets of recorded spike events (i.e., threshold crossings). This may also be raw data, as reported by ephys hardware. If so, the TimeSeries::description field should describe how events were detected. All SpikeEventSeries should reside in a module (under EventWaveform interface) even if the spikes were reported and stored by hardware. All events span the same recording channels and store snapshots of equal duration. TimeSeries::data array structure: [num events] [num channels] [num samples] (or [num events] [num samples] for single electrode). @@ -225,10 +264,7 @@ class SpikeEventSeries(ElectricalSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* num_events, * num_samples"], float], - NDArray[Shape["* num_events, * num_channels, * num_samples"], float], - ] = Field(..., description="""Spike waveforms.""") + data: SpikeEventSeriesData = Field(..., description="""Spike waveforms.""") timestamps: NDArray[Shape["* num_times"], float] = Field( ..., description="""Timestamps for samples stored in data, in seconds, relative to the common experiment master-clock stored in NWBFile.timestamps_reference_time. Timestamps are required for the events. Unlike for TimeSeries, timestamps are required for SpikeEventSeries and are thus re-specified here.""", @@ -238,6 +274,11 @@ class SpikeEventSeries(ElectricalSeries): None, description="""Filtering applied to all channels of the data. For example, if this ElectricalSeries represents high-pass-filtered data (also known as AP Band), then this value could be \"High-pass 4-pole Bessel filter at 500 Hz\". If this ElectricalSeries represents low-pass-filtered LFP data and the type of filter is unknown, then this value could be \"Low-pass filter at 300 Hz\". If a non-standard filter type is used, provide as much detail about the filter properties as possible.""", ) + channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( + None, + description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", + json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, + ) electrodes: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""", @@ -250,11 +291,6 @@ class SpikeEventSeries(ElectricalSeries): } }, ) - channel_conversion: Optional[NDArray[Shape["* num_channels"], float]] = Field( - None, - description="""Channel-specific conversion factor. Multiply the data in the 'data' dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the 'conversion' attribute of 'data' to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_channels"}]}}}, - ) description: Optional[str] = Field( "no description", description="""Description of the time series.""", @@ -287,6 +323,48 @@ class SpikeEventSeries(ElectricalSeries): ) +class SpikeEventSeriesData(ConfiguredBaseModel): + """ + Spike waveforms. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ecephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["volts"] = Field( + "volts", + description="""Unit of measurement for waveforms, which is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + value: Optional[ + Union[ + NDArray[Shape["* num_events, * num_samples"], float], + NDArray[Shape["* num_events, * num_channels, * num_samples"], float], + ] + ] = Field(None) + + class FeatureExtraction(NWBDataInterface): """ Features, such as PC1 and PC2, that are extracted from signals stored in a SpikeEventSeries or other source. @@ -561,7 +639,9 @@ class Clustering(NWBDataInterface): # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model ElectricalSeries.model_rebuild() +ElectricalSeriesData.model_rebuild() SpikeEventSeries.model_rebuild() +SpikeEventSeriesData.model_rebuild() FeatureExtraction.model_rebuild() EventDetection.model_rebuild() EventWaveform.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_epoch.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_epoch.py index e8b5539..eb514b2 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_epoch.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_epoch.py @@ -36,7 +36,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_file.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_file.py index 038a4ae..b21e028 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_file.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_file.py @@ -34,7 +34,12 @@ from ...core.v2_7_0.core_nwb_icephys import ( from ...core.v2_7_0.core_nwb_misc import Units from ...core.v2_7_0.core_nwb_ogen import OptogeneticStimulusSite from ...core.v2_7_0.core_nwb_ophys import ImagingPlane -from ...hdmf_common.v1_8_0.hdmf_common_table import DynamicTable, ElementIdentifiers, VectorData +from ...hdmf_common.v1_8_0.hdmf_common_table import ( + DynamicTable, + ElementIdentifiers, + VectorData, + VectorIndex, +) metamodel_version = "None" @@ -45,7 +50,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_icephys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_icephys.py index c1818b4..3cb28da 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_icephys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_icephys.py @@ -45,7 +45,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -227,6 +227,24 @@ class PatchClampSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: str = Field( ..., 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'.""", @@ -246,12 +264,12 @@ class CurrentClampSeries(PatchClampSeries): ) name: str = Field(...) - data: CurrentClampSeriesData = Field(..., description="""Recorded voltage.""") bias_current: Optional[float] = Field(None, description="""Bias current, in amps.""") bridge_balance: Optional[float] = Field(None, description="""Bridge balance, in ohms.""") capacitance_compensation: Optional[float] = Field( None, description="""Capacitance compensation, in farads.""" ) + data: CurrentClampSeriesData = Field(..., description="""Recorded voltage.""") stimulus_description: str = Field( ..., description="""Protocol/stimulus name for this patch-clamp dataset.""" ) @@ -319,12 +337,32 @@ class CurrentClampSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["volts"] = Field( "volts", description="""Base unit of measurement for working with the data. which is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class IZeroClampSeries(CurrentClampSeries): @@ -479,6 +517,24 @@ class CurrentClampStimulusSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["amperes"] = Field( "amperes", description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", @@ -486,7 +542,9 @@ class CurrentClampStimulusSeriesData(ConfiguredBaseModel): "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} }, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class VoltageClampSeries(PatchClampSeries): @@ -499,13 +557,13 @@ class VoltageClampSeries(PatchClampSeries): ) name: str = Field(...) - data: VoltageClampSeriesData = Field(..., description="""Recorded current.""") capacitance_fast: Optional[VoltageClampSeriesCapacitanceFast] = Field( None, description="""Fast capacitance, in farads.""" ) capacitance_slow: Optional[VoltageClampSeriesCapacitanceSlow] = Field( None, description="""Slow capacitance, in farads.""" ) + data: VoltageClampSeriesData = Field(..., description="""Recorded current.""") resistance_comp_bandwidth: Optional[VoltageClampSeriesResistanceCompBandwidth] = Field( None, description="""Resistance compensation bandwidth, in hertz.""" ) @@ -577,27 +635,6 @@ class VoltageClampSeries(PatchClampSeries): ) -class VoltageClampSeriesData(ConfiguredBaseModel): - """ - Recorded current. - """ - - linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.icephys"}) - - name: Literal["data"] = Field( - "data", - json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, - ) - unit: Literal["amperes"] = Field( - "amperes", - description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", - json_schema_extra={ - "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} - }, - ) - value: Any = Field(...) - - class VoltageClampSeriesCapacitanceFast(ConfiguredBaseModel): """ Fast capacitance, in farads. @@ -650,6 +687,47 @@ class VoltageClampSeriesCapacitanceSlow(ConfiguredBaseModel): value: float = Field(...) +class VoltageClampSeriesData(ConfiguredBaseModel): + """ + Recorded current. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.icephys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["amperes"] = Field( + "amperes", + description="""Base unit of measurement for working with the data. which is fixed to 'amperes'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", + json_schema_extra={ + "linkml_meta": {"equals_string": "amperes", "ifabsent": "string(amperes)"} + }, + ) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class VoltageClampSeriesResistanceCompBandwidth(ConfiguredBaseModel): """ Resistance compensation bandwidth, in hertz. @@ -854,12 +932,32 @@ class VoltageClampStimulusSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Literal["volts"] = Field( "volts", description="""Base unit of measurement for working with the data. which is fixed to 'volts'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""", json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, ) - value: Any = Field(...) + value: Optional[NDArray[Shape["* num_times"], float]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) class IntracellularElectrode(NWBContainer): @@ -910,15 +1008,6 @@ class SweepTable(DynamicTable): ) name: str = Field(...) - sweep_number: VectorData[NDArray[Any, int]] = Field( - ..., - description="""Sweep number of the PatchClampSeries in that row.""", - json_schema_extra={ - "linkml_meta": { - "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} - } - }, - ) series: VectorData[NDArray[Any, PatchClampSeries]] = Field( ..., description="""The PatchClampSeries with the sweep number in that row.""", @@ -940,6 +1029,15 @@ class SweepTable(DynamicTable): } }, ) + sweep_number: VectorData[NDArray[Any, int]] = Field( + ..., + description="""Sweep number of the PatchClampSeries in that row.""", + json_schema_extra={ + "linkml_meta": { + "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} + } + }, + ) colnames: List[str] = Field( ..., description="""The names of the columns in this table. This should be used to specify an order to the columns.""", @@ -1133,12 +1231,12 @@ class IntracellularRecordingsTable(AlignedDynamicTable): electrodes: IntracellularElectrodesTable = Field( ..., description="""Table for storing intracellular electrode related metadata.""" ) - stimuli: IntracellularStimuliTable = Field( - ..., description="""Table for storing intracellular stimulus related metadata.""" - ) responses: IntracellularResponsesTable = Field( ..., description="""Table for storing intracellular response related metadata.""" ) + stimuli: IntracellularStimuliTable = Field( + ..., description="""Table for storing intracellular stimulus related metadata.""" + ) value: Optional[Dict[str, DynamicTable]] = Field( None, json_schema_extra={"linkml_meta": {"any_of": [{"range": "DynamicTable"}]}} ) @@ -1478,9 +1576,9 @@ IZeroClampSeries.model_rebuild() CurrentClampStimulusSeries.model_rebuild() CurrentClampStimulusSeriesData.model_rebuild() VoltageClampSeries.model_rebuild() -VoltageClampSeriesData.model_rebuild() VoltageClampSeriesCapacitanceFast.model_rebuild() VoltageClampSeriesCapacitanceSlow.model_rebuild() +VoltageClampSeriesData.model_rebuild() VoltageClampSeriesResistanceCompBandwidth.model_rebuild() VoltageClampSeriesResistanceCompCorrection.model_rebuild() VoltageClampSeriesResistanceCompPrediction.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_image.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_image.py index 6e97172..263bf5b 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_image.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_image.py @@ -29,7 +29,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -204,9 +204,7 @@ class ImageSeries(TimeSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -220,8 +218,9 @@ class ImageSeries(TimeSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -269,6 +268,47 @@ class ImageSeries(TimeSeries): ) +class ImageSeriesData(ConfiguredBaseModel): + """ + Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + continuity: Optional[str] = Field( + 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.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* frame, * x, * y"], float], + NDArray[Shape["* frame, * x, * y, * z"], float], + ] + ] = Field(None) + + class ImageSeriesExternalFile(ConfiguredBaseModel): """ Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file. @@ -310,9 +350,7 @@ class ImageMaskSeries(ImageSeries): } }, ) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -326,8 +364,9 @@ class ImageMaskSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -385,6 +424,9 @@ class OpticalSeries(ImageSeries): ) name: str = Field(...) + data: OpticalSeriesData = Field( + ..., description="""Images presented to subject, either grayscale or RGB""" + ) distance: Optional[float] = Field( None, description="""Distance from camera/monitor to target/eye.""" ) @@ -393,10 +435,6 @@ class OpticalSeries(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.""") - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], - NDArray[Shape["* frame, * x, * y, 3 r_g_b"], float], - ] = Field(..., description="""Images presented to subject, either grayscale or RGB""") orientation: Optional[str] = Field( None, description="""Description of image relative to some reference frame (e.g., which way is up). Must also specify frame of reference.""", @@ -411,8 +449,9 @@ class OpticalSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -460,6 +499,47 @@ class OpticalSeries(ImageSeries): ) +class OpticalSeriesData(ConfiguredBaseModel): + """ + Images presented to subject, either grayscale or RGB + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* frame, * x, * y"], float], + NDArray[Shape["* frame, * x, * y, 3 r_g_b"], float], + ] + ] = Field(None) + + class IndexSeries(TimeSeries): """ Stores indices to image frames stored in an ImageSeries. The purpose of the IndexSeries is to allow a static image stack to be stored in an Images object, and the images in the stack to be referenced out-of-order. This can be for the display of individual images, or of movie segments (as a movie is simply a series of images). The data field stores the index of the frame in the referenced Images object, and the timestamps array indicates when that image was displayed. @@ -470,10 +550,8 @@ class IndexSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], int] = Field( - ..., - description="""Index of the image (using zero-indexing) in the linked Images object.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: IndexSeriesData = Field( + ..., description="""Index of the image (using zero-indexing) in the linked Images object.""" ) indexed_timeseries: Optional[Union[ImageSeries, str]] = Field( None, @@ -530,13 +608,52 @@ class IndexSeries(TimeSeries): ) +class IndexSeriesData(ConfiguredBaseModel): + """ + Index of the image (using zero-indexing) in the linked Images object. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.image"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + description="""This field is unused by IndexSeries.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field(None, description="""This field is unused by IndexSeries.""") + resolution: Optional[float] = Field( + -1.0, + description="""This field is unused by IndexSeries.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["N/A"] = Field( + "N/A", + description="""This field is unused by IndexSeries and has the value N/A.""", + json_schema_extra={"linkml_meta": {"equals_string": "N/A", "ifabsent": "string(N/A)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], int]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model GrayscaleImage.model_rebuild() RGBImage.model_rebuild() RGBAImage.model_rebuild() ImageSeries.model_rebuild() +ImageSeriesData.model_rebuild() ImageSeriesExternalFile.model_rebuild() ImageMaskSeries.model_rebuild() OpticalSeries.model_rebuild() +OpticalSeriesData.model_rebuild() IndexSeries.model_rebuild() +IndexSeriesData.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_misc.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_misc.py index 1eb2c3a..e1dbe0e 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_misc.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_misc.py @@ -38,7 +38,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -213,6 +213,24 @@ class AbstractFeatureSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: Optional[str] = Field( "see ", 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'\".""", @@ -236,10 +254,8 @@ class AnnotationSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], str] = Field( - ..., - description="""Annotations made during an experiment.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: AnnotationSeriesData = Field( + ..., description="""Annotations made during an experiment.""" ) description: Optional[str] = Field( "no description", @@ -278,6 +294,47 @@ class AnnotationSeries(TimeSeries): ) +class AnnotationSeriesData(ConfiguredBaseModel): + """ + Annotations made during an experiment. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: float = Field( + -1.0, + description="""Smallest meaningful difference between values in data. Annotations have no units, so the value is fixed to -1.0.""", + le=-1, + ge=-1, + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["n/a"] = Field( + "n/a", + description="""Base unit of measurement for working with the data. Annotations have no units, so the value is fixed to 'n/a'.""", + json_schema_extra={"linkml_meta": {"equals_string": "n/a", "ifabsent": "string(n/a)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], str]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class IntervalSeries(TimeSeries): """ Stores intervals of data. The timestamps field stores the beginning and end of intervals. The data field stores whether the interval just started (>0 value) or ended (<0 value). Different interval types can be represented in the same series by using multiple key values (eg, 1 for feature A, 2 for feature B, 3 for feature C, etc). The field data stores an 8-bit integer. This is largely an alias of a standard TimeSeries but that is identifiable as representing time intervals in a machine-readable way. @@ -288,10 +345,8 @@ class IntervalSeries(TimeSeries): ) name: str = Field(...) - data: NDArray[Shape["* num_times"], int] = Field( - ..., - description="""Use values >0 if interval started, <0 if interval ended.""", - json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}}, + data: IntervalSeriesData = Field( + ..., description="""Use values >0 if interval started, <0 if interval ended.""" ) description: Optional[str] = Field( "no description", @@ -330,6 +385,47 @@ class IntervalSeries(TimeSeries): ) +class IntervalSeriesData(ConfiguredBaseModel): + """ + Use values >0 if interval started, <0 if interval ended. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: float = Field( + -1.0, + description="""Smallest meaningful difference between values in data. Annotations have no units, so the value is fixed to -1.0.""", + le=-1, + ge=-1, + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["n/a"] = Field( + "n/a", + description="""Base unit of measurement for working with the data. Annotations have no units, so the value is fixed to 'n/a'.""", + json_schema_extra={"linkml_meta": {"equals_string": "n/a", "ifabsent": "string(n/a)"}}, + ) + value: Optional[NDArray[Shape["* num_times"], int]] = Field( + None, json_schema_extra={"linkml_meta": {"array": {"dimensions": [{"alias": "num_times"}]}}} + ) + + class DecompositionSeries(TimeSeries): """ Spectral analysis of a time series, e.g. of an LFP or a speech signal. @@ -417,6 +513,24 @@ class DecompositionSeriesData(ConfiguredBaseModel): "data", json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) unit: str = Field( "no unit", 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'.""", @@ -504,9 +618,18 @@ class Units(DynamicTable): ) name: str = Field("Units", json_schema_extra={"linkml_meta": {"ifabsent": "string(Units)"}}) - spike_times_index: Optional[Named[VectorIndex]] = Field( + electrode_group: Optional[VectorData[NDArray[Any, ElectrodeGroup]]] = Field( None, - description="""Index into the spike_times dataset.""", + description="""Electrode group that each spike unit came from.""", + json_schema_extra={ + "linkml_meta": { + "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} + } + }, + ) + electrodes: Optional[Named[DynamicTableRegion]] = Field( + None, + description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -516,12 +639,9 @@ class Units(DynamicTable): } }, ) - spike_times: Optional[UnitsSpikeTimes] = Field( - None, description="""Spike times for each unit in seconds.""" - ) - obs_intervals_index: Optional[Named[VectorIndex]] = Field( + electrodes_index: Optional[Named[VectorIndex]] = Field( None, - description="""Index into the obs_intervals dataset.""", + description="""Index into electrodes.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -547,9 +667,9 @@ class Units(DynamicTable): }, ) ) - electrodes_index: Optional[Named[VectorIndex]] = Field( + obs_intervals_index: Optional[Named[VectorIndex]] = Field( None, - description="""Index into electrodes.""", + description="""Index into the obs_intervals dataset.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -559,9 +679,12 @@ class Units(DynamicTable): } }, ) - electrodes: Optional[Named[DynamicTableRegion]] = Field( + spike_times: Optional[UnitsSpikeTimes] = Field( + None, description="""Spike times for each unit in seconds.""" + ) + spike_times_index: Optional[Named[VectorIndex]] = Field( None, - description="""Electrode that each spike unit came from, specified using a DynamicTableRegion.""", + description="""Index into the spike_times dataset.""", json_schema_extra={ "linkml_meta": { "annotations": { @@ -571,41 +694,15 @@ class Units(DynamicTable): } }, ) - electrode_group: Optional[VectorData[NDArray[Any, ElectrodeGroup]]] = Field( - None, - description="""Electrode group that each spike unit came from.""", - json_schema_extra={ - "linkml_meta": { - "array": {"maximum_number_dimensions": False, "minimum_number_dimensions": 1} - } - }, + waveform_mean: Optional[UnitsWaveformMean] = Field( + None, description="""Spike waveform mean for each spike unit.""" ) - waveform_mean: Optional[ - VectorData[ - Union[ - NDArray[Shape["* num_units, * num_samples"], float], - NDArray[Shape["* num_units, * num_samples, * num_electrodes"], float], - ] - ] - ] = Field(None, description="""Spike waveform mean for each spike unit.""") - waveform_sd: Optional[ - VectorData[ - Union[ - NDArray[Shape["* num_units, * num_samples"], float], - NDArray[Shape["* num_units, * num_samples, * num_electrodes"], float], - ] - ] - ] = Field(None, description="""Spike waveform standard deviation for each spike unit.""") - waveforms: Optional[VectorData[NDArray[Shape["* num_waveforms, * num_samples"], float]]] = ( - Field( - None, - description="""Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same.""", - json_schema_extra={ - "linkml_meta": { - "array": {"dimensions": [{"alias": "num_waveforms"}, {"alias": "num_samples"}]} - } - }, - ) + waveform_sd: Optional[UnitsWaveformSd] = Field( + None, description="""Spike waveform standard deviation for each spike unit.""" + ) + waveforms: Optional[UnitsWaveforms] = Field( + None, + description="""Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same.""", ) waveforms_index: Optional[Named[VectorIndex]] = Field( None, @@ -671,14 +768,109 @@ class UnitsSpikeTimes(VectorData): ] = Field(None) +class UnitsWaveformMean(VectorData): + """ + Spike waveform mean for each spike unit. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveform_mean"] = Field( + "waveform_mean", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveform_mean", "ifabsent": "string(waveform_mean)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + +class UnitsWaveformSd(VectorData): + """ + Spike waveform standard deviation for each spike unit. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveform_sd"] = Field( + "waveform_sd", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveform_sd", "ifabsent": "string(waveform_sd)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + +class UnitsWaveforms(VectorData): + """ + Individual waveforms for each spike on each electrode. This is a doubly indexed column. The 'waveforms_index' column indexes which waveforms in this column belong to the same spike event for a given unit, where each waveform was recorded from a different electrode. The 'waveforms_index_index' column indexes the 'waveforms_index' column to indicate which spike events belong to a given unit. For example, if the 'waveforms_index_index' column has values [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' column correspond to the 3 spike events of the second unit, and the next 1 element of the 'waveforms_index' column corresponds to the 1 spike event of the third unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then the first 3 elements of the 'waveforms' column contain the 3 spike waveforms that were recorded from 3 different electrodes for the first spike time of the first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays for a graphical representation of this example. When there is only one electrode for each unit (i.e., each spike time is associated with a single waveform), then the 'waveforms_index' column will have values 1, 2, ..., N, where N is the number of spike events. The number of electrodes for each spike event should be the same within a given unit. The 'electrodes' column should be used to indicate which electrodes are associated with each unit, and the order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.misc"}) + + name: Literal["waveforms"] = Field( + "waveforms", + json_schema_extra={ + "linkml_meta": {"equals_string": "waveforms", "ifabsent": "string(waveforms)"} + }, + ) + sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""") + unit: Optional[Literal["volts"]] = Field( + "volts", + description="""Unit of measurement. This value is fixed to 'volts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "volts", "ifabsent": "string(volts)"}}, + ) + description: str = Field(..., description="""Description of what these vectors represent.""") + value: Optional[ + Union[ + NDArray[Shape["* dim0"], Any], + NDArray[Shape["* dim0, * dim1"], Any], + NDArray[Shape["* dim0, * dim1, * dim2"], Any], + NDArray[Shape["* dim0, * dim1, * dim2, * dim3"], Any], + ] + ] = Field(None) + + # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model AbstractFeatureSeries.model_rebuild() AbstractFeatureSeriesData.model_rebuild() AnnotationSeries.model_rebuild() +AnnotationSeriesData.model_rebuild() IntervalSeries.model_rebuild() +IntervalSeriesData.model_rebuild() DecompositionSeries.model_rebuild() DecompositionSeriesData.model_rebuild() DecompositionSeriesBands.model_rebuild() Units.model_rebuild() UnitsSpikeTimes.model_rebuild() +UnitsWaveformMean.model_rebuild() +UnitsWaveformSd.model_rebuild() +UnitsWaveforms.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_ogen.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_ogen.py index 626a28c..bc21582 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_ogen.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_ogen.py @@ -28,7 +28,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -121,9 +121,7 @@ class OptogeneticSeries(TimeSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_rois"], float] - ] = Field( + data: OptogeneticSeriesData = Field( ..., 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.""", ) @@ -173,6 +171,47 @@ class OptogeneticSeries(TimeSeries): ) +class OptogeneticSeriesData(ConfiguredBaseModel): + """ + 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. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ogen"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + continuity: Optional[str] = Field( + 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.""", + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: Literal["watts"] = Field( + "watts", + description="""Unit of measurement for data, which is fixed to 'watts'.""", + json_schema_extra={"linkml_meta": {"equals_string": "watts", "ifabsent": "string(watts)"}}, + ) + value: Optional[ + Union[ + NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_rois"], float] + ] + ] = Field(None) + + class OptogeneticStimulusSite(NWBContainer): """ A site of optogenetic stimulation. @@ -203,4 +242,5 @@ class OptogeneticStimulusSite(NWBContainer): # Model rebuild # see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model OptogeneticSeries.model_rebuild() +OptogeneticSeriesData.model_rebuild() OptogeneticStimulusSite.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_ophys.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_ophys.py index d462064..8104916 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_ophys.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_ophys.py @@ -27,7 +27,7 @@ from ...core.v2_7_0.core_nwb_base import ( TimeSeriesSync, ) from ...core.v2_7_0.core_nwb_device import Device -from ...core.v2_7_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile +from ...core.v2_7_0.core_nwb_image import ImageSeries, ImageSeriesData, ImageSeriesExternalFile from ...hdmf_common.v1_8_0.hdmf_common_table import ( DynamicTable, DynamicTableRegion, @@ -45,7 +45,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, @@ -160,21 +160,21 @@ class OnePhotonSeries(ImageSeries): ) name: str = Field(...) - pmt_gain: Optional[float] = Field(None, description="""Photomultiplier gain.""") - scan_line_rate: Optional[float] = Field( - None, - description="""Lines imaged per second. This is also stored in /general/optophysiology but is kept here as it is useful information for analysis, and so good to be stored w/ the actual data.""", + binning: Optional[int] = Field( + None, description="""Amount of pixels combined into 'bins'; could be 1, 2, 4, 8, etc.""" ) exposure_time: Optional[float] = Field( None, description="""Exposure time of the sample; often the inverse of the frequency.""" ) - binning: Optional[int] = Field( - None, description="""Amount of pixels combined into 'bins'; could be 1, 2, 4, 8, etc.""" - ) - power: Optional[float] = Field(None, description="""Power of the excitation in mW, if known.""") intensity: Optional[float] = Field( None, description="""Intensity of the excitation in mW/mm^2, if known.""" ) + pmt_gain: Optional[float] = Field(None, description="""Photomultiplier gain.""") + power: Optional[float] = Field(None, description="""Power of the excitation in mW, if known.""") + scan_line_rate: Optional[float] = Field( + None, + description="""Lines imaged per second. This is also stored in /general/optophysiology but is kept here as it is useful information for analysis, and so good to be stored w/ the actual data.""", + ) imaging_plane: Union[ImagingPlane, str] = Field( ..., json_schema_extra={ @@ -184,9 +184,7 @@ class OnePhotonSeries(ImageSeries): } }, ) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -200,8 +198,9 @@ class OnePhotonSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -278,9 +277,7 @@ class TwoPhotonSeries(ImageSeries): } }, ) - data: Union[ - NDArray[Shape["* frame, * x, * y"], float], NDArray[Shape["* frame, * x, * y, * z"], float] - ] = Field( + data: ImageSeriesData = Field( ..., description="""Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.""", ) @@ -294,8 +291,9 @@ class TwoPhotonSeries(ImageSeries): description="""Paths to one or more external file(s). The field is only present if format='external'. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.""", ) format: Optional[str] = Field( - None, + "raw", 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.""", + json_schema_extra={"linkml_meta": {"ifabsent": "string(raw)"}}, ) device: Optional[Union[Device, str]] = Field( None, @@ -353,9 +351,7 @@ class RoiResponseSeries(TimeSeries): ) name: str = Field(...) - data: Union[ - NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_rois"], float] - ] = Field(..., description="""Signals from ROIs.""") + data: RoiResponseSeriesData = Field(..., description="""Signals from ROIs.""") rois: Named[DynamicTableRegion] = Field( ..., description="""DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.""", @@ -405,6 +401,46 @@ class RoiResponseSeries(TimeSeries): ) +class RoiResponseSeriesData(ConfiguredBaseModel): + """ + Signals from ROIs. + """ + + linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({"from_schema": "core.nwb.ophys"}) + + name: Literal["data"] = Field( + "data", + json_schema_extra={"linkml_meta": {"equals_string": "data", "ifabsent": "string(data)"}}, + ) + conversion: Optional[float] = Field( + 1.0, + 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 signed 16-bit integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' multiplier to get from raw data acquisition values to recorded volts is 2.5/32768/8000 = 9.5367e-9.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(1.0)"}}, + ) + offset: Optional[float] = Field( + None, + description="""Scalar to add to the data after scaling by 'conversion' to finalize its coercion to the specified 'unit'. Two common examples of this include (a) data stored in an unsigned type that requires a shift after scaling to re-center the data, and (b) specialized recording devices that naturally cause a scalar offset with respect to the true units.""", + ) + resolution: Optional[float] = Field( + -1.0, + description="""Smallest meaningful difference between values in data, stored in the specified by unit, e.g., the change in value of the least significant bit, or a larger number if signal noise is known to be present. If unknown, use -1.0.""", + json_schema_extra={"linkml_meta": {"ifabsent": "float(-1.0)"}}, + ) + unit: str = Field( + ..., + 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'.""", + ) + continuity: Optional[str] = Field( + 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.""", + ) + value: Optional[ + Union[ + NDArray[Shape["* num_times"], float], NDArray[Shape["* num_times, * num_rois"], float] + ] + ] = Field(None) + + class DfOverF(NWBDataInterface): """ dF/F information about a region of interest (ROI). Storage hierarchy of dF/F should be the same as for segmentation (i.e., same names for ROIs and for image planes). @@ -471,6 +507,10 @@ class PlaneSegmentation(DynamicTable): None, description="""ROI masks for each ROI. Each image mask is the size of the original imaging plane (or volume) and members of the ROI are finite non-zero.""", ) + pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( + None, + description="""Pixel masks for each ROI: a list of indices and weights for the ROI. Pixel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", + ) pixel_mask_index: Optional[Named[VectorIndex]] = Field( None, description="""Index into pixel_mask.""", @@ -483,9 +523,9 @@ class PlaneSegmentation(DynamicTable): } }, ) - pixel_mask: Optional[PlaneSegmentationPixelMask] = Field( + voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( None, - description="""Pixel masks for each ROI: a list of indices and weights for the ROI. Pixel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", + description="""Voxel masks for each ROI: a list of indices and weights for the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", ) voxel_mask_index: Optional[Named[VectorIndex]] = Field( None, @@ -499,10 +539,6 @@ class PlaneSegmentation(DynamicTable): } }, ) - voxel_mask: Optional[PlaneSegmentationVoxelMask] = Field( - None, - description="""Voxel masks for each ROI: a list of indices and weights for the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation""", - ) reference_images: Optional[Dict[str, ImageSeries]] = Field( None, description="""Image stacks that the segmentation masks apply to.""", @@ -802,6 +838,7 @@ class CorrectedImageStack(NWBDataInterface): OnePhotonSeries.model_rebuild() TwoPhotonSeries.model_rebuild() RoiResponseSeries.model_rebuild() +RoiResponseSeriesData.model_rebuild() DfOverF.model_rebuild() Fluorescence.model_rebuild() ImageSegmentation.model_rebuild() diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_retinotopy.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_retinotopy.py index 26f2f92..c7ced82 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_retinotopy.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/core_nwb_retinotopy.py @@ -22,7 +22,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/namespace.py b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/namespace.py index 5747cde..fd6b259 100644 --- a/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/namespace.py +++ b/nwb_models/src/nwb_models/models/pydantic/core/v2_7_0/namespace.py @@ -40,6 +40,7 @@ from ...core.v2_7_0.core_nwb_ecephys import ( ClusterWaveforms, Clustering, ElectricalSeries, + ElectricalSeriesData, ElectrodeGroup, ElectrodeGroupPosition, EventDetection, @@ -48,6 +49,7 @@ from ...core.v2_7_0.core_nwb_ecephys import ( FilteredEphys, LFP, SpikeEventSeries, + SpikeEventSeriesData, ) from ...core.v2_7_0.core_nwb_epoch import TimeIntervals from ...core.v2_7_0.core_nwb_file import ( @@ -102,9 +104,12 @@ from ...core.v2_7_0.core_nwb_image import ( GrayscaleImage, ImageMaskSeries, ImageSeries, + ImageSeriesData, ImageSeriesExternalFile, IndexSeries, + IndexSeriesData, OpticalSeries, + OpticalSeriesData, RGBAImage, RGBImage, ) @@ -112,14 +117,23 @@ from ...core.v2_7_0.core_nwb_misc import ( AbstractFeatureSeries, AbstractFeatureSeriesData, AnnotationSeries, + AnnotationSeriesData, DecompositionSeries, DecompositionSeriesBands, DecompositionSeriesData, IntervalSeries, + IntervalSeriesData, Units, UnitsSpikeTimes, + UnitsWaveformMean, + UnitsWaveformSd, + UnitsWaveforms, +) +from ...core.v2_7_0.core_nwb_ogen import ( + OptogeneticSeries, + OptogeneticSeriesData, + OptogeneticStimulusSite, ) -from ...core.v2_7_0.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite from ...core.v2_7_0.core_nwb_ophys import ( CorrectedImageStack, DfOverF, @@ -136,6 +150,7 @@ from ...core.v2_7_0.core_nwb_ophys import ( PlaneSegmentationPixelMask, PlaneSegmentationVoxelMask, RoiResponseSeries, + RoiResponseSeriesData, TwoPhotonSeries, ) from ...core.v2_7_0.core_nwb_retinotopy import ( @@ -178,7 +193,7 @@ class ConfiguredBaseModel(BaseModel): model_config = ConfigDict( validate_assignment=True, validate_default=True, - extra="allow", + extra="forbid", arbitrary_types_allowed=True, use_enum_values=True, strict=False, diff --git a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/__init__.py b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/__init__.py index 8b13789..e69de29 100644 --- a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/__init__.py +++ b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/__init__.py @@ -1 +0,0 @@ - diff --git a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_4_0/hdmf_common_table.py b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_4_0/hdmf_common_table.py index a730ec1..c704fa9 100644 --- a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_4_0/hdmf_common_table.py +++ b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_4_0/hdmf_common_table.py @@ -928,12 +928,12 @@ class DynamicTableRegion(DynamicTableRegionMixin, VectorData, ConfiguredBaseMode ) name: str = Field(...) - table: DynamicTable = Field( - ..., description="""Reference to the DynamicTable object that this region applies to.""" - ) description: str = Field( ..., description="""Description of what this table region points to.""" ) + table: DynamicTable = Field( + ..., description="""Reference to the DynamicTable object that this region applies to.""" + ) value: Optional[ Union[ NDArray[Shape["* dim0"], Any], diff --git a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_5_0/hdmf_common_table.py b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_5_0/hdmf_common_table.py index 27a287c..c604b38 100644 --- a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_5_0/hdmf_common_table.py +++ b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_5_0/hdmf_common_table.py @@ -928,12 +928,12 @@ class DynamicTableRegion(DynamicTableRegionMixin, VectorData, ConfiguredBaseMode ) name: str = Field(...) - table: DynamicTable = Field( - ..., description="""Reference to the DynamicTable object that this region applies to.""" - ) description: str = Field( ..., description="""Description of what this table region points to.""" ) + table: DynamicTable = Field( + ..., description="""Reference to the DynamicTable object that this region applies to.""" + ) value: Optional[ Union[ NDArray[Shape["* dim0"], Any], diff --git a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_5_1/hdmf_common_table.py b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_5_1/hdmf_common_table.py index 3112a4f..6719d89 100644 --- a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_5_1/hdmf_common_table.py +++ b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_5_1/hdmf_common_table.py @@ -928,12 +928,12 @@ class DynamicTableRegion(DynamicTableRegionMixin, VectorData, ConfiguredBaseMode ) name: str = Field(...) - table: DynamicTable = Field( - ..., description="""Reference to the DynamicTable object that this region applies to.""" - ) description: str = Field( ..., description="""Description of what this table region points to.""" ) + table: DynamicTable = Field( + ..., description="""Reference to the DynamicTable object that this region applies to.""" + ) value: Optional[ Union[ NDArray[Shape["* dim0"], Any], diff --git a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_6_0/hdmf_common_table.py b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_6_0/hdmf_common_table.py index 0759b51..d47f747 100644 --- a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_6_0/hdmf_common_table.py +++ b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_6_0/hdmf_common_table.py @@ -928,12 +928,12 @@ class DynamicTableRegion(DynamicTableRegionMixin, VectorData, ConfiguredBaseMode ) name: str = Field(...) - table: DynamicTable = Field( - ..., description="""Reference to the DynamicTable object that this region applies to.""" - ) description: str = Field( ..., description="""Description of what this table region points to.""" ) + table: DynamicTable = Field( + ..., description="""Reference to the DynamicTable object that this region applies to.""" + ) value: Optional[ Union[ NDArray[Shape["* dim0"], Any], diff --git a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_7_0/hdmf_common_table.py b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_7_0/hdmf_common_table.py index e805fe7..dceaa2e 100644 --- a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_7_0/hdmf_common_table.py +++ b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_7_0/hdmf_common_table.py @@ -928,12 +928,12 @@ class DynamicTableRegion(DynamicTableRegionMixin, VectorData, ConfiguredBaseMode ) name: str = Field(...) - table: DynamicTable = Field( - ..., description="""Reference to the DynamicTable object that this region applies to.""" - ) description: str = Field( ..., description="""Description of what this table region points to.""" ) + table: DynamicTable = Field( + ..., description="""Reference to the DynamicTable object that this region applies to.""" + ) value: Optional[ Union[ NDArray[Shape["* dim0"], Any], diff --git a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_8_0/hdmf_common_table.py b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_8_0/hdmf_common_table.py index 8f0d610..d6699e6 100644 --- a/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_8_0/hdmf_common_table.py +++ b/nwb_models/src/nwb_models/models/pydantic/hdmf_common/v1_8_0/hdmf_common_table.py @@ -928,12 +928,12 @@ class DynamicTableRegion(DynamicTableRegionMixin, VectorData, ConfiguredBaseMode ) name: str = Field(...) - table: DynamicTable = Field( - ..., description="""Reference to the DynamicTable object that this region applies to.""" - ) description: str = Field( ..., description="""Description of what this table region points to.""" ) + table: DynamicTable = Field( + ..., description="""Reference to the DynamicTable object that this region applies to.""" + ) value: Optional[ Union[ NDArray[Shape["* dim0"], Any], diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.base.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.base.yaml index b11b02c..04aec2d 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.base.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.base.yaml @@ -124,7 +124,6 @@ classes: external file. range: TimeSeries__data required: true - multivalued: false inlined: true starting_time: name: starting_time @@ -132,8 +131,6 @@ classes: uniformly spaced, the timestamp of the first sample can be specified and all subsequent ones calculated from the sampling rate attribute. range: TimeSeries__starting_time - required: false - multivalued: false inlined: true timestamps: name: timestamps @@ -176,8 +173,6 @@ classes: external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes. range: TimeSeries__sync - required: false - multivalued: false inlined: true inlined_as_list: true tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.behavior.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.behavior.yaml index f63c218..27f87f4 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.behavior.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.behavior.yaml @@ -38,14 +38,11 @@ classes: reference frame. range: SpatialSeries__data required: true - multivalued: false inlined: true reference_frame: name: reference_frame description: Description defining what exactly 'straight-ahead' means. range: text - required: false - multivalued: false tree_root: true SpatialSeries__data: name: SpatialSeries__data @@ -59,6 +56,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. The default diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.ecephys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.ecephys.yaml index 7a93461..8ce3b23 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.ecephys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.ecephys.yaml @@ -39,40 +39,6 @@ classes: about the filter properties as possible. range: text required: false - data: - name: data - description: Recorded voltage data. - range: numeric - required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_times - - array: - dimensions: - - alias: num_times - - alias: num_channels - - array: - dimensions: - - alias: num_times - - alias: num_channels - - alias: num_samples - electrodes: - name: electrodes - annotations: - 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 - required: true - multivalued: false - inlined: true channel_conversion: name: channel_conversion description: Channel-specific conversion factor. Multiply the data in the @@ -90,7 +56,100 @@ classes: range: float32 required: false multivalued: false + data: + name: data + description: Recorded voltage data. + range: ElectricalSeries__data + required: true + inlined: true + electrodes: + name: electrodes + annotations: + 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 + required: true + inlined: true tree_root: true + ElectricalSeries__data: + name: ElectricalSeries__data + description: Recorded voltage data. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Base unit of measurement for working with the data. This value + is fixed to 'volts'. Actual stored values are not necessarily stored in + these units. To access the data in these units, multiply 'data' by 'conversion' + and 'channel_conversion' (if present). + ifabsent: string(volts) + range: text + required: true + equals_string: volts + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_times + - array: + dimensions: + - alias: num_times + - alias: num_channels + - array: + dimensions: + - alias: num_times + - alias: num_channels + - alias: num_samples SpikeEventSeries: name: SpikeEventSeries description: 'Stores snapshots/snippets of recorded spike events (i.e., threshold @@ -111,19 +170,9 @@ classes: data: name: data description: Spike waveforms. - range: numeric + range: SpikeEventSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_events - - alias: num_samples - - array: - dimensions: - - alias: num_events - - alias: num_channels - - alias: num_samples + inlined: true timestamps: name: timestamps description: Timestamps for samples stored in data, in seconds, relative to @@ -137,6 +186,73 @@ classes: required: true multivalued: false tree_root: true + SpikeEventSeries__data: + name: SpikeEventSeries__data + description: Spike waveforms. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Unit of measurement for waveforms, which is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: true + equals_string: volts + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_events + - alias: num_samples + - array: + dimensions: + - alias: num_events + - alias: num_channels + - alias: num_samples FeatureExtraction: name: FeatureExtraction description: Features, such as PC1 and PC2, that are extracted from signals stored @@ -192,7 +308,6 @@ classes: was generated from. range: DynamicTableRegion required: true - multivalued: false inlined: true tree_root: true EventDetection: @@ -212,7 +327,6 @@ classes: or dV/dT threshold, as well as relevant values. range: text required: true - multivalued: false source_idx: name: source_idx description: Indices (zero-based) into source ElectricalSeries::data array @@ -241,7 +355,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ElectricalSeries @@ -323,8 +436,6 @@ classes: name: position description: stereotaxic or common framework coordinates range: ElectrodeGroup__position - required: false - multivalued: false inlined: true device: name: device @@ -333,7 +444,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -356,24 +466,18 @@ classes: array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false y: name: y description: y coordinate array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false z: name: z description: z coordinate array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false ClusterWaveforms: name: ClusterWaveforms description: DEPRECATED The mean waveform shape, including standard deviation, @@ -395,7 +499,6 @@ classes: description: Filtering applied to data before generating mean/sd range: text required: true - multivalued: false waveform_mean: name: waveform_mean description: The mean waveform for each cluster, using the same indices for @@ -427,7 +530,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Clustering @@ -451,7 +553,6 @@ classes: clusters curated using Klusters, etc) range: text required: true - multivalued: false num: name: num description: Cluster number of each event diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.epoch.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.epoch.yaml index 4eb778d..c095b7b 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.epoch.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.epoch.yaml @@ -63,15 +63,11 @@ classes: value: neurodata_type_inc description: Index for tags. range: VectorIndex - required: false - multivalued: false inlined: true timeseries: name: timeseries description: An index into a TimeSeries object. range: TimeIntervals__timeseries - required: false - multivalued: false inlined: true timeseries_index: name: timeseries_index @@ -84,8 +80,6 @@ classes: value: neurodata_type_inc description: Index for timeseries. range: VectorIndex - required: false - multivalued: false inlined: true tree_root: true TimeIntervals__timeseries: @@ -108,8 +102,6 @@ classes: array: exact_number_dimensions: 1 range: int32 - required: false - multivalued: false count: name: count description: Number of data samples available in this time series, during @@ -117,14 +109,10 @@ classes: array: exact_number_dimensions: 1 range: int32 - required: false - multivalued: false timeseries: name: timeseries description: the TimeSeries that this index applies to. array: exact_number_dimensions: 1 range: TimeSeries - required: false - multivalued: false inlined: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.file.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.file.yaml index a3eb463..be74485 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.file.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.file.yaml @@ -81,13 +81,11 @@ classes: other files. range: text required: true - multivalued: false session_description: name: session_description description: A description of the experimental session and data in the file. range: text required: true - multivalued: false session_start_time: name: session_start_time description: 'Date and time of the experiment/session start. The date is stored @@ -96,7 +94,6 @@ classes: offset. Date accuracy is up to milliseconds.' range: isodatetime required: true - multivalued: false timestamps_reference_time: name: timestamps_reference_time description: 'Date and time corresponding to time zero of all timestamps. @@ -106,7 +103,6 @@ classes: times stored in the file use this time as reference (i.e., time zero).' range: isodatetime required: true - multivalued: false acquisition: name: acquisition description: Data streams recorded from the system, including ephys, ophys, @@ -185,7 +181,6 @@ classes: can exist in the present file or can be linked to a remote library file. range: NWBFile__stimulus required: true - multivalued: false inlined: true inlined_as_list: true general: @@ -207,7 +202,6 @@ classes: should not be created unless there is data to store within them. range: NWBFile__general required: true - multivalued: false inlined: true inlined_as_list: true intervals: @@ -217,16 +211,12 @@ classes: an experiment, or epochs (see epochs subgroup) deriving from analysis of data. range: NWBFile__intervals - required: false - multivalued: false inlined: true inlined_as_list: true units: name: units description: Data about sorted spike units. range: Units - required: false - multivalued: false inlined: true inlined_as_list: false tree_root: true @@ -299,14 +289,10 @@ classes: name: data_collection description: Notes about data collection and analysis. range: text - required: false - multivalued: false experiment_description: name: experiment_description description: General description of the experiment. range: text - required: false - multivalued: false experimenter: name: experimenter description: Name of person(s) who performed the experiment. Can also specify @@ -321,8 +307,6 @@ classes: name: institution description: Institution(s) where experiment was performed. range: text - required: false - multivalued: false keywords: name: keywords description: Terms to search over. @@ -336,28 +320,20 @@ classes: name: lab description: Laboratory where experiment was performed. range: text - required: false - multivalued: false notes: name: notes description: Notes about the experiment. range: text - required: false - multivalued: false pharmacology: name: pharmacology description: Description of drugs used, including how and when they were administered. Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc. range: text - required: false - multivalued: false protocol: name: protocol description: Experimental protocol, if applicable. e.g., include IACUC protocol number. range: text - required: false - multivalued: false related_publications: name: related_publications description: Publication information. PMID, DOI, URL, etc. @@ -371,49 +347,36 @@ classes: name: session_id description: Lab-specific ID for the session. range: text - required: false - multivalued: false slices: name: slices description: Description of slices, including information about preparation thickness, orientation, temperature, and bath solution. range: text - required: false - multivalued: false source_script: name: source_script description: Script file or link to public source code used to create this NWB file. range: general__source_script - required: false - multivalued: false inlined: true stimulus: name: stimulus description: Notes about stimuli, such as how and where they were presented. range: text - required: false - multivalued: false surgery: name: surgery description: Narrative description about surgery/surgeries, including date(s) and who performed surgery. range: text - required: false - multivalued: false virus: name: virus description: Information about virus(es) used in experiments, including virus ID, source, date made, injection location, volume, etc. range: text - required: false - multivalued: false lab_meta_data: name: lab_meta_data description: Place-holder than can be extended so that lab-specific meta-data can be placed in /general. range: LabMetaData - required: false multivalued: true inlined: true inlined_as_list: false @@ -431,24 +394,18 @@ classes: description: Information about the animal or person from which the data was measured. range: Subject - required: false - multivalued: false inlined: true inlined_as_list: false extracellular_ephys: name: extracellular_ephys description: Metadata related to extracellular electrophysiology. range: general__extracellular_ephys - required: false - multivalued: false inlined: true inlined_as_list: true intracellular_ephys: name: intracellular_ephys description: Metadata related to intracellular electrophysiology. range: general__intracellular_ephys - required: false - multivalued: false inlined: true inlined_as_list: true optogenetics: @@ -503,7 +460,6 @@ classes: name: electrode_group description: Physical group of electrodes. range: ElectrodeGroup - required: false multivalued: true inlined: true inlined_as_list: false @@ -511,8 +467,6 @@ classes: name: electrodes description: A table of all electrodes (i.e. channels) used for recording. range: extracellular_ephys__electrodes - required: false - multivalued: false inlined: true inlined_as_list: true extracellular_ephys__electrodes: @@ -656,13 +610,10 @@ classes: frequency fall-off, etc. If this changes between TimeSeries, filter description should be stored as a text attribute for each TimeSeries. range: text - required: false - multivalued: false intracellular_electrode: name: intracellular_electrode description: An intracellular electrode. range: IntracellularElectrode - required: false multivalued: true inlined: true inlined_as_list: false @@ -670,8 +621,6 @@ classes: name: sweep_table description: The table which groups different PatchClampSeries together. range: SweepTable - required: false - multivalued: false inlined: true inlined_as_list: false NWBFile__intervals: @@ -692,24 +641,18 @@ classes: description: Divisions in time marking experimental stages or sub-divisions of a single recording session. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false trials: name: trials description: Repeated experimental events that have a logical grouping. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false invalid_times: name: invalid_times description: Time intervals that should be removed from analysis. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false time_intervals: @@ -717,7 +660,6 @@ classes: description: Optional additional table(s) for describing other experimental time intervals. range: TimeIntervals - required: false multivalued: true inlined: true inlined_as_list: false @@ -746,56 +688,38 @@ classes: name: age description: Age of subject. Can be supplied instead of 'date_of_birth'. range: text - required: false - multivalued: false date_of_birth: name: date_of_birth description: Date of birth of subject. Can be supplied instead of 'age'. range: isodatetime - required: false - multivalued: false description: name: description description: Description of subject and where subject came from (e.g., breeder, if animal). range: text - required: false - multivalued: false genotype: name: genotype description: Genetic strain. If absent, assume Wild Type (WT). range: text - required: false - multivalued: false sex: name: sex description: Gender of subject. range: text - required: false - multivalued: false species: name: species description: Species of subject. range: text - required: false - multivalued: false strain: name: strain description: Strain of subject. range: text - required: false - multivalued: false subject_id: name: subject_id description: ID of animal/person used/participating in experiment (lab convention). range: text - required: false - multivalued: false weight: name: weight description: Weight at time of experiment, at time of surgery and at other important times. range: text - required: false - multivalued: false tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.icephys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.icephys.yaml index 26823be..e37c11d 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.icephys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.icephys.yaml @@ -41,15 +41,12 @@ classes: description: Recorded voltage or current. range: PatchClampSeries__data required: true - multivalued: false inlined: true gain: name: gain description: Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp). range: float32 - required: false - multivalued: false electrode: name: electrode annotations: @@ -57,7 +54,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: IntracellularElectrode @@ -74,6 +70,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. Actual stored @@ -99,31 +131,24 @@ classes: identifier: true range: string required: true + bias_current: + name: bias_current + description: Bias current, in amps. + range: float32 + bridge_balance: + name: bridge_balance + description: Bridge balance, in ohms. + range: float32 + capacitance_compensation: + name: capacitance_compensation + description: Capacitance compensation, in farads. + range: float32 data: name: data description: Recorded voltage. range: CurrentClampSeries__data required: true - multivalued: false inlined: true - bias_current: - name: bias_current - description: Bias current, in amps. - range: float32 - required: false - multivalued: false - bridge_balance: - name: bridge_balance - description: Bridge balance, in ohms. - range: float32 - required: false - multivalued: false - capacitance_compensation: - name: capacitance_compensation - description: Capacitance compensation, in farads. - range: float32 - required: false - multivalued: false tree_root: true CurrentClampSeries__data: name: CurrentClampSeries__data @@ -136,6 +161,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -147,8 +208,10 @@ classes: equals_string: volts value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric IZeroClampSeries: name: IZeroClampSeries description: Voltage data from an intracellular recording when all current and @@ -175,19 +238,16 @@ classes: description: Bias current, in amps, fixed to 0.0. range: float32 required: true - multivalued: false bridge_balance: name: bridge_balance description: Bridge balance, in ohms, fixed to 0.0. range: float32 required: true - multivalued: false capacitance_compensation: name: capacitance_compensation description: Capacitance compensation, in farads, fixed to 0.0. range: float32 required: true - multivalued: false tree_root: true CurrentClampStimulusSeries: name: CurrentClampStimulusSeries @@ -204,7 +264,6 @@ classes: description: Stimulus current applied. range: CurrentClampStimulusSeries__data required: true - multivalued: false inlined: true tree_root: true CurrentClampStimulusSeries__data: @@ -218,6 +277,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -229,8 +324,10 @@ classes: equals_string: amperes value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric VoltageClampSeries: name: VoltageClampSeries description: Current data from an intracellular voltage-clamp recording. A corresponding @@ -243,87 +340,48 @@ classes: identifier: true range: string required: true - data: - name: data - description: Recorded current. - range: VoltageClampSeries__data - required: true - multivalued: false - inlined: true capacitance_fast: name: capacitance_fast description: Fast capacitance, in farads. range: VoltageClampSeries__capacitance_fast - required: false - multivalued: false inlined: true capacitance_slow: name: capacitance_slow description: Slow capacitance, in farads. range: VoltageClampSeries__capacitance_slow - required: false - multivalued: false + inlined: true + data: + name: data + description: Recorded current. + range: VoltageClampSeries__data + required: true inlined: true resistance_comp_bandwidth: name: resistance_comp_bandwidth description: Resistance compensation bandwidth, in hertz. range: VoltageClampSeries__resistance_comp_bandwidth - required: false - multivalued: false inlined: true resistance_comp_correction: name: resistance_comp_correction description: Resistance compensation correction, in percent. range: VoltageClampSeries__resistance_comp_correction - required: false - multivalued: false inlined: true resistance_comp_prediction: name: resistance_comp_prediction description: Resistance compensation prediction, in percent. range: VoltageClampSeries__resistance_comp_prediction - required: false - multivalued: false inlined: true whole_cell_capacitance_comp: name: whole_cell_capacitance_comp description: Whole cell capacitance compensation, in farads. range: VoltageClampSeries__whole_cell_capacitance_comp - required: false - multivalued: false inlined: true whole_cell_series_resistance_comp: name: whole_cell_series_resistance_comp description: Whole cell series resistance compensation, in ohms. range: VoltageClampSeries__whole_cell_series_resistance_comp - required: false - multivalued: false inlined: true tree_root: true - VoltageClampSeries__data: - name: VoltageClampSeries__data - description: Recorded current. - attributes: - name: - name: name - ifabsent: string(data) - identifier: true - range: string - required: true - equals_string: data - unit: - name: unit - description: Base unit of measurement for working with the data. which is - fixed to 'amperes'. Actual stored values are not necessarily stored in these - units. To access the data in these units, multiply 'data' by 'conversion'. - ifabsent: string(amperes) - range: text - required: true - equals_string: amperes - value: - name: value - range: AnyType - required: true VoltageClampSeries__capacitance_fast: name: VoltageClampSeries__capacitance_fast description: Fast capacitance, in farads. @@ -368,6 +426,68 @@ classes: name: value range: float32 required: true + VoltageClampSeries__data: + name: VoltageClampSeries__data + description: Recorded current. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Base unit of measurement for working with the data. which is + fixed to 'amperes'. Actual stored values are not necessarily stored in these + units. To access the data in these units, multiply 'data' by 'conversion'. + ifabsent: string(amperes) + range: text + required: true + equals_string: amperes + value: + name: value + array: + dimensions: + - alias: num_times + range: numeric VoltageClampSeries__resistance_comp_bandwidth: name: VoltageClampSeries__resistance_comp_bandwidth description: Resistance compensation bandwidth, in hertz. @@ -498,7 +618,6 @@ classes: description: Stimulus voltage applied. range: VoltageClampStimulusSeries__data required: true - multivalued: false inlined: true tree_root: true VoltageClampStimulusSeries__data: @@ -512,6 +631,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -523,8 +678,10 @@ classes: equals_string: volts value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric IntracellularElectrode: name: IntracellularElectrode description: An intracellular electrode and its metadata. @@ -540,45 +697,32 @@ classes: description: Description of electrode (e.g., whole-cell, sharp, etc.). range: text required: true - multivalued: false filtering: name: filtering description: Electrode specific filtering. range: text - required: false - multivalued: false initial_access_resistance: name: initial_access_resistance description: Initial access resistance. range: text - required: false - multivalued: false location: name: location description: Location of the electrode. 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: false - multivalued: false resistance: name: resistance description: Electrode resistance, in ohms. range: text - required: false - multivalued: false seal: name: seal description: Information about seal used for recording. range: text - required: false - multivalued: false slice: name: slice description: Information about slice used for recording. range: text - required: false - multivalued: false device: name: device annotations: @@ -586,7 +730,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -602,15 +745,6 @@ classes: identifier: true range: string required: true - sweep_number: - name: sweep_number - description: Sweep number of the PatchClampSeries in that row. - array: - minimum_number_dimensions: 1 - maximum_number_dimensions: false - range: uint32 - required: true - multivalued: false series: name: series description: The PatchClampSeries with the sweep number in that row. @@ -633,6 +767,14 @@ classes: description: Index for series. range: VectorIndex required: true - multivalued: false inlined: true + sweep_number: + name: sweep_number + description: Sweep number of the PatchClampSeries in that row. + array: + minimum_number_dimensions: 1 + maximum_number_dimensions: false + range: uint32 + required: true + multivalued: false tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.image.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.image.yaml index adfab1b..28b17e1 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.image.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.image.yaml @@ -90,21 +90,8 @@ classes: data: name: data description: Binary data representing images across frames. - range: numeric - required: false - multivalued: false - any_of: - - array: - dimensions: - - alias: frame - - alias: x - - alias: y - - array: - dimensions: - - alias: frame - - alias: x - - alias: y - - alias: z + range: ImageSeries__data + inlined: true dimension: name: dimension description: Number of pixels on x, y, (and z) axes. @@ -122,8 +109,6 @@ classes: used if the image is stored in another NWB file and that file is linked to this file. range: ImageSeries__external_file - required: false - multivalued: false inlined: true format: name: format @@ -131,22 +116,88 @@ classes: 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. + ifabsent: string(raw) range: text - required: false - multivalued: false device: name: device annotations: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: Device - range: string tree_root: true + ImageSeries__data: + name: ImageSeries__data + description: Binary data representing images across frames. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + continuity: + name: continuity + 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. + range: text + required: false + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: frame + - alias: x + - alias: y + - array: + dimensions: + - alias: frame + - alias: x + - alias: y + - alias: z ImageSeries__external_file: name: ImageSeries__external_file description: Paths to one or more external file(s). The field is only present @@ -205,7 +256,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImageSeries @@ -225,12 +275,16 @@ classes: identifier: true range: string required: true + data: + name: data + description: Images presented to subject, either grayscale or RGB + range: OpticalSeries__data + required: true + inlined: true distance: name: distance description: Distance from camera/monitor to target/eye. range: float32 - required: false - multivalued: false field_of_view: name: field_of_view description: Width, height and depth of image, or imaged area, in meters. @@ -246,12 +300,69 @@ classes: dimensions: - alias: width_height_depth exact_cardinality: 3 - data: - name: data - description: Images presented to subject, either grayscale or RGB - range: numeric + orientation: + name: orientation + description: Description of image relative to some reference frame (e.g., + which way is up). Must also specify frame of reference. + range: text + tree_root: true + OpticalSeries__data: + name: OpticalSeries__data + description: Images presented to subject, either grayscale or RGB + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string required: true - multivalued: false + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + value: + name: value + range: numeric any_of: - array: dimensions: @@ -265,14 +376,6 @@ classes: - alias: y - alias: r_g_b exact_cardinality: 3 - orientation: - name: orientation - description: Description of image relative to some reference frame (e.g., - which way is up). Must also specify frame of reference. - range: text - required: false - multivalued: false - tree_root: true IndexSeries: name: IndexSeries description: Stores indices to image frames stored in an ImageSeries. The purpose @@ -291,12 +394,9 @@ classes: data: name: data description: Index of the frame in the referenced ImageSeries. - array: - dimensions: - - alias: num_times - range: int32 + range: IndexSeries__data required: true - multivalued: false + inlined: true indexed_timeseries: name: indexed_timeseries annotations: @@ -304,9 +404,68 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImageSeries - range: string tree_root: true + IndexSeries__data: + name: IndexSeries__data + description: Index of the frame in the referenced ImageSeries. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + continuity: + name: continuity + 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. + range: text + required: false + value: + name: value + array: + dimensions: + - alias: num_times + range: int32 diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.misc.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.misc.yaml index c2323b8..e151936 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.misc.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.misc.yaml @@ -38,7 +38,6 @@ classes: description: Values of each feature at each time. range: AbstractFeatureSeries__data required: true - multivalued: false inlined: true feature_units: name: feature_units @@ -70,6 +69,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Since there can be different units for different features, store @@ -105,13 +140,70 @@ classes: data: name: data description: Annotations made during an experiment. + range: AnnotationSeries__data + required: true + inlined: true + tree_root: true + AnnotationSeries__data: + name: AnnotationSeries__data + description: Annotations made during an experiment. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data. Annotations + have no units, so the value is fixed to -1.0. + ifabsent: float(-1.0) + range: float32 + required: true + equals_number: -1 + unit: + name: unit + description: Base unit of measurement for working with the data. Annotations + have no units, so the value is fixed to 'n/a'. + ifabsent: string(n/a) + range: text + required: true + equals_string: n/a + value: + name: value array: dimensions: - alias: num_times range: text - required: true - multivalued: false - tree_root: true IntervalSeries: name: IntervalSeries description: Stores intervals of data. The timestamps field stores the beginning @@ -131,13 +223,70 @@ classes: data: name: data description: Use values >0 if interval started, <0 if interval ended. + range: IntervalSeries__data + required: true + inlined: true + tree_root: true + IntervalSeries__data: + name: IntervalSeries__data + description: Use values >0 if interval started, <0 if interval ended. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data. Annotations + have no units, so the value is fixed to -1.0. + ifabsent: float(-1.0) + range: float32 + required: true + equals_number: -1 + unit: + name: unit + description: Base unit of measurement for working with the data. Annotations + have no units, so the value is fixed to 'n/a'. + ifabsent: string(n/a) + range: text + required: true + equals_string: n/a + value: + name: value array: dimensions: - alias: num_times range: int8 - required: true - multivalued: false - tree_root: true DecompositionSeries: name: DecompositionSeries description: Spectral analysis of a time series, e.g. of an LFP or a speech signal. @@ -153,14 +302,12 @@ classes: description: Data decomposed into frequency bands. range: DecompositionSeries__data required: true - multivalued: false inlined: true metric: name: metric description: The metric used, e.g. phase, amplitude, power. range: text required: true - multivalued: false source_channels: name: source_channels annotations: @@ -173,8 +320,6 @@ classes: description: DynamicTableRegion pointer to the channels that this decomposition series was generated from. range: DynamicTableRegion - required: false - multivalued: false inlined: true bands: name: bands @@ -182,7 +327,6 @@ classes: from. There should be one row in this table for each band. range: DecompositionSeries__bands required: true - multivalued: false inlined: true inlined_as_list: true source_timeseries: @@ -191,8 +335,6 @@ classes: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: TimeSeries @@ -209,6 +351,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. Actual stored @@ -289,63 +467,13 @@ classes: identifier: true range: string required: true - spike_times_index: - name: spike_times_index - annotations: - 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 - multivalued: false - inlined: true - spike_times: - name: spike_times - description: Spike times for each unit. - range: Units__spike_times - required: false - multivalued: false - inlined: true - obs_intervals_index: - name: obs_intervals_index - annotations: - 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 - multivalued: false - inlined: true - obs_intervals: - name: obs_intervals - description: Observation intervals for each unit. + electrode_group: + name: electrode_group + description: Electrode group that each spike unit came from. array: - dimensions: - - alias: num_intervals - - alias: start_end - exact_cardinality: 2 - range: float64 - required: false - multivalued: false - electrodes_index: - name: electrodes_index - annotations: - named: - tag: named - value: true - source_type: - tag: source_type - value: neurodata_type_inc - description: Index into electrodes. - range: VectorIndex + minimum_number_dimensions: 1 + maximum_number_dimensions: false + range: ElectrodeGroup required: false multivalued: false inlined: true @@ -360,51 +488,69 @@ classes: value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion - required: false - multivalued: false inlined: true - electrode_group: - name: electrode_group - description: Electrode group that each spike unit came from. + electrodes_index: + name: electrodes_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into electrodes. + range: VectorIndex + inlined: true + obs_intervals: + name: obs_intervals + description: Observation intervals for each unit. array: - minimum_number_dimensions: 1 - maximum_number_dimensions: false - range: ElectrodeGroup + dimensions: + - alias: num_intervals + - alias: start_end + exact_cardinality: 2 + range: float64 required: false multivalued: false + obs_intervals_index: + name: obs_intervals_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into the obs_intervals dataset. + range: VectorIndex + inlined: true + spike_times: + name: spike_times + description: Spike times for each unit. + range: Units__spike_times + inlined: true + spike_times_index: + name: spike_times_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into the spike_times dataset. + range: VectorIndex inlined: true waveform_mean: name: waveform_mean description: Spike waveform mean for each spike unit. - range: float32 - required: false - multivalued: false - any_of: - - array: - dimensions: - - alias: num_units - - alias: num_samples - - array: - dimensions: - - alias: num_units - - alias: num_samples - - alias: num_electrodes + range: Units__waveform_mean + inlined: true waveform_sd: name: waveform_sd description: Spike waveform standard deviation for each spike unit. - range: float32 - required: false - multivalued: false - any_of: - - array: - dimensions: - - alias: num_units - - alias: num_samples - - array: - dimensions: - - alias: num_units - - alias: num_samples - - alias: num_electrodes + range: Units__waveform_sd + inlined: true waveforms: name: waveforms description: Individual waveforms for each spike on each electrode. This is @@ -430,13 +576,8 @@ classes: order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same. - array: - dimensions: - - alias: num_waveforms - - alias: num_samples - range: numeric - required: false - multivalued: false + range: Units__waveforms + inlined: true waveforms_index: name: waveforms_index annotations: @@ -449,8 +590,6 @@ classes: description: Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail. range: VectorIndex - required: false - multivalued: false inlined: true waveforms_index_index: name: waveforms_index_index @@ -464,8 +603,6 @@ classes: description: Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail. range: VectorIndex - required: false - multivalued: false inlined: true tree_root: true Units__spike_times: @@ -489,3 +626,97 @@ classes: for the spike time to be between samples. range: float64 required: false + Units__waveform_mean: + name: Units__waveform_mean + description: Spike waveform mean for each spike unit. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveform_mean) + identifier: true + range: string + required: true + equals_string: waveform_mean + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts + Units__waveform_sd: + name: Units__waveform_sd + description: Spike waveform standard deviation for each spike unit. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveform_sd) + identifier: true + range: string + required: true + equals_string: waveform_sd + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts + Units__waveforms: + name: Units__waveforms + description: Individual waveforms for each spike on each electrode. This is a + doubly indexed column. The 'waveforms_index' column indexes which waveforms + in this column belong to the same spike event for a given unit, where each waveform + was recorded from a different electrode. The 'waveforms_index_index' column + indexes the 'waveforms_index' column to indicate which spike events belong to + a given unit. For example, if the 'waveforms_index_index' column has values + [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond + to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' + column correspond to the 3 spike events of the second unit, and the next 1 element + of the 'waveforms_index' column corresponds to the 1 spike event of the third + unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then + the first 3 elements of the 'waveforms' column contain the 3 spike waveforms + that were recorded from 3 different electrodes for the first spike time of the + first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays + for a graphical representation of this example. When there is only one electrode + for each unit (i.e., each spike time is associated with a single waveform), + then the 'waveforms_index' column will have values 1, 2, ..., N, where N is + the number of spike events. The number of electrodes for each spike event should + be the same within a given unit. The 'electrodes' column should be used to indicate + which electrodes are associated with each unit, and the order of the waveforms + within a given unit x spike event should be in the same order as the electrodes + referenced in the 'electrodes' column of this table. The number of samples for + each waveform must be the same. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveforms) + identifier: true + range: string + required: true + equals_string: waveforms + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.ogen.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.ogen.yaml index 0dc7be0..c4078fa 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.ogen.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.ogen.yaml @@ -27,12 +27,9 @@ classes: data: name: data description: Applied power for optogenetic stimulus, in watts. - array: - dimensions: - - alias: num_times - range: numeric + range: OptogeneticSeries__data required: true - multivalued: false + inlined: true site: name: site annotations: @@ -40,12 +37,71 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: OptogeneticStimulusSite - range: string tree_root: true + OptogeneticSeries__data: + name: OptogeneticSeries__data + description: Applied power for optogenetic stimulus, in watts. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Unit of measurement for data, which is fixed to 'watts'. + ifabsent: string(watts) + range: text + required: true + equals_string: watts + value: + name: value + array: + dimensions: + - alias: num_times + range: numeric OptogeneticStimulusSite: name: OptogeneticStimulusSite description: A site of optogenetic stimulation. @@ -61,13 +117,11 @@ classes: description: Description of stimulation site. range: text required: true - multivalued: false excitation_lambda: name: excitation_lambda description: Excitation wavelength, in nm. range: float32 required: true - multivalued: false location: name: location description: Location of the stimulation site. Specify the area, layer, comments @@ -75,7 +129,6 @@ classes: standard atlas names for anatomical regions when possible. range: text required: true - multivalued: false device: name: device annotations: @@ -83,7 +136,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.ophys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.ophys.yaml index 40860fc..5041d82 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.ophys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.ophys.yaml @@ -60,7 +60,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImagingPlane @@ -80,17 +79,9 @@ classes: data: name: data description: Signals from ROIs. - range: numeric + range: RoiResponseSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_times - - array: - dimensions: - - alias: num_times - - alias: num_rois + inlined: true rois: name: rois annotations: @@ -104,9 +95,73 @@ classes: on the ROIs stored in this timeseries. range: DynamicTableRegion required: true - multivalued: false inlined: true tree_root: true + RoiResponseSeries__data: + name: RoiResponseSeries__data + description: Signals from ROIs. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + continuity: + name: continuity + 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. + range: text + required: false + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_times + - array: + dimensions: + - alias: num_times + - alias: num_rois DfOverF: name: DfOverF description: dF/F information about a region of interest (ROI). Storage hierarchy @@ -182,6 +237,13 @@ classes: - alias: num_x - alias: num_y - alias: num_z + pixel_mask: + name: pixel_mask + description: 'Pixel masks for each ROI: a list of indices and weights for + the ROI. Pixel masks are concatenated and parsing of this dataset is maintained + by the PlaneSegmentation' + range: PlaneSegmentation__pixel_mask + inlined: true pixel_mask_index: name: pixel_mask_index annotations: @@ -193,17 +255,13 @@ classes: value: neurodata_type_inc description: Index into pixel_mask. range: VectorIndex - required: false - multivalued: false inlined: true - pixel_mask: - name: pixel_mask - description: 'Pixel masks for each ROI: a list of indices and weights for - the ROI. Pixel masks are concatenated and parsing of this dataset is maintained + voxel_mask: + name: voxel_mask + description: 'Voxel masks for each ROI: a list of indices and weights for + the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation' - range: PlaneSegmentation__pixel_mask - required: false - multivalued: false + range: PlaneSegmentation__voxel_mask inlined: true voxel_mask_index: name: voxel_mask_index @@ -216,17 +274,6 @@ classes: value: neurodata_type_inc description: Index into voxel_mask. range: VectorIndex - required: false - multivalued: false - inlined: true - voxel_mask: - name: voxel_mask - description: 'Voxel masks for each ROI: a list of indices and weights for - the ROI. Voxel masks are concatenated and parsing of this dataset is maintained - by the PlaneSegmentation' - range: PlaneSegmentation__voxel_mask - required: false - multivalued: false inlined: true reference_images: name: reference_images @@ -243,7 +290,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImagingPlane @@ -269,24 +315,18 @@ classes: array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false y: name: y description: Pixel y-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false weight: name: weight description: Weight of the pixel. array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false PlaneSegmentation__voxel_mask: name: PlaneSegmentation__voxel_mask description: 'Voxel masks for each ROI: a list of indices and weights for the @@ -307,32 +347,24 @@ classes: array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false y: name: y description: Voxel y-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false z: name: z description: Voxel z-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false weight: name: weight description: Weight of the voxel. array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false ImagingPlane: name: ImagingPlane description: An imaging plane and its metadata. @@ -347,27 +379,21 @@ classes: 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 @@ -375,15 +401,12 @@ classes: 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 inlined: true origin_coords: name: origin_coords @@ -391,8 +414,6 @@ classes: 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 inlined: true grid_spacing: name: grid_spacing @@ -400,8 +421,6 @@ classes: 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 inlined: true reference_frame: name: reference_frame @@ -423,8 +442,6 @@ classes: 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. @@ -440,7 +457,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -573,13 +589,11 @@ classes: 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 tree_root: true MotionCorrection: name: MotionCorrection @@ -610,7 +624,6 @@ classes: description: Image stack with frames shifted to the common coordinates. range: ImageSeries required: true - multivalued: false inlined: true inlined_as_list: false xy_translation: @@ -619,7 +632,6 @@ classes: coordinates, for example, to align each frame to a reference image. range: TimeSeries required: true - multivalued: false inlined: true inlined_as_list: false original: @@ -629,7 +641,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImageSeries diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.retinotopy.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.retinotopy.yaml index 97007ea..2708c7e 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.retinotopy.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_3_0/core.nwb.retinotopy.yaml @@ -37,30 +37,24 @@ classes: description: Phase response to stimulus on the first measured axis. range: ImagingRetinotopy__axis_1_phase_map required: true - multivalued: false inlined: true axis_1_power_map: name: axis_1_power_map 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: ImagingRetinotopy__axis_1_power_map - required: false - multivalued: false inlined: true axis_2_phase_map: name: axis_2_phase_map description: Phase response to stimulus on the second measured axis. range: ImagingRetinotopy__axis_2_phase_map required: true - multivalued: false inlined: true axis_2_power_map: name: axis_2_power_map description: Power response on the second measured axis. Response is scaled so 0.0 is no power in the response and 1.0 is maximum relative power. range: ImagingRetinotopy__axis_2_power_map - required: false - multivalued: false inlined: true axis_descriptions: name: axis_descriptions @@ -79,16 +73,12 @@ classes: description: 'Gray-scale image taken with same settings/parameters (e.g., focal depth, wavelength) as data collection. Array format: [rows][columns].' range: ImagingRetinotopy__focal_depth_image - required: false - multivalued: false inlined: true sign_map: name: sign_map description: Sine of the angle between the direction of the gradient in axis_1 and axis_2. range: ImagingRetinotopy__sign_map - required: false - multivalued: false inlined: true vasculature_image: name: vasculature_image @@ -96,7 +86,6 @@ classes: [rows][columns]' range: ImagingRetinotopy__vasculature_image required: true - multivalued: false inlined: true tree_root: true ImagingRetinotopy__axis_1_phase_map: diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.base.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.base.yaml index 1bfb911..68f456b 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.base.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.base.yaml @@ -47,7 +47,6 @@ classes: exact_number_dimensions: 1 range: int32 required: true - multivalued: false count: name: count description: Number of data samples available in this time series, during @@ -56,7 +55,6 @@ classes: exact_number_dimensions: 1 range: int32 required: true - multivalued: false timeseries: name: timeseries description: The TimeSeries that this index applies to @@ -64,7 +62,6 @@ classes: exact_number_dimensions: 1 range: TimeSeries required: true - multivalued: false inlined: true tree_root: true Image: @@ -166,7 +163,6 @@ classes: external file. range: TimeSeries__data required: true - multivalued: false inlined: true starting_time: name: starting_time @@ -174,8 +170,6 @@ classes: uniformly spaced, the timestamp of the first sample can be specified and all subsequent ones calculated from the sampling rate attribute. range: TimeSeries__starting_time - required: false - multivalued: false inlined: true timestamps: name: timestamps @@ -218,8 +212,6 @@ classes: external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes. range: TimeSeries__sync - required: false - multivalued: false inlined: true inlined_as_list: true tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.behavior.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.behavior.yaml index 47aa752..477072b 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.behavior.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.behavior.yaml @@ -38,14 +38,11 @@ classes: reference frame. range: SpatialSeries__data required: true - multivalued: false inlined: true reference_frame: name: reference_frame description: Description defining what exactly 'straight-ahead' means. range: text - required: false - multivalued: false tree_root: true SpatialSeries__data: name: SpatialSeries__data @@ -59,6 +56,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. The default diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.ecephys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.ecephys.yaml index 4d8e539..47187f0 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.ecephys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.ecephys.yaml @@ -39,40 +39,6 @@ classes: about the filter properties as possible. range: text required: false - data: - name: data - description: Recorded voltage data. - range: numeric - required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_times - - array: - dimensions: - - alias: num_times - - alias: num_channels - - array: - dimensions: - - alias: num_times - - alias: num_channels - - alias: num_samples - electrodes: - name: electrodes - annotations: - 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 - required: true - multivalued: false - inlined: true channel_conversion: name: channel_conversion description: Channel-specific conversion factor. Multiply the data in the @@ -90,7 +56,100 @@ classes: range: float32 required: false multivalued: false + data: + name: data + description: Recorded voltage data. + range: ElectricalSeries__data + required: true + inlined: true + electrodes: + name: electrodes + annotations: + 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 + required: true + inlined: true tree_root: true + ElectricalSeries__data: + name: ElectricalSeries__data + description: Recorded voltage data. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Base unit of measurement for working with the data. This value + is fixed to 'volts'. Actual stored values are not necessarily stored in + these units. To access the data in these units, multiply 'data' by 'conversion' + and 'channel_conversion' (if present). + ifabsent: string(volts) + range: text + required: true + equals_string: volts + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_times + - array: + dimensions: + - alias: num_times + - alias: num_channels + - array: + dimensions: + - alias: num_times + - alias: num_channels + - alias: num_samples SpikeEventSeries: name: SpikeEventSeries description: 'Stores snapshots/snippets of recorded spike events (i.e., threshold @@ -111,19 +170,9 @@ classes: data: name: data description: Spike waveforms. - range: numeric + range: SpikeEventSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_events - - alias: num_samples - - array: - dimensions: - - alias: num_events - - alias: num_channels - - alias: num_samples + inlined: true timestamps: name: timestamps description: Timestamps for samples stored in data, in seconds, relative to @@ -137,6 +186,73 @@ classes: required: true multivalued: false tree_root: true + SpikeEventSeries__data: + name: SpikeEventSeries__data + description: Spike waveforms. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Unit of measurement for waveforms, which is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: true + equals_string: volts + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_events + - alias: num_samples + - array: + dimensions: + - alias: num_events + - alias: num_channels + - alias: num_samples FeatureExtraction: name: FeatureExtraction description: Features, such as PC1 and PC2, that are extracted from signals stored @@ -192,7 +308,6 @@ classes: was generated from. range: DynamicTableRegion required: true - multivalued: false inlined: true tree_root: true EventDetection: @@ -212,7 +327,6 @@ classes: or dV/dT threshold, as well as relevant values. range: text required: true - multivalued: false source_idx: name: source_idx description: Indices (zero-based) into source ElectricalSeries::data array @@ -241,7 +355,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ElectricalSeries @@ -323,8 +436,6 @@ classes: name: position description: stereotaxic or common framework coordinates range: ElectrodeGroup__position - required: false - multivalued: false inlined: true device: name: device @@ -333,7 +444,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -356,24 +466,18 @@ classes: array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false y: name: y description: y coordinate array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false z: name: z description: z coordinate array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false ClusterWaveforms: name: ClusterWaveforms description: DEPRECATED The mean waveform shape, including standard deviation, @@ -395,7 +499,6 @@ classes: description: Filtering applied to data before generating mean/sd range: text required: true - multivalued: false waveform_mean: name: waveform_mean description: The mean waveform for each cluster, using the same indices for @@ -427,7 +530,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Clustering @@ -451,7 +553,6 @@ classes: clusters curated using Klusters, etc) range: text required: true - multivalued: false num: name: num description: Cluster number of each event diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.epoch.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.epoch.yaml index e264a54..eedea6f 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.epoch.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.epoch.yaml @@ -63,15 +63,11 @@ classes: value: neurodata_type_inc description: Index for tags. range: VectorIndex - required: false - multivalued: false inlined: true timeseries: name: timeseries description: An index into a TimeSeries object. range: TimeIntervals__timeseries - required: false - multivalued: false inlined: true timeseries_index: name: timeseries_index @@ -84,8 +80,6 @@ classes: value: neurodata_type_inc description: Index for timeseries. range: VectorIndex - required: false - multivalued: false inlined: true tree_root: true TimeIntervals__timeseries: @@ -108,8 +102,6 @@ classes: array: exact_number_dimensions: 1 range: int32 - required: false - multivalued: false count: name: count description: Number of data samples available in this time series, during @@ -117,14 +109,10 @@ classes: array: exact_number_dimensions: 1 range: int32 - required: false - multivalued: false timeseries: name: timeseries description: the TimeSeries that this index applies to. array: exact_number_dimensions: 1 range: TimeSeries - required: false - multivalued: false inlined: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.file.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.file.yaml index f81b157..f11e44b 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.file.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.file.yaml @@ -81,13 +81,11 @@ classes: other files. range: text required: true - multivalued: false session_description: name: session_description description: A description of the experimental session and data in the file. range: text required: true - multivalued: false session_start_time: name: session_start_time description: 'Date and time of the experiment/session start. The date is stored @@ -96,7 +94,6 @@ classes: offset. Date accuracy is up to milliseconds.' range: isodatetime required: true - multivalued: false timestamps_reference_time: name: timestamps_reference_time description: 'Date and time corresponding to time zero of all timestamps. @@ -106,7 +103,6 @@ classes: times stored in the file use this time as reference (i.e., time zero).' range: isodatetime required: true - multivalued: false acquisition: name: acquisition description: Data streams recorded from the system, including ephys, ophys, @@ -185,7 +181,6 @@ classes: can exist in the present file or can be linked to a remote library file. range: NWBFile__stimulus required: true - multivalued: false inlined: true inlined_as_list: true general: @@ -207,7 +202,6 @@ classes: should not be created unless there is data to store within them. range: NWBFile__general required: true - multivalued: false inlined: true inlined_as_list: true intervals: @@ -217,16 +211,12 @@ classes: an experiment, or epochs (see epochs subgroup) deriving from analysis of data. range: NWBFile__intervals - required: false - multivalued: false inlined: true inlined_as_list: true units: name: units description: Data about sorted spike units. range: Units - required: false - multivalued: false inlined: true inlined_as_list: false tree_root: true @@ -299,14 +289,10 @@ classes: name: data_collection description: Notes about data collection and analysis. range: text - required: false - multivalued: false experiment_description: name: experiment_description description: General description of the experiment. range: text - required: false - multivalued: false experimenter: name: experimenter description: Name of person(s) who performed the experiment. Can also specify @@ -321,8 +307,6 @@ classes: name: institution description: Institution(s) where experiment was performed. range: text - required: false - multivalued: false keywords: name: keywords description: Terms to search over. @@ -336,28 +320,20 @@ classes: name: lab description: Laboratory where experiment was performed. range: text - required: false - multivalued: false notes: name: notes description: Notes about the experiment. range: text - required: false - multivalued: false pharmacology: name: pharmacology description: Description of drugs used, including how and when they were administered. Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc. range: text - required: false - multivalued: false protocol: name: protocol description: Experimental protocol, if applicable. e.g., include IACUC protocol number. range: text - required: false - multivalued: false related_publications: name: related_publications description: Publication information. PMID, DOI, URL, etc. @@ -371,49 +347,36 @@ classes: name: session_id description: Lab-specific ID for the session. range: text - required: false - multivalued: false slices: name: slices description: Description of slices, including information about preparation thickness, orientation, temperature, and bath solution. range: text - required: false - multivalued: false source_script: name: source_script description: Script file or link to public source code used to create this NWB file. range: general__source_script - required: false - multivalued: false inlined: true stimulus: name: stimulus description: Notes about stimuli, such as how and where they were presented. range: text - required: false - multivalued: false surgery: name: surgery description: Narrative description about surgery/surgeries, including date(s) and who performed surgery. range: text - required: false - multivalued: false virus: name: virus description: Information about virus(es) used in experiments, including virus ID, source, date made, injection location, volume, etc. range: text - required: false - multivalued: false lab_meta_data: name: lab_meta_data description: Place-holder than can be extended so that lab-specific meta-data can be placed in /general. range: LabMetaData - required: false multivalued: true inlined: true inlined_as_list: false @@ -431,24 +394,18 @@ classes: description: Information about the animal or person from which the data was measured. range: Subject - required: false - multivalued: false inlined: true inlined_as_list: false extracellular_ephys: name: extracellular_ephys description: Metadata related to extracellular electrophysiology. range: general__extracellular_ephys - required: false - multivalued: false inlined: true inlined_as_list: true intracellular_ephys: name: intracellular_ephys description: Metadata related to intracellular electrophysiology. range: general__intracellular_ephys - required: false - multivalued: false inlined: true inlined_as_list: true optogenetics: @@ -503,7 +460,6 @@ classes: name: electrode_group description: Physical group of electrodes. range: ElectrodeGroup - required: false multivalued: true inlined: true inlined_as_list: false @@ -511,8 +467,6 @@ classes: name: electrodes description: A table of all electrodes (i.e. channels) used for recording. range: extracellular_ephys__electrodes - required: false - multivalued: false inlined: true inlined_as_list: true extracellular_ephys__electrodes: @@ -657,13 +611,10 @@ classes: etc. If this changes between TimeSeries, filter description should be stored as a text attribute for each TimeSeries.' range: text - required: false - multivalued: false intracellular_electrode: name: intracellular_electrode description: An intracellular electrode. range: IntracellularElectrode - required: false multivalued: true inlined: true inlined_as_list: false @@ -674,8 +625,6 @@ classes: tabels. Additional SequentialRecordingsTable, RepetitionsTable and ExperimentalConditions tables provide enhanced support for experiment metadata.' range: SweepTable - required: false - multivalued: false inlined: true inlined_as_list: false intracellular_recordings: @@ -693,8 +642,6 @@ classes: to an electrode is also common in intracellular electrophysiology, in which case other TimeSeries may be used. range: IntracellularRecordingsTable - required: false - multivalued: false inlined: true inlined_as_list: false simultaneous_recordings: @@ -703,8 +650,6 @@ classes: the IntracellularRecordingsTable table together that were recorded simultaneously from different electrodes range: SimultaneousRecordingsTable - required: false - multivalued: false inlined: true inlined_as_list: false sequential_recordings: @@ -714,8 +659,6 @@ classes: together sequential recordings where the a sequence of stimuli of the same type with varying parameters have been presented in a sequence. range: SequentialRecordingsTable - required: false - multivalued: false inlined: true inlined_as_list: false repetitions: @@ -725,8 +668,6 @@ classes: type of stimulus, the RepetitionsTable table is typically used to group sets of stimuli applied in sequence. range: RepetitionsTable - required: false - multivalued: false inlined: true inlined_as_list: false experimental_conditions: @@ -734,8 +675,6 @@ classes: description: A table for grouping different intracellular recording repetitions together that belong to the same experimental experimental_conditions. range: ExperimentalConditionsTable - required: false - multivalued: false inlined: true inlined_as_list: false NWBFile__intervals: @@ -756,24 +695,18 @@ classes: description: Divisions in time marking experimental stages or sub-divisions of a single recording session. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false trials: name: trials description: Repeated experimental events that have a logical grouping. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false invalid_times: name: invalid_times description: Time intervals that should be removed from analysis. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false time_intervals: @@ -781,7 +714,6 @@ classes: description: Optional additional table(s) for describing other experimental time intervals. range: TimeIntervals - required: false multivalued: true inlined: true inlined_as_list: false @@ -810,56 +742,38 @@ classes: name: age description: Age of subject. Can be supplied instead of 'date_of_birth'. range: text - required: false - multivalued: false date_of_birth: name: date_of_birth description: Date of birth of subject. Can be supplied instead of 'age'. range: isodatetime - required: false - multivalued: false description: name: description description: Description of subject and where subject came from (e.g., breeder, if animal). range: text - required: false - multivalued: false genotype: name: genotype description: Genetic strain. If absent, assume Wild Type (WT). range: text - required: false - multivalued: false sex: name: sex description: Gender of subject. range: text - required: false - multivalued: false species: name: species description: Species of subject. range: text - required: false - multivalued: false strain: name: strain description: Strain of subject. range: text - required: false - multivalued: false subject_id: name: subject_id description: ID of animal/person used/participating in experiment (lab convention). range: text - required: false - multivalued: false weight: name: weight description: Weight at time of experiment, at time of surgery and at other important times. range: text - required: false - multivalued: false tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.icephys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.icephys.yaml index d3a808f..848fb69 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.icephys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.icephys.yaml @@ -41,15 +41,12 @@ classes: description: Recorded voltage or current. range: PatchClampSeries__data required: true - multivalued: false inlined: true gain: name: gain description: Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp). range: float32 - required: false - multivalued: false electrode: name: electrode annotations: @@ -57,7 +54,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: IntracellularElectrode @@ -74,6 +70,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. Actual stored @@ -99,31 +131,24 @@ classes: identifier: true range: string required: true + bias_current: + name: bias_current + description: Bias current, in amps. + range: float32 + bridge_balance: + name: bridge_balance + description: Bridge balance, in ohms. + range: float32 + capacitance_compensation: + name: capacitance_compensation + description: Capacitance compensation, in farads. + range: float32 data: name: data description: Recorded voltage. range: CurrentClampSeries__data required: true - multivalued: false inlined: true - bias_current: - name: bias_current - description: Bias current, in amps. - range: float32 - required: false - multivalued: false - bridge_balance: - name: bridge_balance - description: Bridge balance, in ohms. - range: float32 - required: false - multivalued: false - capacitance_compensation: - name: capacitance_compensation - description: Capacitance compensation, in farads. - range: float32 - required: false - multivalued: false tree_root: true CurrentClampSeries__data: name: CurrentClampSeries__data @@ -136,6 +161,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -147,8 +208,10 @@ classes: equals_string: volts value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric IZeroClampSeries: name: IZeroClampSeries description: Voltage data from an intracellular recording when all current and @@ -175,19 +238,16 @@ classes: description: Bias current, in amps, fixed to 0.0. range: float32 required: true - multivalued: false bridge_balance: name: bridge_balance description: Bridge balance, in ohms, fixed to 0.0. range: float32 required: true - multivalued: false capacitance_compensation: name: capacitance_compensation description: Capacitance compensation, in farads, fixed to 0.0. range: float32 required: true - multivalued: false tree_root: true CurrentClampStimulusSeries: name: CurrentClampStimulusSeries @@ -204,7 +264,6 @@ classes: description: Stimulus current applied. range: CurrentClampStimulusSeries__data required: true - multivalued: false inlined: true tree_root: true CurrentClampStimulusSeries__data: @@ -218,6 +277,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -229,8 +324,10 @@ classes: equals_string: amperes value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric VoltageClampSeries: name: VoltageClampSeries description: Current data from an intracellular voltage-clamp recording. A corresponding @@ -243,87 +340,48 @@ classes: identifier: true range: string required: true - data: - name: data - description: Recorded current. - range: VoltageClampSeries__data - required: true - multivalued: false - inlined: true capacitance_fast: name: capacitance_fast description: Fast capacitance, in farads. range: VoltageClampSeries__capacitance_fast - required: false - multivalued: false inlined: true capacitance_slow: name: capacitance_slow description: Slow capacitance, in farads. range: VoltageClampSeries__capacitance_slow - required: false - multivalued: false + inlined: true + data: + name: data + description: Recorded current. + range: VoltageClampSeries__data + required: true inlined: true resistance_comp_bandwidth: name: resistance_comp_bandwidth description: Resistance compensation bandwidth, in hertz. range: VoltageClampSeries__resistance_comp_bandwidth - required: false - multivalued: false inlined: true resistance_comp_correction: name: resistance_comp_correction description: Resistance compensation correction, in percent. range: VoltageClampSeries__resistance_comp_correction - required: false - multivalued: false inlined: true resistance_comp_prediction: name: resistance_comp_prediction description: Resistance compensation prediction, in percent. range: VoltageClampSeries__resistance_comp_prediction - required: false - multivalued: false inlined: true whole_cell_capacitance_comp: name: whole_cell_capacitance_comp description: Whole cell capacitance compensation, in farads. range: VoltageClampSeries__whole_cell_capacitance_comp - required: false - multivalued: false inlined: true whole_cell_series_resistance_comp: name: whole_cell_series_resistance_comp description: Whole cell series resistance compensation, in ohms. range: VoltageClampSeries__whole_cell_series_resistance_comp - required: false - multivalued: false inlined: true tree_root: true - VoltageClampSeries__data: - name: VoltageClampSeries__data - description: Recorded current. - attributes: - name: - name: name - ifabsent: string(data) - identifier: true - range: string - required: true - equals_string: data - unit: - name: unit - description: Base unit of measurement for working with the data. which is - fixed to 'amperes'. Actual stored values are not necessarily stored in these - units. To access the data in these units, multiply 'data' by 'conversion'. - ifabsent: string(amperes) - range: text - required: true - equals_string: amperes - value: - name: value - range: AnyType - required: true VoltageClampSeries__capacitance_fast: name: VoltageClampSeries__capacitance_fast description: Fast capacitance, in farads. @@ -368,6 +426,68 @@ classes: name: value range: float32 required: true + VoltageClampSeries__data: + name: VoltageClampSeries__data + description: Recorded current. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Base unit of measurement for working with the data. which is + fixed to 'amperes'. Actual stored values are not necessarily stored in these + units. To access the data in these units, multiply 'data' by 'conversion'. + ifabsent: string(amperes) + range: text + required: true + equals_string: amperes + value: + name: value + array: + dimensions: + - alias: num_times + range: numeric VoltageClampSeries__resistance_comp_bandwidth: name: VoltageClampSeries__resistance_comp_bandwidth description: Resistance compensation bandwidth, in hertz. @@ -498,7 +618,6 @@ classes: description: Stimulus voltage applied. range: VoltageClampStimulusSeries__data required: true - multivalued: false inlined: true tree_root: true VoltageClampStimulusSeries__data: @@ -512,6 +631,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -523,8 +678,10 @@ classes: equals_string: volts value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric IntracellularElectrode: name: IntracellularElectrode description: An intracellular electrode and its metadata. @@ -540,45 +697,32 @@ classes: description: Description of electrode (e.g., whole-cell, sharp, etc.). range: text required: true - multivalued: false filtering: name: filtering description: Electrode specific filtering. range: text - required: false - multivalued: false initial_access_resistance: name: initial_access_resistance description: Initial access resistance. range: text - required: false - multivalued: false location: name: location description: Location of the electrode. 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: false - multivalued: false resistance: name: resistance description: Electrode resistance, in ohms. range: text - required: false - multivalued: false seal: name: seal description: Information about seal used for recording. range: text - required: false - multivalued: false slice: name: slice description: Information about slice used for recording. range: text - required: false - multivalued: false device: name: device annotations: @@ -586,7 +730,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -605,15 +748,6 @@ classes: identifier: true range: string required: true - sweep_number: - name: sweep_number - description: Sweep number of the PatchClampSeries in that row. - array: - minimum_number_dimensions: 1 - maximum_number_dimensions: false - range: uint32 - required: true - multivalued: false series: name: series description: The PatchClampSeries with the sweep number in that row. @@ -636,8 +770,16 @@ classes: description: Index for series. range: VectorIndex required: true - multivalued: false inlined: true + sweep_number: + name: sweep_number + description: Sweep number of the PatchClampSeries in that row. + array: + minimum_number_dimensions: 1 + maximum_number_dimensions: false + range: uint32 + required: true + multivalued: false tree_root: true IntracellularElectrodesTable: name: IntracellularElectrodesTable @@ -697,7 +839,6 @@ classes: recording (rows). range: TimeSeriesReferenceVectorData required: true - multivalued: false inlined: true tree_root: true IntracellularResponsesTable: @@ -730,7 +871,6 @@ classes: recording (rows) range: TimeSeriesReferenceVectorData required: true - multivalued: false inlined: true tree_root: true IntracellularRecordingsTable: @@ -772,15 +912,6 @@ classes: description: Table for storing intracellular electrode related metadata. range: IntracellularElectrodesTable required: true - multivalued: false - inlined: true - inlined_as_list: false - stimuli: - name: stimuli - description: Table for storing intracellular stimulus related metadata. - range: IntracellularStimuliTable - required: true - multivalued: false inlined: true inlined_as_list: false responses: @@ -788,7 +919,13 @@ classes: description: Table for storing intracellular response related metadata. range: IntracellularResponsesTable required: true - multivalued: false + inlined: true + inlined_as_list: false + stimuli: + name: stimuli + description: Table for storing intracellular stimulus related metadata. + range: IntracellularStimuliTable + required: true inlined: true inlined_as_list: false tree_root: true @@ -812,7 +949,6 @@ classes: table. range: SimultaneousRecordingsTable__recordings required: true - multivalued: false inlined: true recordings_index: name: recordings_index @@ -826,7 +962,6 @@ classes: description: Index dataset for the recordings column. range: VectorIndex required: true - multivalued: false inlined: true tree_root: true SimultaneousRecordingsTable__recordings: @@ -871,7 +1006,6 @@ classes: table. range: SequentialRecordingsTable__simultaneous_recordings required: true - multivalued: false inlined: true simultaneous_recordings_index: name: simultaneous_recordings_index @@ -885,7 +1019,6 @@ classes: description: Index dataset for the simultaneous_recordings column. range: VectorIndex required: true - multivalued: false inlined: true stimulus_type: name: stimulus_type @@ -939,7 +1072,6 @@ classes: table. range: RepetitionsTable__sequential_recordings required: true - multivalued: false inlined: true sequential_recordings_index: name: sequential_recordings_index @@ -953,7 +1085,6 @@ classes: description: Index dataset for the sequential_recordings column. range: VectorIndex required: true - multivalued: false inlined: true tree_root: true RepetitionsTable__sequential_recordings: @@ -995,7 +1126,6 @@ classes: description: A reference to one or more rows in the RepetitionsTable table. range: ExperimentalConditionsTable__repetitions required: true - multivalued: false inlined: true repetitions_index: name: repetitions_index @@ -1009,7 +1139,6 @@ classes: description: Index dataset for the repetitions column. range: VectorIndex required: true - multivalued: false inlined: true tree_root: true ExperimentalConditionsTable__repetitions: diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.image.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.image.yaml index fec75ec..716c087 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.image.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.image.yaml @@ -91,21 +91,9 @@ classes: name: data description: Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array. - range: numeric + range: ImageSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: frame - - alias: x - - alias: y - - array: - dimensions: - - alias: frame - - alias: x - - alias: y - - alias: z + inlined: true dimension: name: dimension description: Number of pixels on x, y, (and z) axes. @@ -123,8 +111,6 @@ classes: used if the image is stored in another NWB file and that file is linked to this file. range: ImageSeries__external_file - required: false - multivalued: false inlined: true format: name: format @@ -132,22 +118,89 @@ classes: 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. + ifabsent: string(raw) range: text - required: false - multivalued: false device: name: device annotations: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: Device - range: string tree_root: true + ImageSeries__data: + name: ImageSeries__data + description: Binary data representing images across frames. If data are stored + in an external file, this should be an empty 3D array. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + continuity: + name: continuity + 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. + range: text + required: false + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: frame + - alias: x + - alias: y + - array: + dimensions: + - alias: frame + - alias: x + - alias: y + - alias: z ImageSeries__external_file: name: ImageSeries__external_file description: Paths to one or more external file(s). The field is only present @@ -206,7 +259,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImageSeries @@ -226,12 +278,16 @@ classes: identifier: true range: string required: true + data: + name: data + description: Images presented to subject, either grayscale or RGB + range: OpticalSeries__data + required: true + inlined: true distance: name: distance description: Distance from camera/monitor to target/eye. range: float32 - required: false - multivalued: false field_of_view: name: field_of_view description: Width, height and depth of image, or imaged area, in meters. @@ -247,12 +303,69 @@ classes: dimensions: - alias: width_height_depth exact_cardinality: 3 - data: - name: data - description: Images presented to subject, either grayscale or RGB - range: numeric + orientation: + name: orientation + description: Description of image relative to some reference frame (e.g., + which way is up). Must also specify frame of reference. + range: text + tree_root: true + OpticalSeries__data: + name: OpticalSeries__data + description: Images presented to subject, either grayscale or RGB + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string required: true - multivalued: false + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + value: + name: value + range: numeric any_of: - array: dimensions: @@ -266,14 +379,6 @@ classes: - alias: y - alias: r_g_b exact_cardinality: 3 - orientation: - name: orientation - description: Description of image relative to some reference frame (e.g., - which way is up). Must also specify frame of reference. - range: text - required: false - multivalued: false - tree_root: true IndexSeries: name: IndexSeries description: Stores indices to image frames stored in an ImageSeries. The purpose @@ -292,12 +397,9 @@ classes: data: name: data description: Index of the frame in the referenced ImageSeries. - array: - dimensions: - - alias: num_times - range: int32 + range: IndexSeries__data required: true - multivalued: false + inlined: true indexed_timeseries: name: indexed_timeseries annotations: @@ -305,9 +407,68 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImageSeries - range: string tree_root: true + IndexSeries__data: + name: IndexSeries__data + description: Index of the frame in the referenced ImageSeries. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + continuity: + name: continuity + 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. + range: text + required: false + value: + name: value + array: + dimensions: + - alias: num_times + range: int32 diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.misc.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.misc.yaml index ec02fc4..5299631 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.misc.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.misc.yaml @@ -38,7 +38,6 @@ classes: description: Values of each feature at each time. range: AbstractFeatureSeries__data required: true - multivalued: false inlined: true feature_units: name: feature_units @@ -70,6 +69,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Since there can be different units for different features, store @@ -105,13 +140,70 @@ classes: data: name: data description: Annotations made during an experiment. + range: AnnotationSeries__data + required: true + inlined: true + tree_root: true + AnnotationSeries__data: + name: AnnotationSeries__data + description: Annotations made during an experiment. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data. Annotations + have no units, so the value is fixed to -1.0. + ifabsent: float(-1.0) + range: float32 + required: true + equals_number: -1 + unit: + name: unit + description: Base unit of measurement for working with the data. Annotations + have no units, so the value is fixed to 'n/a'. + ifabsent: string(n/a) + range: text + required: true + equals_string: n/a + value: + name: value array: dimensions: - alias: num_times range: text - required: true - multivalued: false - tree_root: true IntervalSeries: name: IntervalSeries description: Stores intervals of data. The timestamps field stores the beginning @@ -131,13 +223,70 @@ classes: data: name: data description: Use values >0 if interval started, <0 if interval ended. + range: IntervalSeries__data + required: true + inlined: true + tree_root: true + IntervalSeries__data: + name: IntervalSeries__data + description: Use values >0 if interval started, <0 if interval ended. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data. Annotations + have no units, so the value is fixed to -1.0. + ifabsent: float(-1.0) + range: float32 + required: true + equals_number: -1 + unit: + name: unit + description: Base unit of measurement for working with the data. Annotations + have no units, so the value is fixed to 'n/a'. + ifabsent: string(n/a) + range: text + required: true + equals_string: n/a + value: + name: value array: dimensions: - alias: num_times range: int8 - required: true - multivalued: false - tree_root: true DecompositionSeries: name: DecompositionSeries description: Spectral analysis of a time series, e.g. of an LFP or a speech signal. @@ -153,14 +302,12 @@ classes: description: Data decomposed into frequency bands. range: DecompositionSeries__data required: true - multivalued: false inlined: true metric: name: metric description: The metric used, e.g. phase, amplitude, power. range: text required: true - multivalued: false source_channels: name: source_channels annotations: @@ -173,8 +320,6 @@ classes: description: DynamicTableRegion pointer to the channels that this decomposition series was generated from. range: DynamicTableRegion - required: false - multivalued: false inlined: true bands: name: bands @@ -182,7 +327,6 @@ classes: from. There should be one row in this table for each band. range: DecompositionSeries__bands required: true - multivalued: false inlined: true inlined_as_list: true source_timeseries: @@ -191,8 +335,6 @@ classes: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: TimeSeries @@ -209,6 +351,42 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. Actual stored @@ -289,63 +467,13 @@ classes: identifier: true range: string required: true - spike_times_index: - name: spike_times_index - annotations: - 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 - multivalued: false - inlined: true - spike_times: - name: spike_times - description: Spike times for each unit. - range: Units__spike_times - required: false - multivalued: false - inlined: true - obs_intervals_index: - name: obs_intervals_index - annotations: - 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 - multivalued: false - inlined: true - obs_intervals: - name: obs_intervals - description: Observation intervals for each unit. + electrode_group: + name: electrode_group + description: Electrode group that each spike unit came from. array: - dimensions: - - alias: num_intervals - - alias: start_end - exact_cardinality: 2 - range: float64 - required: false - multivalued: false - electrodes_index: - name: electrodes_index - annotations: - named: - tag: named - value: true - source_type: - tag: source_type - value: neurodata_type_inc - description: Index into electrodes. - range: VectorIndex + minimum_number_dimensions: 1 + maximum_number_dimensions: false + range: ElectrodeGroup required: false multivalued: false inlined: true @@ -360,51 +488,69 @@ classes: value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion - required: false - multivalued: false inlined: true - electrode_group: - name: electrode_group - description: Electrode group that each spike unit came from. + electrodes_index: + name: electrodes_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into electrodes. + range: VectorIndex + inlined: true + obs_intervals: + name: obs_intervals + description: Observation intervals for each unit. array: - minimum_number_dimensions: 1 - maximum_number_dimensions: false - range: ElectrodeGroup + dimensions: + - alias: num_intervals + - alias: start_end + exact_cardinality: 2 + range: float64 required: false multivalued: false + obs_intervals_index: + name: obs_intervals_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into the obs_intervals dataset. + range: VectorIndex + inlined: true + spike_times: + name: spike_times + description: Spike times for each unit. + range: Units__spike_times + inlined: true + spike_times_index: + name: spike_times_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into the spike_times dataset. + range: VectorIndex inlined: true waveform_mean: name: waveform_mean description: Spike waveform mean for each spike unit. - range: float32 - required: false - multivalued: false - any_of: - - array: - dimensions: - - alias: num_units - - alias: num_samples - - array: - dimensions: - - alias: num_units - - alias: num_samples - - alias: num_electrodes + range: Units__waveform_mean + inlined: true waveform_sd: name: waveform_sd description: Spike waveform standard deviation for each spike unit. - range: float32 - required: false - multivalued: false - any_of: - - array: - dimensions: - - alias: num_units - - alias: num_samples - - array: - dimensions: - - alias: num_units - - alias: num_samples - - alias: num_electrodes + range: Units__waveform_sd + inlined: true waveforms: name: waveforms description: Individual waveforms for each spike on each electrode. This is @@ -430,13 +576,8 @@ classes: order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same. - array: - dimensions: - - alias: num_waveforms - - alias: num_samples - range: numeric - required: false - multivalued: false + range: Units__waveforms + inlined: true waveforms_index: name: waveforms_index annotations: @@ -449,8 +590,6 @@ classes: description: Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail. range: VectorIndex - required: false - multivalued: false inlined: true waveforms_index_index: name: waveforms_index_index @@ -464,8 +603,6 @@ classes: description: Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail. range: VectorIndex - required: false - multivalued: false inlined: true tree_root: true Units__spike_times: @@ -489,3 +626,97 @@ classes: for the spike time to be between samples. range: float64 required: false + Units__waveform_mean: + name: Units__waveform_mean + description: Spike waveform mean for each spike unit. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveform_mean) + identifier: true + range: string + required: true + equals_string: waveform_mean + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts + Units__waveform_sd: + name: Units__waveform_sd + description: Spike waveform standard deviation for each spike unit. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveform_sd) + identifier: true + range: string + required: true + equals_string: waveform_sd + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts + Units__waveforms: + name: Units__waveforms + description: Individual waveforms for each spike on each electrode. This is a + doubly indexed column. The 'waveforms_index' column indexes which waveforms + in this column belong to the same spike event for a given unit, where each waveform + was recorded from a different electrode. The 'waveforms_index_index' column + indexes the 'waveforms_index' column to indicate which spike events belong to + a given unit. For example, if the 'waveforms_index_index' column has values + [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond + to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' + column correspond to the 3 spike events of the second unit, and the next 1 element + of the 'waveforms_index' column corresponds to the 1 spike event of the third + unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then + the first 3 elements of the 'waveforms' column contain the 3 spike waveforms + that were recorded from 3 different electrodes for the first spike time of the + first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays + for a graphical representation of this example. When there is only one electrode + for each unit (i.e., each spike time is associated with a single waveform), + then the 'waveforms_index' column will have values 1, 2, ..., N, where N is + the number of spike events. The number of electrodes for each spike event should + be the same within a given unit. The 'electrodes' column should be used to indicate + which electrodes are associated with each unit, and the order of the waveforms + within a given unit x spike event should be in the same order as the electrodes + referenced in the 'electrodes' column of this table. The number of samples for + each waveform must be the same. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveforms) + identifier: true + range: string + required: true + equals_string: waveforms + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.ogen.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.ogen.yaml index cbe1a6d..67986b2 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.ogen.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.ogen.yaml @@ -27,12 +27,9 @@ classes: data: name: data description: Applied power for optogenetic stimulus, in watts. - array: - dimensions: - - alias: num_times - range: numeric + range: OptogeneticSeries__data required: true - multivalued: false + inlined: true site: name: site annotations: @@ -40,12 +37,71 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: OptogeneticStimulusSite - range: string tree_root: true + OptogeneticSeries__data: + name: OptogeneticSeries__data + description: Applied power for optogenetic stimulus, in watts. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Unit of measurement for data, which is fixed to 'watts'. + ifabsent: string(watts) + range: text + required: true + equals_string: watts + value: + name: value + array: + dimensions: + - alias: num_times + range: numeric OptogeneticStimulusSite: name: OptogeneticStimulusSite description: A site of optogenetic stimulation. @@ -61,13 +117,11 @@ classes: description: Description of stimulation site. range: text required: true - multivalued: false excitation_lambda: name: excitation_lambda description: Excitation wavelength, in nm. range: float32 required: true - multivalued: false location: name: location description: Location of the stimulation site. Specify the area, layer, comments @@ -75,7 +129,6 @@ classes: standard atlas names for anatomical regions when possible. range: text required: true - multivalued: false device: name: device annotations: @@ -83,7 +136,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.ophys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.ophys.yaml index aec8547..c87f8be 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.ophys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.ophys.yaml @@ -60,7 +60,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImagingPlane @@ -80,17 +79,9 @@ classes: data: name: data description: Signals from ROIs. - range: numeric + range: RoiResponseSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_times - - array: - dimensions: - - alias: num_times - - alias: num_rois + inlined: true rois: name: rois annotations: @@ -104,9 +95,73 @@ classes: on the ROIs stored in this timeseries. range: DynamicTableRegion required: true - multivalued: false inlined: true tree_root: true + RoiResponseSeries__data: + name: RoiResponseSeries__data + description: Signals from ROIs. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + continuity: + name: continuity + 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. + range: text + required: false + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_times + - array: + dimensions: + - alias: num_times + - alias: num_rois DfOverF: name: DfOverF description: dF/F information about a region of interest (ROI). Storage hierarchy @@ -182,6 +237,13 @@ classes: - alias: num_x - alias: num_y - alias: num_z + pixel_mask: + name: pixel_mask + description: 'Pixel masks for each ROI: a list of indices and weights for + the ROI. Pixel masks are concatenated and parsing of this dataset is maintained + by the PlaneSegmentation' + range: PlaneSegmentation__pixel_mask + inlined: true pixel_mask_index: name: pixel_mask_index annotations: @@ -193,17 +255,13 @@ classes: value: neurodata_type_inc description: Index into pixel_mask. range: VectorIndex - required: false - multivalued: false inlined: true - pixel_mask: - name: pixel_mask - description: 'Pixel masks for each ROI: a list of indices and weights for - the ROI. Pixel masks are concatenated and parsing of this dataset is maintained + voxel_mask: + name: voxel_mask + description: 'Voxel masks for each ROI: a list of indices and weights for + the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation' - range: PlaneSegmentation__pixel_mask - required: false - multivalued: false + range: PlaneSegmentation__voxel_mask inlined: true voxel_mask_index: name: voxel_mask_index @@ -216,17 +274,6 @@ classes: value: neurodata_type_inc description: Index into voxel_mask. range: VectorIndex - required: false - multivalued: false - inlined: true - voxel_mask: - name: voxel_mask - description: 'Voxel masks for each ROI: a list of indices and weights for - the ROI. Voxel masks are concatenated and parsing of this dataset is maintained - by the PlaneSegmentation' - range: PlaneSegmentation__voxel_mask - required: false - multivalued: false inlined: true reference_images: name: reference_images @@ -243,7 +290,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImagingPlane @@ -269,24 +315,18 @@ classes: array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false y: name: y description: Pixel y-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false weight: name: weight description: Weight of the pixel. array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false PlaneSegmentation__voxel_mask: name: PlaneSegmentation__voxel_mask description: 'Voxel masks for each ROI: a list of indices and weights for the @@ -307,32 +347,24 @@ classes: array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false y: name: y description: Voxel y-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false z: name: z description: Voxel z-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false weight: name: weight description: Weight of the voxel. array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false ImagingPlane: name: ImagingPlane description: An imaging plane and its metadata. @@ -347,27 +379,21 @@ classes: 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 @@ -375,15 +401,12 @@ classes: 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 inlined: true origin_coords: name: origin_coords @@ -391,8 +414,6 @@ classes: 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 inlined: true grid_spacing: name: grid_spacing @@ -400,8 +421,6 @@ classes: 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 inlined: true reference_frame: name: reference_frame @@ -423,8 +442,6 @@ classes: 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. @@ -440,7 +457,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -573,13 +589,11 @@ classes: 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 tree_root: true MotionCorrection: name: MotionCorrection @@ -610,7 +624,6 @@ classes: description: Image stack with frames shifted to the common coordinates. range: ImageSeries required: true - multivalued: false inlined: true inlined_as_list: false xy_translation: @@ -619,7 +632,6 @@ classes: coordinates, for example, to align each frame to a reference image. range: TimeSeries required: true - multivalued: false inlined: true inlined_as_list: false original: @@ -629,7 +641,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImageSeries diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.retinotopy.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.retinotopy.yaml index f30f06f..1b75917 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.retinotopy.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_4_0/core.nwb.retinotopy.yaml @@ -37,30 +37,24 @@ classes: description: Phase response to stimulus on the first measured axis. range: ImagingRetinotopy__axis_1_phase_map required: true - multivalued: false inlined: true axis_1_power_map: name: axis_1_power_map 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: ImagingRetinotopy__axis_1_power_map - required: false - multivalued: false inlined: true axis_2_phase_map: name: axis_2_phase_map description: Phase response to stimulus on the second measured axis. range: ImagingRetinotopy__axis_2_phase_map required: true - multivalued: false inlined: true axis_2_power_map: name: axis_2_power_map description: Power response on the second measured axis. Response is scaled so 0.0 is no power in the response and 1.0 is maximum relative power. range: ImagingRetinotopy__axis_2_power_map - required: false - multivalued: false inlined: true axis_descriptions: name: axis_descriptions @@ -79,16 +73,12 @@ classes: description: 'Gray-scale image taken with same settings/parameters (e.g., focal depth, wavelength) as data collection. Array format: [rows][columns].' range: ImagingRetinotopy__focal_depth_image - required: false - multivalued: false inlined: true sign_map: name: sign_map description: Sine of the angle between the direction of the gradient in axis_1 and axis_2. range: ImagingRetinotopy__sign_map - required: false - multivalued: false inlined: true vasculature_image: name: vasculature_image @@ -96,7 +86,6 @@ classes: [rows][columns]' range: ImagingRetinotopy__vasculature_image required: true - multivalued: false inlined: true tree_root: true ImagingRetinotopy__axis_1_phase_map: diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.base.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.base.yaml index 547dd4c..5809bb5 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.base.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.base.yaml @@ -47,7 +47,6 @@ classes: exact_number_dimensions: 1 range: int32 required: true - multivalued: false count: name: count description: Number of data samples available in this time series, during @@ -56,7 +55,6 @@ classes: exact_number_dimensions: 1 range: int32 required: true - multivalued: false timeseries: name: timeseries description: The TimeSeries that this index applies to @@ -64,7 +62,6 @@ classes: exact_number_dimensions: 1 range: TimeSeries required: true - multivalued: false inlined: true tree_root: true Image: @@ -189,7 +186,6 @@ classes: external file. range: TimeSeries__data required: true - multivalued: false inlined: true starting_time: name: starting_time @@ -197,8 +193,6 @@ classes: uniformly spaced, the timestamp of the first sample can be specified and all subsequent ones calculated from the sampling rate attribute. range: TimeSeries__starting_time - required: false - multivalued: false inlined: true timestamps: name: timestamps @@ -241,8 +235,6 @@ classes: external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes. range: TimeSeries__sync - required: false - multivalued: false inlined: true inlined_as_list: true tree_root: true @@ -429,7 +421,5 @@ classes: and only once, so the dataset should have the same length as the number of images. range: ImageReferences - required: false - multivalued: false inlined: true tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.behavior.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.behavior.yaml index 94ff5f8..9db47e3 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.behavior.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.behavior.yaml @@ -38,14 +38,11 @@ classes: reference frame. range: SpatialSeries__data required: true - multivalued: false inlined: true reference_frame: name: reference_frame description: Description defining what exactly 'straight-ahead' means. range: text - required: false - multivalued: false tree_root: true SpatialSeries__data: name: SpatialSeries__data @@ -59,6 +56,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. The default diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.ecephys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.ecephys.yaml index b611d74..6700cc0 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.ecephys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.ecephys.yaml @@ -39,40 +39,6 @@ classes: about the filter properties as possible. range: text required: false - data: - name: data - description: Recorded voltage data. - range: numeric - required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_times - - array: - dimensions: - - alias: num_times - - alias: num_channels - - array: - dimensions: - - alias: num_times - - alias: num_channels - - alias: num_samples - electrodes: - name: electrodes - annotations: - 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 - required: true - multivalued: false - inlined: true channel_conversion: name: channel_conversion description: Channel-specific conversion factor. Multiply the data in the @@ -90,7 +56,109 @@ classes: range: float32 required: false multivalued: false + data: + name: data + description: Recorded voltage data. + range: ElectricalSeries__data + required: true + inlined: true + electrodes: + name: electrodes + annotations: + 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 + required: true + inlined: true tree_root: true + ElectricalSeries__data: + name: ElectricalSeries__data + description: Recorded voltage data. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Base unit of measurement for working with the data. This value + is fixed to 'volts'. Actual stored values are not necessarily stored in + these units. To access the data in these units, multiply 'data' by 'conversion', + followed by 'channel_conversion' (if present), and then add 'offset'. + ifabsent: string(volts) + range: text + required: true + equals_string: volts + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_times + - array: + dimensions: + - alias: num_times + - alias: num_channels + - array: + dimensions: + - alias: num_times + - alias: num_channels + - alias: num_samples SpikeEventSeries: name: SpikeEventSeries description: 'Stores snapshots/snippets of recorded spike events (i.e., threshold @@ -111,19 +179,9 @@ classes: data: name: data description: Spike waveforms. - range: numeric + range: SpikeEventSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_events - - alias: num_samples - - array: - dimensions: - - alias: num_events - - alias: num_channels - - alias: num_samples + inlined: true timestamps: name: timestamps description: Timestamps for samples stored in data, in seconds, relative to @@ -137,6 +195,82 @@ classes: required: true multivalued: false tree_root: true + SpikeEventSeries__data: + name: SpikeEventSeries__data + description: Spike waveforms. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Unit of measurement for waveforms, which is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: true + equals_string: volts + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_events + - alias: num_samples + - array: + dimensions: + - alias: num_events + - alias: num_channels + - alias: num_samples FeatureExtraction: name: FeatureExtraction description: Features, such as PC1 and PC2, that are extracted from signals stored @@ -192,7 +326,6 @@ classes: was generated from. range: DynamicTableRegion required: true - multivalued: false inlined: true tree_root: true EventDetection: @@ -212,7 +345,6 @@ classes: or dV/dT threshold, as well as relevant values. range: text required: true - multivalued: false source_idx: name: source_idx description: Indices (zero-based) into source ElectricalSeries::data array @@ -241,7 +373,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ElectricalSeries @@ -323,8 +454,6 @@ classes: name: position description: stereotaxic or common framework coordinates range: ElectrodeGroup__position - required: false - multivalued: false inlined: true device: name: device @@ -333,7 +462,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -356,24 +484,18 @@ classes: array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false y: name: y description: y coordinate array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false z: name: z description: z coordinate array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false ClusterWaveforms: name: ClusterWaveforms description: DEPRECATED The mean waveform shape, including standard deviation, @@ -395,7 +517,6 @@ classes: description: Filtering applied to data before generating mean/sd range: text required: true - multivalued: false waveform_mean: name: waveform_mean description: The mean waveform for each cluster, using the same indices for @@ -427,7 +548,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Clustering @@ -451,7 +571,6 @@ classes: clusters curated using Klusters, etc) range: text required: true - multivalued: false num: name: num description: Cluster number of each event diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.epoch.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.epoch.yaml index 9857394..81a3ca5 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.epoch.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.epoch.yaml @@ -63,8 +63,6 @@ classes: value: neurodata_type_inc description: Index for tags. range: VectorIndex - required: false - multivalued: false inlined: true timeseries: name: timeseries @@ -77,8 +75,6 @@ classes: value: neurodata_type_inc description: An index into a TimeSeries object. range: TimeSeriesReferenceVectorData - required: false - multivalued: false inlined: true timeseries_index: name: timeseries_index @@ -91,7 +87,5 @@ classes: value: neurodata_type_inc description: Index for timeseries. range: VectorIndex - required: false - multivalued: false inlined: true tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.file.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.file.yaml index 01ef5b5..e42c8b3 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.file.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.file.yaml @@ -81,13 +81,11 @@ classes: other files. range: text required: true - multivalued: false session_description: name: session_description description: A description of the experimental session and data in the file. range: text required: true - multivalued: false session_start_time: name: session_start_time description: 'Date and time of the experiment/session start. The date is stored @@ -96,7 +94,6 @@ classes: offset. Date accuracy is up to milliseconds.' range: isodatetime required: true - multivalued: false timestamps_reference_time: name: timestamps_reference_time description: 'Date and time corresponding to time zero of all timestamps. @@ -106,7 +103,6 @@ classes: times stored in the file use this time as reference (i.e., time zero).' range: isodatetime required: true - multivalued: false acquisition: name: acquisition description: Data streams recorded from the system, including ephys, ophys, @@ -185,7 +181,6 @@ classes: can exist in the present file or can be linked to a remote library file. range: NWBFile__stimulus required: true - multivalued: false inlined: true inlined_as_list: true general: @@ -207,7 +202,6 @@ classes: should not be created unless there is data to store within them. range: NWBFile__general required: true - multivalued: false inlined: true inlined_as_list: true intervals: @@ -217,16 +211,12 @@ classes: an experiment, or epochs (see epochs subgroup) deriving from analysis of data. range: NWBFile__intervals - required: false - multivalued: false inlined: true inlined_as_list: true units: name: units description: Data about sorted spike units. range: Units - required: false - multivalued: false inlined: true inlined_as_list: false tree_root: true @@ -300,14 +290,10 @@ classes: name: data_collection description: Notes about data collection and analysis. range: text - required: false - multivalued: false experiment_description: name: experiment_description description: General description of the experiment. range: text - required: false - multivalued: false experimenter: name: experimenter description: Name of person(s) who performed the experiment. Can also specify @@ -322,8 +308,6 @@ classes: name: institution description: Institution(s) where experiment was performed. range: text - required: false - multivalued: false keywords: name: keywords description: Terms to search over. @@ -337,28 +321,20 @@ classes: name: lab description: Laboratory where experiment was performed. range: text - required: false - multivalued: false notes: name: notes description: Notes about the experiment. range: text - required: false - multivalued: false pharmacology: name: pharmacology description: Description of drugs used, including how and when they were administered. Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc. range: text - required: false - multivalued: false protocol: name: protocol description: Experimental protocol, if applicable. e.g., include IACUC protocol number. range: text - required: false - multivalued: false related_publications: name: related_publications description: Publication information. PMID, DOI, URL, etc. @@ -372,49 +348,36 @@ classes: name: session_id description: Lab-specific ID for the session. range: text - required: false - multivalued: false slices: name: slices description: Description of slices, including information about preparation thickness, orientation, temperature, and bath solution. range: text - required: false - multivalued: false source_script: name: source_script description: Script file or link to public source code used to create this NWB file. range: general__source_script - required: false - multivalued: false inlined: true stimulus: name: stimulus description: Notes about stimuli, such as how and where they were presented. range: text - required: false - multivalued: false surgery: name: surgery description: Narrative description about surgery/surgeries, including date(s) and who performed surgery. range: text - required: false - multivalued: false virus: name: virus description: Information about virus(es) used in experiments, including virus ID, source, date made, injection location, volume, etc. range: text - required: false - multivalued: false lab_meta_data: name: lab_meta_data description: Place-holder than can be extended so that lab-specific meta-data can be placed in /general. range: LabMetaData - required: false multivalued: true inlined: true inlined_as_list: false @@ -432,24 +395,18 @@ classes: description: Information about the animal or person from which the data was measured. range: Subject - required: false - multivalued: false inlined: true inlined_as_list: false extracellular_ephys: name: extracellular_ephys description: Metadata related to extracellular electrophysiology. range: general__extracellular_ephys - required: false - multivalued: false inlined: true inlined_as_list: true intracellular_ephys: name: intracellular_ephys description: Metadata related to intracellular electrophysiology. range: general__intracellular_ephys - required: false - multivalued: false inlined: true inlined_as_list: true optogenetics: @@ -504,7 +461,6 @@ classes: name: electrode_group description: Physical group of electrodes. range: ElectrodeGroup - required: false multivalued: true inlined: true inlined_as_list: false @@ -512,8 +468,6 @@ classes: name: electrodes description: A table of all electrodes (i.e. channels) used for recording. range: extracellular_ephys__electrodes - required: false - multivalued: false inlined: true inlined_as_list: true extracellular_ephys__electrodes: @@ -660,13 +614,10 @@ classes: etc. If this changes between TimeSeries, filter description should be stored as a text attribute for each TimeSeries.' range: text - required: false - multivalued: false intracellular_electrode: name: intracellular_electrode description: An intracellular electrode. range: IntracellularElectrode - required: false multivalued: true inlined: true inlined_as_list: false @@ -677,8 +628,6 @@ classes: tabels. Additional SequentialRecordingsTable, RepetitionsTable and ExperimentalConditions tables provide enhanced support for experiment metadata.' range: SweepTable - required: false - multivalued: false inlined: true inlined_as_list: false intracellular_recordings: @@ -696,8 +645,6 @@ classes: to an electrode is also common in intracellular electrophysiology, in which case other TimeSeries may be used. range: IntracellularRecordingsTable - required: false - multivalued: false inlined: true inlined_as_list: false simultaneous_recordings: @@ -706,8 +653,6 @@ classes: the IntracellularRecordingsTable table together that were recorded simultaneously from different electrodes range: SimultaneousRecordingsTable - required: false - multivalued: false inlined: true inlined_as_list: false sequential_recordings: @@ -717,8 +662,6 @@ classes: together sequential recordings where the a sequence of stimuli of the same type with varying parameters have been presented in a sequence. range: SequentialRecordingsTable - required: false - multivalued: false inlined: true inlined_as_list: false repetitions: @@ -728,8 +671,6 @@ classes: type of stimulus, the RepetitionsTable table is typically used to group sets of stimuli applied in sequence. range: RepetitionsTable - required: false - multivalued: false inlined: true inlined_as_list: false experimental_conditions: @@ -737,8 +678,6 @@ classes: description: A table for grouping different intracellular recording repetitions together that belong to the same experimental experimental_conditions. range: ExperimentalConditionsTable - required: false - multivalued: false inlined: true inlined_as_list: false NWBFile__intervals: @@ -759,24 +698,18 @@ classes: description: Divisions in time marking experimental stages or sub-divisions of a single recording session. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false trials: name: trials description: Repeated experimental events that have a logical grouping. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false invalid_times: name: invalid_times description: Time intervals that should be removed from analysis. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false time_intervals: @@ -784,7 +717,6 @@ classes: description: Optional additional table(s) for describing other experimental time intervals. range: TimeIntervals - required: false multivalued: true inlined: true inlined_as_list: false @@ -813,56 +745,38 @@ classes: name: age description: Age of subject. Can be supplied instead of 'date_of_birth'. range: text - required: false - multivalued: false date_of_birth: name: date_of_birth description: Date of birth of subject. Can be supplied instead of 'age'. range: isodatetime - required: false - multivalued: false description: name: description description: Description of subject and where subject came from (e.g., breeder, if animal). range: text - required: false - multivalued: false genotype: name: genotype description: Genetic strain. If absent, assume Wild Type (WT). range: text - required: false - multivalued: false sex: name: sex description: Gender of subject. range: text - required: false - multivalued: false species: name: species description: Species of subject. range: text - required: false - multivalued: false strain: name: strain description: Strain of subject. range: text - required: false - multivalued: false subject_id: name: subject_id description: ID of animal/person used/participating in experiment (lab convention). range: text - required: false - multivalued: false weight: name: weight description: Weight at time of experiment, at time of surgery and at other important times. range: text - required: false - multivalued: false tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.icephys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.icephys.yaml index 257b07b..cc89c87 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.icephys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.icephys.yaml @@ -41,15 +41,12 @@ classes: description: Recorded voltage or current. range: PatchClampSeries__data required: true - multivalued: false inlined: true gain: name: gain description: Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp). range: float32 - required: false - multivalued: false electrode: name: electrode annotations: @@ -57,7 +54,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: IntracellularElectrode @@ -74,6 +70,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. Actual stored @@ -99,31 +140,24 @@ classes: identifier: true range: string required: true + bias_current: + name: bias_current + description: Bias current, in amps. + range: float32 + bridge_balance: + name: bridge_balance + description: Bridge balance, in ohms. + range: float32 + capacitance_compensation: + name: capacitance_compensation + description: Capacitance compensation, in farads. + range: float32 data: name: data description: Recorded voltage. range: CurrentClampSeries__data required: true - multivalued: false inlined: true - bias_current: - name: bias_current - description: Bias current, in amps. - range: float32 - required: false - multivalued: false - bridge_balance: - name: bridge_balance - description: Bridge balance, in ohms. - range: float32 - required: false - multivalued: false - capacitance_compensation: - name: capacitance_compensation - description: Capacitance compensation, in farads. - range: float32 - required: false - multivalued: false tree_root: true CurrentClampSeries__data: name: CurrentClampSeries__data @@ -136,6 +170,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -148,8 +227,10 @@ classes: equals_string: volts value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric IZeroClampSeries: name: IZeroClampSeries description: Voltage data from an intracellular recording when all current and @@ -176,19 +257,16 @@ classes: description: Bias current, in amps, fixed to 0.0. range: float32 required: true - multivalued: false bridge_balance: name: bridge_balance description: Bridge balance, in ohms, fixed to 0.0. range: float32 required: true - multivalued: false capacitance_compensation: name: capacitance_compensation description: Capacitance compensation, in farads, fixed to 0.0. range: float32 required: true - multivalued: false tree_root: true CurrentClampStimulusSeries: name: CurrentClampStimulusSeries @@ -205,7 +283,6 @@ classes: description: Stimulus current applied. range: CurrentClampStimulusSeries__data required: true - multivalued: false inlined: true tree_root: true CurrentClampStimulusSeries__data: @@ -219,6 +296,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -231,8 +353,10 @@ classes: equals_string: amperes value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric VoltageClampSeries: name: VoltageClampSeries description: Current data from an intracellular voltage-clamp recording. A corresponding @@ -245,88 +369,48 @@ classes: identifier: true range: string required: true - data: - name: data - description: Recorded current. - range: VoltageClampSeries__data - required: true - multivalued: false - inlined: true capacitance_fast: name: capacitance_fast description: Fast capacitance, in farads. range: VoltageClampSeries__capacitance_fast - required: false - multivalued: false inlined: true capacitance_slow: name: capacitance_slow description: Slow capacitance, in farads. range: VoltageClampSeries__capacitance_slow - required: false - multivalued: false + inlined: true + data: + name: data + description: Recorded current. + range: VoltageClampSeries__data + required: true inlined: true resistance_comp_bandwidth: name: resistance_comp_bandwidth description: Resistance compensation bandwidth, in hertz. range: VoltageClampSeries__resistance_comp_bandwidth - required: false - multivalued: false inlined: true resistance_comp_correction: name: resistance_comp_correction description: Resistance compensation correction, in percent. range: VoltageClampSeries__resistance_comp_correction - required: false - multivalued: false inlined: true resistance_comp_prediction: name: resistance_comp_prediction description: Resistance compensation prediction, in percent. range: VoltageClampSeries__resistance_comp_prediction - required: false - multivalued: false inlined: true whole_cell_capacitance_comp: name: whole_cell_capacitance_comp description: Whole cell capacitance compensation, in farads. range: VoltageClampSeries__whole_cell_capacitance_comp - required: false - multivalued: false inlined: true whole_cell_series_resistance_comp: name: whole_cell_series_resistance_comp description: Whole cell series resistance compensation, in ohms. range: VoltageClampSeries__whole_cell_series_resistance_comp - required: false - multivalued: false inlined: true tree_root: true - VoltageClampSeries__data: - name: VoltageClampSeries__data - description: Recorded current. - attributes: - name: - name: name - ifabsent: string(data) - identifier: true - range: string - required: true - equals_string: data - unit: - name: unit - description: Base unit of measurement for working with the data. which is - fixed to 'amperes'. Actual stored values are not necessarily stored in these - units. To access the data in these units, multiply 'data' by 'conversion' - and add 'offset'. - ifabsent: string(amperes) - range: text - required: true - equals_string: amperes - value: - name: value - range: AnyType - required: true VoltageClampSeries__capacitance_fast: name: VoltageClampSeries__capacitance_fast description: Fast capacitance, in farads. @@ -371,6 +455,78 @@ classes: name: value range: float32 required: true + VoltageClampSeries__data: + name: VoltageClampSeries__data + description: Recorded current. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Base unit of measurement for working with the data. which is + fixed to 'amperes'. Actual stored values are not necessarily stored in these + units. To access the data in these units, multiply 'data' by 'conversion' + and add 'offset'. + ifabsent: string(amperes) + range: text + required: true + equals_string: amperes + value: + name: value + array: + dimensions: + - alias: num_times + range: numeric VoltageClampSeries__resistance_comp_bandwidth: name: VoltageClampSeries__resistance_comp_bandwidth description: Resistance compensation bandwidth, in hertz. @@ -501,7 +657,6 @@ classes: description: Stimulus voltage applied. range: VoltageClampStimulusSeries__data required: true - multivalued: false inlined: true tree_root: true VoltageClampStimulusSeries__data: @@ -515,6 +670,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -527,8 +727,10 @@ classes: equals_string: volts value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric IntracellularElectrode: name: IntracellularElectrode description: An intracellular electrode and its metadata. @@ -543,52 +745,37 @@ classes: name: cell_id description: unique ID of the cell range: text - required: false - multivalued: false description: name: description description: Description of electrode (e.g., whole-cell, sharp, etc.). range: text required: true - multivalued: false filtering: name: filtering description: Electrode specific filtering. range: text - required: false - multivalued: false initial_access_resistance: name: initial_access_resistance description: Initial access resistance. range: text - required: false - multivalued: false location: name: location description: Location of the electrode. 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: false - multivalued: false resistance: name: resistance description: Electrode resistance, in ohms. range: text - required: false - multivalued: false seal: name: seal description: Information about seal used for recording. range: text - required: false - multivalued: false slice: name: slice description: Information about slice used for recording. range: text - required: false - multivalued: false device: name: device annotations: @@ -596,7 +783,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -615,15 +801,6 @@ classes: identifier: true range: string required: true - sweep_number: - name: sweep_number - description: Sweep number of the PatchClampSeries in that row. - array: - minimum_number_dimensions: 1 - maximum_number_dimensions: false - range: uint32 - required: true - multivalued: false series: name: series description: The PatchClampSeries with the sweep number in that row. @@ -646,8 +823,16 @@ classes: description: Index for series. range: VectorIndex required: true - multivalued: false inlined: true + sweep_number: + name: sweep_number + description: Sweep number of the PatchClampSeries in that row. + array: + minimum_number_dimensions: 1 + maximum_number_dimensions: false + range: uint32 + required: true + multivalued: false tree_root: true IntracellularElectrodesTable: name: IntracellularElectrodesTable @@ -707,7 +892,6 @@ classes: recording (rows). range: TimeSeriesReferenceVectorData required: true - multivalued: false inlined: true tree_root: true IntracellularResponsesTable: @@ -740,7 +924,6 @@ classes: recording (rows) range: TimeSeriesReferenceVectorData required: true - multivalued: false inlined: true tree_root: true IntracellularRecordingsTable: @@ -782,15 +965,6 @@ classes: description: Table for storing intracellular electrode related metadata. range: IntracellularElectrodesTable required: true - multivalued: false - inlined: true - inlined_as_list: false - stimuli: - name: stimuli - description: Table for storing intracellular stimulus related metadata. - range: IntracellularStimuliTable - required: true - multivalued: false inlined: true inlined_as_list: false responses: @@ -798,7 +972,13 @@ classes: description: Table for storing intracellular response related metadata. range: IntracellularResponsesTable required: true - multivalued: false + inlined: true + inlined_as_list: false + stimuli: + name: stimuli + description: Table for storing intracellular stimulus related metadata. + range: IntracellularStimuliTable + required: true inlined: true inlined_as_list: false tree_root: true @@ -822,7 +1002,6 @@ classes: table. range: SimultaneousRecordingsTable__recordings required: true - multivalued: false inlined: true recordings_index: name: recordings_index @@ -836,7 +1015,6 @@ classes: description: Index dataset for the recordings column. range: VectorIndex required: true - multivalued: false inlined: true tree_root: true SimultaneousRecordingsTable__recordings: @@ -881,7 +1059,6 @@ classes: table. range: SequentialRecordingsTable__simultaneous_recordings required: true - multivalued: false inlined: true simultaneous_recordings_index: name: simultaneous_recordings_index @@ -895,7 +1072,6 @@ classes: description: Index dataset for the simultaneous_recordings column. range: VectorIndex required: true - multivalued: false inlined: true stimulus_type: name: stimulus_type @@ -949,7 +1125,6 @@ classes: table. range: RepetitionsTable__sequential_recordings required: true - multivalued: false inlined: true sequential_recordings_index: name: sequential_recordings_index @@ -963,7 +1138,6 @@ classes: description: Index dataset for the sequential_recordings column. range: VectorIndex required: true - multivalued: false inlined: true tree_root: true RepetitionsTable__sequential_recordings: @@ -1005,7 +1179,6 @@ classes: description: A reference to one or more rows in the RepetitionsTable table. range: ExperimentalConditionsTable__repetitions required: true - multivalued: false inlined: true repetitions_index: name: repetitions_index @@ -1019,7 +1192,6 @@ classes: description: Index dataset for the repetitions column. range: VectorIndex required: true - multivalued: false inlined: true tree_root: true ExperimentalConditionsTable__repetitions: diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.image.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.image.yaml index dd4d2f4..1d9c427 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.image.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.image.yaml @@ -91,21 +91,9 @@ classes: name: data description: Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array. - range: numeric + range: ImageSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: frame - - alias: x - - alias: y - - array: - dimensions: - - alias: frame - - alias: x - - alias: y - - alias: z + inlined: true dimension: name: dimension description: Number of pixels on x, y, (and z) axes. @@ -123,8 +111,6 @@ classes: used if the image is stored in another NWB file and that file is linked to this file. range: ImageSeries__external_file - required: false - multivalued: false inlined: true format: name: format @@ -132,22 +118,98 @@ classes: 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. + ifabsent: string(raw) range: text - required: false - multivalued: false device: name: device annotations: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: Device - range: string tree_root: true + ImageSeries__data: + name: ImageSeries__data + description: Binary data representing images across frames. If data are stored + in an external file, this should be an empty 3D array. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + continuity: + name: continuity + 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. + range: text + required: false + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: frame + - alias: x + - alias: y + - array: + dimensions: + - alias: frame + - alias: x + - alias: y + - alias: z ImageSeries__external_file: name: ImageSeries__external_file description: Paths to one or more external file(s). The field is only present @@ -206,7 +268,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImageSeries @@ -226,12 +287,16 @@ classes: identifier: true range: string required: true + data: + name: data + description: Images presented to subject, either grayscale or RGB + range: OpticalSeries__data + required: true + inlined: true distance: name: distance description: Distance from camera/monitor to target/eye. range: float32 - required: false - multivalued: false field_of_view: name: field_of_view description: Width, height and depth of image, or imaged area, in meters. @@ -247,12 +312,78 @@ classes: dimensions: - alias: width_height_depth exact_cardinality: 3 - data: - name: data - description: Images presented to subject, either grayscale or RGB - range: numeric + orientation: + name: orientation + description: Description of image relative to some reference frame (e.g., + which way is up). Must also specify frame of reference. + range: text + tree_root: true + OpticalSeries__data: + name: OpticalSeries__data + description: Images presented to subject, either grayscale or RGB + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string required: true - multivalued: false + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + value: + name: value + range: numeric any_of: - array: dimensions: @@ -266,14 +397,6 @@ classes: - alias: y - alias: r_g_b exact_cardinality: 3 - orientation: - name: orientation - description: Description of image relative to some reference frame (e.g., - which way is up). Must also specify frame of reference. - range: text - required: false - multivalued: false - tree_root: true IndexSeries: name: IndexSeries description: Stores indices to image frames stored in an ImageSeries. The purpose @@ -294,20 +417,15 @@ classes: name: data description: Index of the image (using zero-indexing) in the linked Images object. - array: - dimensions: - - alias: num_times - range: uint32 + range: IndexSeries__data required: true - multivalued: false + inlined: true indexed_timeseries: name: indexed_timeseries annotations: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: ImageSeries @@ -318,10 +436,62 @@ classes: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: Images - range: string tree_root: true + IndexSeries__data: + name: IndexSeries__data + description: Index of the image (using zero-indexing) in the linked Images object. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + conversion: + name: conversion + description: This field is unused by IndexSeries. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: This field is unused by IndexSeries. + range: float32 + required: false + resolution: + name: resolution + description: This field is unused by IndexSeries. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: This field is unused by IndexSeries and has the value N/A. + ifabsent: string(N/A) + range: text + required: true + equals_string: N/A + value: + name: value + array: + dimensions: + - alias: num_times + range: uint32 diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.misc.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.misc.yaml index 5bfeb44..8cb7a86 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.misc.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.misc.yaml @@ -38,7 +38,6 @@ classes: description: Values of each feature at each time. range: AbstractFeatureSeries__data required: true - multivalued: false inlined: true feature_units: name: feature_units @@ -70,6 +69,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Since there can be different units for different features, store @@ -105,13 +149,79 @@ classes: data: name: data description: Annotations made during an experiment. + range: AnnotationSeries__data + required: true + inlined: true + tree_root: true + AnnotationSeries__data: + name: AnnotationSeries__data + description: Annotations made during an experiment. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data. Annotations + have no units, so the value is fixed to -1.0. + ifabsent: float(-1.0) + range: float32 + required: true + equals_number: -1 + unit: + name: unit + description: Base unit of measurement for working with the data. Annotations + have no units, so the value is fixed to 'n/a'. + ifabsent: string(n/a) + range: text + required: true + equals_string: n/a + value: + name: value array: dimensions: - alias: num_times range: text - required: true - multivalued: false - tree_root: true IntervalSeries: name: IntervalSeries description: Stores intervals of data. The timestamps field stores the beginning @@ -131,13 +241,79 @@ classes: data: name: data description: Use values >0 if interval started, <0 if interval ended. + range: IntervalSeries__data + required: true + inlined: true + tree_root: true + IntervalSeries__data: + name: IntervalSeries__data + description: Use values >0 if interval started, <0 if interval ended. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data. Annotations + have no units, so the value is fixed to -1.0. + ifabsent: float(-1.0) + range: float32 + required: true + equals_number: -1 + unit: + name: unit + description: Base unit of measurement for working with the data. Annotations + have no units, so the value is fixed to 'n/a'. + ifabsent: string(n/a) + range: text + required: true + equals_string: n/a + value: + name: value array: dimensions: - alias: num_times range: int8 - required: true - multivalued: false - tree_root: true DecompositionSeries: name: DecompositionSeries description: Spectral analysis of a time series, e.g. of an LFP or a speech signal. @@ -153,14 +329,12 @@ classes: description: Data decomposed into frequency bands. range: DecompositionSeries__data required: true - multivalued: false inlined: true metric: name: metric description: The metric used, e.g. phase, amplitude, power. range: text required: true - multivalued: false source_channels: name: source_channels annotations: @@ -173,8 +347,6 @@ classes: description: DynamicTableRegion pointer to the channels that this decomposition series was generated from. range: DynamicTableRegion - required: false - multivalued: false inlined: true bands: name: bands @@ -182,7 +354,6 @@ classes: from. There should be one row in this table for each band. range: DecompositionSeries__bands required: true - multivalued: false inlined: true inlined_as_list: true source_timeseries: @@ -191,8 +362,6 @@ classes: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: TimeSeries @@ -209,6 +378,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. Actual stored @@ -289,63 +503,13 @@ classes: identifier: true range: string required: true - spike_times_index: - name: spike_times_index - annotations: - 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 - multivalued: false - inlined: true - spike_times: - name: spike_times - description: Spike times for each unit. - range: Units__spike_times - required: false - multivalued: false - inlined: true - obs_intervals_index: - name: obs_intervals_index - annotations: - 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 - multivalued: false - inlined: true - obs_intervals: - name: obs_intervals - description: Observation intervals for each unit. + electrode_group: + name: electrode_group + description: Electrode group that each spike unit came from. array: - dimensions: - - alias: num_intervals - - alias: start_end - exact_cardinality: 2 - range: float64 - required: false - multivalued: false - electrodes_index: - name: electrodes_index - annotations: - named: - tag: named - value: true - source_type: - tag: source_type - value: neurodata_type_inc - description: Index into electrodes. - range: VectorIndex + minimum_number_dimensions: 1 + maximum_number_dimensions: false + range: ElectrodeGroup required: false multivalued: false inlined: true @@ -360,51 +524,69 @@ classes: value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion - required: false - multivalued: false inlined: true - electrode_group: - name: electrode_group - description: Electrode group that each spike unit came from. + electrodes_index: + name: electrodes_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into electrodes. + range: VectorIndex + inlined: true + obs_intervals: + name: obs_intervals + description: Observation intervals for each unit. array: - minimum_number_dimensions: 1 - maximum_number_dimensions: false - range: ElectrodeGroup + dimensions: + - alias: num_intervals + - alias: start_end + exact_cardinality: 2 + range: float64 required: false multivalued: false + obs_intervals_index: + name: obs_intervals_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into the obs_intervals dataset. + range: VectorIndex + inlined: true + spike_times: + name: spike_times + description: Spike times for each unit. + range: Units__spike_times + inlined: true + spike_times_index: + name: spike_times_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into the spike_times dataset. + range: VectorIndex inlined: true waveform_mean: name: waveform_mean description: Spike waveform mean for each spike unit. - range: float32 - required: false - multivalued: false - any_of: - - array: - dimensions: - - alias: num_units - - alias: num_samples - - array: - dimensions: - - alias: num_units - - alias: num_samples - - alias: num_electrodes + range: Units__waveform_mean + inlined: true waveform_sd: name: waveform_sd description: Spike waveform standard deviation for each spike unit. - range: float32 - required: false - multivalued: false - any_of: - - array: - dimensions: - - alias: num_units - - alias: num_samples - - array: - dimensions: - - alias: num_units - - alias: num_samples - - alias: num_electrodes + range: Units__waveform_sd + inlined: true waveforms: name: waveforms description: Individual waveforms for each spike on each electrode. This is @@ -430,13 +612,8 @@ classes: order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same. - array: - dimensions: - - alias: num_waveforms - - alias: num_samples - range: numeric - required: false - multivalued: false + range: Units__waveforms + inlined: true waveforms_index: name: waveforms_index annotations: @@ -449,8 +626,6 @@ classes: description: Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail. range: VectorIndex - required: false - multivalued: false inlined: true waveforms_index_index: name: waveforms_index_index @@ -464,8 +639,6 @@ classes: description: Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail. range: VectorIndex - required: false - multivalued: false inlined: true tree_root: true Units__spike_times: @@ -489,3 +662,97 @@ classes: for the spike time to be between samples. range: float64 required: false + Units__waveform_mean: + name: Units__waveform_mean + description: Spike waveform mean for each spike unit. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveform_mean) + identifier: true + range: string + required: true + equals_string: waveform_mean + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts + Units__waveform_sd: + name: Units__waveform_sd + description: Spike waveform standard deviation for each spike unit. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveform_sd) + identifier: true + range: string + required: true + equals_string: waveform_sd + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts + Units__waveforms: + name: Units__waveforms + description: Individual waveforms for each spike on each electrode. This is a + doubly indexed column. The 'waveforms_index' column indexes which waveforms + in this column belong to the same spike event for a given unit, where each waveform + was recorded from a different electrode. The 'waveforms_index_index' column + indexes the 'waveforms_index' column to indicate which spike events belong to + a given unit. For example, if the 'waveforms_index_index' column has values + [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond + to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' + column correspond to the 3 spike events of the second unit, and the next 1 element + of the 'waveforms_index' column corresponds to the 1 spike event of the third + unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then + the first 3 elements of the 'waveforms' column contain the 3 spike waveforms + that were recorded from 3 different electrodes for the first spike time of the + first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays + for a graphical representation of this example. When there is only one electrode + for each unit (i.e., each spike time is associated with a single waveform), + then the 'waveforms_index' column will have values 1, 2, ..., N, where N is + the number of spike events. The number of electrodes for each spike event should + be the same within a given unit. The 'electrodes' column should be used to indicate + which electrodes are associated with each unit, and the order of the waveforms + within a given unit x spike event should be in the same order as the electrodes + referenced in the 'electrodes' column of this table. The number of samples for + each waveform must be the same. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveforms) + identifier: true + range: string + required: true + equals_string: waveforms + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.ogen.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.ogen.yaml index 8c6b076..99b02f7 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.ogen.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.ogen.yaml @@ -27,12 +27,9 @@ classes: data: name: data description: Applied power for optogenetic stimulus, in watts. - array: - dimensions: - - alias: num_times - range: numeric + range: OptogeneticSeries__data required: true - multivalued: false + inlined: true site: name: site annotations: @@ -40,12 +37,80 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: OptogeneticStimulusSite - range: string tree_root: true + OptogeneticSeries__data: + name: OptogeneticSeries__data + description: Applied power for optogenetic stimulus, in watts. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Unit of measurement for data, which is fixed to 'watts'. + ifabsent: string(watts) + range: text + required: true + equals_string: watts + value: + name: value + array: + dimensions: + - alias: num_times + range: numeric OptogeneticStimulusSite: name: OptogeneticStimulusSite description: A site of optogenetic stimulation. @@ -61,13 +126,11 @@ classes: description: Description of stimulation site. range: text required: true - multivalued: false excitation_lambda: name: excitation_lambda description: Excitation wavelength, in nm. range: float32 required: true - multivalued: false location: name: location description: Location of the stimulation site. Specify the area, layer, comments @@ -75,7 +138,6 @@ classes: standard atlas names for anatomical regions when possible. range: text required: true - multivalued: false device: name: device annotations: @@ -83,7 +145,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.ophys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.ophys.yaml index 17bb442..3658597 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.ophys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.ophys.yaml @@ -60,7 +60,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImagingPlane @@ -80,17 +79,9 @@ classes: data: name: data description: Signals from ROIs. - range: numeric + range: RoiResponseSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_times - - array: - dimensions: - - alias: num_times - - alias: num_rois + inlined: true rois: name: rois annotations: @@ -104,9 +95,82 @@ classes: on the ROIs stored in this timeseries. range: DynamicTableRegion required: true - multivalued: false inlined: true tree_root: true + RoiResponseSeries__data: + name: RoiResponseSeries__data + description: Signals from ROIs. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + continuity: + name: continuity + 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. + range: text + required: false + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_times + - array: + dimensions: + - alias: num_times + - alias: num_rois DfOverF: name: DfOverF description: dF/F information about a region of interest (ROI). Storage hierarchy @@ -182,6 +246,13 @@ classes: - alias: num_x - alias: num_y - alias: num_z + pixel_mask: + name: pixel_mask + description: 'Pixel masks for each ROI: a list of indices and weights for + the ROI. Pixel masks are concatenated and parsing of this dataset is maintained + by the PlaneSegmentation' + range: PlaneSegmentation__pixel_mask + inlined: true pixel_mask_index: name: pixel_mask_index annotations: @@ -193,17 +264,13 @@ classes: value: neurodata_type_inc description: Index into pixel_mask. range: VectorIndex - required: false - multivalued: false inlined: true - pixel_mask: - name: pixel_mask - description: 'Pixel masks for each ROI: a list of indices and weights for - the ROI. Pixel masks are concatenated and parsing of this dataset is maintained + voxel_mask: + name: voxel_mask + description: 'Voxel masks for each ROI: a list of indices and weights for + the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation' - range: PlaneSegmentation__pixel_mask - required: false - multivalued: false + range: PlaneSegmentation__voxel_mask inlined: true voxel_mask_index: name: voxel_mask_index @@ -216,17 +283,6 @@ classes: value: neurodata_type_inc description: Index into voxel_mask. range: VectorIndex - required: false - multivalued: false - inlined: true - voxel_mask: - name: voxel_mask - description: 'Voxel masks for each ROI: a list of indices and weights for - the ROI. Voxel masks are concatenated and parsing of this dataset is maintained - by the PlaneSegmentation' - range: PlaneSegmentation__voxel_mask - required: false - multivalued: false inlined: true reference_images: name: reference_images @@ -243,7 +299,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImagingPlane @@ -269,24 +324,18 @@ classes: array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false y: name: y description: Pixel y-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false weight: name: weight description: Weight of the pixel. array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false PlaneSegmentation__voxel_mask: name: PlaneSegmentation__voxel_mask description: 'Voxel masks for each ROI: a list of indices and weights for the @@ -307,32 +356,24 @@ classes: array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false y: name: y description: Voxel y-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false z: name: z description: Voxel z-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false weight: name: weight description: Weight of the voxel. array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false ImagingPlane: name: ImagingPlane description: An imaging plane and its metadata. @@ -347,27 +388,21 @@ classes: 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 @@ -375,15 +410,12 @@ classes: 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 inlined: true origin_coords: name: origin_coords @@ -391,8 +423,6 @@ classes: 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 inlined: true grid_spacing: name: grid_spacing @@ -400,8 +430,6 @@ classes: 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 inlined: true reference_frame: name: reference_frame @@ -423,8 +451,6 @@ classes: 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. @@ -440,7 +466,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -573,13 +598,11 @@ classes: 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 tree_root: true MotionCorrection: name: MotionCorrection @@ -610,7 +633,6 @@ classes: description: Image stack with frames shifted to the common coordinates. range: ImageSeries required: true - multivalued: false inlined: true inlined_as_list: false xy_translation: @@ -619,7 +641,6 @@ classes: coordinates, for example, to align each frame to a reference image. range: TimeSeries required: true - multivalued: false inlined: true inlined_as_list: false original: @@ -629,7 +650,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImageSeries diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.retinotopy.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.retinotopy.yaml index 26b6ed6..d3d25ee 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.retinotopy.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_5_0/core.nwb.retinotopy.yaml @@ -37,30 +37,24 @@ classes: description: Phase response to stimulus on the first measured axis. range: ImagingRetinotopy__axis_1_phase_map required: true - multivalued: false inlined: true axis_1_power_map: name: axis_1_power_map 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: ImagingRetinotopy__axis_1_power_map - required: false - multivalued: false inlined: true axis_2_phase_map: name: axis_2_phase_map description: Phase response to stimulus on the second measured axis. range: ImagingRetinotopy__axis_2_phase_map required: true - multivalued: false inlined: true axis_2_power_map: name: axis_2_power_map description: Power response on the second measured axis. Response is scaled so 0.0 is no power in the response and 1.0 is maximum relative power. range: ImagingRetinotopy__axis_2_power_map - required: false - multivalued: false inlined: true axis_descriptions: name: axis_descriptions @@ -79,16 +73,12 @@ classes: description: 'Gray-scale image taken with same settings/parameters (e.g., focal depth, wavelength) as data collection. Array format: [rows][columns].' range: ImagingRetinotopy__focal_depth_image - required: false - multivalued: false inlined: true sign_map: name: sign_map description: Sine of the angle between the direction of the gradient in axis_1 and axis_2. range: ImagingRetinotopy__sign_map - required: false - multivalued: false inlined: true vasculature_image: name: vasculature_image @@ -96,7 +86,6 @@ classes: [rows][columns]' range: ImagingRetinotopy__vasculature_image required: true - multivalued: false inlined: true tree_root: true ImagingRetinotopy__axis_1_phase_map: diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.base.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.base.yaml index 9aeec32..f7f96c9 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.base.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.base.yaml @@ -47,7 +47,6 @@ classes: exact_number_dimensions: 1 range: int32 required: true - multivalued: false count: name: count description: Number of data samples available in this time series, during @@ -56,7 +55,6 @@ classes: exact_number_dimensions: 1 range: int32 required: true - multivalued: false timeseries: name: timeseries description: The TimeSeries that this index applies to @@ -64,7 +62,6 @@ classes: exact_number_dimensions: 1 range: TimeSeries required: true - multivalued: false inlined: true tree_root: true Image: @@ -189,7 +186,6 @@ classes: external file. range: TimeSeries__data required: true - multivalued: false inlined: true starting_time: name: starting_time @@ -197,8 +193,6 @@ classes: uniformly spaced, the timestamp of the first sample can be specified and all subsequent ones calculated from the sampling rate attribute. range: TimeSeries__starting_time - required: false - multivalued: false inlined: true timestamps: name: timestamps @@ -241,8 +235,6 @@ classes: external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes. range: TimeSeries__sync - required: false - multivalued: false inlined: true inlined_as_list: true tree_root: true @@ -429,7 +421,5 @@ classes: and only once, so the dataset should have the same length as the number of images. range: ImageReferences - required: false - multivalued: false inlined: true tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.behavior.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.behavior.yaml index 9d96389..47c9e78 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.behavior.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.behavior.yaml @@ -38,14 +38,11 @@ classes: reference frame. range: SpatialSeries__data required: true - multivalued: false inlined: true reference_frame: name: reference_frame description: Description defining what exactly 'straight-ahead' means. range: text - required: false - multivalued: false tree_root: true SpatialSeries__data: name: SpatialSeries__data @@ -59,6 +56,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. The default diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.ecephys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.ecephys.yaml index 6fba341..2434030 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.ecephys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.ecephys.yaml @@ -39,40 +39,6 @@ classes: about the filter properties as possible. range: text required: false - data: - name: data - description: Recorded voltage data. - range: numeric - required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_times - - array: - dimensions: - - alias: num_times - - alias: num_channels - - array: - dimensions: - - alias: num_times - - alias: num_channels - - alias: num_samples - electrodes: - name: electrodes - annotations: - 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 - required: true - multivalued: false - inlined: true channel_conversion: name: channel_conversion description: Channel-specific conversion factor. Multiply the data in the @@ -90,7 +56,109 @@ classes: range: float32 required: false multivalued: false + data: + name: data + description: Recorded voltage data. + range: ElectricalSeries__data + required: true + inlined: true + electrodes: + name: electrodes + annotations: + 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 + required: true + inlined: true tree_root: true + ElectricalSeries__data: + name: ElectricalSeries__data + description: Recorded voltage data. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Base unit of measurement for working with the data. This value + is fixed to 'volts'. Actual stored values are not necessarily stored in + these units. To access the data in these units, multiply 'data' by 'conversion', + followed by 'channel_conversion' (if present), and then add 'offset'. + ifabsent: string(volts) + range: text + required: true + equals_string: volts + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_times + - array: + dimensions: + - alias: num_times + - alias: num_channels + - array: + dimensions: + - alias: num_times + - alias: num_channels + - alias: num_samples SpikeEventSeries: name: SpikeEventSeries description: 'Stores snapshots/snippets of recorded spike events (i.e., threshold @@ -111,19 +179,9 @@ classes: data: name: data description: Spike waveforms. - range: numeric + range: SpikeEventSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_events - - alias: num_samples - - array: - dimensions: - - alias: num_events - - alias: num_channels - - alias: num_samples + inlined: true timestamps: name: timestamps description: Timestamps for samples stored in data, in seconds, relative to @@ -137,6 +195,82 @@ classes: required: true multivalued: false tree_root: true + SpikeEventSeries__data: + name: SpikeEventSeries__data + description: Spike waveforms. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Unit of measurement for waveforms, which is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: true + equals_string: volts + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_events + - alias: num_samples + - array: + dimensions: + - alias: num_events + - alias: num_channels + - alias: num_samples FeatureExtraction: name: FeatureExtraction description: Features, such as PC1 and PC2, that are extracted from signals stored @@ -192,7 +326,6 @@ classes: was generated from. range: DynamicTableRegion required: true - multivalued: false inlined: true tree_root: true EventDetection: @@ -212,7 +345,6 @@ classes: or dV/dT threshold, as well as relevant values. range: text required: true - multivalued: false source_idx: name: source_idx description: Indices (zero-based) into source ElectricalSeries::data array @@ -241,7 +373,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ElectricalSeries @@ -323,8 +454,6 @@ classes: name: position description: stereotaxic or common framework coordinates range: ElectrodeGroup__position - required: false - multivalued: false inlined: true device: name: device @@ -333,7 +462,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -356,24 +484,18 @@ classes: array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false y: name: y description: y coordinate array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false z: name: z description: z coordinate array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false ClusterWaveforms: name: ClusterWaveforms description: DEPRECATED The mean waveform shape, including standard deviation, @@ -395,7 +517,6 @@ classes: description: Filtering applied to data before generating mean/sd range: text required: true - multivalued: false waveform_mean: name: waveform_mean description: The mean waveform for each cluster, using the same indices for @@ -427,7 +548,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Clustering @@ -451,7 +571,6 @@ classes: clusters curated using Klusters, etc) range: text required: true - multivalued: false num: name: num description: Cluster number of each event diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.epoch.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.epoch.yaml index 0a9685b..cbe9de3 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.epoch.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.epoch.yaml @@ -63,8 +63,6 @@ classes: value: neurodata_type_inc description: Index for tags. range: VectorIndex - required: false - multivalued: false inlined: true timeseries: name: timeseries @@ -77,8 +75,6 @@ classes: value: neurodata_type_inc description: An index into a TimeSeries object. range: TimeSeriesReferenceVectorData - required: false - multivalued: false inlined: true timeseries_index: name: timeseries_index @@ -91,7 +87,5 @@ classes: value: neurodata_type_inc description: Index for timeseries. range: VectorIndex - required: false - multivalued: false inlined: true tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.file.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.file.yaml index 481256f..1a0cf34 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.file.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.file.yaml @@ -81,13 +81,11 @@ classes: other files. range: text required: true - multivalued: false session_description: name: session_description description: A description of the experimental session and data in the file. range: text required: true - multivalued: false session_start_time: name: session_start_time description: 'Date and time of the experiment/session start. The date is stored @@ -96,7 +94,6 @@ classes: offset. Date accuracy is up to milliseconds.' range: isodatetime required: true - multivalued: false timestamps_reference_time: name: timestamps_reference_time description: 'Date and time corresponding to time zero of all timestamps. @@ -106,7 +103,6 @@ classes: times stored in the file use this time as reference (i.e., time zero).' range: isodatetime required: true - multivalued: false acquisition: name: acquisition description: Data streams recorded from the system, including ephys, ophys, @@ -185,7 +181,6 @@ classes: can exist in the present file or can be linked to a remote library file. range: NWBFile__stimulus required: true - multivalued: false inlined: true inlined_as_list: true general: @@ -207,7 +202,6 @@ classes: should not be created unless there is data to store within them. range: NWBFile__general required: true - multivalued: false inlined: true inlined_as_list: true intervals: @@ -217,16 +211,12 @@ classes: an experiment, or epochs (see epochs subgroup) deriving from analysis of data. range: NWBFile__intervals - required: false - multivalued: false inlined: true inlined_as_list: true units: name: units description: Data about sorted spike units. range: Units - required: false - multivalued: false inlined: true inlined_as_list: false tree_root: true @@ -300,14 +290,10 @@ classes: name: data_collection description: Notes about data collection and analysis. range: text - required: false - multivalued: false experiment_description: name: experiment_description description: General description of the experiment. range: text - required: false - multivalued: false experimenter: name: experimenter description: Name of person(s) who performed the experiment. Can also specify @@ -322,8 +308,6 @@ classes: name: institution description: Institution(s) where experiment was performed. range: text - required: false - multivalued: false keywords: name: keywords description: Terms to search over. @@ -337,28 +321,20 @@ classes: name: lab description: Laboratory where experiment was performed. range: text - required: false - multivalued: false notes: name: notes description: Notes about the experiment. range: text - required: false - multivalued: false pharmacology: name: pharmacology description: Description of drugs used, including how and when they were administered. Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc. range: text - required: false - multivalued: false protocol: name: protocol description: Experimental protocol, if applicable. e.g., include IACUC protocol number. range: text - required: false - multivalued: false related_publications: name: related_publications description: Publication information. PMID, DOI, URL, etc. @@ -372,49 +348,36 @@ classes: name: session_id description: Lab-specific ID for the session. range: text - required: false - multivalued: false slices: name: slices description: Description of slices, including information about preparation thickness, orientation, temperature, and bath solution. range: text - required: false - multivalued: false source_script: name: source_script description: Script file or link to public source code used to create this NWB file. range: general__source_script - required: false - multivalued: false inlined: true stimulus: name: stimulus description: Notes about stimuli, such as how and where they were presented. range: text - required: false - multivalued: false surgery: name: surgery description: Narrative description about surgery/surgeries, including date(s) and who performed surgery. range: text - required: false - multivalued: false virus: name: virus description: Information about virus(es) used in experiments, including virus ID, source, date made, injection location, volume, etc. range: text - required: false - multivalued: false lab_meta_data: name: lab_meta_data description: Place-holder than can be extended so that lab-specific meta-data can be placed in /general. range: LabMetaData - required: false multivalued: true inlined: true inlined_as_list: false @@ -432,24 +395,18 @@ classes: description: Information about the animal or person from which the data was measured. range: Subject - required: false - multivalued: false inlined: true inlined_as_list: false extracellular_ephys: name: extracellular_ephys description: Metadata related to extracellular electrophysiology. range: general__extracellular_ephys - required: false - multivalued: false inlined: true inlined_as_list: true intracellular_ephys: name: intracellular_ephys description: Metadata related to intracellular electrophysiology. range: general__intracellular_ephys - required: false - multivalued: false inlined: true inlined_as_list: true optogenetics: @@ -504,7 +461,6 @@ classes: name: electrode_group description: Physical group of electrodes. range: ElectrodeGroup - required: false multivalued: true inlined: true inlined_as_list: false @@ -512,8 +468,6 @@ classes: name: electrodes description: A table of all electrodes (i.e. channels) used for recording. range: extracellular_ephys__electrodes - required: false - multivalued: false inlined: true inlined_as_list: true extracellular_ephys__electrodes: @@ -660,13 +614,10 @@ classes: etc. If this changes between TimeSeries, filter description should be stored as a text attribute for each TimeSeries.' range: text - required: false - multivalued: false intracellular_electrode: name: intracellular_electrode description: An intracellular electrode. range: IntracellularElectrode - required: false multivalued: true inlined: true inlined_as_list: false @@ -677,8 +628,6 @@ classes: tabels. Additional SequentialRecordingsTable, RepetitionsTable and ExperimentalConditions tables provide enhanced support for experiment metadata.' range: SweepTable - required: false - multivalued: false inlined: true inlined_as_list: false intracellular_recordings: @@ -696,8 +645,6 @@ classes: to an electrode is also common in intracellular electrophysiology, in which case other TimeSeries may be used. range: IntracellularRecordingsTable - required: false - multivalued: false inlined: true inlined_as_list: false simultaneous_recordings: @@ -706,8 +653,6 @@ classes: the IntracellularRecordingsTable table together that were recorded simultaneously from different electrodes range: SimultaneousRecordingsTable - required: false - multivalued: false inlined: true inlined_as_list: false sequential_recordings: @@ -717,8 +662,6 @@ classes: together sequential recordings where the a sequence of stimuli of the same type with varying parameters have been presented in a sequence. range: SequentialRecordingsTable - required: false - multivalued: false inlined: true inlined_as_list: false repetitions: @@ -728,8 +671,6 @@ classes: type of stimulus, the RepetitionsTable table is typically used to group sets of stimuli applied in sequence. range: RepetitionsTable - required: false - multivalued: false inlined: true inlined_as_list: false experimental_conditions: @@ -737,8 +678,6 @@ classes: description: A table for grouping different intracellular recording repetitions together that belong to the same experimental experimental_conditions. range: ExperimentalConditionsTable - required: false - multivalued: false inlined: true inlined_as_list: false NWBFile__intervals: @@ -759,24 +698,18 @@ classes: description: Divisions in time marking experimental stages or sub-divisions of a single recording session. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false trials: name: trials description: Repeated experimental events that have a logical grouping. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false invalid_times: name: invalid_times description: Time intervals that should be removed from analysis. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false time_intervals: @@ -784,7 +717,6 @@ classes: description: Optional additional table(s) for describing other experimental time intervals. range: TimeIntervals - required: false multivalued: true inlined: true inlined_as_list: false @@ -813,59 +745,41 @@ classes: name: age description: Age of subject. Can be supplied instead of 'date_of_birth'. range: Subject__age - required: false - multivalued: false inlined: true date_of_birth: name: date_of_birth description: Date of birth of subject. Can be supplied instead of 'age'. range: isodatetime - required: false - multivalued: false description: name: description description: Description of subject and where subject came from (e.g., breeder, if animal). range: text - required: false - multivalued: false genotype: name: genotype description: Genetic strain. If absent, assume Wild Type (WT). range: text - required: false - multivalued: false sex: name: sex description: Gender of subject. range: text - required: false - multivalued: false species: name: species description: Species of subject. range: text - required: false - multivalued: false strain: name: strain description: Strain of subject. range: text - required: false - multivalued: false subject_id: name: subject_id description: ID of animal/person used/participating in experiment (lab convention). range: text - required: false - multivalued: false weight: name: weight description: Weight at time of experiment, at time of surgery and at other important times. range: text - required: false - multivalued: false tree_root: true Subject__age: name: Subject__age diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.icephys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.icephys.yaml index 140e8c8..95b2598 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.icephys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.icephys.yaml @@ -41,15 +41,12 @@ classes: description: Recorded voltage or current. range: PatchClampSeries__data required: true - multivalued: false inlined: true gain: name: gain description: Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp). range: float32 - required: false - multivalued: false electrode: name: electrode annotations: @@ -57,7 +54,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: IntracellularElectrode @@ -74,6 +70,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. Actual stored @@ -99,31 +140,24 @@ classes: identifier: true range: string required: true + bias_current: + name: bias_current + description: Bias current, in amps. + range: float32 + bridge_balance: + name: bridge_balance + description: Bridge balance, in ohms. + range: float32 + capacitance_compensation: + name: capacitance_compensation + description: Capacitance compensation, in farads. + range: float32 data: name: data description: Recorded voltage. range: CurrentClampSeries__data required: true - multivalued: false inlined: true - bias_current: - name: bias_current - description: Bias current, in amps. - range: float32 - required: false - multivalued: false - bridge_balance: - name: bridge_balance - description: Bridge balance, in ohms. - range: float32 - required: false - multivalued: false - capacitance_compensation: - name: capacitance_compensation - description: Capacitance compensation, in farads. - range: float32 - required: false - multivalued: false tree_root: true CurrentClampSeries__data: name: CurrentClampSeries__data @@ -136,6 +170,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -148,8 +227,10 @@ classes: equals_string: volts value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric IZeroClampSeries: name: IZeroClampSeries description: Voltage data from an intracellular recording when all current and @@ -176,19 +257,16 @@ classes: description: Bias current, in amps, fixed to 0.0. range: float32 required: true - multivalued: false bridge_balance: name: bridge_balance description: Bridge balance, in ohms, fixed to 0.0. range: float32 required: true - multivalued: false capacitance_compensation: name: capacitance_compensation description: Capacitance compensation, in farads, fixed to 0.0. range: float32 required: true - multivalued: false tree_root: true CurrentClampStimulusSeries: name: CurrentClampStimulusSeries @@ -205,7 +283,6 @@ classes: description: Stimulus current applied. range: CurrentClampStimulusSeries__data required: true - multivalued: false inlined: true tree_root: true CurrentClampStimulusSeries__data: @@ -219,6 +296,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -231,8 +353,10 @@ classes: equals_string: amperes value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric VoltageClampSeries: name: VoltageClampSeries description: Current data from an intracellular voltage-clamp recording. A corresponding @@ -245,88 +369,48 @@ classes: identifier: true range: string required: true - data: - name: data - description: Recorded current. - range: VoltageClampSeries__data - required: true - multivalued: false - inlined: true capacitance_fast: name: capacitance_fast description: Fast capacitance, in farads. range: VoltageClampSeries__capacitance_fast - required: false - multivalued: false inlined: true capacitance_slow: name: capacitance_slow description: Slow capacitance, in farads. range: VoltageClampSeries__capacitance_slow - required: false - multivalued: false + inlined: true + data: + name: data + description: Recorded current. + range: VoltageClampSeries__data + required: true inlined: true resistance_comp_bandwidth: name: resistance_comp_bandwidth description: Resistance compensation bandwidth, in hertz. range: VoltageClampSeries__resistance_comp_bandwidth - required: false - multivalued: false inlined: true resistance_comp_correction: name: resistance_comp_correction description: Resistance compensation correction, in percent. range: VoltageClampSeries__resistance_comp_correction - required: false - multivalued: false inlined: true resistance_comp_prediction: name: resistance_comp_prediction description: Resistance compensation prediction, in percent. range: VoltageClampSeries__resistance_comp_prediction - required: false - multivalued: false inlined: true whole_cell_capacitance_comp: name: whole_cell_capacitance_comp description: Whole cell capacitance compensation, in farads. range: VoltageClampSeries__whole_cell_capacitance_comp - required: false - multivalued: false inlined: true whole_cell_series_resistance_comp: name: whole_cell_series_resistance_comp description: Whole cell series resistance compensation, in ohms. range: VoltageClampSeries__whole_cell_series_resistance_comp - required: false - multivalued: false inlined: true tree_root: true - VoltageClampSeries__data: - name: VoltageClampSeries__data - description: Recorded current. - attributes: - name: - name: name - ifabsent: string(data) - identifier: true - range: string - required: true - equals_string: data - unit: - name: unit - description: Base unit of measurement for working with the data. which is - fixed to 'amperes'. Actual stored values are not necessarily stored in these - units. To access the data in these units, multiply 'data' by 'conversion' - and add 'offset'. - ifabsent: string(amperes) - range: text - required: true - equals_string: amperes - value: - name: value - range: AnyType - required: true VoltageClampSeries__capacitance_fast: name: VoltageClampSeries__capacitance_fast description: Fast capacitance, in farads. @@ -371,6 +455,78 @@ classes: name: value range: float32 required: true + VoltageClampSeries__data: + name: VoltageClampSeries__data + description: Recorded current. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Base unit of measurement for working with the data. which is + fixed to 'amperes'. Actual stored values are not necessarily stored in these + units. To access the data in these units, multiply 'data' by 'conversion' + and add 'offset'. + ifabsent: string(amperes) + range: text + required: true + equals_string: amperes + value: + name: value + array: + dimensions: + - alias: num_times + range: numeric VoltageClampSeries__resistance_comp_bandwidth: name: VoltageClampSeries__resistance_comp_bandwidth description: Resistance compensation bandwidth, in hertz. @@ -501,7 +657,6 @@ classes: description: Stimulus voltage applied. range: VoltageClampStimulusSeries__data required: true - multivalued: false inlined: true tree_root: true VoltageClampStimulusSeries__data: @@ -515,6 +670,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -527,8 +727,10 @@ classes: equals_string: volts value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric IntracellularElectrode: name: IntracellularElectrode description: An intracellular electrode and its metadata. @@ -543,52 +745,37 @@ classes: name: cell_id description: unique ID of the cell range: text - required: false - multivalued: false description: name: description description: Description of electrode (e.g., whole-cell, sharp, etc.). range: text required: true - multivalued: false filtering: name: filtering description: Electrode specific filtering. range: text - required: false - multivalued: false initial_access_resistance: name: initial_access_resistance description: Initial access resistance. range: text - required: false - multivalued: false location: name: location description: Location of the electrode. 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: false - multivalued: false resistance: name: resistance description: Electrode resistance, in ohms. range: text - required: false - multivalued: false seal: name: seal description: Information about seal used for recording. range: text - required: false - multivalued: false slice: name: slice description: Information about slice used for recording. range: text - required: false - multivalued: false device: name: device annotations: @@ -596,7 +783,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -615,15 +801,6 @@ classes: identifier: true range: string required: true - sweep_number: - name: sweep_number - description: Sweep number of the PatchClampSeries in that row. - array: - minimum_number_dimensions: 1 - maximum_number_dimensions: false - range: uint32 - required: true - multivalued: false series: name: series description: The PatchClampSeries with the sweep number in that row. @@ -646,8 +823,16 @@ classes: description: Index for series. range: VectorIndex required: true - multivalued: false inlined: true + sweep_number: + name: sweep_number + description: Sweep number of the PatchClampSeries in that row. + array: + minimum_number_dimensions: 1 + maximum_number_dimensions: false + range: uint32 + required: true + multivalued: false tree_root: true IntracellularElectrodesTable: name: IntracellularElectrodesTable @@ -707,7 +892,6 @@ classes: recording (rows). range: TimeSeriesReferenceVectorData required: true - multivalued: false inlined: true tree_root: true IntracellularResponsesTable: @@ -740,7 +924,6 @@ classes: recording (rows) range: TimeSeriesReferenceVectorData required: true - multivalued: false inlined: true tree_root: true IntracellularRecordingsTable: @@ -782,15 +965,6 @@ classes: description: Table for storing intracellular electrode related metadata. range: IntracellularElectrodesTable required: true - multivalued: false - inlined: true - inlined_as_list: false - stimuli: - name: stimuli - description: Table for storing intracellular stimulus related metadata. - range: IntracellularStimuliTable - required: true - multivalued: false inlined: true inlined_as_list: false responses: @@ -798,7 +972,13 @@ classes: description: Table for storing intracellular response related metadata. range: IntracellularResponsesTable required: true - multivalued: false + inlined: true + inlined_as_list: false + stimuli: + name: stimuli + description: Table for storing intracellular stimulus related metadata. + range: IntracellularStimuliTable + required: true inlined: true inlined_as_list: false tree_root: true @@ -822,7 +1002,6 @@ classes: table. range: SimultaneousRecordingsTable__recordings required: true - multivalued: false inlined: true recordings_index: name: recordings_index @@ -836,7 +1015,6 @@ classes: description: Index dataset for the recordings column. range: VectorIndex required: true - multivalued: false inlined: true tree_root: true SimultaneousRecordingsTable__recordings: @@ -881,7 +1059,6 @@ classes: table. range: SequentialRecordingsTable__simultaneous_recordings required: true - multivalued: false inlined: true simultaneous_recordings_index: name: simultaneous_recordings_index @@ -895,7 +1072,6 @@ classes: description: Index dataset for the simultaneous_recordings column. range: VectorIndex required: true - multivalued: false inlined: true stimulus_type: name: stimulus_type @@ -949,7 +1125,6 @@ classes: table. range: RepetitionsTable__sequential_recordings required: true - multivalued: false inlined: true sequential_recordings_index: name: sequential_recordings_index @@ -963,7 +1138,6 @@ classes: description: Index dataset for the sequential_recordings column. range: VectorIndex required: true - multivalued: false inlined: true tree_root: true RepetitionsTable__sequential_recordings: @@ -1005,7 +1179,6 @@ classes: description: A reference to one or more rows in the RepetitionsTable table. range: ExperimentalConditionsTable__repetitions required: true - multivalued: false inlined: true repetitions_index: name: repetitions_index @@ -1019,7 +1192,6 @@ classes: description: Index dataset for the repetitions column. range: VectorIndex required: true - multivalued: false inlined: true tree_root: true ExperimentalConditionsTable__repetitions: diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.image.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.image.yaml index 4406284..4da87da 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.image.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.image.yaml @@ -91,21 +91,9 @@ classes: name: data description: Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array. - range: numeric + range: ImageSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: frame - - alias: x - - alias: y - - array: - dimensions: - - alias: frame - - alias: x - - alias: y - - alias: z + inlined: true dimension: name: dimension description: Number of pixels on x, y, (and z) axes. @@ -123,8 +111,6 @@ classes: used if the image is stored in another NWB file and that file is linked to this file. range: ImageSeries__external_file - required: false - multivalued: false inlined: true format: name: format @@ -132,22 +118,98 @@ classes: 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. + ifabsent: string(raw) range: text - required: false - multivalued: false device: name: device annotations: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: Device - range: string tree_root: true + ImageSeries__data: + name: ImageSeries__data + description: Binary data representing images across frames. If data are stored + in an external file, this should be an empty 3D array. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + continuity: + name: continuity + 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. + range: text + required: false + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: frame + - alias: x + - alias: y + - array: + dimensions: + - alias: frame + - alias: x + - alias: y + - alias: z ImageSeries__external_file: name: ImageSeries__external_file description: Paths to one or more external file(s). The field is only present @@ -206,7 +268,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImageSeries @@ -226,12 +287,16 @@ classes: identifier: true range: string required: true + data: + name: data + description: Images presented to subject, either grayscale or RGB + range: OpticalSeries__data + required: true + inlined: true distance: name: distance description: Distance from camera/monitor to target/eye. range: float32 - required: false - multivalued: false field_of_view: name: field_of_view description: Width, height and depth of image, or imaged area, in meters. @@ -247,12 +312,78 @@ classes: dimensions: - alias: width_height_depth exact_cardinality: 3 - data: - name: data - description: Images presented to subject, either grayscale or RGB - range: numeric + orientation: + name: orientation + description: Description of image relative to some reference frame (e.g., + which way is up). Must also specify frame of reference. + range: text + tree_root: true + OpticalSeries__data: + name: OpticalSeries__data + description: Images presented to subject, either grayscale or RGB + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string required: true - multivalued: false + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + value: + name: value + range: numeric any_of: - array: dimensions: @@ -266,14 +397,6 @@ classes: - alias: y - alias: r_g_b exact_cardinality: 3 - orientation: - name: orientation - description: Description of image relative to some reference frame (e.g., - which way is up). Must also specify frame of reference. - range: text - required: false - multivalued: false - tree_root: true IndexSeries: name: IndexSeries description: Stores indices to image frames stored in an ImageSeries. The purpose @@ -294,20 +417,15 @@ classes: name: data description: Index of the image (using zero-indexing) in the linked Images object. - array: - dimensions: - - alias: num_times - range: uint32 + range: IndexSeries__data required: true - multivalued: false + inlined: true indexed_timeseries: name: indexed_timeseries annotations: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: ImageSeries @@ -318,10 +436,62 @@ classes: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: Images - range: string tree_root: true + IndexSeries__data: + name: IndexSeries__data + description: Index of the image (using zero-indexing) in the linked Images object. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + conversion: + name: conversion + description: This field is unused by IndexSeries. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: This field is unused by IndexSeries. + range: float32 + required: false + resolution: + name: resolution + description: This field is unused by IndexSeries. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: This field is unused by IndexSeries and has the value N/A. + ifabsent: string(N/A) + range: text + required: true + equals_string: N/A + value: + name: value + array: + dimensions: + - alias: num_times + range: uint32 diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.misc.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.misc.yaml index ced8985..021044b 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.misc.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.misc.yaml @@ -38,7 +38,6 @@ classes: description: Values of each feature at each time. range: AbstractFeatureSeries__data required: true - multivalued: false inlined: true feature_units: name: feature_units @@ -70,6 +69,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Since there can be different units for different features, store @@ -105,13 +149,79 @@ classes: data: name: data description: Annotations made during an experiment. + range: AnnotationSeries__data + required: true + inlined: true + tree_root: true + AnnotationSeries__data: + name: AnnotationSeries__data + description: Annotations made during an experiment. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data. Annotations + have no units, so the value is fixed to -1.0. + ifabsent: float(-1.0) + range: float32 + required: true + equals_number: -1 + unit: + name: unit + description: Base unit of measurement for working with the data. Annotations + have no units, so the value is fixed to 'n/a'. + ifabsent: string(n/a) + range: text + required: true + equals_string: n/a + value: + name: value array: dimensions: - alias: num_times range: text - required: true - multivalued: false - tree_root: true IntervalSeries: name: IntervalSeries description: Stores intervals of data. The timestamps field stores the beginning @@ -131,13 +241,79 @@ classes: data: name: data description: Use values >0 if interval started, <0 if interval ended. + range: IntervalSeries__data + required: true + inlined: true + tree_root: true + IntervalSeries__data: + name: IntervalSeries__data + description: Use values >0 if interval started, <0 if interval ended. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data. Annotations + have no units, so the value is fixed to -1.0. + ifabsent: float(-1.0) + range: float32 + required: true + equals_number: -1 + unit: + name: unit + description: Base unit of measurement for working with the data. Annotations + have no units, so the value is fixed to 'n/a'. + ifabsent: string(n/a) + range: text + required: true + equals_string: n/a + value: + name: value array: dimensions: - alias: num_times range: int8 - required: true - multivalued: false - tree_root: true DecompositionSeries: name: DecompositionSeries description: Spectral analysis of a time series, e.g. of an LFP or a speech signal. @@ -153,14 +329,12 @@ classes: description: Data decomposed into frequency bands. range: DecompositionSeries__data required: true - multivalued: false inlined: true metric: name: metric description: The metric used, e.g. phase, amplitude, power. range: text required: true - multivalued: false source_channels: name: source_channels annotations: @@ -173,8 +347,6 @@ classes: description: DynamicTableRegion pointer to the channels that this decomposition series was generated from. range: DynamicTableRegion - required: false - multivalued: false inlined: true bands: name: bands @@ -182,7 +354,6 @@ classes: from. There should be one row in this table for each band. range: DecompositionSeries__bands required: true - multivalued: false inlined: true inlined_as_list: true source_timeseries: @@ -191,8 +362,6 @@ classes: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: TimeSeries @@ -209,6 +378,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. Actual stored @@ -289,63 +503,13 @@ classes: identifier: true range: string required: true - spike_times_index: - name: spike_times_index - annotations: - 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 - multivalued: false - inlined: true - spike_times: - name: spike_times - description: Spike times for each unit in seconds. - range: Units__spike_times - required: false - multivalued: false - inlined: true - obs_intervals_index: - name: obs_intervals_index - annotations: - 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 - multivalued: false - inlined: true - obs_intervals: - name: obs_intervals - description: Observation intervals for each unit. + electrode_group: + name: electrode_group + description: Electrode group that each spike unit came from. array: - dimensions: - - alias: num_intervals - - alias: start_end - exact_cardinality: 2 - range: float64 - required: false - multivalued: false - electrodes_index: - name: electrodes_index - annotations: - named: - tag: named - value: true - source_type: - tag: source_type - value: neurodata_type_inc - description: Index into electrodes. - range: VectorIndex + minimum_number_dimensions: 1 + maximum_number_dimensions: false + range: ElectrodeGroup required: false multivalued: false inlined: true @@ -360,51 +524,69 @@ classes: value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion - required: false - multivalued: false inlined: true - electrode_group: - name: electrode_group - description: Electrode group that each spike unit came from. + electrodes_index: + name: electrodes_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into electrodes. + range: VectorIndex + inlined: true + obs_intervals: + name: obs_intervals + description: Observation intervals for each unit. array: - minimum_number_dimensions: 1 - maximum_number_dimensions: false - range: ElectrodeGroup + dimensions: + - alias: num_intervals + - alias: start_end + exact_cardinality: 2 + range: float64 required: false multivalued: false + obs_intervals_index: + name: obs_intervals_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into the obs_intervals dataset. + range: VectorIndex + inlined: true + spike_times: + name: spike_times + description: Spike times for each unit in seconds. + range: Units__spike_times + inlined: true + spike_times_index: + name: spike_times_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into the spike_times dataset. + range: VectorIndex inlined: true waveform_mean: name: waveform_mean description: Spike waveform mean for each spike unit. - range: float32 - required: false - multivalued: false - any_of: - - array: - dimensions: - - alias: num_units - - alias: num_samples - - array: - dimensions: - - alias: num_units - - alias: num_samples - - alias: num_electrodes + range: Units__waveform_mean + inlined: true waveform_sd: name: waveform_sd description: Spike waveform standard deviation for each spike unit. - range: float32 - required: false - multivalued: false - any_of: - - array: - dimensions: - - alias: num_units - - alias: num_samples - - array: - dimensions: - - alias: num_units - - alias: num_samples - - alias: num_electrodes + range: Units__waveform_sd + inlined: true waveforms: name: waveforms description: Individual waveforms for each spike on each electrode. This is @@ -430,13 +612,8 @@ classes: order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same. - array: - dimensions: - - alias: num_waveforms - - alias: num_samples - range: numeric - required: false - multivalued: false + range: Units__waveforms + inlined: true waveforms_index: name: waveforms_index annotations: @@ -449,8 +626,6 @@ classes: description: Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail. range: VectorIndex - required: false - multivalued: false inlined: true waveforms_index_index: name: waveforms_index_index @@ -464,8 +639,6 @@ classes: description: Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail. range: VectorIndex - required: false - multivalued: false inlined: true tree_root: true Units__spike_times: @@ -489,3 +662,97 @@ classes: for the spike time to be between samples. range: float64 required: false + Units__waveform_mean: + name: Units__waveform_mean + description: Spike waveform mean for each spike unit. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveform_mean) + identifier: true + range: string + required: true + equals_string: waveform_mean + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts + Units__waveform_sd: + name: Units__waveform_sd + description: Spike waveform standard deviation for each spike unit. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveform_sd) + identifier: true + range: string + required: true + equals_string: waveform_sd + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts + Units__waveforms: + name: Units__waveforms + description: Individual waveforms for each spike on each electrode. This is a + doubly indexed column. The 'waveforms_index' column indexes which waveforms + in this column belong to the same spike event for a given unit, where each waveform + was recorded from a different electrode. The 'waveforms_index_index' column + indexes the 'waveforms_index' column to indicate which spike events belong to + a given unit. For example, if the 'waveforms_index_index' column has values + [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond + to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' + column correspond to the 3 spike events of the second unit, and the next 1 element + of the 'waveforms_index' column corresponds to the 1 spike event of the third + unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then + the first 3 elements of the 'waveforms' column contain the 3 spike waveforms + that were recorded from 3 different electrodes for the first spike time of the + first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays + for a graphical representation of this example. When there is only one electrode + for each unit (i.e., each spike time is associated with a single waveform), + then the 'waveforms_index' column will have values 1, 2, ..., N, where N is + the number of spike events. The number of electrodes for each spike event should + be the same within a given unit. The 'electrodes' column should be used to indicate + which electrodes are associated with each unit, and the order of the waveforms + within a given unit x spike event should be in the same order as the electrodes + referenced in the 'electrodes' column of this table. The number of samples for + each waveform must be the same. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveforms) + identifier: true + range: string + required: true + equals_string: waveforms + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.ogen.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.ogen.yaml index b485822..aa9b528 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.ogen.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.ogen.yaml @@ -27,12 +27,9 @@ classes: data: name: data description: Applied power for optogenetic stimulus, in watts. - array: - dimensions: - - alias: num_times - range: numeric + range: OptogeneticSeries__data required: true - multivalued: false + inlined: true site: name: site annotations: @@ -40,12 +37,80 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: OptogeneticStimulusSite - range: string tree_root: true + OptogeneticSeries__data: + name: OptogeneticSeries__data + description: Applied power for optogenetic stimulus, in watts. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Unit of measurement for data, which is fixed to 'watts'. + ifabsent: string(watts) + range: text + required: true + equals_string: watts + value: + name: value + array: + dimensions: + - alias: num_times + range: numeric OptogeneticStimulusSite: name: OptogeneticStimulusSite description: A site of optogenetic stimulation. @@ -61,13 +126,11 @@ classes: description: Description of stimulation site. range: text required: true - multivalued: false excitation_lambda: name: excitation_lambda description: Excitation wavelength, in nm. range: float32 required: true - multivalued: false location: name: location description: Location of the stimulation site. Specify the area, layer, comments @@ -75,7 +138,6 @@ classes: standard atlas names for anatomical regions when possible. range: text required: true - multivalued: false device: name: device annotations: @@ -83,7 +145,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.ophys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.ophys.yaml index 3da9ec5..9226935 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.ophys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.ophys.yaml @@ -26,11 +26,31 @@ classes: identifier: true range: string required: true + binning: + name: binning + description: Amount of pixels combined into 'bins'; could be 1, 2, 4, 8, etc. + range: uint8 + required: false + exposure_time: + name: exposure_time + description: Exposure time of the sample; often the inverse of the frequency. + range: float32 + required: false + intensity: + name: intensity + description: Intensity of the excitation in mW/mm^2, if known. + range: float32 + required: false pmt_gain: name: pmt_gain description: Photomultiplier gain. range: float32 required: false + power: + name: power + description: Power of the excitation in mW, if known. + range: float32 + required: false scan_line_rate: name: scan_line_rate description: Lines imaged per second. This is also stored in /general/optophysiology @@ -38,26 +58,6 @@ classes: be stored w/ the actual data. range: float32 required: false - exposure_time: - name: exposure_time - description: Exposure time of the sample; often the inverse of the frequency. - range: float32 - required: false - binning: - name: binning - description: Amount of pixels combined into 'bins'; could be 1, 2, 4, 8, etc. - range: uint8 - required: false - power: - name: power - description: Power of the excitation in mW, if known. - range: float32 - required: false - intensity: - name: intensity - description: Intensity of the excitation in mW/mm^2, if known. - range: float32 - required: false imaging_plane: name: imaging_plane annotations: @@ -65,7 +65,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImagingPlane @@ -115,7 +114,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImagingPlane @@ -135,17 +133,9 @@ classes: data: name: data description: Signals from ROIs. - range: numeric + range: RoiResponseSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_times - - array: - dimensions: - - alias: num_times - - alias: num_rois + inlined: true rois: name: rois annotations: @@ -159,9 +149,82 @@ classes: on the ROIs stored in this timeseries. range: DynamicTableRegion required: true - multivalued: false inlined: true tree_root: true + RoiResponseSeries__data: + name: RoiResponseSeries__data + description: Signals from ROIs. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + continuity: + name: continuity + 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. + range: text + required: false + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_times + - array: + dimensions: + - alias: num_times + - alias: num_rois DfOverF: name: DfOverF description: dF/F information about a region of interest (ROI). Storage hierarchy @@ -237,6 +300,13 @@ classes: - alias: num_x - alias: num_y - alias: num_z + pixel_mask: + name: pixel_mask + description: 'Pixel masks for each ROI: a list of indices and weights for + the ROI. Pixel masks are concatenated and parsing of this dataset is maintained + by the PlaneSegmentation' + range: PlaneSegmentation__pixel_mask + inlined: true pixel_mask_index: name: pixel_mask_index annotations: @@ -248,17 +318,13 @@ classes: value: neurodata_type_inc description: Index into pixel_mask. range: VectorIndex - required: false - multivalued: false inlined: true - pixel_mask: - name: pixel_mask - description: 'Pixel masks for each ROI: a list of indices and weights for - the ROI. Pixel masks are concatenated and parsing of this dataset is maintained + voxel_mask: + name: voxel_mask + description: 'Voxel masks for each ROI: a list of indices and weights for + the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation' - range: PlaneSegmentation__pixel_mask - required: false - multivalued: false + range: PlaneSegmentation__voxel_mask inlined: true voxel_mask_index: name: voxel_mask_index @@ -271,17 +337,6 @@ classes: value: neurodata_type_inc description: Index into voxel_mask. range: VectorIndex - required: false - multivalued: false - inlined: true - voxel_mask: - name: voxel_mask - description: 'Voxel masks for each ROI: a list of indices and weights for - the ROI. Voxel masks are concatenated and parsing of this dataset is maintained - by the PlaneSegmentation' - range: PlaneSegmentation__voxel_mask - required: false - multivalued: false inlined: true reference_images: name: reference_images @@ -298,7 +353,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImagingPlane @@ -324,24 +378,18 @@ classes: array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false y: name: y description: Pixel y-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false weight: name: weight description: Weight of the pixel. array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false PlaneSegmentation__voxel_mask: name: PlaneSegmentation__voxel_mask description: 'Voxel masks for each ROI: a list of indices and weights for the @@ -362,32 +410,24 @@ classes: array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false y: name: y description: Voxel y-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false z: name: z description: Voxel z-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false weight: name: weight description: Weight of the voxel. array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false ImagingPlane: name: ImagingPlane description: An imaging plane and its metadata. @@ -402,27 +442,21 @@ classes: 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 @@ -430,15 +464,12 @@ classes: 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 inlined: true origin_coords: name: origin_coords @@ -446,8 +477,6 @@ classes: 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 inlined: true grid_spacing: name: grid_spacing @@ -455,8 +484,6 @@ classes: 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 inlined: true reference_frame: name: reference_frame @@ -478,8 +505,6 @@ classes: 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. @@ -495,7 +520,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -628,13 +652,11 @@ classes: 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 tree_root: true MotionCorrection: name: MotionCorrection @@ -665,7 +687,6 @@ classes: description: Image stack with frames shifted to the common coordinates. range: ImageSeries required: true - multivalued: false inlined: true inlined_as_list: false xy_translation: @@ -674,7 +695,6 @@ classes: coordinates, for example, to align each frame to a reference image. range: TimeSeries required: true - multivalued: false inlined: true inlined_as_list: false original: @@ -684,7 +704,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImageSeries diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.retinotopy.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.retinotopy.yaml index c1fce82..33116cf 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.retinotopy.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_6_0_alpha/core.nwb.retinotopy.yaml @@ -37,30 +37,24 @@ classes: description: Phase response to stimulus on the first measured axis. range: ImagingRetinotopy__axis_1_phase_map required: true - multivalued: false inlined: true axis_1_power_map: name: axis_1_power_map 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: ImagingRetinotopy__axis_1_power_map - required: false - multivalued: false inlined: true axis_2_phase_map: name: axis_2_phase_map description: Phase response to stimulus on the second measured axis. range: ImagingRetinotopy__axis_2_phase_map required: true - multivalued: false inlined: true axis_2_power_map: name: axis_2_power_map description: Power response on the second measured axis. Response is scaled so 0.0 is no power in the response and 1.0 is maximum relative power. range: ImagingRetinotopy__axis_2_power_map - required: false - multivalued: false inlined: true axis_descriptions: name: axis_descriptions @@ -79,16 +73,12 @@ classes: description: 'Gray-scale image taken with same settings/parameters (e.g., focal depth, wavelength) as data collection. Array format: [rows][columns].' range: ImagingRetinotopy__focal_depth_image - required: false - multivalued: false inlined: true sign_map: name: sign_map description: Sine of the angle between the direction of the gradient in axis_1 and axis_2. range: ImagingRetinotopy__sign_map - required: false - multivalued: false inlined: true vasculature_image: name: vasculature_image @@ -96,7 +86,6 @@ classes: [rows][columns]' range: ImagingRetinotopy__vasculature_image required: true - multivalued: false inlined: true tree_root: true ImagingRetinotopy__axis_1_phase_map: diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.base.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.base.yaml index 7c3450a..ab0ec35 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.base.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.base.yaml @@ -47,7 +47,6 @@ classes: exact_number_dimensions: 1 range: int32 required: true - multivalued: false count: name: count description: Number of data samples available in this time series, during @@ -56,7 +55,6 @@ classes: exact_number_dimensions: 1 range: int32 required: true - multivalued: false timeseries: name: timeseries description: The TimeSeries that this index applies to @@ -64,7 +62,6 @@ classes: exact_number_dimensions: 1 range: TimeSeries required: true - multivalued: false inlined: true tree_root: true Image: @@ -189,7 +186,6 @@ classes: external file. range: TimeSeries__data required: true - multivalued: false inlined: true starting_time: name: starting_time @@ -197,8 +193,6 @@ classes: uniformly spaced, the timestamp of the first sample can be specified and all subsequent ones calculated from the sampling rate attribute. range: TimeSeries__starting_time - required: false - multivalued: false inlined: true timestamps: name: timestamps @@ -241,8 +235,6 @@ classes: external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes. range: TimeSeries__sync - required: false - multivalued: false inlined: true inlined_as_list: true tree_root: true @@ -429,7 +421,5 @@ classes: and only once, so the dataset should have the same length as the number of images. range: ImageReferences - required: false - multivalued: false inlined: true tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.behavior.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.behavior.yaml index 32ff4f8..5f2dc7d 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.behavior.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.behavior.yaml @@ -38,14 +38,11 @@ classes: reference frame. range: SpatialSeries__data required: true - multivalued: false inlined: true reference_frame: name: reference_frame description: Description defining what exactly 'straight-ahead' means. range: text - required: false - multivalued: false tree_root: true SpatialSeries__data: name: SpatialSeries__data @@ -59,6 +56,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. The default diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.ecephys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.ecephys.yaml index 71eadb4..db3213f 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.ecephys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.ecephys.yaml @@ -39,40 +39,6 @@ classes: about the filter properties as possible. range: text required: false - data: - name: data - description: Recorded voltage data. - range: numeric - required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_times - - array: - dimensions: - - alias: num_times - - alias: num_channels - - array: - dimensions: - - alias: num_times - - alias: num_channels - - alias: num_samples - electrodes: - name: electrodes - annotations: - 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 - required: true - multivalued: false - inlined: true channel_conversion: name: channel_conversion description: Channel-specific conversion factor. Multiply the data in the @@ -90,7 +56,109 @@ classes: range: float32 required: false multivalued: false + data: + name: data + description: Recorded voltage data. + range: ElectricalSeries__data + required: true + inlined: true + electrodes: + name: electrodes + annotations: + 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 + required: true + inlined: true tree_root: true + ElectricalSeries__data: + name: ElectricalSeries__data + description: Recorded voltage data. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Base unit of measurement for working with the data. This value + is fixed to 'volts'. Actual stored values are not necessarily stored in + these units. To access the data in these units, multiply 'data' by 'conversion', + followed by 'channel_conversion' (if present), and then add 'offset'. + ifabsent: string(volts) + range: text + required: true + equals_string: volts + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_times + - array: + dimensions: + - alias: num_times + - alias: num_channels + - array: + dimensions: + - alias: num_times + - alias: num_channels + - alias: num_samples SpikeEventSeries: name: SpikeEventSeries description: 'Stores snapshots/snippets of recorded spike events (i.e., threshold @@ -111,19 +179,9 @@ classes: data: name: data description: Spike waveforms. - range: numeric + range: SpikeEventSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_events - - alias: num_samples - - array: - dimensions: - - alias: num_events - - alias: num_channels - - alias: num_samples + inlined: true timestamps: name: timestamps description: Timestamps for samples stored in data, in seconds, relative to @@ -137,6 +195,82 @@ classes: required: true multivalued: false tree_root: true + SpikeEventSeries__data: + name: SpikeEventSeries__data + description: Spike waveforms. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Unit of measurement for waveforms, which is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: true + equals_string: volts + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_events + - alias: num_samples + - array: + dimensions: + - alias: num_events + - alias: num_channels + - alias: num_samples FeatureExtraction: name: FeatureExtraction description: Features, such as PC1 and PC2, that are extracted from signals stored @@ -192,7 +326,6 @@ classes: was generated from. range: DynamicTableRegion required: true - multivalued: false inlined: true tree_root: true EventDetection: @@ -212,7 +345,6 @@ classes: or dV/dT threshold, as well as relevant values. range: text required: true - multivalued: false source_idx: name: source_idx description: Indices (zero-based) into source ElectricalSeries::data array @@ -241,7 +373,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ElectricalSeries @@ -323,8 +454,6 @@ classes: name: position description: stereotaxic or common framework coordinates range: ElectrodeGroup__position - required: false - multivalued: false inlined: true device: name: device @@ -333,7 +462,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -356,24 +484,18 @@ classes: array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false y: name: y description: y coordinate array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false z: name: z description: z coordinate array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false ClusterWaveforms: name: ClusterWaveforms description: DEPRECATED The mean waveform shape, including standard deviation, @@ -395,7 +517,6 @@ classes: description: Filtering applied to data before generating mean/sd range: text required: true - multivalued: false waveform_mean: name: waveform_mean description: The mean waveform for each cluster, using the same indices for @@ -427,7 +548,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Clustering @@ -451,7 +571,6 @@ classes: clusters curated using Klusters, etc) range: text required: true - multivalued: false num: name: num description: Cluster number of each event diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.epoch.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.epoch.yaml index 471b87a..e556749 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.epoch.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.epoch.yaml @@ -63,8 +63,6 @@ classes: value: neurodata_type_inc description: Index for tags. range: VectorIndex - required: false - multivalued: false inlined: true timeseries: name: timeseries @@ -77,8 +75,6 @@ classes: value: neurodata_type_inc description: An index into a TimeSeries object. range: TimeSeriesReferenceVectorData - required: false - multivalued: false inlined: true timeseries_index: name: timeseries_index @@ -91,7 +87,5 @@ classes: value: neurodata_type_inc description: Index for timeseries. range: VectorIndex - required: false - multivalued: false inlined: true tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.file.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.file.yaml index a6b27f5..fcd10dc 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.file.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.file.yaml @@ -81,13 +81,11 @@ classes: other files. range: text required: true - multivalued: false session_description: name: session_description description: A description of the experimental session and data in the file. range: text required: true - multivalued: false session_start_time: name: session_start_time description: 'Date and time of the experiment/session start. The date is stored @@ -96,7 +94,6 @@ classes: offset. Date accuracy is up to milliseconds.' range: isodatetime required: true - multivalued: false timestamps_reference_time: name: timestamps_reference_time description: 'Date and time corresponding to time zero of all timestamps. @@ -106,7 +103,6 @@ classes: times stored in the file use this time as reference (i.e., time zero).' range: isodatetime required: true - multivalued: false acquisition: name: acquisition description: Data streams recorded from the system, including ephys, ophys, @@ -185,7 +181,6 @@ classes: can exist in the present file or can be linked to a remote library file. range: NWBFile__stimulus required: true - multivalued: false inlined: true inlined_as_list: true general: @@ -207,7 +202,6 @@ classes: should not be created unless there is data to store within them. range: NWBFile__general required: true - multivalued: false inlined: true inlined_as_list: true intervals: @@ -217,16 +211,12 @@ classes: an experiment, or epochs (see epochs subgroup) deriving from analysis of data. range: NWBFile__intervals - required: false - multivalued: false inlined: true inlined_as_list: true units: name: units description: Data about sorted spike units. range: Units - required: false - multivalued: false inlined: true inlined_as_list: false tree_root: true @@ -302,14 +292,10 @@ classes: name: data_collection description: Notes about data collection and analysis. range: text - required: false - multivalued: false experiment_description: name: experiment_description description: General description of the experiment. range: text - required: false - multivalued: false experimenter: name: experimenter description: Name of person(s) who performed the experiment. Can also specify @@ -324,8 +310,6 @@ classes: name: institution description: Institution(s) where experiment was performed. range: text - required: false - multivalued: false keywords: name: keywords description: Terms to search over. @@ -339,28 +323,20 @@ classes: name: lab description: Laboratory where experiment was performed. range: text - required: false - multivalued: false notes: name: notes description: Notes about the experiment. range: text - required: false - multivalued: false pharmacology: name: pharmacology description: Description of drugs used, including how and when they were administered. Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc. range: text - required: false - multivalued: false protocol: name: protocol description: Experimental protocol, if applicable. e.g., include IACUC protocol number. range: text - required: false - multivalued: false related_publications: name: related_publications description: Publication information. PMID, DOI, URL, etc. @@ -374,49 +350,36 @@ classes: name: session_id description: Lab-specific ID for the session. range: text - required: false - multivalued: false slices: name: slices description: Description of slices, including information about preparation thickness, orientation, temperature, and bath solution. range: text - required: false - multivalued: false source_script: name: source_script description: Script file or link to public source code used to create this NWB file. range: general__source_script - required: false - multivalued: false inlined: true stimulus: name: stimulus description: Notes about stimuli, such as how and where they were presented. range: text - required: false - multivalued: false surgery: name: surgery description: Narrative description about surgery/surgeries, including date(s) and who performed surgery. range: text - required: false - multivalued: false virus: name: virus description: Information about virus(es) used in experiments, including virus ID, source, date made, injection location, volume, etc. range: text - required: false - multivalued: false lab_meta_data: name: lab_meta_data description: Place-holder than can be extended so that lab-specific meta-data can be placed in /general. range: LabMetaData - required: false multivalued: true inlined: true inlined_as_list: false @@ -434,24 +397,18 @@ classes: description: Information about the animal or person from which the data was measured. range: Subject - required: false - multivalued: false inlined: true inlined_as_list: false extracellular_ephys: name: extracellular_ephys description: Metadata related to extracellular electrophysiology. range: general__extracellular_ephys - required: false - multivalued: false inlined: true inlined_as_list: true intracellular_ephys: name: intracellular_ephys description: Metadata related to intracellular electrophysiology. range: general__intracellular_ephys - required: false - multivalued: false inlined: true inlined_as_list: true optogenetics: @@ -506,7 +463,6 @@ classes: name: electrode_group description: Physical group of electrodes. range: ElectrodeGroup - required: false multivalued: true inlined: true inlined_as_list: false @@ -514,8 +470,6 @@ classes: name: electrodes description: A table of all electrodes (i.e. channels) used for recording. range: extracellular_ephys__electrodes - required: false - multivalued: false inlined: true inlined_as_list: true extracellular_ephys__electrodes: @@ -662,13 +616,10 @@ classes: etc. If this changes between TimeSeries, filter description should be stored as a text attribute for each TimeSeries.' range: text - required: false - multivalued: false intracellular_electrode: name: intracellular_electrode description: An intracellular electrode. range: IntracellularElectrode - required: false multivalued: true inlined: true inlined_as_list: false @@ -679,8 +630,6 @@ classes: tables. Additional SequentialRecordingsTable, RepetitionsTable and ExperimentalConditions tables provide enhanced support for experiment metadata.' range: SweepTable - required: false - multivalued: false inlined: true inlined_as_list: false intracellular_recordings: @@ -698,8 +647,6 @@ classes: to an electrode is also common in intracellular electrophysiology, in which case other TimeSeries may be used. range: IntracellularRecordingsTable - required: false - multivalued: false inlined: true inlined_as_list: false simultaneous_recordings: @@ -708,8 +655,6 @@ classes: the IntracellularRecordingsTable table together that were recorded simultaneously from different electrodes range: SimultaneousRecordingsTable - required: false - multivalued: false inlined: true inlined_as_list: false sequential_recordings: @@ -719,8 +664,6 @@ classes: together sequential recordings where the a sequence of stimuli of the same type with varying parameters have been presented in a sequence. range: SequentialRecordingsTable - required: false - multivalued: false inlined: true inlined_as_list: false repetitions: @@ -730,8 +673,6 @@ classes: type of stimulus, the RepetitionsTable table is typically used to group sets of stimuli applied in sequence. range: RepetitionsTable - required: false - multivalued: false inlined: true inlined_as_list: false experimental_conditions: @@ -739,8 +680,6 @@ classes: description: A table for grouping different intracellular recording repetitions together that belong to the same experimental experimental_conditions. range: ExperimentalConditionsTable - required: false - multivalued: false inlined: true inlined_as_list: false NWBFile__intervals: @@ -761,24 +700,18 @@ classes: description: Divisions in time marking experimental stages or sub-divisions of a single recording session. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false trials: name: trials description: Repeated experimental events that have a logical grouping. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false invalid_times: name: invalid_times description: Time intervals that should be removed from analysis. range: TimeIntervals - required: false - multivalued: false inlined: true inlined_as_list: false time_intervals: @@ -786,7 +719,6 @@ classes: description: Optional additional table(s) for describing other experimental time intervals. range: TimeIntervals - required: false multivalued: true inlined: true inlined_as_list: false @@ -815,59 +747,41 @@ classes: name: age description: Age of subject. Can be supplied instead of 'date_of_birth'. range: Subject__age - required: false - multivalued: false inlined: true date_of_birth: name: date_of_birth description: Date of birth of subject. Can be supplied instead of 'age'. range: isodatetime - required: false - multivalued: false description: name: description description: Description of subject and where subject came from (e.g., breeder, if animal). range: text - required: false - multivalued: false genotype: name: genotype description: Genetic strain. If absent, assume Wild Type (WT). range: text - required: false - multivalued: false sex: name: sex description: Gender of subject. range: text - required: false - multivalued: false species: name: species description: Species of subject. range: text - required: false - multivalued: false strain: name: strain description: Strain of subject. range: text - required: false - multivalued: false subject_id: name: subject_id description: ID of animal/person used/participating in experiment (lab convention). range: text - required: false - multivalued: false weight: name: weight description: Weight at time of experiment, at time of surgery and at other important times. range: text - required: false - multivalued: false tree_root: true Subject__age: name: Subject__age diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.icephys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.icephys.yaml index a8662e7..30fcb0c 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.icephys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.icephys.yaml @@ -41,15 +41,12 @@ classes: description: Recorded voltage or current. range: PatchClampSeries__data required: true - multivalued: false inlined: true gain: name: gain description: Gain of the recording, in units Volt/Amp (v-clamp) or Volt/Volt (c-clamp). range: float32 - required: false - multivalued: false electrode: name: electrode annotations: @@ -57,7 +54,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: IntracellularElectrode @@ -74,6 +70,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. Actual stored @@ -99,31 +140,24 @@ classes: identifier: true range: string required: true + bias_current: + name: bias_current + description: Bias current, in amps. + range: float32 + bridge_balance: + name: bridge_balance + description: Bridge balance, in ohms. + range: float32 + capacitance_compensation: + name: capacitance_compensation + description: Capacitance compensation, in farads. + range: float32 data: name: data description: Recorded voltage. range: CurrentClampSeries__data required: true - multivalued: false inlined: true - bias_current: - name: bias_current - description: Bias current, in amps. - range: float32 - required: false - multivalued: false - bridge_balance: - name: bridge_balance - description: Bridge balance, in ohms. - range: float32 - required: false - multivalued: false - capacitance_compensation: - name: capacitance_compensation - description: Capacitance compensation, in farads. - range: float32 - required: false - multivalued: false tree_root: true CurrentClampSeries__data: name: CurrentClampSeries__data @@ -136,6 +170,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -148,8 +227,10 @@ classes: equals_string: volts value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric IZeroClampSeries: name: IZeroClampSeries description: Voltage data from an intracellular recording when all current and @@ -176,19 +257,16 @@ classes: description: Bias current, in amps, fixed to 0.0. range: float32 required: true - multivalued: false bridge_balance: name: bridge_balance description: Bridge balance, in ohms, fixed to 0.0. range: float32 required: true - multivalued: false capacitance_compensation: name: capacitance_compensation description: Capacitance compensation, in farads, fixed to 0.0. range: float32 required: true - multivalued: false tree_root: true CurrentClampStimulusSeries: name: CurrentClampStimulusSeries @@ -205,7 +283,6 @@ classes: description: Stimulus current applied. range: CurrentClampStimulusSeries__data required: true - multivalued: false inlined: true tree_root: true CurrentClampStimulusSeries__data: @@ -219,6 +296,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -231,8 +353,10 @@ classes: equals_string: amperes value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric VoltageClampSeries: name: VoltageClampSeries description: Current data from an intracellular voltage-clamp recording. A corresponding @@ -245,88 +369,48 @@ classes: identifier: true range: string required: true - data: - name: data - description: Recorded current. - range: VoltageClampSeries__data - required: true - multivalued: false - inlined: true capacitance_fast: name: capacitance_fast description: Fast capacitance, in farads. range: VoltageClampSeries__capacitance_fast - required: false - multivalued: false inlined: true capacitance_slow: name: capacitance_slow description: Slow capacitance, in farads. range: VoltageClampSeries__capacitance_slow - required: false - multivalued: false + inlined: true + data: + name: data + description: Recorded current. + range: VoltageClampSeries__data + required: true inlined: true resistance_comp_bandwidth: name: resistance_comp_bandwidth description: Resistance compensation bandwidth, in hertz. range: VoltageClampSeries__resistance_comp_bandwidth - required: false - multivalued: false inlined: true resistance_comp_correction: name: resistance_comp_correction description: Resistance compensation correction, in percent. range: VoltageClampSeries__resistance_comp_correction - required: false - multivalued: false inlined: true resistance_comp_prediction: name: resistance_comp_prediction description: Resistance compensation prediction, in percent. range: VoltageClampSeries__resistance_comp_prediction - required: false - multivalued: false inlined: true whole_cell_capacitance_comp: name: whole_cell_capacitance_comp description: Whole cell capacitance compensation, in farads. range: VoltageClampSeries__whole_cell_capacitance_comp - required: false - multivalued: false inlined: true whole_cell_series_resistance_comp: name: whole_cell_series_resistance_comp description: Whole cell series resistance compensation, in ohms. range: VoltageClampSeries__whole_cell_series_resistance_comp - required: false - multivalued: false inlined: true tree_root: true - VoltageClampSeries__data: - name: VoltageClampSeries__data - description: Recorded current. - attributes: - name: - name: name - ifabsent: string(data) - identifier: true - range: string - required: true - equals_string: data - unit: - name: unit - description: Base unit of measurement for working with the data. which is - fixed to 'amperes'. Actual stored values are not necessarily stored in these - units. To access the data in these units, multiply 'data' by 'conversion' - and add 'offset'. - ifabsent: string(amperes) - range: text - required: true - equals_string: amperes - value: - name: value - range: AnyType - required: true VoltageClampSeries__capacitance_fast: name: VoltageClampSeries__capacitance_fast description: Fast capacitance, in farads. @@ -371,6 +455,78 @@ classes: name: value range: float32 required: true + VoltageClampSeries__data: + name: VoltageClampSeries__data + description: Recorded current. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Base unit of measurement for working with the data. which is + fixed to 'amperes'. Actual stored values are not necessarily stored in these + units. To access the data in these units, multiply 'data' by 'conversion' + and add 'offset'. + ifabsent: string(amperes) + range: text + required: true + equals_string: amperes + value: + name: value + array: + dimensions: + - alias: num_times + range: numeric VoltageClampSeries__resistance_comp_bandwidth: name: VoltageClampSeries__resistance_comp_bandwidth description: Resistance compensation bandwidth, in hertz. @@ -501,7 +657,6 @@ classes: description: Stimulus voltage applied. range: VoltageClampStimulusSeries__data required: true - multivalued: false inlined: true tree_root: true VoltageClampStimulusSeries__data: @@ -515,6 +670,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. which is @@ -527,8 +727,10 @@ classes: equals_string: volts value: name: value - range: AnyType - required: true + array: + dimensions: + - alias: num_times + range: numeric IntracellularElectrode: name: IntracellularElectrode description: An intracellular electrode and its metadata. @@ -543,52 +745,37 @@ classes: name: cell_id description: unique ID of the cell range: text - required: false - multivalued: false description: name: description description: Description of electrode (e.g., whole-cell, sharp, etc.). range: text required: true - multivalued: false filtering: name: filtering description: Electrode specific filtering. range: text - required: false - multivalued: false initial_access_resistance: name: initial_access_resistance description: Initial access resistance. range: text - required: false - multivalued: false location: name: location description: Location of the electrode. 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: false - multivalued: false resistance: name: resistance description: Electrode resistance, in ohms. range: text - required: false - multivalued: false seal: name: seal description: Information about seal used for recording. range: text - required: false - multivalued: false slice: name: slice description: Information about slice used for recording. range: text - required: false - multivalued: false device: name: device annotations: @@ -596,7 +783,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -615,15 +801,6 @@ classes: identifier: true range: string required: true - sweep_number: - name: sweep_number - description: Sweep number of the PatchClampSeries in that row. - array: - minimum_number_dimensions: 1 - maximum_number_dimensions: false - range: uint32 - required: true - multivalued: false series: name: series description: The PatchClampSeries with the sweep number in that row. @@ -646,8 +823,16 @@ classes: description: Index for series. range: VectorIndex required: true - multivalued: false inlined: true + sweep_number: + name: sweep_number + description: Sweep number of the PatchClampSeries in that row. + array: + minimum_number_dimensions: 1 + maximum_number_dimensions: false + range: uint32 + required: true + multivalued: false tree_root: true IntracellularElectrodesTable: name: IntracellularElectrodesTable @@ -707,7 +892,6 @@ classes: recording (rows). range: TimeSeriesReferenceVectorData required: true - multivalued: false inlined: true stimulus_template: name: stimulus_template @@ -721,8 +905,6 @@ classes: description: Column storing the reference to the stimulus template for the recording (rows). range: TimeSeriesReferenceVectorData - required: false - multivalued: false inlined: true tree_root: true IntracellularResponsesTable: @@ -755,7 +937,6 @@ classes: recording (rows) range: TimeSeriesReferenceVectorData required: true - multivalued: false inlined: true tree_root: true IntracellularRecordingsTable: @@ -797,15 +978,6 @@ classes: description: Table for storing intracellular electrode related metadata. range: IntracellularElectrodesTable required: true - multivalued: false - inlined: true - inlined_as_list: false - stimuli: - name: stimuli - description: Table for storing intracellular stimulus related metadata. - range: IntracellularStimuliTable - required: true - multivalued: false inlined: true inlined_as_list: false responses: @@ -813,7 +985,13 @@ classes: description: Table for storing intracellular response related metadata. range: IntracellularResponsesTable required: true - multivalued: false + inlined: true + inlined_as_list: false + stimuli: + name: stimuli + description: Table for storing intracellular stimulus related metadata. + range: IntracellularStimuliTable + required: true inlined: true inlined_as_list: false tree_root: true @@ -837,7 +1015,6 @@ classes: table. range: SimultaneousRecordingsTable__recordings required: true - multivalued: false inlined: true recordings_index: name: recordings_index @@ -851,7 +1028,6 @@ classes: description: Index dataset for the recordings column. range: VectorIndex required: true - multivalued: false inlined: true tree_root: true SimultaneousRecordingsTable__recordings: @@ -896,7 +1072,6 @@ classes: table. range: SequentialRecordingsTable__simultaneous_recordings required: true - multivalued: false inlined: true simultaneous_recordings_index: name: simultaneous_recordings_index @@ -910,7 +1085,6 @@ classes: description: Index dataset for the simultaneous_recordings column. range: VectorIndex required: true - multivalued: false inlined: true stimulus_type: name: stimulus_type @@ -964,7 +1138,6 @@ classes: table. range: RepetitionsTable__sequential_recordings required: true - multivalued: false inlined: true sequential_recordings_index: name: sequential_recordings_index @@ -978,7 +1151,6 @@ classes: description: Index dataset for the sequential_recordings column. range: VectorIndex required: true - multivalued: false inlined: true tree_root: true RepetitionsTable__sequential_recordings: @@ -1020,7 +1192,6 @@ classes: description: A reference to one or more rows in the RepetitionsTable table. range: ExperimentalConditionsTable__repetitions required: true - multivalued: false inlined: true repetitions_index: name: repetitions_index @@ -1034,7 +1205,6 @@ classes: description: Index dataset for the repetitions column. range: VectorIndex required: true - multivalued: false inlined: true tree_root: true ExperimentalConditionsTable__repetitions: diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.image.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.image.yaml index 603c351..6b17e13 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.image.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.image.yaml @@ -91,21 +91,9 @@ classes: name: data description: Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array. - range: numeric + range: ImageSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: frame - - alias: x - - alias: y - - array: - dimensions: - - alias: frame - - alias: x - - alias: y - - alias: z + inlined: true dimension: name: dimension description: Number of pixels on x, y, (and z) axes. @@ -123,8 +111,6 @@ classes: used if the image is stored in another NWB file and that file is linked to this file. range: ImageSeries__external_file - required: false - multivalued: false inlined: true format: name: format @@ -132,22 +118,98 @@ classes: 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. + ifabsent: string(raw) range: text - required: false - multivalued: false device: name: device annotations: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: Device - range: string tree_root: true + ImageSeries__data: + name: ImageSeries__data + description: Binary data representing images across frames. If data are stored + in an external file, this should be an empty 3D array. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + continuity: + name: continuity + 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. + range: text + required: false + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: frame + - alias: x + - alias: y + - array: + dimensions: + - alias: frame + - alias: x + - alias: y + - alias: z ImageSeries__external_file: name: ImageSeries__external_file description: Paths to one or more external file(s). The field is only present @@ -206,7 +268,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImageSeries @@ -226,12 +287,16 @@ classes: identifier: true range: string required: true + data: + name: data + description: Images presented to subject, either grayscale or RGB + range: OpticalSeries__data + required: true + inlined: true distance: name: distance description: Distance from camera/monitor to target/eye. range: float32 - required: false - multivalued: false field_of_view: name: field_of_view description: Width, height and depth of image, or imaged area, in meters. @@ -247,12 +312,78 @@ classes: dimensions: - alias: width_height_depth exact_cardinality: 3 - data: - name: data - description: Images presented to subject, either grayscale or RGB - range: numeric + orientation: + name: orientation + description: Description of image relative to some reference frame (e.g., + which way is up). Must also specify frame of reference. + range: text + tree_root: true + OpticalSeries__data: + name: OpticalSeries__data + description: Images presented to subject, either grayscale or RGB + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string required: true - multivalued: false + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + value: + name: value + range: numeric any_of: - array: dimensions: @@ -266,14 +397,6 @@ classes: - alias: y - alias: r_g_b exact_cardinality: 3 - orientation: - name: orientation - description: Description of image relative to some reference frame (e.g., - which way is up). Must also specify frame of reference. - range: text - required: false - multivalued: false - tree_root: true IndexSeries: name: IndexSeries description: Stores indices to image frames stored in an ImageSeries. The purpose @@ -294,20 +417,15 @@ classes: name: data description: Index of the image (using zero-indexing) in the linked Images object. - array: - dimensions: - - alias: num_times - range: uint32 + range: IndexSeries__data required: true - multivalued: false + inlined: true indexed_timeseries: name: indexed_timeseries annotations: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: ImageSeries @@ -318,10 +436,62 @@ classes: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: Images - range: string tree_root: true + IndexSeries__data: + name: IndexSeries__data + description: Index of the image (using zero-indexing) in the linked Images object. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + conversion: + name: conversion + description: This field is unused by IndexSeries. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: This field is unused by IndexSeries. + range: float32 + required: false + resolution: + name: resolution + description: This field is unused by IndexSeries. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: This field is unused by IndexSeries and has the value N/A. + ifabsent: string(N/A) + range: text + required: true + equals_string: N/A + value: + name: value + array: + dimensions: + - alias: num_times + range: uint32 diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.misc.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.misc.yaml index b30070d..917e860 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.misc.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.misc.yaml @@ -38,7 +38,6 @@ classes: description: Values of each feature at each time. range: AbstractFeatureSeries__data required: true - multivalued: false inlined: true feature_units: name: feature_units @@ -70,6 +69,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Since there can be different units for different features, store @@ -105,13 +149,79 @@ classes: data: name: data description: Annotations made during an experiment. + range: AnnotationSeries__data + required: true + inlined: true + tree_root: true + AnnotationSeries__data: + name: AnnotationSeries__data + description: Annotations made during an experiment. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data. Annotations + have no units, so the value is fixed to -1.0. + ifabsent: float(-1.0) + range: float32 + required: true + equals_number: -1 + unit: + name: unit + description: Base unit of measurement for working with the data. Annotations + have no units, so the value is fixed to 'n/a'. + ifabsent: string(n/a) + range: text + required: true + equals_string: n/a + value: + name: value array: dimensions: - alias: num_times range: text - required: true - multivalued: false - tree_root: true IntervalSeries: name: IntervalSeries description: Stores intervals of data. The timestamps field stores the beginning @@ -131,13 +241,79 @@ classes: data: name: data description: Use values >0 if interval started, <0 if interval ended. + range: IntervalSeries__data + required: true + inlined: true + tree_root: true + IntervalSeries__data: + name: IntervalSeries__data + description: Use values >0 if interval started, <0 if interval ended. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data. Annotations + have no units, so the value is fixed to -1.0. + ifabsent: float(-1.0) + range: float32 + required: true + equals_number: -1 + unit: + name: unit + description: Base unit of measurement for working with the data. Annotations + have no units, so the value is fixed to 'n/a'. + ifabsent: string(n/a) + range: text + required: true + equals_string: n/a + value: + name: value array: dimensions: - alias: num_times range: int8 - required: true - multivalued: false - tree_root: true DecompositionSeries: name: DecompositionSeries description: Spectral analysis of a time series, e.g. of an LFP or a speech signal. @@ -153,14 +329,12 @@ classes: description: Data decomposed into frequency bands. range: DecompositionSeries__data required: true - multivalued: false inlined: true metric: name: metric description: The metric used, e.g. phase, amplitude, power. range: text required: true - multivalued: false source_channels: name: source_channels annotations: @@ -173,8 +347,6 @@ classes: description: DynamicTableRegion pointer to the channels that this decomposition series was generated from. range: DynamicTableRegion - required: false - multivalued: false inlined: true bands: name: bands @@ -182,7 +354,6 @@ classes: from. There should be one row in this table for each band. range: DecompositionSeries__bands required: true - multivalued: false inlined: true inlined_as_list: true source_timeseries: @@ -191,8 +362,6 @@ classes: source_type: tag: source_type value: link - required: false - multivalued: false inlined: true any_of: - range: TimeSeries @@ -209,6 +378,51 @@ classes: range: string required: true equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false unit: name: unit description: Base unit of measurement for working with the data. Actual stored @@ -289,63 +503,13 @@ classes: identifier: true range: string required: true - spike_times_index: - name: spike_times_index - annotations: - 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 - multivalued: false - inlined: true - spike_times: - name: spike_times - description: Spike times for each unit in seconds. - range: Units__spike_times - required: false - multivalued: false - inlined: true - obs_intervals_index: - name: obs_intervals_index - annotations: - 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 - multivalued: false - inlined: true - obs_intervals: - name: obs_intervals - description: Observation intervals for each unit. + electrode_group: + name: electrode_group + description: Electrode group that each spike unit came from. array: - dimensions: - - alias: num_intervals - - alias: start_end - exact_cardinality: 2 - range: float64 - required: false - multivalued: false - electrodes_index: - name: electrodes_index - annotations: - named: - tag: named - value: true - source_type: - tag: source_type - value: neurodata_type_inc - description: Index into electrodes. - range: VectorIndex + minimum_number_dimensions: 1 + maximum_number_dimensions: false + range: ElectrodeGroup required: false multivalued: false inlined: true @@ -360,51 +524,69 @@ classes: value: neurodata_type_inc description: Electrode that each spike unit came from, specified using a DynamicTableRegion. range: DynamicTableRegion - required: false - multivalued: false inlined: true - electrode_group: - name: electrode_group - description: Electrode group that each spike unit came from. + electrodes_index: + name: electrodes_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into electrodes. + range: VectorIndex + inlined: true + obs_intervals: + name: obs_intervals + description: Observation intervals for each unit. array: - minimum_number_dimensions: 1 - maximum_number_dimensions: false - range: ElectrodeGroup + dimensions: + - alias: num_intervals + - alias: start_end + exact_cardinality: 2 + range: float64 required: false multivalued: false + obs_intervals_index: + name: obs_intervals_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into the obs_intervals dataset. + range: VectorIndex + inlined: true + spike_times: + name: spike_times + description: Spike times for each unit in seconds. + range: Units__spike_times + inlined: true + spike_times_index: + name: spike_times_index + annotations: + named: + tag: named + value: true + source_type: + tag: source_type + value: neurodata_type_inc + description: Index into the spike_times dataset. + range: VectorIndex inlined: true waveform_mean: name: waveform_mean description: Spike waveform mean for each spike unit. - range: float32 - required: false - multivalued: false - any_of: - - array: - dimensions: - - alias: num_units - - alias: num_samples - - array: - dimensions: - - alias: num_units - - alias: num_samples - - alias: num_electrodes + range: Units__waveform_mean + inlined: true waveform_sd: name: waveform_sd description: Spike waveform standard deviation for each spike unit. - range: float32 - required: false - multivalued: false - any_of: - - array: - dimensions: - - alias: num_units - - alias: num_samples - - array: - dimensions: - - alias: num_units - - alias: num_samples - - alias: num_electrodes + range: Units__waveform_sd + inlined: true waveforms: name: waveforms description: Individual waveforms for each spike on each electrode. This is @@ -430,13 +612,8 @@ classes: order of the waveforms within a given unit x spike event should be in the same order as the electrodes referenced in the 'electrodes' column of this table. The number of samples for each waveform must be the same. - array: - dimensions: - - alias: num_waveforms - - alias: num_samples - range: numeric - required: false - multivalued: false + range: Units__waveforms + inlined: true waveforms_index: name: waveforms_index annotations: @@ -449,8 +626,6 @@ classes: description: Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail. range: VectorIndex - required: false - multivalued: false inlined: true waveforms_index_index: name: waveforms_index_index @@ -464,8 +639,6 @@ classes: description: Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail. range: VectorIndex - required: false - multivalued: false inlined: true tree_root: true Units__spike_times: @@ -489,3 +662,97 @@ classes: for the spike time to be between samples. range: float64 required: false + Units__waveform_mean: + name: Units__waveform_mean + description: Spike waveform mean for each spike unit. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveform_mean) + identifier: true + range: string + required: true + equals_string: waveform_mean + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts + Units__waveform_sd: + name: Units__waveform_sd + description: Spike waveform standard deviation for each spike unit. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveform_sd) + identifier: true + range: string + required: true + equals_string: waveform_sd + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts + Units__waveforms: + name: Units__waveforms + description: Individual waveforms for each spike on each electrode. This is a + doubly indexed column. The 'waveforms_index' column indexes which waveforms + in this column belong to the same spike event for a given unit, where each waveform + was recorded from a different electrode. The 'waveforms_index_index' column + indexes the 'waveforms_index' column to indicate which spike events belong to + a given unit. For example, if the 'waveforms_index_index' column has values + [2, 5, 6], then the first 2 elements of the 'waveforms_index' column correspond + to the 2 spike events of the first unit, the next 3 elements of the 'waveforms_index' + column correspond to the 3 spike events of the second unit, and the next 1 element + of the 'waveforms_index' column corresponds to the 1 spike event of the third + unit. If the 'waveforms_index' column has values [3, 6, 8, 10, 12, 13], then + the first 3 elements of the 'waveforms' column contain the 3 spike waveforms + that were recorded from 3 different electrodes for the first spike time of the + first unit. See https://nwb-schema.readthedocs.io/en/stable/format_description.html#doubly-ragged-arrays + for a graphical representation of this example. When there is only one electrode + for each unit (i.e., each spike time is associated with a single waveform), + then the 'waveforms_index' column will have values 1, 2, ..., N, where N is + the number of spike events. The number of electrodes for each spike event should + be the same within a given unit. The 'electrodes' column should be used to indicate + which electrodes are associated with each unit, and the order of the waveforms + within a given unit x spike event should be in the same order as the electrodes + referenced in the 'electrodes' column of this table. The number of samples for + each waveform must be the same. + is_a: VectorData + attributes: + name: + name: name + ifabsent: string(waveforms) + identifier: true + range: string + required: true + equals_string: waveforms + sampling_rate: + name: sampling_rate + description: Sampling rate, in hertz. + range: float32 + required: false + unit: + name: unit + description: Unit of measurement. This value is fixed to 'volts'. + ifabsent: string(volts) + range: text + required: false + equals_string: volts diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.ogen.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.ogen.yaml index 9cc7b0d..2e71557 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.ogen.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.ogen.yaml @@ -29,9 +29,89 @@ classes: 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. - range: numeric + range: OptogeneticSeries__data required: true - multivalued: false + inlined: true + site: + name: site + annotations: + source_type: + tag: source_type + value: link + required: true + inlined: true + any_of: + - range: OptogeneticStimulusSite + - range: string + tree_root: true + OptogeneticSeries__data: + name: OptogeneticSeries__data + 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. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + continuity: + name: continuity + 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. + range: text + required: false + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + description: Unit of measurement for data, which is fixed to 'watts'. + ifabsent: string(watts) + range: text + required: true + equals_string: watts + value: + name: value + range: numeric any_of: - array: dimensions: @@ -40,19 +120,6 @@ classes: dimensions: - alias: num_times - alias: num_rois - site: - name: site - annotations: - source_type: - tag: source_type - value: link - required: true - multivalued: false - inlined: true - any_of: - - range: OptogeneticStimulusSite - - range: string - tree_root: true OptogeneticStimulusSite: name: OptogeneticStimulusSite description: A site of optogenetic stimulation. @@ -68,13 +135,11 @@ classes: description: Description of stimulation site. range: text required: true - multivalued: false excitation_lambda: name: excitation_lambda description: Excitation wavelength, in nm. range: float32 required: true - multivalued: false location: name: location description: Location of the stimulation site. Specify the area, layer, comments @@ -82,7 +147,6 @@ classes: standard atlas names for anatomical regions when possible. range: text required: true - multivalued: false device: name: device annotations: @@ -90,7 +154,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.ophys.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.ophys.yaml index b5d3676..61cb747 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.ophys.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.ophys.yaml @@ -26,11 +26,31 @@ classes: identifier: true range: string required: true + binning: + name: binning + description: Amount of pixels combined into 'bins'; could be 1, 2, 4, 8, etc. + range: uint8 + required: false + exposure_time: + name: exposure_time + description: Exposure time of the sample; often the inverse of the frequency. + range: float32 + required: false + intensity: + name: intensity + description: Intensity of the excitation in mW/mm^2, if known. + range: float32 + required: false pmt_gain: name: pmt_gain description: Photomultiplier gain. range: float32 required: false + power: + name: power + description: Power of the excitation in mW, if known. + range: float32 + required: false scan_line_rate: name: scan_line_rate description: Lines imaged per second. This is also stored in /general/optophysiology @@ -38,26 +58,6 @@ classes: be stored w/ the actual data. range: float32 required: false - exposure_time: - name: exposure_time - description: Exposure time of the sample; often the inverse of the frequency. - range: float32 - required: false - binning: - name: binning - description: Amount of pixels combined into 'bins'; could be 1, 2, 4, 8, etc. - range: uint8 - required: false - power: - name: power - description: Power of the excitation in mW, if known. - range: float32 - required: false - intensity: - name: intensity - description: Intensity of the excitation in mW/mm^2, if known. - range: float32 - required: false imaging_plane: name: imaging_plane annotations: @@ -65,7 +65,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImagingPlane @@ -115,7 +114,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImagingPlane @@ -135,17 +133,9 @@ classes: data: name: data description: Signals from ROIs. - range: numeric + range: RoiResponseSeries__data required: true - multivalued: false - any_of: - - array: - dimensions: - - alias: num_times - - array: - dimensions: - - alias: num_times - - alias: num_rois + inlined: true rois: name: rois annotations: @@ -159,9 +149,82 @@ classes: on the ROIs stored in this timeseries. range: DynamicTableRegion required: true - multivalued: false inlined: true tree_root: true + RoiResponseSeries__data: + name: RoiResponseSeries__data + description: Signals from ROIs. + attributes: + name: + name: name + ifabsent: string(data) + identifier: true + range: string + required: true + equals_string: data + 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 signed 16-bit + integers (int16 range -32,768 to 32,767) that correspond to a 5V range (-2.5V + to 2.5V), and the data acquisition system gain is 8000X, then the 'conversion' + multiplier to get from raw data acquisition values to recorded volts is + 2.5/32768/8000 = 9.5367e-9. + ifabsent: float(1.0) + range: float32 + required: false + offset: + name: offset + description: Scalar to add to the data after scaling by 'conversion' to finalize + its coercion to the specified 'unit'. Two common examples of this include + (a) data stored in an unsigned type that requires a shift after scaling + to re-center the data, and (b) specialized recording devices that naturally + cause a scalar offset with respect to the true units. + range: float32 + required: false + resolution: + name: resolution + description: Smallest meaningful difference between values in data, stored + in the specified by unit, e.g., the change in value of the least significant + bit, or a larger number if signal noise is known to be present. If unknown, + use -1.0. + ifabsent: float(-1.0) + range: float32 + required: false + unit: + name: unit + 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'. + range: text + required: true + continuity: + name: continuity + 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. + range: text + required: false + value: + name: value + range: numeric + any_of: + - array: + dimensions: + - alias: num_times + - array: + dimensions: + - alias: num_times + - alias: num_rois DfOverF: name: DfOverF description: dF/F information about a region of interest (ROI). Storage hierarchy @@ -237,6 +300,13 @@ classes: - alias: num_x - alias: num_y - alias: num_z + pixel_mask: + name: pixel_mask + description: 'Pixel masks for each ROI: a list of indices and weights for + the ROI. Pixel masks are concatenated and parsing of this dataset is maintained + by the PlaneSegmentation' + range: PlaneSegmentation__pixel_mask + inlined: true pixel_mask_index: name: pixel_mask_index annotations: @@ -248,17 +318,13 @@ classes: value: neurodata_type_inc description: Index into pixel_mask. range: VectorIndex - required: false - multivalued: false inlined: true - pixel_mask: - name: pixel_mask - description: 'Pixel masks for each ROI: a list of indices and weights for - the ROI. Pixel masks are concatenated and parsing of this dataset is maintained + voxel_mask: + name: voxel_mask + description: 'Voxel masks for each ROI: a list of indices and weights for + the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation' - range: PlaneSegmentation__pixel_mask - required: false - multivalued: false + range: PlaneSegmentation__voxel_mask inlined: true voxel_mask_index: name: voxel_mask_index @@ -271,17 +337,6 @@ classes: value: neurodata_type_inc description: Index into voxel_mask. range: VectorIndex - required: false - multivalued: false - inlined: true - voxel_mask: - name: voxel_mask - description: 'Voxel masks for each ROI: a list of indices and weights for - the ROI. Voxel masks are concatenated and parsing of this dataset is maintained - by the PlaneSegmentation' - range: PlaneSegmentation__voxel_mask - required: false - multivalued: false inlined: true reference_images: name: reference_images @@ -298,7 +353,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImagingPlane @@ -324,24 +378,18 @@ classes: array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false y: name: y description: Pixel y-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false weight: name: weight description: Weight of the pixel. array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false PlaneSegmentation__voxel_mask: name: PlaneSegmentation__voxel_mask description: 'Voxel masks for each ROI: a list of indices and weights for the @@ -362,32 +410,24 @@ classes: array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false y: name: y description: Voxel y-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false z: name: z description: Voxel z-coordinate. array: exact_number_dimensions: 1 range: uint32 - required: false - multivalued: false weight: name: weight description: Weight of the voxel. array: exact_number_dimensions: 1 range: float32 - required: false - multivalued: false ImagingPlane: name: ImagingPlane description: An imaging plane and its metadata. @@ -402,27 +442,21 @@ classes: 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 @@ -430,15 +464,12 @@ classes: 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 inlined: true origin_coords: name: origin_coords @@ -446,8 +477,6 @@ classes: 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 inlined: true grid_spacing: name: grid_spacing @@ -455,8 +484,6 @@ classes: 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 inlined: true reference_frame: name: reference_frame @@ -478,8 +505,6 @@ classes: 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. @@ -495,7 +520,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: Device @@ -628,13 +652,11 @@ classes: 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 tree_root: true MotionCorrection: name: MotionCorrection @@ -665,7 +687,6 @@ classes: description: Image stack with frames shifted to the common coordinates. range: ImageSeries required: true - multivalued: false inlined: true inlined_as_list: false xy_translation: @@ -674,7 +695,6 @@ classes: coordinates, for example, to align each frame to a reference image. range: TimeSeries required: true - multivalued: false inlined: true inlined_as_list: false original: @@ -684,7 +704,6 @@ classes: tag: source_type value: link required: true - multivalued: false inlined: true any_of: - range: ImageSeries diff --git a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.retinotopy.yaml b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.retinotopy.yaml index 8cc1810..a376d92 100644 --- a/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.retinotopy.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/core/v2_7_0/core.nwb.retinotopy.yaml @@ -37,30 +37,24 @@ classes: description: Phase response to stimulus on the first measured axis. range: ImagingRetinotopy__axis_1_phase_map required: true - multivalued: false inlined: true axis_1_power_map: name: axis_1_power_map 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: ImagingRetinotopy__axis_1_power_map - required: false - multivalued: false inlined: true axis_2_phase_map: name: axis_2_phase_map description: Phase response to stimulus on the second measured axis. range: ImagingRetinotopy__axis_2_phase_map required: true - multivalued: false inlined: true axis_2_power_map: name: axis_2_power_map description: Power response on the second measured axis. Response is scaled so 0.0 is no power in the response and 1.0 is maximum relative power. range: ImagingRetinotopy__axis_2_power_map - required: false - multivalued: false inlined: true axis_descriptions: name: axis_descriptions @@ -79,16 +73,12 @@ classes: description: 'Gray-scale image taken with same settings/parameters (e.g., focal depth, wavelength) as data collection. Array format: [rows][columns].' range: ImagingRetinotopy__focal_depth_image - required: false - multivalued: false inlined: true sign_map: name: sign_map description: Sine of the angle between the direction of the gradient in axis_1 and axis_2. range: ImagingRetinotopy__sign_map - required: false - multivalued: false inlined: true vasculature_image: name: vasculature_image @@ -96,7 +86,6 @@ classes: [rows][columns]' range: ImagingRetinotopy__vasculature_image required: true - multivalued: false inlined: true tree_root: true ImagingRetinotopy__axis_1_phase_map: diff --git a/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_4_0/hdmf-common.table.yaml b/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_4_0/hdmf-common.table.yaml index 7e1a614..de0d90a 100644 --- a/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_4_0/hdmf-common.table.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_4_0/hdmf-common.table.yaml @@ -116,6 +116,11 @@ classes: identifier: true range: string required: true + description: + name: description + description: Description of what this table region points to. + range: text + required: true table: name: table description: Reference to the DynamicTable object that this region applies @@ -123,11 +128,6 @@ classes: range: DynamicTable required: true inlined: true - description: - name: description - description: Description of what this table region points to. - range: text - required: true tree_root: true DynamicTable: name: DynamicTable @@ -177,11 +177,4 @@ classes: range: int required: true multivalued: false - vector_data: - name: vector_data - description: Vector columns, including index columns, of this dynamic table. - range: VectorData - required: false - multivalued: true - inlined: true tree_root: true diff --git a/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_5_0/hdmf-common.table.yaml b/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_5_0/hdmf-common.table.yaml index f8adba6..b8e1134 100644 --- a/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_5_0/hdmf-common.table.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_5_0/hdmf-common.table.yaml @@ -116,6 +116,11 @@ classes: identifier: true range: string required: true + description: + name: description + description: Description of what this table region points to. + range: text + required: true table: name: table description: Reference to the DynamicTable object that this region applies @@ -123,11 +128,6 @@ classes: range: DynamicTable required: true inlined: true - description: - name: description - description: Description of what this table region points to. - range: text - required: true tree_root: true DynamicTable: name: DynamicTable @@ -177,13 +177,6 @@ classes: range: int required: true multivalued: false - vector_data: - name: vector_data - description: Vector columns, including index columns, of this dynamic table. - range: VectorData - required: false - multivalued: true - inlined: true tree_root: true AlignedDynamicTable: name: AlignedDynamicTable diff --git a/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_5_1/hdmf-common.table.yaml b/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_5_1/hdmf-common.table.yaml index 52b119d..513a5d4 100644 --- a/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_5_1/hdmf-common.table.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_5_1/hdmf-common.table.yaml @@ -116,6 +116,11 @@ classes: identifier: true range: string required: true + description: + name: description + description: Description of what this table region points to. + range: text + required: true table: name: table description: Reference to the DynamicTable object that this region applies @@ -123,11 +128,6 @@ classes: range: DynamicTable required: true inlined: true - description: - name: description - description: Description of what this table region points to. - range: text - required: true tree_root: true DynamicTable: name: DynamicTable @@ -177,13 +177,6 @@ classes: range: int required: true multivalued: false - vector_data: - name: vector_data - description: Vector columns, including index columns, of this dynamic table. - range: VectorData - required: false - multivalued: true - inlined: true tree_root: true AlignedDynamicTable: name: AlignedDynamicTable diff --git a/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_6_0/hdmf-common.table.yaml b/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_6_0/hdmf-common.table.yaml index 85675e7..5613666 100644 --- a/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_6_0/hdmf-common.table.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_6_0/hdmf-common.table.yaml @@ -116,6 +116,11 @@ classes: identifier: true range: string required: true + description: + name: description + description: Description of what this table region points to. + range: text + required: true table: name: table description: Reference to the DynamicTable object that this region applies @@ -123,11 +128,6 @@ classes: range: DynamicTable required: true inlined: true - description: - name: description - description: Description of what this table region points to. - range: text - required: true tree_root: true DynamicTable: name: DynamicTable @@ -177,13 +177,6 @@ classes: range: int required: true multivalued: false - vector_data: - name: vector_data - description: Vector columns, including index columns, of this dynamic table. - range: VectorData - required: false - multivalued: true - inlined: true tree_root: true AlignedDynamicTable: name: AlignedDynamicTable diff --git a/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_7_0/hdmf-common.table.yaml b/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_7_0/hdmf-common.table.yaml index 9ffb97d..36dd411 100644 --- a/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_7_0/hdmf-common.table.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_7_0/hdmf-common.table.yaml @@ -116,6 +116,11 @@ classes: identifier: true range: string required: true + description: + name: description + description: Description of what this table region points to. + range: text + required: true table: name: table description: Reference to the DynamicTable object that this region applies @@ -123,11 +128,6 @@ classes: range: DynamicTable required: true inlined: true - description: - name: description - description: Description of what this table region points to. - range: text - required: true tree_root: true DynamicTable: name: DynamicTable @@ -177,13 +177,6 @@ classes: range: int required: true multivalued: false - vector_data: - name: vector_data - description: Vector columns, including index columns, of this dynamic table. - range: VectorData - required: false - multivalued: true - inlined: true tree_root: true AlignedDynamicTable: name: AlignedDynamicTable diff --git a/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_8_0/hdmf-common.table.yaml b/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_8_0/hdmf-common.table.yaml index 940f1b7..c7f3d0d 100644 --- a/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_8_0/hdmf-common.table.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/hdmf_common/v1_8_0/hdmf-common.table.yaml @@ -116,6 +116,11 @@ classes: identifier: true range: string required: true + description: + name: description + description: Description of what this table region points to. + range: text + required: true table: name: table description: Reference to the DynamicTable object that this region applies @@ -123,11 +128,6 @@ classes: range: DynamicTable required: true inlined: true - description: - name: description - description: Description of what this table region points to. - range: text - required: true tree_root: true DynamicTable: name: DynamicTable @@ -177,13 +177,6 @@ classes: range: int required: true multivalued: false - vector_data: - name: vector_data - description: Vector columns, including index columns, of this dynamic table. - range: VectorData - required: false - multivalued: true - inlined: true tree_root: true AlignedDynamicTable: name: AlignedDynamicTable diff --git a/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_1_0/hdmf-experimental.resources.yaml b/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_1_0/hdmf-experimental.resources.yaml index a962b8f..a8d955d 100644 --- a/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_1_0/hdmf-experimental.resources.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_1_0/hdmf-experimental.resources.yaml @@ -31,21 +31,18 @@ classes: resources. range: ExternalResources__keys required: true - multivalued: false inlined: true entities: name: entities description: A table for mapping user terms (i.e., keys) to resource entities. range: ExternalResources__entities required: true - multivalued: false inlined: true resources: name: resources description: A table for mapping user terms (i.e., keys) to resource entities. range: ExternalResources__resources required: true - multivalued: false inlined: true objects: name: objects @@ -53,14 +50,12 @@ classes: to external resources. range: ExternalResources__objects required: true - multivalued: false inlined: true object_keys: name: object_keys description: A table for identifying which objects use which keys. range: ExternalResources__object_keys required: true - multivalued: false inlined: true tree_root: true ExternalResources__keys: @@ -84,7 +79,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__entities: name: ExternalResources__entities description: A table for mapping user terms (i.e., keys) to resource entities. @@ -104,7 +98,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false resources_idx: name: resources_idx description: The index into the 'resources' table @@ -112,7 +105,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false entity_id: name: entity_id description: The unique identifier entity. @@ -120,7 +112,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false entity_uri: name: entity_uri description: The URI for the entity this reference applies to. This can be @@ -129,7 +120,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__resources: name: ExternalResources__resources description: A table for mapping user terms (i.e., keys) to resource entities. @@ -149,7 +139,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false resource_uri: name: resource_uri description: The URI for the resource. This can be an empty string. @@ -157,7 +146,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__objects: name: ExternalResources__objects description: A table for identifying which objects in a file contain references @@ -178,7 +166,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false field: name: field description: The field of the object. This can be an empty string if the object @@ -187,7 +174,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__object_keys: name: ExternalResources__object_keys description: A table for identifying which objects use which keys. @@ -208,7 +194,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false keys_idx: name: keys_idx description: The index to the 'keys' table for the key. @@ -216,4 +201,3 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false diff --git a/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_2_0/hdmf-experimental.resources.yaml b/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_2_0/hdmf-experimental.resources.yaml index 89023ae..4aadb91 100644 --- a/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_2_0/hdmf-experimental.resources.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_2_0/hdmf-experimental.resources.yaml @@ -31,21 +31,18 @@ classes: resources. range: ExternalResources__keys required: true - multivalued: false inlined: true entities: name: entities description: A table for mapping user terms (i.e., keys) to resource entities. range: ExternalResources__entities required: true - multivalued: false inlined: true resources: name: resources description: A table for mapping user terms (i.e., keys) to resource entities. range: ExternalResources__resources required: true - multivalued: false inlined: true objects: name: objects @@ -53,14 +50,12 @@ classes: to external resources. range: ExternalResources__objects required: true - multivalued: false inlined: true object_keys: name: object_keys description: A table for identifying which objects use which keys. range: ExternalResources__object_keys required: true - multivalued: false inlined: true tree_root: true ExternalResources__keys: @@ -84,7 +79,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__entities: name: ExternalResources__entities description: A table for mapping user terms (i.e., keys) to resource entities. @@ -104,7 +98,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false resources_idx: name: resources_idx description: The index into the 'resources' table @@ -112,7 +105,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false entity_id: name: entity_id description: The unique identifier entity. @@ -120,7 +112,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false entity_uri: name: entity_uri description: The URI for the entity this reference applies to. This can be @@ -129,7 +120,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__resources: name: ExternalResources__resources description: A table for mapping user terms (i.e., keys) to resource entities. @@ -149,7 +139,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false resource_uri: name: resource_uri description: The URI for the resource. This can be an empty string. @@ -157,7 +146,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__objects: name: ExternalResources__objects description: A table for identifying which objects in a file contain references @@ -178,7 +166,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false relative_path: name: relative_path description: The relative path from the container with the object_id to the @@ -189,7 +176,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false field: name: field description: The field of the compound data type using an external resource. @@ -199,7 +185,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__object_keys: name: ExternalResources__object_keys description: A table for identifying which objects use which keys. @@ -220,7 +205,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false keys_idx: name: keys_idx description: The index to the 'keys' table for the key. @@ -228,4 +212,3 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false diff --git a/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_3_0/hdmf-experimental.resources.yaml b/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_3_0/hdmf-experimental.resources.yaml index d0909a2..52d014f 100644 --- a/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_3_0/hdmf-experimental.resources.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_3_0/hdmf-experimental.resources.yaml @@ -31,21 +31,18 @@ classes: resources. range: ExternalResources__keys required: true - multivalued: false inlined: true files: name: files description: A table for storing object ids of files used in external resources. range: ExternalResources__files required: true - multivalued: false inlined: true entities: name: entities description: A table for mapping user terms (i.e., keys) to resource entities. range: ExternalResources__entities required: true - multivalued: false inlined: true objects: name: objects @@ -53,14 +50,12 @@ classes: to external resources. range: ExternalResources__objects required: true - multivalued: false inlined: true object_keys: name: object_keys description: A table for identifying which objects use which keys. range: ExternalResources__object_keys required: true - multivalued: false inlined: true tree_root: true ExternalResources__keys: @@ -84,7 +79,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__files: name: ExternalResources__files description: A table for storing object ids of files used in external resources. @@ -105,7 +99,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__entities: name: ExternalResources__entities description: A table for mapping user terms (i.e., keys) to resource entities. @@ -125,7 +118,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false entity_id: name: entity_id description: The compact uniform resource identifier (CURIE) of the entity, @@ -134,7 +126,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false entity_uri: name: entity_uri description: The URI for the entity this reference applies to. This can be @@ -143,7 +134,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__objects: name: ExternalResources__objects description: A table for identifying which objects in a file contain references @@ -165,7 +155,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false object_id: name: object_id description: The object id (UUID) of the object. @@ -173,7 +162,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false object_type: name: object_type description: The data type of the object. @@ -181,7 +169,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false relative_path: name: relative_path description: The relative path from the data object with the `object_id` to @@ -192,7 +179,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false field: name: field description: The field within the compound data type using an external resource. @@ -202,7 +188,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__object_keys: name: ExternalResources__object_keys description: A table for identifying which objects use which keys. @@ -223,7 +208,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false keys_idx: name: keys_idx description: The row index to the key in the `keys` table. @@ -231,4 +215,3 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false diff --git a/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_4_0/hdmf-experimental.resources.yaml b/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_4_0/hdmf-experimental.resources.yaml index 75f3938..bc36101 100644 --- a/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_4_0/hdmf-experimental.resources.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_4_0/hdmf-experimental.resources.yaml @@ -31,21 +31,18 @@ classes: resources. range: ExternalResources__keys required: true - multivalued: false inlined: true files: name: files description: A table for storing object ids of files used in external resources. range: ExternalResources__files required: true - multivalued: false inlined: true entities: name: entities description: A table for mapping user terms (i.e., keys) to resource entities. range: ExternalResources__entities required: true - multivalued: false inlined: true objects: name: objects @@ -53,21 +50,18 @@ classes: to external resources. range: ExternalResources__objects required: true - multivalued: false inlined: true object_keys: name: object_keys description: A table for identifying which objects use which keys. range: ExternalResources__object_keys required: true - multivalued: false inlined: true entity_keys: name: entity_keys description: A table for identifying which keys use which entity. range: ExternalResources__entity_keys required: true - multivalued: false inlined: true tree_root: true ExternalResources__keys: @@ -91,7 +85,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__files: name: ExternalResources__files description: A table for storing object ids of files used in external resources. @@ -112,7 +105,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__entities: name: ExternalResources__entities description: A table for mapping user terms (i.e., keys) to resource entities. @@ -133,7 +125,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false entity_uri: name: entity_uri description: The URI for the entity this reference applies to. This can be @@ -142,7 +133,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__objects: name: ExternalResources__objects description: A table for identifying which objects in a file contain references @@ -164,7 +154,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false object_id: name: object_id description: The object id (UUID) of the object. @@ -172,7 +161,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false object_type: name: object_type description: The data type of the object. @@ -180,7 +168,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false relative_path: name: relative_path description: The relative path from the data object with the `object_id` to @@ -191,7 +178,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false field: name: field description: The field within the compound data type using an external resource. @@ -201,7 +187,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false ExternalResources__object_keys: name: ExternalResources__object_keys description: A table for identifying which objects use which keys. @@ -222,7 +207,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false keys_idx: name: keys_idx description: The row index to the key in the `keys` table. @@ -230,7 +214,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false ExternalResources__entity_keys: name: ExternalResources__entity_keys description: A table for identifying which keys use which entity. @@ -250,7 +233,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false keys_idx: name: keys_idx description: The row index to the key in the `keys` table. @@ -258,4 +240,3 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false diff --git a/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_5_0/hdmf-experimental.resources.yaml b/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_5_0/hdmf-experimental.resources.yaml index dcaf960..6dfe7fe 100644 --- a/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_5_0/hdmf-experimental.resources.yaml +++ b/nwb_models/src/nwb_models/schema/linkml/hdmf_experimental/v0_5_0/hdmf-experimental.resources.yaml @@ -30,21 +30,18 @@ classes: resources. range: HERD__keys required: true - multivalued: false inlined: true files: name: files description: A table for storing object ids of files used in external resources. range: HERD__files required: true - multivalued: false inlined: true entities: name: entities description: A table for mapping user terms (i.e., keys) to resource entities. range: HERD__entities required: true - multivalued: false inlined: true objects: name: objects @@ -52,21 +49,18 @@ classes: to external resources. range: HERD__objects required: true - multivalued: false inlined: true object_keys: name: object_keys description: A table for identifying which objects use which keys. range: HERD__object_keys required: true - multivalued: false inlined: true entity_keys: name: entity_keys description: A table for identifying which keys use which entity. range: HERD__entity_keys required: true - multivalued: false inlined: true tree_root: true HERD__keys: @@ -90,7 +84,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false HERD__files: name: HERD__files description: A table for storing object ids of files used in external resources. @@ -111,7 +104,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false HERD__entities: name: HERD__entities description: A table for mapping user terms (i.e., keys) to resource entities. @@ -132,7 +124,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false entity_uri: name: entity_uri description: The URI for the entity this reference applies to. This can be @@ -141,7 +132,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false HERD__objects: name: HERD__objects description: A table for identifying which objects in a file contain references @@ -163,7 +153,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false object_id: name: object_id description: The object id (UUID) of the object. @@ -171,7 +160,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false object_type: name: object_type description: The data type of the object. @@ -179,7 +167,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false relative_path: name: relative_path description: The relative path from the data object with the `object_id` to @@ -190,7 +177,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false field: name: field description: The field within the compound data type using an external resource. @@ -200,7 +186,6 @@ classes: exact_number_dimensions: 1 range: text required: true - multivalued: false HERD__object_keys: name: HERD__object_keys description: A table for identifying which objects use which keys. @@ -221,7 +206,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false keys_idx: name: keys_idx description: The row index to the key in the `keys` table. @@ -229,7 +213,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false HERD__entity_keys: name: HERD__entity_keys description: A table for identifying which keys use which entity. @@ -249,7 +232,6 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false keys_idx: name: keys_idx description: The row index to the key in the `keys` table. @@ -257,4 +239,3 @@ classes: exact_number_dimensions: 1 range: uint required: true - multivalued: false