mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2025-01-10 06:04:28 +00:00
- Able to complete build all the way through to importing generated classes
This commit is contained in:
parent
8f4f99cffd
commit
78d2ec59d7
79 changed files with 4418 additions and 4704 deletions
5
docs/notes/todo.md
Normal file
5
docs/notes/todo.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
Stuff to keep track of that might have been manually overrided that needs to be fixed pre-release
|
||||||
|
|
||||||
|
- Coerce all listlike things into lists if they are passed as single elements!
|
3
hdf5_linkml/README.md
Normal file
3
hdf5_linkml/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# hdf5_linkml
|
||||||
|
|
||||||
|
HDF5 adapter to linkml models
|
|
@ -19,7 +19,7 @@ class H5File:
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def translate_schema(self, dict) -> SchemaDefinition:
|
def translate_schema(self, schema: List[dict]) -> List[SchemaDefinition]:
|
||||||
"""
|
"""
|
||||||
Optionally translate schema from source language into LinkML
|
Optionally translate schema from source language into LinkML
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,29 @@ class ClassAdapter(Adapter):
|
||||||
|
|
||||||
return name
|
return name
|
||||||
|
|
||||||
|
def _get_slot_name(self) -> str:
|
||||||
|
"""
|
||||||
|
Get the name to use as the name when this is a subclass used as a slot,
|
||||||
|
used to dodge name overlaps by snake-casing!
|
||||||
|
again distinct from the actual name of the instantiated object
|
||||||
|
"""
|
||||||
|
# return self._get_full_name()
|
||||||
|
name = None
|
||||||
|
if self.cls.neurodata_type_def:
|
||||||
|
name = camel_to_snake(self.cls.neurodata_type_def)
|
||||||
|
# name = self.cls.neurodata_type_def
|
||||||
|
elif self.cls.name is not None:
|
||||||
|
# we do have a unique name
|
||||||
|
name = self.cls.name
|
||||||
|
elif self.cls.neurodata_type_inc:
|
||||||
|
name = camel_to_snake(self.cls.neurodata_type_inc)
|
||||||
|
# name = self.cls.neurodata_type_inc
|
||||||
|
|
||||||
|
if name is None:
|
||||||
|
raise ValueError(f'Class has no name!: {self.cls}')
|
||||||
|
|
||||||
|
return name
|
||||||
|
|
||||||
def handle_dtype(self, dtype: DTypeType | None) -> str:
|
def handle_dtype(self, dtype: DTypeType | None) -> str:
|
||||||
if isinstance(dtype, ReferenceDtype):
|
if isinstance(dtype, ReferenceDtype):
|
||||||
return dtype.target_type
|
return dtype.target_type
|
||||||
|
@ -198,7 +221,7 @@ class ClassAdapter(Adapter):
|
||||||
If we are a child class, we make a slot so our parent can refer to us
|
If we are a child class, we make a slot so our parent can refer to us
|
||||||
"""
|
"""
|
||||||
return SlotDefinition(
|
return SlotDefinition(
|
||||||
name=self._get_attr_name(),
|
name=self._get_slot_name(),
|
||||||
description=self.cls.doc,
|
description=self.cls.doc,
|
||||||
range=self._get_full_name(),
|
range=self._get_full_name(),
|
||||||
**QUANTITY_MAP[self.cls.quantity]
|
**QUANTITY_MAP[self.cls.quantity]
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
"""
|
"""
|
||||||
Adapter for NWB datasets to linkml Classes
|
Adapter for NWB datasets to linkml Classes
|
||||||
"""
|
"""
|
||||||
|
import pdb
|
||||||
from typing import Optional, List
|
from typing import Optional, List
|
||||||
|
import warnings
|
||||||
|
|
||||||
from linkml_runtime.linkml_model import ClassDefinition, SlotDefinition
|
from linkml_runtime.linkml_model import ClassDefinition, SlotDefinition
|
||||||
from pydantic import PrivateAttr
|
from pydantic import PrivateAttr
|
||||||
|
|
||||||
from nwb_schema_language import Dataset, ReferenceDtype, CompoundDtype, DTypeType
|
from nwb_schema_language import Dataset, ReferenceDtype, CompoundDtype, DTypeType
|
||||||
from nwb_linkml.adapters.classes import ClassAdapter
|
from nwb_linkml.adapters.classes import ClassAdapter, camel_to_snake
|
||||||
from nwb_linkml.adapters.adapter import BuildResult
|
from nwb_linkml.adapters.adapter import BuildResult
|
||||||
from nwb_linkml.maps import QUANTITY_MAP
|
from nwb_linkml.maps import QUANTITY_MAP
|
||||||
|
|
||||||
|
@ -21,11 +23,13 @@ class DatasetAdapter(ClassAdapter):
|
||||||
def build(self) -> BuildResult:
|
def build(self) -> BuildResult:
|
||||||
res = self.build_base()
|
res = self.build_base()
|
||||||
|
|
||||||
|
res = self.drop_dynamic_table(res)
|
||||||
res = self.handle_arraylike(res, self.cls, self._get_full_name())
|
res = self.handle_arraylike(res, self.cls, self._get_full_name())
|
||||||
res = self.handle_1d_vector(res)
|
res = self.handle_1d_vector(res)
|
||||||
res = self.handle_listlike(res)
|
res = self.handle_listlike(res)
|
||||||
res = self.handle_scalar(res)
|
res = self.handle_scalar(res)
|
||||||
|
|
||||||
|
|
||||||
if len(self._handlers) > 1:
|
if len(self._handlers) > 1:
|
||||||
raise RuntimeError(f"Only one handler should have been triggered, instead triggered {self._handlers}")
|
raise RuntimeError(f"Only one handler should have been triggered, instead triggered {self._handlers}")
|
||||||
|
|
||||||
|
@ -171,7 +175,8 @@ class DatasetAdapter(ClassAdapter):
|
||||||
return res
|
return res
|
||||||
elif not all((dataset.dims, dataset.shape)):
|
elif not all((dataset.dims, dataset.shape)):
|
||||||
# need to have both if one is present!
|
# need to have both if one is present!
|
||||||
raise ValueError(f"A dataset needs both dims and shape to define an arraylike object")
|
warnings.warn(f"A dataset needs both dims and shape to define an arraylike object. This is allowed for compatibility with some badly formatted NWB files, but should in general be avoided. Treating like we dont have an array")
|
||||||
|
return res
|
||||||
|
|
||||||
# Special cases
|
# Special cases
|
||||||
if dataset.neurodata_type_inc == 'VectorData':
|
if dataset.neurodata_type_inc == 'VectorData':
|
||||||
|
@ -193,6 +198,9 @@ class DatasetAdapter(ClassAdapter):
|
||||||
if isinstance(inner_dim, list):
|
if isinstance(inner_dim, list):
|
||||||
# list of lists
|
# list of lists
|
||||||
dims_shape.extend([(dim, shape) for dim, shape in zip(inner_dim, inner_shape)])
|
dims_shape.extend([(dim, shape) for dim, shape in zip(inner_dim, inner_shape)])
|
||||||
|
elif isinstance(inner_shape, list):
|
||||||
|
# Some badly formatted schema will have the shape be a LoL but the dims won't be...
|
||||||
|
dims_shape.extend([(inner_dim, shape) for shape in inner_shape])
|
||||||
else:
|
else:
|
||||||
# single-layer list
|
# single-layer list
|
||||||
dims_shape.append((inner_dim, inner_shape))
|
dims_shape.append((inner_dim, inner_shape))
|
||||||
|
@ -239,7 +247,7 @@ class DatasetAdapter(ClassAdapter):
|
||||||
range=dtype
|
range=dtype
|
||||||
))
|
))
|
||||||
|
|
||||||
# and then the class is just a subclass of `Arraylike` (which is imported by default from `nwb.language.yaml`)
|
# and then the class is just a subclass of `Arraylist` (which is imported by default from `nwb.language.yaml`)
|
||||||
if name:
|
if name:
|
||||||
pass
|
pass
|
||||||
elif dataset.neurodata_type_def:
|
elif dataset.neurodata_type_def:
|
||||||
|
@ -268,3 +276,46 @@ class DatasetAdapter(ClassAdapter):
|
||||||
self._handlers.append('arraylike')
|
self._handlers.append('arraylike')
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
def drop_dynamic_table(self, res:BuildResult) -> BuildResult:
|
||||||
|
"""
|
||||||
|
DynamicTables in hdmf are so special-cased that we have to just special-case them ourselves.
|
||||||
|
|
||||||
|
Typically they include a '*' quantitied, unnamed VectorData object to contain arbitrary columns,
|
||||||
|
this would normally get converted to its own container class, but since they're unnamed they conflict with
|
||||||
|
names in the containing scope.
|
||||||
|
|
||||||
|
We just convert them into multivalued slots and don't use them
|
||||||
|
"""
|
||||||
|
if self.cls.name is None and \
|
||||||
|
self.cls.neurodata_type_def is None and \
|
||||||
|
self.cls.neurodata_type_inc in ('VectorIndex', 'VectorData') and \
|
||||||
|
self.cls.quantity == '*':
|
||||||
|
self._handlers.append('dynamic_table')
|
||||||
|
this_slot = SlotDefinition(
|
||||||
|
name=camel_to_snake(self.cls.neurodata_type_inc),
|
||||||
|
description=self.cls.doc,
|
||||||
|
range=self.cls.neurodata_type_inc,
|
||||||
|
required=False,
|
||||||
|
multivalued=True
|
||||||
|
)
|
||||||
|
# No need to make a class for us, so we replace the existing build results
|
||||||
|
res = BuildResult(slots=[this_slot])
|
||||||
|
return res
|
||||||
|
elif self.cls.name is None and \
|
||||||
|
self.cls.neurodata_type_def is None and \
|
||||||
|
self.cls.neurodata_type_inc and \
|
||||||
|
self.cls.quantity in ('*', '+'):
|
||||||
|
self._handlers.append('generic_container')
|
||||||
|
this_slot = SlotDefinition(
|
||||||
|
name=camel_to_snake(self.cls.neurodata_type_inc),
|
||||||
|
description=self.cls.doc,
|
||||||
|
range=self.cls.neurodata_type_inc,
|
||||||
|
**QUANTITY_MAP[self.cls.quantity]
|
||||||
|
)
|
||||||
|
# No need to make a class for us, so we replace the existing build results
|
||||||
|
res = BuildResult(slots=[this_slot])
|
||||||
|
return res
|
||||||
|
else:
|
||||||
|
return res
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,8 @@ class GroupAdapter(ClassAdapter):
|
||||||
cls: Group
|
cls: Group
|
||||||
|
|
||||||
def build(self) -> BuildResult:
|
def build(self) -> BuildResult:
|
||||||
|
if self.cls.neurodata_type_def == "Subject":
|
||||||
|
pdb.set_trace()
|
||||||
# Handle container groups with only * quantity unnamed groups
|
# Handle container groups with only * quantity unnamed groups
|
||||||
if len(self.cls.groups) > 0 and \
|
if len(self.cls.groups) > 0 and \
|
||||||
all([self._check_if_container(g) for g in self.cls.groups]) and \
|
all([self._check_if_container(g) for g in self.cls.groups]) and \
|
||||||
|
@ -24,6 +25,7 @@ class GroupAdapter(ClassAdapter):
|
||||||
|
|
||||||
# handle if we are a terminal container group without making a new class
|
# handle if we are a terminal container group without making a new class
|
||||||
if len(self.cls.groups) == 0 and \
|
if len(self.cls.groups) == 0 and \
|
||||||
|
len(self.cls.datasets) == 0 and \
|
||||||
self.cls.neurodata_type_inc is not None and \
|
self.cls.neurodata_type_inc is not None and \
|
||||||
self.parent is not None:
|
self.parent is not None:
|
||||||
return self.handle_container_slot(self.cls)
|
return self.handle_container_slot(self.cls)
|
||||||
|
@ -160,7 +162,7 @@ class GroupAdapter(ClassAdapter):
|
||||||
quantity: '*'
|
quantity: '*'
|
||||||
"""
|
"""
|
||||||
if not group.name and \
|
if not group.name and \
|
||||||
group.quantity == '*' and \
|
group.quantity in ('*','+') and \
|
||||||
group.neurodata_type_inc:
|
group.neurodata_type_inc:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -6,9 +6,12 @@ for extracting information and generating translated schema
|
||||||
"""
|
"""
|
||||||
import pdb
|
import pdb
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
from pathlib import Path
|
||||||
from pydantic import BaseModel, Field, validator, PrivateAttr
|
from pydantic import BaseModel, Field, validator, PrivateAttr
|
||||||
from pprint import pformat
|
from pprint import pformat
|
||||||
from linkml_runtime.linkml_model import SchemaDefinition
|
from linkml_runtime.linkml_model import SchemaDefinition
|
||||||
|
from linkml_runtime.dumpers import yaml_dumper
|
||||||
|
|
||||||
|
|
||||||
from nwb_schema_language import Namespaces
|
from nwb_schema_language import Namespaces
|
||||||
|
|
||||||
|
@ -47,13 +50,15 @@ class NamespacesAdapter(Adapter):
|
||||||
|
|
||||||
# now generate the top-level namespaces that import everything
|
# now generate the top-level namespaces that import everything
|
||||||
for ns in self.namespaces.namespaces:
|
for ns in self.namespaces.namespaces:
|
||||||
ns_schemas = [sch for sch in self.schemas if sch.namespace == ns.name]
|
ns_schemas = [sch.name for sch in self.schemas if sch.namespace == ns.name]
|
||||||
|
# also add imports bc, well, we need them
|
||||||
|
ns_schemas.extend([ns.name for imported in self.imported for ns in imported.namespaces.namespaces])
|
||||||
ns_schema = SchemaDefinition(
|
ns_schema = SchemaDefinition(
|
||||||
name = ns.name,
|
name = ns.name,
|
||||||
id = ns.name,
|
id = ns.name,
|
||||||
description = ns.doc,
|
description = ns.doc,
|
||||||
version = ns.version,
|
version = ns.version,
|
||||||
imports=[sch.name for sch in ns_schemas],
|
imports=ns_schemas,
|
||||||
annotations=[{'tag': 'namespace', 'value': True}]
|
annotations=[{'tag': 'namespace', 'value': True}]
|
||||||
)
|
)
|
||||||
sch_result.schemas.append(ns_schema)
|
sch_result.schemas.append(ns_schema)
|
||||||
|
@ -91,7 +96,7 @@ class NamespacesAdapter(Adapter):
|
||||||
# find which namespace imports this schema file
|
# find which namespace imports this schema file
|
||||||
for ns in self.namespaces.namespaces:
|
for ns in self.namespaces.namespaces:
|
||||||
sources = [sch.source for sch in ns.schema_]
|
sources = [sch.source for sch in ns.schema_]
|
||||||
if sch_name in sources:
|
if sch_name in sources or sch.path.stem in sources:
|
||||||
sch.namespace = ns.name
|
sch.namespace = ns.name
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -148,4 +153,14 @@ class NamespacesAdapter(Adapter):
|
||||||
|
|
||||||
self._imports_populated = True
|
self._imports_populated = True
|
||||||
|
|
||||||
|
def to_yaml(self, base_dir:Path):
|
||||||
|
schemas = self.build().schemas
|
||||||
|
base_dir = Path(base_dir)
|
||||||
|
|
||||||
|
base_dir.mkdir(exist_ok=True)
|
||||||
|
|
||||||
|
for schema in schemas:
|
||||||
|
output_file = base_dir / (schema.name + '.yaml')
|
||||||
|
yaml_dumper.dump(schema, output_file)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,11 @@ The `serialize` method
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import pdb
|
import pdb
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from pathlib import Path
|
||||||
from typing import List, Dict, Set, Tuple, Optional
|
from typing import List, Dict, Set, Tuple, Optional
|
||||||
|
import os, sys
|
||||||
|
from types import ModuleType
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
|
@ -34,6 +38,7 @@ ElementName
|
||||||
)
|
)
|
||||||
from linkml_runtime.utils.formatutils import camelcase, underscore
|
from linkml_runtime.utils.formatutils import camelcase, underscore
|
||||||
from linkml_runtime.utils.schemaview import SchemaView
|
from linkml_runtime.utils.schemaview import SchemaView
|
||||||
|
from linkml_runtime.utils.compile_python import file_text
|
||||||
from jinja2 import Template
|
from jinja2 import Template
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,12 +133,13 @@ class {{ c.name }}
|
||||||
\"\"\"
|
\"\"\"
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% for attr in c.attributes.values() if c.attributes -%}
|
{% for attr in c.attributes.values() if c.attributes -%}
|
||||||
{{attr.name}}: {{ attr.annotations['python_range'].value }} = Field(
|
{{attr.name}}: {%- if attr.equals_string -%}
|
||||||
|
Literal[{{ predefined_slot_values[c.name][attr.name] }}]
|
||||||
|
{%- else -%}
|
||||||
|
{{ attr.annotations['python_range'].value }}
|
||||||
|
{%- endif -%} = Field(
|
||||||
{%- if predefined_slot_values[c.name][attr.name] -%}
|
{%- if predefined_slot_values[c.name][attr.name] -%}
|
||||||
{{ predefined_slot_values[c.name][attr.name] }}
|
{{ predefined_slot_values[c.name][attr.name] }}
|
||||||
{%- if attr.equals_string -%}
|
|
||||||
, const=True
|
|
||||||
{%- endif -%}
|
|
||||||
{%- elif attr.required -%}
|
{%- elif attr.required -%}
|
||||||
...
|
...
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
|
@ -169,10 +175,15 @@ class {{ c.name }}
|
||||||
return template
|
return template
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
class NWBPydanticGenerator(PydanticGenerator):
|
class NWBPydanticGenerator(PydanticGenerator):
|
||||||
|
|
||||||
SKIP_ENUM=('FlatDType',)
|
SKIP_ENUM=('FlatDType',)
|
||||||
|
# SKIP_SLOTS=('VectorData',)
|
||||||
|
SKIP_SLOTS=('',)
|
||||||
|
SKIP_CLASSES=('',)
|
||||||
|
# SKIP_CLASSES=('VectorData','VectorIndex')
|
||||||
|
split:bool=True
|
||||||
|
|
||||||
def _locate_imports(
|
def _locate_imports(
|
||||||
self,
|
self,
|
||||||
|
@ -229,6 +240,8 @@ class NWBPydanticGenerator(PydanticGenerator):
|
||||||
needed_classes.append(cls.is_a)
|
needed_classes.append(cls.is_a)
|
||||||
# get needed classes used as ranges in class attributes
|
# get needed classes used as ranges in class attributes
|
||||||
for slot_name in sv.class_slots(cls.name):
|
for slot_name in sv.class_slots(cls.name):
|
||||||
|
if slot_name in self.SKIP_SLOTS:
|
||||||
|
continue
|
||||||
slot = deepcopy(sv.induced_slot(slot_name, cls.name))
|
slot = deepcopy(sv.induced_slot(slot_name, cls.name))
|
||||||
if slot.range in all_classes:
|
if slot.range in all_classes:
|
||||||
needed_classes.append(slot.range)
|
needed_classes.append(slot.range)
|
||||||
|
@ -316,7 +329,7 @@ class NWBPydanticGenerator(PydanticGenerator):
|
||||||
else:
|
else:
|
||||||
shape_part = "*"
|
shape_part = "*"
|
||||||
# do this cheaply instead of using regex because i want to see if this works at all first...
|
# do this cheaply instead of using regex because i want to see if this works at all first...
|
||||||
name_part = attr.name.replace(',', '_').replace(' ', '_').replace('__', '_')
|
name_part = attr.name.replace(',', '_').replace(' ', '_').replace('__', '_').replace('|','_')
|
||||||
|
|
||||||
dim_pieces.append(' '.join([shape_part, name_part]))
|
dim_pieces.append(' '.join([shape_part, name_part]))
|
||||||
|
|
||||||
|
@ -371,6 +384,7 @@ class NWBPydanticGenerator(PydanticGenerator):
|
||||||
Modified from original to allow for imported classes
|
Modified from original to allow for imported classes
|
||||||
"""
|
"""
|
||||||
clist = list(clist)
|
clist = list(clist)
|
||||||
|
clist = [c for c in clist if c.name not in self.SKIP_CLASSES]
|
||||||
slist = [] # sorted
|
slist = [] # sorted
|
||||||
while len(clist) > 0:
|
while len(clist) > 0:
|
||||||
can_add = False
|
can_add = False
|
||||||
|
@ -454,6 +468,7 @@ class NWBPydanticGenerator(PydanticGenerator):
|
||||||
# filter skipped enums
|
# filter skipped enums
|
||||||
enums = {k:v for k,v in enums.items() if k not in self.SKIP_ENUM}
|
enums = {k:v for k,v in enums.items() if k not in self.SKIP_ENUM}
|
||||||
|
|
||||||
|
if self.split:
|
||||||
# import from local references, rather than serializing every class in every file
|
# import from local references, rather than serializing every class in every file
|
||||||
if 'namespace' in schema.annotations.keys() and schema.annotations['namespace']['value'] == 'True':
|
if 'namespace' in schema.annotations.keys() and schema.annotations['namespace']['value'] == 'True':
|
||||||
imports = self._get_namespace_imports(sv)
|
imports = self._get_namespace_imports(sv)
|
||||||
|
@ -461,6 +476,16 @@ class NWBPydanticGenerator(PydanticGenerator):
|
||||||
imports = self._get_imports(sv)
|
imports = self._get_imports(sv)
|
||||||
|
|
||||||
sorted_classes = self._get_classes(sv, imports)
|
sorted_classes = self._get_classes(sv, imports)
|
||||||
|
else:
|
||||||
|
sorted_classes = self.sort_classes(list(sv.all_classes().values()), [])
|
||||||
|
imports = {}
|
||||||
|
|
||||||
|
# Don't want to generate classes when class_uri is linkml:Any, will
|
||||||
|
# just swap in typing.Any instead down below
|
||||||
|
sorted_classes = [c for c in sorted_classes if c.class_uri != "linkml:Any"]
|
||||||
|
self.sorted_class_names = [camelcase(c.name) for c in sorted_classes]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for class_original in sorted_classes:
|
for class_original in sorted_classes:
|
||||||
# Generate class definition
|
# Generate class definition
|
||||||
|
@ -479,6 +504,8 @@ class NWBPydanticGenerator(PydanticGenerator):
|
||||||
|
|
||||||
class_name = class_original.name
|
class_name = class_original.name
|
||||||
for sn in sv.class_slots(class_name):
|
for sn in sv.class_slots(class_name):
|
||||||
|
if sn in self.SKIP_SLOTS:
|
||||||
|
continue
|
||||||
# TODO: fix runtime, copy should not be necessary
|
# TODO: fix runtime, copy should not be necessary
|
||||||
s = deepcopy(sv.induced_slot(sn, class_name))
|
s = deepcopy(sv.induced_slot(sn, class_name))
|
||||||
# logging.error(f'Induced slot {class_name}.{sn} == {s.name} {s.range}')
|
# logging.error(f'Induced slot {class_name}.{sn} == {s.name} {s.range}')
|
||||||
|
@ -537,3 +564,53 @@ class NWBPydanticGenerator(PydanticGenerator):
|
||||||
class_isa_plus_mixins=self.get_class_isa_plus_mixins(sorted_classes),
|
class_isa_plus_mixins=self.get_class_isa_plus_mixins(sorted_classes),
|
||||||
)
|
)
|
||||||
return code
|
return code
|
||||||
|
|
||||||
|
def compile_module(self, module_path:Path=None, **kwargs) -> ModuleType:
|
||||||
|
"""
|
||||||
|
Compiles generated python code to a module
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
pycode = self.serialize(**kwargs)
|
||||||
|
if module_path is not None:
|
||||||
|
module_path = Path(module_path)
|
||||||
|
init_file = module_path / '__init__.py'
|
||||||
|
with open(init_file, 'w') as ifile:
|
||||||
|
ifile.write(' ')
|
||||||
|
|
||||||
|
try:
|
||||||
|
return compile_python(pycode, module_path)
|
||||||
|
except NameError as e:
|
||||||
|
raise e
|
||||||
|
|
||||||
|
def compile_python(text_or_fn: str, package_path: Path = None) -> ModuleType:
|
||||||
|
"""
|
||||||
|
Compile the text or file and return the resulting module
|
||||||
|
@param text_or_fn: Python text or file name that references python file
|
||||||
|
@param package_path: Root package path. If omitted and we've got a python file, the package is the containing
|
||||||
|
directory
|
||||||
|
@return: Compiled module
|
||||||
|
"""
|
||||||
|
python_txt = file_text(text_or_fn)
|
||||||
|
if package_path is None and python_txt != text_or_fn:
|
||||||
|
package_path = Path(text_or_fn)
|
||||||
|
spec = compile(python_txt, '<string>', 'exec')
|
||||||
|
module = ModuleType('test')
|
||||||
|
# if package_path:
|
||||||
|
# if package_path.is_absolute():
|
||||||
|
# module.__package__ = str(package_path)
|
||||||
|
# else:
|
||||||
|
# package_path_abs = os.path.join(os.getcwd(), package_path)
|
||||||
|
# # We have to calculate the path to expected path relative to the current working directory
|
||||||
|
# for path in sys.path:
|
||||||
|
# if package_path.startswith(path):
|
||||||
|
# path_from_tests_parent = os.path.relpath(package_path, path)
|
||||||
|
# break
|
||||||
|
# if package_path_abs.startswith(path):
|
||||||
|
# path_from_tests_parent = os.path.relpath(package_path_abs, path)
|
||||||
|
# break
|
||||||
|
# else:
|
||||||
|
# path_from_tests_parent = os.path.relpath(package_path, os.path.join(os.getcwd(), '..'))
|
||||||
|
# module.__package__ = os.path.dirname(os.path.relpath(path_from_tests_parent, os.getcwd())).replace(os.path.sep, '.')
|
||||||
|
# sys.modules[module.__name__] = module
|
||||||
|
exec(spec, module.__dict__)
|
||||||
|
return module
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Loading/saving NWB Schema yaml files
|
Loading/saving NWB Schema yaml files
|
||||||
"""
|
"""
|
||||||
|
import pdb
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TypedDict, List, Dict
|
from typing import TypedDict, List, Dict, Optional
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
|
@ -39,7 +40,10 @@ def load_namespaces(path:Path|NamespaceRepo) -> Namespaces:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def load_schema_file(path:Path) -> SchemaAdapter:
|
def load_schema_file(path:Path, yaml:Optional[dict] = None) -> SchemaAdapter:
|
||||||
|
if yaml is not None:
|
||||||
|
source = yaml
|
||||||
|
else:
|
||||||
source = load_yaml(path)
|
source = load_yaml(path)
|
||||||
|
|
||||||
datasets = []
|
datasets = []
|
||||||
|
@ -125,3 +129,4 @@ def load_nwb_core() -> NamespacesAdapter:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -65,3 +65,9 @@ class KeyMap(Map):
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def apply_preload(ns_dict) -> dict:
|
||||||
|
from nwb_linkml.maps import preload
|
||||||
|
maps = [m for m in Map.instances if m.phase == PHASES.postload]
|
||||||
|
for amap in maps:
|
||||||
|
ns_dict = amap.apply(ns_dict)
|
||||||
|
return ns_dict
|
|
@ -11,6 +11,132 @@ else:
|
||||||
from typing_extensions import Literal
|
from typing_extensions import Literal
|
||||||
|
|
||||||
|
|
||||||
|
from .core_nwb_retinotopy import (
|
||||||
|
ImagingRetinotopy
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_base import (
|
||||||
|
NWBData,
|
||||||
|
TimeSeriesReferenceVectorData,
|
||||||
|
Image,
|
||||||
|
ImageReferences,
|
||||||
|
NWBContainer,
|
||||||
|
NWBDataInterface,
|
||||||
|
TimeSeries,
|
||||||
|
ProcessingModule,
|
||||||
|
Images
|
||||||
|
)
|
||||||
|
|
||||||
|
from .hdmf_common_table import (
|
||||||
|
VectorData,
|
||||||
|
VectorIndex,
|
||||||
|
ElementIdentifiers,
|
||||||
|
DynamicTableRegion,
|
||||||
|
DynamicTable,
|
||||||
|
AlignedDynamicTable
|
||||||
|
)
|
||||||
|
|
||||||
|
from .hdmf_common_base import (
|
||||||
|
Data,
|
||||||
|
Container,
|
||||||
|
SimpleMultiContainer
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_ophys import (
|
||||||
|
OnePhotonSeries,
|
||||||
|
TwoPhotonSeries,
|
||||||
|
RoiResponseSeries,
|
||||||
|
DfOverF,
|
||||||
|
Fluorescence,
|
||||||
|
ImageSegmentation,
|
||||||
|
PlaneSegmentation,
|
||||||
|
ImagingPlane,
|
||||||
|
OpticalChannel,
|
||||||
|
MotionCorrection,
|
||||||
|
CorrectedImageStack
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_device import (
|
||||||
|
Device
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_image import (
|
||||||
|
GrayscaleImage,
|
||||||
|
RGBImage,
|
||||||
|
RGBAImage,
|
||||||
|
ImageSeries,
|
||||||
|
ImageMaskSeries,
|
||||||
|
OpticalSeries,
|
||||||
|
IndexSeries
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_ogen import (
|
||||||
|
OptogeneticSeries,
|
||||||
|
OptogeneticStimulusSite
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_icephys import (
|
||||||
|
PatchClampSeries,
|
||||||
|
CurrentClampSeries,
|
||||||
|
IZeroClampSeries,
|
||||||
|
CurrentClampStimulusSeries,
|
||||||
|
VoltageClampSeries,
|
||||||
|
VoltageClampStimulusSeries,
|
||||||
|
IntracellularElectrode,
|
||||||
|
SweepTable,
|
||||||
|
IntracellularElectrodesTable,
|
||||||
|
IntracellularStimuliTable,
|
||||||
|
IntracellularResponsesTable,
|
||||||
|
IntracellularRecordingsTable,
|
||||||
|
SimultaneousRecordingsTable,
|
||||||
|
SequentialRecordingsTable,
|
||||||
|
RepetitionsTable,
|
||||||
|
ExperimentalConditionsTable
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_ecephys import (
|
||||||
|
ElectricalSeries,
|
||||||
|
SpikeEventSeries,
|
||||||
|
FeatureExtraction,
|
||||||
|
EventDetection,
|
||||||
|
EventWaveform,
|
||||||
|
FilteredEphys,
|
||||||
|
LFP,
|
||||||
|
ElectrodeGroup,
|
||||||
|
ClusterWaveforms,
|
||||||
|
Clustering
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_behavior import (
|
||||||
|
SpatialSeries,
|
||||||
|
BehavioralEpochs,
|
||||||
|
BehavioralEvents,
|
||||||
|
BehavioralTimeSeries,
|
||||||
|
PupilTracking,
|
||||||
|
EyeTracking,
|
||||||
|
CompassDirection,
|
||||||
|
Position
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_misc import (
|
||||||
|
AbstractFeatureSeries,
|
||||||
|
AnnotationSeries,
|
||||||
|
IntervalSeries,
|
||||||
|
DecompositionSeries,
|
||||||
|
Units
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_file import (
|
||||||
|
ScratchData,
|
||||||
|
NWBFile,
|
||||||
|
LabMetaData,
|
||||||
|
Subject
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_epoch import (
|
||||||
|
TimeIntervals
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
metamodel_version = "None"
|
||||||
version = "2.6.0-alpha"
|
version = "2.6.0-alpha"
|
||||||
|
|
|
@ -11,23 +11,14 @@ else:
|
||||||
from typing_extensions import Literal
|
from typing_extensions import Literal
|
||||||
|
|
||||||
|
|
||||||
from .hdmf_common_table import (
|
|
||||||
DynamicTable,
|
|
||||||
VectorData
|
|
||||||
)
|
|
||||||
|
|
||||||
from .hdmf_common_base import (
|
from .hdmf_common_base import (
|
||||||
Data,
|
Data,
|
||||||
Container
|
Container
|
||||||
)
|
)
|
||||||
|
|
||||||
from .core_nwb_base_include import (
|
from .hdmf_common_table import (
|
||||||
TimeSeriesStartingTime,
|
DynamicTable,
|
||||||
ImageArray,
|
VectorData
|
||||||
ImageReferencesArray,
|
|
||||||
TimeSeriesSync,
|
|
||||||
ImagesOrderOfImages,
|
|
||||||
TimeSeriesData
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -115,6 +106,41 @@ class TimeSeries(NWBDataInterface):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class TimeSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Data values. Data can be in 1-D, 2-D, 3-D, or 4-D. The first dimension should always represent time. This can also be used to store binary data (e.g., image frames). This can also be a link to data stored in an external file.
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
conversion:Optional[float]= Field(None, description="""Scalar to multiply each element in data to convert it to the specified 'unit'. If the data are stored in acquisition system units or other units that require a conversion to be interpretable, multiply the data by 'conversion' to convert the data to the specified 'unit'. e.g. if the data acquisition system stores values in this object as 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.""")
|
||||||
|
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(None, 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.""")
|
||||||
|
unit:Optional[str]= Field(None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""")
|
||||||
|
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.""")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["* num_times"], Any],
|
||||||
|
NDArray[Shape["* num_times, * num_DIM2"], Any],
|
||||||
|
NDArray[Shape["* num_times, * num_DIM2, * num_DIM3"], Any],
|
||||||
|
NDArray[Shape["* num_times, * num_DIM2, * num_DIM3, * num_DIM4"], Any]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class TimeSeriesStartingTime(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Timestamp of the first sample in seconds. When timestamps are uniformly spaced, the timestamp of the first sample can be specified and all subsequent ones calculated from the sampling rate attribute.
|
||||||
|
"""
|
||||||
|
name:Literal["starting_time"]= Field("starting_time")
|
||||||
|
rate:Optional[float]= Field(None, description="""Sampling rate, in Hz.""")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit of measurement for time, which is fixed to 'seconds'.""")
|
||||||
|
value:float= Field(...)
|
||||||
|
|
||||||
|
|
||||||
|
class TimeSeriesSync(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.
|
||||||
|
"""
|
||||||
|
name:Literal["sync"]= Field("sync")
|
||||||
|
|
||||||
|
|
||||||
class ProcessingModule(NWBContainer):
|
class ProcessingModule(NWBContainer):
|
||||||
"""
|
"""
|
||||||
A collection of processed data.
|
A collection of processed data.
|
||||||
|
@ -131,10 +157,18 @@ class Images(NWBDataInterface):
|
||||||
"""
|
"""
|
||||||
name:str= Field(...)
|
name:str= Field(...)
|
||||||
description:Optional[str]= Field(None, description="""Description of this collection of images.""")
|
description:Optional[str]= Field(None, description="""Description of this collection of images.""")
|
||||||
Image: List[Image] = Field(default_factory=list, description="""Images stored in this collection.""")
|
image:List[Image]= Field(default_factory=list, description="""Images stored in this collection.""")
|
||||||
order_of_images:Optional[ImagesOrderOfImages]= Field(None, description="""Ordered dataset of references to Image objects stored in the parent group. Each Image object in the Images group should be stored once and only once, so the dataset should have the same length as the number of images.""")
|
order_of_images:Optional[ImagesOrderOfImages]= Field(None, description="""Ordered dataset of references to Image objects stored in the parent group. Each Image object in the Images group should be stored once and only once, so the dataset should have the same length as the number of images.""")
|
||||||
|
|
||||||
|
|
||||||
|
class ImagesOrderOfImages(ImageReferences):
|
||||||
|
"""
|
||||||
|
Ordered dataset of references to Image objects stored in the parent group. Each Image object in the Images group should be stored once and only once, so the dataset should have the same length as the number of images.
|
||||||
|
"""
|
||||||
|
name:Literal["order_of_images"]= Field("order_of_images")
|
||||||
|
array:Optional[List[Image] | Image]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Model rebuild
|
# Model rebuild
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
||||||
|
@ -145,6 +179,10 @@ ImageReferences.model_rebuild()
|
||||||
NWBContainer.model_rebuild()
|
NWBContainer.model_rebuild()
|
||||||
NWBDataInterface.model_rebuild()
|
NWBDataInterface.model_rebuild()
|
||||||
TimeSeries.model_rebuild()
|
TimeSeries.model_rebuild()
|
||||||
|
TimeSeriesData.model_rebuild()
|
||||||
|
TimeSeriesStartingTime.model_rebuild()
|
||||||
|
TimeSeriesSync.model_rebuild()
|
||||||
ProcessingModule.model_rebuild()
|
ProcessingModule.model_rebuild()
|
||||||
Images.model_rebuild()
|
Images.model_rebuild()
|
||||||
|
ImagesOrderOfImages.model_rebuild()
|
||||||
|
|
|
@ -1,109 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
from datetime import datetime, date
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Dict, Optional, Any, Union
|
|
||||||
from pydantic import BaseModel as BaseModel, Field
|
|
||||||
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
|
||||||
import sys
|
|
||||||
if sys.version_info >= (3, 8):
|
|
||||||
from typing import Literal
|
|
||||||
else:
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
|
|
||||||
from .nwb_language import (
|
|
||||||
Arraylike
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_base import (
|
|
||||||
ImageReferences,
|
|
||||||
Image
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
|
||||||
version = "None"
|
|
||||||
|
|
||||||
class ConfiguredBaseModel(BaseModel,
|
|
||||||
validate_assignment = True,
|
|
||||||
validate_default = True,
|
|
||||||
extra = 'forbid',
|
|
||||||
arbitrary_types_allowed = True,
|
|
||||||
use_enum_values = True):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class ImageArray(Arraylike):
|
|
||||||
|
|
||||||
x: float = Field(...)
|
|
||||||
y: float = Field(...)
|
|
||||||
r_g_b: Optional[float] = Field(None)
|
|
||||||
r_g_b_a: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImageReferencesArray(Arraylike):
|
|
||||||
|
|
||||||
num_images: Image = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class TimeSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Data values. Data can be in 1-D, 2-D, 3-D, or 4-D. The first dimension should always represent time. This can also be used to store binary data (e.g., image frames). This can also be a link to data stored in an external file.
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
conversion: Optional[float] = Field(None, description="""Scalar to multiply each element in data to convert it to the specified 'unit'. If the data are stored in acquisition system units or other units that require a conversion to be interpretable, multiply the data by 'conversion' to convert the data to the specified 'unit'. e.g. if the data acquisition system stores values in this object as 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.""")
|
|
||||||
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(None, 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.""")
|
|
||||||
unit: Optional[str] = Field(None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""")
|
|
||||||
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.""")
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["* num_times"], Any],
|
|
||||||
NDArray[Shape["* num_times, * num_DIM2"], Any],
|
|
||||||
NDArray[Shape["* num_times, * num_DIM2, * num_DIM3"], Any],
|
|
||||||
NDArray[Shape["* num_times, * num_DIM2, * num_DIM3, * num_DIM4"], Any]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class TimeSeriesDataArray(Arraylike):
|
|
||||||
|
|
||||||
num_times: Any = Field(...)
|
|
||||||
num_DIM2: Optional[Any] = Field(None)
|
|
||||||
num_DIM3: Optional[Any] = Field(None)
|
|
||||||
num_DIM4: Optional[Any] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class TimeSeriesStartingTime(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Timestamp of the first sample in seconds. When timestamps are uniformly spaced, the timestamp of the first sample can be specified and all subsequent ones calculated from the sampling rate attribute.
|
|
||||||
"""
|
|
||||||
name: str = Field("starting_time", const=True)
|
|
||||||
rate: Optional[float] = Field(None, description="""Sampling rate, in Hz.""")
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement for time, which is fixed to 'seconds'.""")
|
|
||||||
|
|
||||||
|
|
||||||
class TimeSeriesSync(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.
|
|
||||||
"""
|
|
||||||
name: str = Field("sync", const=True)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagesOrderOfImages(ImageReferences):
|
|
||||||
"""
|
|
||||||
Ordered dataset of references to Image objects stored in the parent group. Each Image object in the Images group should be stored once and only once, so the dataset should have the same length as the number of images.
|
|
||||||
"""
|
|
||||||
name: str = Field("order_of_images", const=True)
|
|
||||||
array: Optional[List[Image] | Image] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Model rebuild
|
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
||||||
ImageArray.model_rebuild()
|
|
||||||
ImageReferencesArray.model_rebuild()
|
|
||||||
TimeSeriesData.model_rebuild()
|
|
||||||
TimeSeriesDataArray.model_rebuild()
|
|
||||||
TimeSeriesStartingTime.model_rebuild()
|
|
||||||
TimeSeriesSync.model_rebuild()
|
|
||||||
ImagesOrderOfImages.model_rebuild()
|
|
||||||
|
|
|
@ -12,14 +12,12 @@ else:
|
||||||
|
|
||||||
|
|
||||||
from .core_nwb_base import (
|
from .core_nwb_base import (
|
||||||
|
TimeSeriesStartingTime,
|
||||||
TimeSeries,
|
TimeSeries,
|
||||||
|
TimeSeriesSync,
|
||||||
NWBDataInterface
|
NWBDataInterface
|
||||||
)
|
)
|
||||||
|
|
||||||
from .core_nwb_behavior_include import (
|
|
||||||
SpatialSeriesData
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_misc import (
|
from .core_nwb_misc import (
|
||||||
IntervalSeries
|
IntervalSeries
|
||||||
)
|
)
|
||||||
|
@ -53,6 +51,20 @@ class SpatialSeries(TimeSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class SpatialSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
1-D or 2-D array storing position or direction relative to some reference frame.
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
unit:Optional[str]= Field(None, description="""Base unit of measurement for working with the data. The default value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["* num_times"], Number],
|
||||||
|
NDArray[Shape["* num_times, 1 x"], Number],
|
||||||
|
NDArray[Shape["* num_times, 1 x, 2 x_y"], Number],
|
||||||
|
NDArray[Shape["* num_times, 1 x, 2 x_y, 3 x_y_z"], Number]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
class BehavioralEpochs(NWBDataInterface):
|
class BehavioralEpochs(NWBDataInterface):
|
||||||
"""
|
"""
|
||||||
TimeSeries for storing behavioral epochs. The objective of this and the other two Behavioral interfaces (e.g. BehavioralEvents and BehavioralTimeSeries) is to provide generic hooks for software tools/scripts. This allows a tool/script to take the output one specific interface (e.g., UnitTimes) and plot that data relative to another data modality (e.g., behavioral events) without having to define all possible modalities in advance. Declaring one of these interfaces means that one or more TimeSeries of the specified type is published. These TimeSeries should reside in a group having the same name as the interface. For example, if a BehavioralTimeSeries interface is declared, the module will have one or more TimeSeries defined in the module sub-group 'BehavioralTimeSeries'. BehavioralEpochs should use IntervalSeries. BehavioralEvents is used for irregular events. BehavioralTimeSeries is for continuous data.
|
TimeSeries for storing behavioral epochs. The objective of this and the other two Behavioral interfaces (e.g. BehavioralEvents and BehavioralTimeSeries) is to provide generic hooks for software tools/scripts. This allows a tool/script to take the output one specific interface (e.g., UnitTimes) and plot that data relative to another data modality (e.g., behavioral events) without having to define all possible modalities in advance. Declaring one of these interfaces means that one or more TimeSeries of the specified type is published. These TimeSeries should reside in a group having the same name as the interface. For example, if a BehavioralTimeSeries interface is declared, the module will have one or more TimeSeries defined in the module sub-group 'BehavioralTimeSeries'. BehavioralEpochs should use IntervalSeries. BehavioralEvents is used for irregular events. BehavioralTimeSeries is for continuous data.
|
||||||
|
@ -113,6 +125,7 @@ class Position(NWBDataInterface):
|
||||||
# Model rebuild
|
# Model rebuild
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
||||||
SpatialSeries.model_rebuild()
|
SpatialSeries.model_rebuild()
|
||||||
|
SpatialSeriesData.model_rebuild()
|
||||||
BehavioralEpochs.model_rebuild()
|
BehavioralEpochs.model_rebuild()
|
||||||
BehavioralEvents.model_rebuild()
|
BehavioralEvents.model_rebuild()
|
||||||
BehavioralTimeSeries.model_rebuild()
|
BehavioralTimeSeries.model_rebuild()
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
from datetime import datetime, date
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Dict, Optional, Any, Union
|
|
||||||
from pydantic import BaseModel as BaseModel, Field
|
|
||||||
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
|
||||||
import sys
|
|
||||||
if sys.version_info >= (3, 8):
|
|
||||||
from typing import Literal
|
|
||||||
else:
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
|
|
||||||
from .nwb_language import (
|
|
||||||
Arraylike
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
|
||||||
version = "None"
|
|
||||||
|
|
||||||
class ConfiguredBaseModel(BaseModel,
|
|
||||||
validate_assignment = True,
|
|
||||||
validate_default = True,
|
|
||||||
extra = 'forbid',
|
|
||||||
arbitrary_types_allowed = True,
|
|
||||||
use_enum_values = True):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class SpatialSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
1-D or 2-D array storing position or direction relative to some reference frame.
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Base unit of measurement for working with the data. The default value is 'meters'. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion' and add 'offset'.""")
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["* num_times"], Number],
|
|
||||||
NDArray[Shape["* num_times, 1 x"], Number],
|
|
||||||
NDArray[Shape["* num_times, 1 x, 2 x_y"], Number],
|
|
||||||
NDArray[Shape["* num_times, 1 x, 2 x_y, 3 x_y_z"], Number]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class SpatialSeriesDataArray(Arraylike):
|
|
||||||
|
|
||||||
num_times: float = Field(...)
|
|
||||||
x: Optional[float] = Field(None)
|
|
||||||
xy: Optional[float] = Field(None)
|
|
||||||
xyz: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Model rebuild
|
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
||||||
SpatialSeriesData.model_rebuild()
|
|
||||||
SpatialSeriesDataArray.model_rebuild()
|
|
||||||
|
|
|
@ -12,19 +12,16 @@ else:
|
||||||
|
|
||||||
|
|
||||||
from .core_nwb_base import (
|
from .core_nwb_base import (
|
||||||
TimeSeries,
|
TimeSeriesStartingTime,
|
||||||
NWBContainer,
|
NWBContainer,
|
||||||
|
TimeSeriesSync,
|
||||||
|
TimeSeries,
|
||||||
NWBDataInterface
|
NWBDataInterface
|
||||||
)
|
)
|
||||||
|
|
||||||
from .core_nwb_ecephys_include import (
|
from .hdmf_common_table import (
|
||||||
FeatureExtractionElectrodes,
|
DynamicTable,
|
||||||
ClusterWaveformsWaveformSd,
|
DynamicTableRegion
|
||||||
ClusterWaveformsWaveformMean,
|
|
||||||
SpikeEventSeriesData,
|
|
||||||
ElectricalSeriesElectrodes,
|
|
||||||
ElectricalSeriesData,
|
|
||||||
FeatureExtractionFeatures
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,6 +55,34 @@ class ElectricalSeries(TimeSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class ElectricalSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Recorded voltage data.
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
unit:Optional[str]= Field(None, 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'.""")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["* num_times"], Number],
|
||||||
|
NDArray[Shape["* num_times, * num_channels"], Number],
|
||||||
|
NDArray[Shape["* num_times, * num_channels, * num_samples"], Number]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class ElectricalSeriesElectrodes(DynamicTableRegion):
|
||||||
|
"""
|
||||||
|
DynamicTableRegion pointer to the electrodes that this time series was generated from.
|
||||||
|
"""
|
||||||
|
name:Literal["electrodes"]= Field("electrodes")
|
||||||
|
table:Optional[DynamicTable]= Field(None, description="""Reference to the DynamicTable object that this region applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what this table region points to.""")
|
||||||
|
array: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 SpikeEventSeries(ElectricalSeries):
|
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).
|
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).
|
||||||
|
@ -76,6 +101,18 @@ class SpikeEventSeries(ElectricalSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class SpikeEventSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Spike waveforms.
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit of measurement for waveforms, which is fixed to 'volts'.""")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["* num_events, * num_samples"], Number],
|
||||||
|
NDArray[Shape["* num_events, * num_samples, * num_channels"], Number]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
class FeatureExtraction(NWBDataInterface):
|
class FeatureExtraction(NWBDataInterface):
|
||||||
"""
|
"""
|
||||||
Features, such as PC1 and PC2, that are extracted from signals stored in a SpikeEventSeries or other source.
|
Features, such as PC1 and PC2, that are extracted from signals stored in a SpikeEventSeries or other source.
|
||||||
|
@ -87,6 +124,29 @@ class FeatureExtraction(NWBDataInterface):
|
||||||
electrodes:FeatureExtractionElectrodes= Field(..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""")
|
electrodes:FeatureExtractionElectrodes= Field(..., description="""DynamicTableRegion pointer to the electrodes that this time series was generated from.""")
|
||||||
|
|
||||||
|
|
||||||
|
class FeatureExtractionFeatures(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Multi-dimensional array of features extracted from each event.
|
||||||
|
"""
|
||||||
|
name:Literal["features"]= Field("features")
|
||||||
|
array:Optional[NDArray[Shape["* num_events, * num_channels, * num_features"], Float32]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class FeatureExtractionElectrodes(DynamicTableRegion):
|
||||||
|
"""
|
||||||
|
DynamicTableRegion pointer to the electrodes that this time series was generated from.
|
||||||
|
"""
|
||||||
|
name:Literal["electrodes"]= Field("electrodes")
|
||||||
|
table:Optional[DynamicTable]= Field(None, description="""Reference to the DynamicTable object that this region applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what this table region points to.""")
|
||||||
|
array: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 EventDetection(NWBDataInterface):
|
class EventDetection(NWBDataInterface):
|
||||||
"""
|
"""
|
||||||
Detected spike events from voltage trace(s).
|
Detected spike events from voltage trace(s).
|
||||||
|
@ -141,6 +201,22 @@ class ClusterWaveforms(NWBDataInterface):
|
||||||
waveform_sd:ClusterWaveformsWaveformSd= Field(..., description="""Stdev of waveforms for each cluster, using the same indices as in mean""")
|
waveform_sd:ClusterWaveformsWaveformSd= Field(..., description="""Stdev of waveforms for each cluster, using the same indices as in mean""")
|
||||||
|
|
||||||
|
|
||||||
|
class ClusterWaveformsWaveformMean(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
The mean waveform for each cluster, using the same indices for each wave as cluster numbers in the associated Clustering module (i.e, cluster 3 is in array slot [3]). Waveforms corresponding to gaps in cluster sequence should be empty (e.g., zero- filled)
|
||||||
|
"""
|
||||||
|
name:Literal["waveform_mean"]= Field("waveform_mean")
|
||||||
|
array:Optional[NDArray[Shape["* num_clusters, * num_samples"], Float32]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class ClusterWaveformsWaveformSd(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Stdev of waveforms for each cluster, using the same indices as in mean
|
||||||
|
"""
|
||||||
|
name:Literal["waveform_sd"]= Field("waveform_sd")
|
||||||
|
array:Optional[NDArray[Shape["* num_clusters, * num_samples"], Float32]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
class Clustering(NWBDataInterface):
|
class Clustering(NWBDataInterface):
|
||||||
"""
|
"""
|
||||||
DEPRECATED Clustered spike data, whether from automatic clustering tools (e.g., klustakwik) or as a result of manual sorting.
|
DEPRECATED Clustered spike data, whether from automatic clustering tools (e.g., klustakwik) or as a result of manual sorting.
|
||||||
|
@ -156,13 +232,20 @@ class Clustering(NWBDataInterface):
|
||||||
# Model rebuild
|
# Model rebuild
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
||||||
ElectricalSeries.model_rebuild()
|
ElectricalSeries.model_rebuild()
|
||||||
|
ElectricalSeriesData.model_rebuild()
|
||||||
|
ElectricalSeriesElectrodes.model_rebuild()
|
||||||
SpikeEventSeries.model_rebuild()
|
SpikeEventSeries.model_rebuild()
|
||||||
|
SpikeEventSeriesData.model_rebuild()
|
||||||
FeatureExtraction.model_rebuild()
|
FeatureExtraction.model_rebuild()
|
||||||
|
FeatureExtractionFeatures.model_rebuild()
|
||||||
|
FeatureExtractionElectrodes.model_rebuild()
|
||||||
EventDetection.model_rebuild()
|
EventDetection.model_rebuild()
|
||||||
EventWaveform.model_rebuild()
|
EventWaveform.model_rebuild()
|
||||||
FilteredEphys.model_rebuild()
|
FilteredEphys.model_rebuild()
|
||||||
LFP.model_rebuild()
|
LFP.model_rebuild()
|
||||||
ElectrodeGroup.model_rebuild()
|
ElectrodeGroup.model_rebuild()
|
||||||
ClusterWaveforms.model_rebuild()
|
ClusterWaveforms.model_rebuild()
|
||||||
|
ClusterWaveformsWaveformMean.model_rebuild()
|
||||||
|
ClusterWaveformsWaveformSd.model_rebuild()
|
||||||
Clustering.model_rebuild()
|
Clustering.model_rebuild()
|
||||||
|
|
|
@ -1,162 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
from datetime import datetime, date
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Dict, Optional, Any, Union
|
|
||||||
from pydantic import BaseModel as BaseModel, Field
|
|
||||||
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
|
||||||
import sys
|
|
||||||
if sys.version_info >= (3, 8):
|
|
||||||
from typing import Literal
|
|
||||||
else:
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
|
|
||||||
from .hdmf_common_table import (
|
|
||||||
DynamicTableRegion
|
|
||||||
)
|
|
||||||
|
|
||||||
from .nwb_language import (
|
|
||||||
Arraylike
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
|
||||||
version = "None"
|
|
||||||
|
|
||||||
class ConfiguredBaseModel(BaseModel,
|
|
||||||
validate_assignment = True,
|
|
||||||
validate_default = True,
|
|
||||||
extra = 'forbid',
|
|
||||||
arbitrary_types_allowed = True,
|
|
||||||
use_enum_values = True):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class ElectricalSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Recorded voltage data.
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
unit: Optional[str] = Field(None, 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'.""")
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["* num_times"], Number],
|
|
||||||
NDArray[Shape["* num_times, * num_channels"], Number],
|
|
||||||
NDArray[Shape["* num_times, * num_channels, * num_samples"], Number]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ElectricalSeriesDataArray(Arraylike):
|
|
||||||
|
|
||||||
num_times: float = Field(...)
|
|
||||||
num_channels: Optional[float] = Field(None)
|
|
||||||
num_samples: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ElectricalSeriesElectrodes(DynamicTableRegion):
|
|
||||||
"""
|
|
||||||
DynamicTableRegion pointer to the electrodes that this time series was generated from.
|
|
||||||
"""
|
|
||||||
name: str = Field("electrodes", const=True)
|
|
||||||
table: Optional[DynamicTable] = Field(None, description="""Reference to the DynamicTable object that this region applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what this table region points to.""")
|
|
||||||
array: 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 SpikeEventSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Spike waveforms.
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement for waveforms, which is fixed to 'volts'.""")
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["* num_events, * num_samples"], Number],
|
|
||||||
NDArray[Shape["* num_events, * num_samples, * num_channels"], Number]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class SpikeEventSeriesDataArray(Arraylike):
|
|
||||||
|
|
||||||
num_events: float = Field(...)
|
|
||||||
num_samples: float = Field(...)
|
|
||||||
num_channels: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class FeatureExtractionFeatures(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Multi-dimensional array of features extracted from each event.
|
|
||||||
"""
|
|
||||||
name: str = Field("features", const=True)
|
|
||||||
array: Optional[NDArray[Shape["* num_events, * num_channels, * num_features"], Float32]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class FeatureExtractionFeaturesArray(Arraylike):
|
|
||||||
|
|
||||||
num_events: float = Field(...)
|
|
||||||
num_channels: float = Field(...)
|
|
||||||
num_features: float = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class FeatureExtractionElectrodes(DynamicTableRegion):
|
|
||||||
"""
|
|
||||||
DynamicTableRegion pointer to the electrodes that this time series was generated from.
|
|
||||||
"""
|
|
||||||
name: str = Field("electrodes", const=True)
|
|
||||||
table: Optional[DynamicTable] = Field(None, description="""Reference to the DynamicTable object that this region applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what this table region points to.""")
|
|
||||||
array: 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 ClusterWaveformsWaveformMean(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
The mean waveform for each cluster, using the same indices for each wave as cluster numbers in the associated Clustering module (i.e, cluster 3 is in array slot [3]). Waveforms corresponding to gaps in cluster sequence should be empty (e.g., zero- filled)
|
|
||||||
"""
|
|
||||||
name: str = Field("waveform_mean", const=True)
|
|
||||||
array: Optional[NDArray[Shape["* num_clusters, * num_samples"], Float32]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ClusterWaveformsWaveformMeanArray(Arraylike):
|
|
||||||
|
|
||||||
num_clusters: float = Field(...)
|
|
||||||
num_samples: float = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class ClusterWaveformsWaveformSd(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Stdev of waveforms for each cluster, using the same indices as in mean
|
|
||||||
"""
|
|
||||||
name: str = Field("waveform_sd", const=True)
|
|
||||||
array: Optional[NDArray[Shape["* num_clusters, * num_samples"], Float32]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ClusterWaveformsWaveformSdArray(Arraylike):
|
|
||||||
|
|
||||||
num_clusters: float = Field(...)
|
|
||||||
num_samples: float = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Model rebuild
|
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
||||||
ElectricalSeriesData.model_rebuild()
|
|
||||||
ElectricalSeriesDataArray.model_rebuild()
|
|
||||||
ElectricalSeriesElectrodes.model_rebuild()
|
|
||||||
SpikeEventSeriesData.model_rebuild()
|
|
||||||
SpikeEventSeriesDataArray.model_rebuild()
|
|
||||||
FeatureExtractionFeatures.model_rebuild()
|
|
||||||
FeatureExtractionFeaturesArray.model_rebuild()
|
|
||||||
FeatureExtractionElectrodes.model_rebuild()
|
|
||||||
ClusterWaveformsWaveformMean.model_rebuild()
|
|
||||||
ClusterWaveformsWaveformMeanArray.model_rebuild()
|
|
||||||
ClusterWaveformsWaveformSd.model_rebuild()
|
|
||||||
ClusterWaveformsWaveformSdArray.model_rebuild()
|
|
||||||
|
|
|
@ -12,13 +12,13 @@ else:
|
||||||
|
|
||||||
|
|
||||||
from .hdmf_common_table import (
|
from .hdmf_common_table import (
|
||||||
|
VectorIndex,
|
||||||
|
VectorData,
|
||||||
DynamicTable
|
DynamicTable
|
||||||
)
|
)
|
||||||
|
|
||||||
from .core_nwb_epoch_include import (
|
from .core_nwb_base import (
|
||||||
TimeIntervalsTimeseriesIndex,
|
TimeSeriesReferenceVectorData
|
||||||
TimeIntervalsTimeseries,
|
|
||||||
TimeIntervalsTagsIndex
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,11 +48,58 @@ class TimeIntervals(DynamicTable):
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
|
class TimeIntervalsTagsIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index for tags.
|
||||||
|
"""
|
||||||
|
name:Literal["tags_index"]= Field("tags_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 TimeIntervalsTimeseries(TimeSeriesReferenceVectorData):
|
||||||
|
"""
|
||||||
|
An index into a TimeSeries object.
|
||||||
|
"""
|
||||||
|
name:Literal["timeseries"]= Field("timeseries")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 TimeIntervalsTimeseriesIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index for timeseries.
|
||||||
|
"""
|
||||||
|
name:Literal["timeseries_index"]= Field("timeseries_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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
|
# Model rebuild
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
||||||
TimeIntervals.model_rebuild()
|
TimeIntervals.model_rebuild()
|
||||||
|
TimeIntervalsTagsIndex.model_rebuild()
|
||||||
|
TimeIntervalsTimeseries.model_rebuild()
|
||||||
|
TimeIntervalsTimeseriesIndex.model_rebuild()
|
||||||
|
|
|
@ -1,85 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
from datetime import datetime, date
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Dict, Optional, Any, Union
|
|
||||||
from pydantic import BaseModel as BaseModel, Field
|
|
||||||
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
|
||||||
import sys
|
|
||||||
if sys.version_info >= (3, 8):
|
|
||||||
from typing import Literal
|
|
||||||
else:
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
|
|
||||||
from .hdmf_common_table import (
|
|
||||||
VectorIndex
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_base import (
|
|
||||||
TimeSeriesReferenceVectorData
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
|
||||||
version = "None"
|
|
||||||
|
|
||||||
class ConfiguredBaseModel(BaseModel,
|
|
||||||
validate_assignment = True,
|
|
||||||
validate_default = True,
|
|
||||||
extra = 'forbid',
|
|
||||||
arbitrary_types_allowed = True,
|
|
||||||
use_enum_values = True):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class TimeIntervalsTagsIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index for tags.
|
|
||||||
"""
|
|
||||||
name: str = Field("tags_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 TimeIntervalsTimeseries(TimeSeriesReferenceVectorData):
|
|
||||||
"""
|
|
||||||
An index into a TimeSeries object.
|
|
||||||
"""
|
|
||||||
name: str = Field("timeseries", const=True)
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 TimeIntervalsTimeseriesIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index for timeseries.
|
|
||||||
"""
|
|
||||||
name: str = Field("timeseries_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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
|
|
||||||
TimeIntervalsTagsIndex.model_rebuild()
|
|
||||||
TimeIntervalsTimeseries.model_rebuild()
|
|
||||||
TimeIntervalsTimeseriesIndex.model_rebuild()
|
|
||||||
|
|
|
@ -11,24 +11,49 @@ else:
|
||||||
from typing_extensions import Literal
|
from typing_extensions import Literal
|
||||||
|
|
||||||
|
|
||||||
|
from .core_nwb_base import (
|
||||||
|
NWBContainer,
|
||||||
|
Images,
|
||||||
|
TimeSeries,
|
||||||
|
NWBDataInterface,
|
||||||
|
ProcessingModule,
|
||||||
|
NWBData
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_ecephys import (
|
||||||
|
ElectrodeGroup
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_ogen import (
|
||||||
|
OptogeneticStimulusSite
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_device import (
|
||||||
|
Device
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_ophys import (
|
||||||
|
ImagingPlane
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_epoch import (
|
||||||
|
TimeIntervals
|
||||||
|
)
|
||||||
|
|
||||||
|
from .core_nwb_icephys import (
|
||||||
|
IntracellularElectrode,
|
||||||
|
IntracellularRecordingsTable,
|
||||||
|
RepetitionsTable,
|
||||||
|
SimultaneousRecordingsTable,
|
||||||
|
ExperimentalConditionsTable,
|
||||||
|
SweepTable,
|
||||||
|
SequentialRecordingsTable
|
||||||
|
)
|
||||||
|
|
||||||
from .hdmf_common_table import (
|
from .hdmf_common_table import (
|
||||||
DynamicTable
|
DynamicTable
|
||||||
)
|
)
|
||||||
|
|
||||||
from .core_nwb_base import (
|
|
||||||
NWBData,
|
|
||||||
ProcessingModule,
|
|
||||||
NWBDataInterface,
|
|
||||||
NWBContainer
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_file_include import (
|
|
||||||
NWBFileGeneral,
|
|
||||||
SubjectAge,
|
|
||||||
NWBFileIntervals,
|
|
||||||
NWBFileStimulus
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_misc import (
|
from .core_nwb_misc import (
|
||||||
Units
|
Units
|
||||||
)
|
)
|
||||||
|
@ -58,7 +83,7 @@ class NWBFile(NWBContainer):
|
||||||
"""
|
"""
|
||||||
An NWB file storing cellular-based neurophysiology data from a single experimental session.
|
An NWB file storing cellular-based neurophysiology data from a single experimental session.
|
||||||
"""
|
"""
|
||||||
name: str = Field("root", const=True)
|
name:Literal["root"]= Field("root")
|
||||||
nwb_version:Optional[str]= Field(None, description="""File version string. Use semantic versioning, e.g. 1.2.1. This will be the name of the format with trailing major, minor and patch numbers.""")
|
nwb_version:Optional[str]= Field(None, description="""File version string. Use semantic versioning, e.g. 1.2.1. This will be the name of the format with trailing major, minor and patch numbers.""")
|
||||||
file_create_date:List[datetime ]= Field(default_factory=list, description="""A record of the date the file was created and of subsequent modifications. The date is stored in UTC with local timezone offset as ISO 8601 extended formatted strings: 2018-09-28T14:43:54.123+02:00. Dates stored in UTC end in \"Z\" with no timezone offset. Date accuracy is up to milliseconds. The file can be created after the experiment was run, so this may differ from the experiment start time. Each modification to the nwb file adds a new entry to the array.""")
|
file_create_date:List[datetime ]= Field(default_factory=list, description="""A record of the date the file was created and of subsequent modifications. The date is stored in UTC with local timezone offset as ISO 8601 extended formatted strings: 2018-09-28T14:43:54.123+02:00. Dates stored in UTC end in \"Z\" with no timezone offset. Date accuracy is up to milliseconds. The file can be created after the experiment was run, so this may differ from the experiment start time. Each modification to the nwb file adds a new entry to the array.""")
|
||||||
identifier:str= Field(..., description="""A unique text identifier for the file. For example, concatenated lab name, file creation date/time and experimentalist, or a hash of these and/or other values. The goal is that the string should be unique to all other files.""")
|
identifier:str= Field(..., description="""A unique text identifier for the file. For example, concatenated lab name, file creation date/time and experimentalist, or a hash of these and/or other values. The goal is that the string should be unique to all other files.""")
|
||||||
|
@ -75,6 +100,89 @@ class NWBFile(NWBContainer):
|
||||||
units:Optional[Units]= Field(None, description="""Data about sorted spike units.""")
|
units:Optional[Units]= Field(None, description="""Data about sorted spike units.""")
|
||||||
|
|
||||||
|
|
||||||
|
class NWBFileStimulus(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Data pushed into the system (eg, video stimulus, sound, voltage, etc) and secondary representations of that data (eg, measurements of something used as a stimulus). This group should be made read-only after experiment complete and timestamps are corrected to common timebase. Stores both presented stimuli and stimulus templates, the latter in case the same stimulus is presented multiple times, or is pulled from an external stimulus library. Stimuli are here defined as any signal that is pushed into the system as part of the experiment (eg, sound, video, voltage, etc). Many different experiments can use the same stimuli, and stimuli can be re-used during an experiment. The stimulus group is organized so that one version of template stimuli can be stored and these be used multiple times. These templates can exist in the present file or can be linked to a remote library file.
|
||||||
|
"""
|
||||||
|
name:Literal["stimulus"]= Field("stimulus")
|
||||||
|
presentation:Optional[List[TimeSeries]]= Field(default_factory=list, description="""Stimuli presented during the experiment.""")
|
||||||
|
templates:Optional[List[Union[Images, TimeSeries]]]= Field(default_factory=list, description="""Template stimuli. Timestamps in templates are based on stimulus design and are relative to the beginning of the stimulus. When templates are used, the stimulus instances must convert presentation times to the experiment`s time reference frame.""")
|
||||||
|
|
||||||
|
|
||||||
|
class NWBFileGeneral(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under 'general'. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.
|
||||||
|
"""
|
||||||
|
name:Literal["general"]= Field("general")
|
||||||
|
data_collection:Optional[str]= Field(None, description="""Notes about data collection and analysis.""")
|
||||||
|
experiment_description:Optional[str]= Field(None, description="""General description of the experiment.""")
|
||||||
|
experimenter:Optional[List[str]]= Field(default_factory=list, description="""Name of person(s) who performed the experiment. Can also specify roles of different people involved.""")
|
||||||
|
institution:Optional[str]= Field(None, description="""Institution(s) where experiment was performed.""")
|
||||||
|
keywords:Optional[List[str]]= Field(default_factory=list, description="""Terms to search over.""")
|
||||||
|
lab:Optional[str]= Field(None, description="""Laboratory where experiment was performed.""")
|
||||||
|
notes:Optional[str]= Field(None, description="""Notes about the experiment.""")
|
||||||
|
pharmacology:Optional[str]= Field(None, description="""Description of drugs used, including how and when they were administered. Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc.""")
|
||||||
|
protocol:Optional[str]= Field(None, description="""Experimental protocol, if applicable. e.g., include IACUC protocol number.""")
|
||||||
|
related_publications:Optional[List[str]]= Field(default_factory=list, description="""Publication information. PMID, DOI, URL, etc.""")
|
||||||
|
session_id:Optional[str]= Field(None, description="""Lab-specific ID for the session.""")
|
||||||
|
slices:Optional[str]= Field(None, description="""Description of slices, including information about preparation thickness, orientation, temperature, and bath solution.""")
|
||||||
|
source_script:Optional[NWBFileGeneralSourceScript]= Field(None, description="""Script file or link to public source code used to create this NWB file.""")
|
||||||
|
stimulus:Optional[str]= Field(None, description="""Notes about stimuli, such as how and where they were presented.""")
|
||||||
|
surgery:Optional[str]= Field(None, description="""Narrative description about surgery/surgeries, including date(s) and who performed surgery.""")
|
||||||
|
virus:Optional[str]= Field(None, description="""Information about virus(es) used in experiments, including virus ID, source, date made, injection location, volume, etc.""")
|
||||||
|
lab_meta_data:Optional[List[LabMetaData]]= Field(default_factory=list, description="""Place-holder than can be extended so that lab-specific meta-data can be placed in /general.""")
|
||||||
|
devices:Optional[List[Device]]= Field(default_factory=list, description="""Description of hardware devices used during experiment, e.g., monitors, ADC boards, microscopes, etc.""")
|
||||||
|
subject:Optional[Subject]= Field(None, description="""Information about the animal or person from which the data was measured.""")
|
||||||
|
extracellular_ephys:Optional[NWBFileGeneralExtracellularEphys]= Field(None, description="""Metadata related to extracellular electrophysiology.""")
|
||||||
|
intracellular_ephys:Optional[NWBFileGeneralIntracellularEphys]= Field(None, description="""Metadata related to intracellular electrophysiology.""")
|
||||||
|
optogenetics:Optional[List[OptogeneticStimulusSite]]= Field(default_factory=list, description="""Metadata describing optogenetic stimuluation.""")
|
||||||
|
optophysiology:Optional[List[ImagingPlane]]= Field(default_factory=list, description="""Metadata related to optophysiology.""")
|
||||||
|
|
||||||
|
|
||||||
|
class NWBFileGeneralSourceScript(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Script file or link to public source code used to create this NWB file.
|
||||||
|
"""
|
||||||
|
name:Literal["source_script"]= Field("source_script")
|
||||||
|
file_name:Optional[str]= Field(None, description="""Name of script file.""")
|
||||||
|
value:str= Field(...)
|
||||||
|
|
||||||
|
|
||||||
|
class NWBFileGeneralExtracellularEphys(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Metadata related to extracellular electrophysiology.
|
||||||
|
"""
|
||||||
|
name:Literal["extracellular_ephys"]= Field("extracellular_ephys")
|
||||||
|
electrode_group:Optional[List[ElectrodeGroup]]= Field(default_factory=list, description="""Physical group of electrodes.""")
|
||||||
|
electrodes:Optional[DynamicTable]= Field(None, description="""A table of all electrodes (i.e. channels) used for recording.""")
|
||||||
|
|
||||||
|
|
||||||
|
class NWBFileGeneralIntracellularEphys(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Metadata related to intracellular electrophysiology.
|
||||||
|
"""
|
||||||
|
name:Literal["intracellular_ephys"]= Field("intracellular_ephys")
|
||||||
|
filtering:Optional[str]= Field(None, description="""[DEPRECATED] Use IntracellularElectrode.filtering instead. Description of filtering used. Includes filtering type and parameters, frequency fall-off, etc. If this changes between TimeSeries, filter description should be stored as a text attribute for each TimeSeries.""")
|
||||||
|
intracellular_electrode:Optional[List[IntracellularElectrode]]= Field(default_factory=list, description="""An intracellular electrode.""")
|
||||||
|
sweep_table:Optional[SweepTable]= Field(None, description="""[DEPRECATED] Table used to group different PatchClampSeries. SweepTable is being replaced by IntracellularRecordingsTable and SimultaneousRecordingsTable tables. Additional SequentialRecordingsTable, RepetitionsTable and ExperimentalConditions tables provide enhanced support for experiment metadata.""")
|
||||||
|
intracellular_recordings:Optional[IntracellularRecordingsTable]= Field(None, description="""A table to group together a stimulus and response from a single electrode and a single simultaneous recording. Each row in the table represents a single recording consisting typically of a stimulus and a corresponding response. In some cases, however, only a stimulus or a response are recorded as as part of an experiment. In this case both, the stimulus and response will point to the same TimeSeries while the idx_start and count of the invalid column will be set to -1, thus, indicating that no values have been recorded for the stimulus or response, respectively. Note, a recording MUST contain at least a stimulus or a response. Typically the stimulus and response are PatchClampSeries. However, the use of AD/DA channels that are not associated to an electrode is also common in intracellular electrophysiology, in which case other TimeSeries may be used.""")
|
||||||
|
simultaneous_recordings:Optional[SimultaneousRecordingsTable]= Field(None, description="""A table for grouping different intracellular recordings from the IntracellularRecordingsTable table together that were recorded simultaneously from different electrodes""")
|
||||||
|
sequential_recordings:Optional[SequentialRecordingsTable]= Field(None, description="""A table for grouping different sequential recordings from the SimultaneousRecordingsTable table together. This is typically used to group together sequential recordings where the a sequence of stimuli of the same type with varying parameters have been presented in a sequence.""")
|
||||||
|
repetitions:Optional[RepetitionsTable]= Field(None, description="""A table for grouping different sequential intracellular recordings together. With each SequentialRecording typically representing a particular type of stimulus, the RepetitionsTable table is typically used to group sets of stimuli applied in sequence.""")
|
||||||
|
experimental_conditions:Optional[ExperimentalConditionsTable]= Field(None, description="""A table for grouping different intracellular recording repetitions together that belong to the same experimental experimental_conditions.""")
|
||||||
|
|
||||||
|
|
||||||
|
class NWBFileIntervals(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.
|
||||||
|
"""
|
||||||
|
name:Literal["intervals"]= Field("intervals")
|
||||||
|
epochs:Optional[TimeIntervals]= Field(None, description="""Divisions in time marking experimental stages or sub-divisions of a single recording session.""")
|
||||||
|
trials:Optional[TimeIntervals]= Field(None, description="""Repeated experimental events that have a logical grouping.""")
|
||||||
|
invalid_times:Optional[TimeIntervals]= Field(None, description="""Time intervals that should be removed from analysis.""")
|
||||||
|
time_intervals:Optional[List[TimeIntervals]]= Field(default_factory=list, description="""Optional additional table(s) for describing other experimental time intervals.""")
|
||||||
|
|
||||||
|
|
||||||
class LabMetaData(NWBContainer):
|
class LabMetaData(NWBContainer):
|
||||||
"""
|
"""
|
||||||
Lab-specific meta-data.
|
Lab-specific meta-data.
|
||||||
|
@ -98,11 +206,27 @@ class Subject(NWBContainer):
|
||||||
weight:Optional[str]= Field(None, description="""Weight at time of experiment, at time of surgery and at other important times.""")
|
weight:Optional[str]= Field(None, description="""Weight at time of experiment, at time of surgery and at other important times.""")
|
||||||
|
|
||||||
|
|
||||||
|
class SubjectAge(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Age of subject. Can be supplied instead of 'date_of_birth'.
|
||||||
|
"""
|
||||||
|
name:Literal["age"]= Field("age")
|
||||||
|
reference:Optional[str]= Field(None, description="""Age is with reference to this event. Can be 'birth' or 'gestational'. If reference is omitted, 'birth' is implied.""")
|
||||||
|
value:str= Field(...)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Model rebuild
|
# Model rebuild
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
||||||
ScratchData.model_rebuild()
|
ScratchData.model_rebuild()
|
||||||
NWBFile.model_rebuild()
|
NWBFile.model_rebuild()
|
||||||
|
NWBFileStimulus.model_rebuild()
|
||||||
|
NWBFileGeneral.model_rebuild()
|
||||||
|
NWBFileGeneralSourceScript.model_rebuild()
|
||||||
|
NWBFileGeneralExtracellularEphys.model_rebuild()
|
||||||
|
NWBFileGeneralIntracellularEphys.model_rebuild()
|
||||||
|
NWBFileIntervals.model_rebuild()
|
||||||
LabMetaData.model_rebuild()
|
LabMetaData.model_rebuild()
|
||||||
Subject.model_rebuild()
|
Subject.model_rebuild()
|
||||||
|
SubjectAge.model_rebuild()
|
||||||
|
|
|
@ -1,171 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
from datetime import datetime, date
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Dict, Optional, Any, Union
|
|
||||||
from pydantic import BaseModel as BaseModel, Field
|
|
||||||
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
|
||||||
import sys
|
|
||||||
if sys.version_info >= (3, 8):
|
|
||||||
from typing import Literal
|
|
||||||
else:
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
|
|
||||||
from .core_nwb_base import (
|
|
||||||
TimeSeries,
|
|
||||||
Images
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_icephys import (
|
|
||||||
ExperimentalConditionsTable,
|
|
||||||
SweepTable,
|
|
||||||
IntracellularElectrode,
|
|
||||||
SequentialRecordingsTable,
|
|
||||||
RepetitionsTable,
|
|
||||||
SimultaneousRecordingsTable,
|
|
||||||
IntracellularRecordingsTable
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_ogen import (
|
|
||||||
OptogeneticStimulusSite
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_epoch import (
|
|
||||||
TimeIntervals
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_file import (
|
|
||||||
LabMetaData,
|
|
||||||
Subject
|
|
||||||
)
|
|
||||||
|
|
||||||
from .hdmf_common_table import (
|
|
||||||
DynamicTable
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_device import (
|
|
||||||
Device
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_ecephys import (
|
|
||||||
ElectrodeGroup
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_ophys import (
|
|
||||||
ImagingPlane
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
|
||||||
version = "None"
|
|
||||||
|
|
||||||
class ConfiguredBaseModel(BaseModel,
|
|
||||||
validate_assignment = True,
|
|
||||||
validate_default = True,
|
|
||||||
extra = 'forbid',
|
|
||||||
arbitrary_types_allowed = True,
|
|
||||||
use_enum_values = True):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class NWBFileStimulus(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Data pushed into the system (eg, video stimulus, sound, voltage, etc) and secondary representations of that data (eg, measurements of something used as a stimulus). This group should be made read-only after experiment complete and timestamps are corrected to common timebase. Stores both presented stimuli and stimulus templates, the latter in case the same stimulus is presented multiple times, or is pulled from an external stimulus library. Stimuli are here defined as any signal that is pushed into the system as part of the experiment (eg, sound, video, voltage, etc). Many different experiments can use the same stimuli, and stimuli can be re-used during an experiment. The stimulus group is organized so that one version of template stimuli can be stored and these be used multiple times. These templates can exist in the present file or can be linked to a remote library file.
|
|
||||||
"""
|
|
||||||
name: str = Field("stimulus", const=True)
|
|
||||||
presentation: Optional[List[TimeSeries]] = Field(default_factory=list, description="""Stimuli presented during the experiment.""")
|
|
||||||
templates: Optional[List[Union[Images, TimeSeries]]] = Field(default_factory=list, description="""Template stimuli. Timestamps in templates are based on stimulus design and are relative to the beginning of the stimulus. When templates are used, the stimulus instances must convert presentation times to the experiment`s time reference frame.""")
|
|
||||||
|
|
||||||
|
|
||||||
class NWBFileGeneral(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under 'general'. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.
|
|
||||||
"""
|
|
||||||
name: str = Field("general", const=True)
|
|
||||||
data_collection: Optional[str] = Field(None, description="""Notes about data collection and analysis.""")
|
|
||||||
experiment_description: Optional[str] = Field(None, description="""General description of the experiment.""")
|
|
||||||
experimenter: Optional[List[str]] = Field(default_factory=list, description="""Name of person(s) who performed the experiment. Can also specify roles of different people involved.""")
|
|
||||||
institution: Optional[str] = Field(None, description="""Institution(s) where experiment was performed.""")
|
|
||||||
keywords: Optional[List[str]] = Field(default_factory=list, description="""Terms to search over.""")
|
|
||||||
lab: Optional[str] = Field(None, description="""Laboratory where experiment was performed.""")
|
|
||||||
notes: Optional[str] = Field(None, description="""Notes about the experiment.""")
|
|
||||||
pharmacology: Optional[str] = Field(None, description="""Description of drugs used, including how and when they were administered. Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc.""")
|
|
||||||
protocol: Optional[str] = Field(None, description="""Experimental protocol, if applicable. e.g., include IACUC protocol number.""")
|
|
||||||
related_publications: Optional[List[str]] = Field(default_factory=list, description="""Publication information. PMID, DOI, URL, etc.""")
|
|
||||||
session_id: Optional[str] = Field(None, description="""Lab-specific ID for the session.""")
|
|
||||||
slices: Optional[str] = Field(None, description="""Description of slices, including information about preparation thickness, orientation, temperature, and bath solution.""")
|
|
||||||
source_script: Optional[NWBFileGeneralSourceScript] = Field(None, description="""Script file or link to public source code used to create this NWB file.""")
|
|
||||||
stimulus: Optional[str] = Field(None, description="""Notes about stimuli, such as how and where they were presented.""")
|
|
||||||
surgery: Optional[str] = Field(None, description="""Narrative description about surgery/surgeries, including date(s) and who performed surgery.""")
|
|
||||||
virus: Optional[str] = Field(None, description="""Information about virus(es) used in experiments, including virus ID, source, date made, injection location, volume, etc.""")
|
|
||||||
lab_meta_data: Optional[List[LabMetaData]] = Field(default_factory=list, description="""Place-holder than can be extended so that lab-specific meta-data can be placed in /general.""")
|
|
||||||
devices: Optional[List[Device]] = Field(default_factory=list, description="""Description of hardware devices used during experiment, e.g., monitors, ADC boards, microscopes, etc.""")
|
|
||||||
subject: Optional[Subject] = Field(None, description="""Information about the animal or person from which the data was measured.""")
|
|
||||||
extracellular_ephys: Optional[NWBFileGeneralExtracellularEphys] = Field(None, description="""Metadata related to extracellular electrophysiology.""")
|
|
||||||
intracellular_ephys: Optional[NWBFileGeneralIntracellularEphys] = Field(None, description="""Metadata related to intracellular electrophysiology.""")
|
|
||||||
optogenetics: Optional[List[OptogeneticStimulusSite]] = Field(default_factory=list, description="""Metadata describing optogenetic stimuluation.""")
|
|
||||||
optophysiology: Optional[List[ImagingPlane]] = Field(default_factory=list, description="""Metadata related to optophysiology.""")
|
|
||||||
|
|
||||||
|
|
||||||
class NWBFileGeneralSourceScript(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Script file or link to public source code used to create this NWB file.
|
|
||||||
"""
|
|
||||||
name: str = Field("source_script", const=True)
|
|
||||||
file_name: Optional[str] = Field(None, description="""Name of script file.""")
|
|
||||||
|
|
||||||
|
|
||||||
class NWBFileGeneralExtracellularEphys(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Metadata related to extracellular electrophysiology.
|
|
||||||
"""
|
|
||||||
name: str = Field("extracellular_ephys", const=True)
|
|
||||||
electrode_group: Optional[List[ElectrodeGroup]] = Field(default_factory=list, description="""Physical group of electrodes.""")
|
|
||||||
electrodes: Optional[DynamicTable] = Field(None, description="""A table of all electrodes (i.e. channels) used for recording.""")
|
|
||||||
|
|
||||||
|
|
||||||
class NWBFileGeneralIntracellularEphys(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Metadata related to intracellular electrophysiology.
|
|
||||||
"""
|
|
||||||
name: str = Field("intracellular_ephys", const=True)
|
|
||||||
filtering: Optional[str] = Field(None, description="""[DEPRECATED] Use IntracellularElectrode.filtering instead. Description of filtering used. Includes filtering type and parameters, frequency fall-off, etc. If this changes between TimeSeries, filter description should be stored as a text attribute for each TimeSeries.""")
|
|
||||||
intracellular_electrode: Optional[List[IntracellularElectrode]] = Field(default_factory=list, description="""An intracellular electrode.""")
|
|
||||||
sweep_table: Optional[SweepTable] = Field(None, description="""[DEPRECATED] Table used to group different PatchClampSeries. SweepTable is being replaced by IntracellularRecordingsTable and SimultaneousRecordingsTable tables. Additional SequentialRecordingsTable, RepetitionsTable and ExperimentalConditions tables provide enhanced support for experiment metadata.""")
|
|
||||||
intracellular_recordings: Optional[IntracellularRecordingsTable] = Field(None, description="""A table to group together a stimulus and response from a single electrode and a single simultaneous recording. Each row in the table represents a single recording consisting typically of a stimulus and a corresponding response. In some cases, however, only a stimulus or a response are recorded as as part of an experiment. In this case both, the stimulus and response will point to the same TimeSeries while the idx_start and count of the invalid column will be set to -1, thus, indicating that no values have been recorded for the stimulus or response, respectively. Note, a recording MUST contain at least a stimulus or a response. Typically the stimulus and response are PatchClampSeries. However, the use of AD/DA channels that are not associated to an electrode is also common in intracellular electrophysiology, in which case other TimeSeries may be used.""")
|
|
||||||
simultaneous_recordings: Optional[SimultaneousRecordingsTable] = Field(None, description="""A table for grouping different intracellular recordings from the IntracellularRecordingsTable table together that were recorded simultaneously from different electrodes""")
|
|
||||||
sequential_recordings: Optional[SequentialRecordingsTable] = Field(None, description="""A table for grouping different sequential recordings from the SimultaneousRecordingsTable table together. This is typically used to group together sequential recordings where the a sequence of stimuli of the same type with varying parameters have been presented in a sequence.""")
|
|
||||||
repetitions: Optional[RepetitionsTable] = Field(None, description="""A table for grouping different sequential intracellular recordings together. With each SequentialRecording typically representing a particular type of stimulus, the RepetitionsTable table is typically used to group sets of stimuli applied in sequence.""")
|
|
||||||
experimental_conditions: Optional[ExperimentalConditionsTable] = Field(None, description="""A table for grouping different intracellular recording repetitions together that belong to the same experimental experimental_conditions.""")
|
|
||||||
|
|
||||||
|
|
||||||
class NWBFileIntervals(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.
|
|
||||||
"""
|
|
||||||
name: str = Field("intervals", const=True)
|
|
||||||
epochs: Optional[TimeIntervals] = Field(None, description="""Divisions in time marking experimental stages or sub-divisions of a single recording session.""")
|
|
||||||
trials: Optional[TimeIntervals] = Field(None, description="""Repeated experimental events that have a logical grouping.""")
|
|
||||||
invalid_times: Optional[TimeIntervals] = Field(None, description="""Time intervals that should be removed from analysis.""")
|
|
||||||
time_intervals: Optional[List[TimeIntervals]] = Field(default_factory=list, description="""Optional additional table(s) for describing other experimental time intervals.""")
|
|
||||||
|
|
||||||
|
|
||||||
class SubjectAge(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Age of subject. Can be supplied instead of 'date_of_birth'.
|
|
||||||
"""
|
|
||||||
name: str = Field("age", const=True)
|
|
||||||
reference: Optional[str] = Field(None, description="""Age is with reference to this event. Can be 'birth' or 'gestational'. If reference is omitted, 'birth' is implied.""")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Model rebuild
|
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
||||||
NWBFileStimulus.model_rebuild()
|
|
||||||
NWBFileGeneral.model_rebuild()
|
|
||||||
NWBFileGeneralSourceScript.model_rebuild()
|
|
||||||
NWBFileGeneralExtracellularEphys.model_rebuild()
|
|
||||||
NWBFileGeneralIntracellularEphys.model_rebuild()
|
|
||||||
NWBFileIntervals.model_rebuild()
|
|
||||||
SubjectAge.model_rebuild()
|
|
||||||
|
|
|
@ -12,38 +12,19 @@ else:
|
||||||
|
|
||||||
|
|
||||||
from .core_nwb_base import (
|
from .core_nwb_base import (
|
||||||
TimeSeries,
|
TimeSeriesStartingTime,
|
||||||
NWBContainer
|
NWBContainer,
|
||||||
)
|
TimeSeriesReferenceVectorData,
|
||||||
|
TimeSeriesSync,
|
||||||
from .core_nwb_icephys_include import (
|
TimeSeries
|
||||||
VoltageClampSeriesCapacitanceSlow,
|
|
||||||
ExperimentalConditionsTableRepetitions,
|
|
||||||
VoltageClampStimulusSeriesData,
|
|
||||||
ExperimentalConditionsTableRepetitionsIndex,
|
|
||||||
VoltageClampSeriesResistanceCompPrediction,
|
|
||||||
VoltageClampSeriesWholeCellSeriesResistanceComp,
|
|
||||||
SequentialRecordingsTableSimultaneousRecordings,
|
|
||||||
VoltageClampSeriesCapacitanceFast,
|
|
||||||
RepetitionsTableSequentialRecordingsIndex,
|
|
||||||
IntracellularStimuliTableStimulus,
|
|
||||||
VoltageClampSeriesResistanceCompCorrection,
|
|
||||||
SequentialRecordingsTableSimultaneousRecordingsIndex,
|
|
||||||
SimultaneousRecordingsTableRecordings,
|
|
||||||
IntracellularResponsesTableResponse,
|
|
||||||
VoltageClampSeriesResistanceCompBandwidth,
|
|
||||||
CurrentClampSeriesData,
|
|
||||||
SimultaneousRecordingsTableRecordingsIndex,
|
|
||||||
VoltageClampSeriesData,
|
|
||||||
RepetitionsTableSequentialRecordings,
|
|
||||||
VoltageClampSeriesWholeCellCapacitanceComp,
|
|
||||||
CurrentClampStimulusSeriesData,
|
|
||||||
SweepTableSeriesIndex
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from .hdmf_common_table import (
|
from .hdmf_common_table import (
|
||||||
|
AlignedDynamicTable,
|
||||||
|
VectorIndex,
|
||||||
DynamicTable,
|
DynamicTable,
|
||||||
AlignedDynamicTable
|
VectorData,
|
||||||
|
DynamicTableRegion
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,6 +79,15 @@ class CurrentClampSeries(PatchClampSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class CurrentClampSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Recorded voltage.
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
unit:Optional[str]= Field(None, 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'.""")
|
||||||
|
value:Any= Field(...)
|
||||||
|
|
||||||
|
|
||||||
class IZeroClampSeries(CurrentClampSeries):
|
class IZeroClampSeries(CurrentClampSeries):
|
||||||
"""
|
"""
|
||||||
Voltage data from an intracellular recording when all current and amplifier settings are off (i.e., CurrentClampSeries fields will be zero). There is no CurrentClampStimulusSeries associated with an IZero series because the amplifier is disconnected and no stimulus can reach the cell.
|
Voltage data from an intracellular recording when all current and amplifier settings are off (i.e., CurrentClampSeries fields will be zero). There is no CurrentClampStimulusSeries associated with an IZero series because the amplifier is disconnected and no stimulus can reach the cell.
|
||||||
|
@ -137,6 +127,15 @@ class CurrentClampStimulusSeries(PatchClampSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class CurrentClampStimulusSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Stimulus current applied.
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
unit:Optional[str]= Field(None, 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'.""")
|
||||||
|
value:Any= Field(...)
|
||||||
|
|
||||||
|
|
||||||
class VoltageClampSeries(PatchClampSeries):
|
class VoltageClampSeries(PatchClampSeries):
|
||||||
"""
|
"""
|
||||||
Current data from an intracellular voltage-clamp recording. A corresponding VoltageClampStimulusSeries (stored separately as a stimulus) is used to store the voltage injected.
|
Current data from an intracellular voltage-clamp recording. A corresponding VoltageClampStimulusSeries (stored separately as a stimulus) is used to store the voltage injected.
|
||||||
|
@ -162,6 +161,78 @@ class VoltageClampSeries(PatchClampSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class VoltageClampSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Recorded current.
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
unit:Optional[str]= Field(None, 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'.""")
|
||||||
|
value:Any= Field(...)
|
||||||
|
|
||||||
|
|
||||||
|
class VoltageClampSeriesCapacitanceFast(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Fast capacitance, in farads.
|
||||||
|
"""
|
||||||
|
name:Literal["capacitance_fast"]= Field("capacitance_fast")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit of measurement for capacitance_fast, which is fixed to 'farads'.""")
|
||||||
|
value:float= Field(...)
|
||||||
|
|
||||||
|
|
||||||
|
class VoltageClampSeriesCapacitanceSlow(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Slow capacitance, in farads.
|
||||||
|
"""
|
||||||
|
name:Literal["capacitance_slow"]= Field("capacitance_slow")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit of measurement for capacitance_fast, which is fixed to 'farads'.""")
|
||||||
|
value:float= Field(...)
|
||||||
|
|
||||||
|
|
||||||
|
class VoltageClampSeriesResistanceCompBandwidth(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Resistance compensation bandwidth, in hertz.
|
||||||
|
"""
|
||||||
|
name:Literal["resistance_comp_bandwidth"]= Field("resistance_comp_bandwidth")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit of measurement for resistance_comp_bandwidth, which is fixed to 'hertz'.""")
|
||||||
|
value:float= Field(...)
|
||||||
|
|
||||||
|
|
||||||
|
class VoltageClampSeriesResistanceCompCorrection(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Resistance compensation correction, in percent.
|
||||||
|
"""
|
||||||
|
name:Literal["resistance_comp_correction"]= Field("resistance_comp_correction")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit of measurement for resistance_comp_correction, which is fixed to 'percent'.""")
|
||||||
|
value:float= Field(...)
|
||||||
|
|
||||||
|
|
||||||
|
class VoltageClampSeriesResistanceCompPrediction(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Resistance compensation prediction, in percent.
|
||||||
|
"""
|
||||||
|
name:Literal["resistance_comp_prediction"]= Field("resistance_comp_prediction")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit of measurement for resistance_comp_prediction, which is fixed to 'percent'.""")
|
||||||
|
value:float= Field(...)
|
||||||
|
|
||||||
|
|
||||||
|
class VoltageClampSeriesWholeCellCapacitanceComp(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Whole cell capacitance compensation, in farads.
|
||||||
|
"""
|
||||||
|
name:Literal["whole_cell_capacitance_comp"]= Field("whole_cell_capacitance_comp")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit of measurement for whole_cell_capacitance_comp, which is fixed to 'farads'.""")
|
||||||
|
value:float= Field(...)
|
||||||
|
|
||||||
|
|
||||||
|
class VoltageClampSeriesWholeCellSeriesResistanceComp(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Whole cell series resistance compensation, in ohms.
|
||||||
|
"""
|
||||||
|
name:Literal["whole_cell_series_resistance_comp"]= Field("whole_cell_series_resistance_comp")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit of measurement for whole_cell_series_resistance_comp, which is fixed to 'ohms'.""")
|
||||||
|
value:float= Field(...)
|
||||||
|
|
||||||
|
|
||||||
class VoltageClampStimulusSeries(PatchClampSeries):
|
class VoltageClampStimulusSeries(PatchClampSeries):
|
||||||
"""
|
"""
|
||||||
Stimulus voltage applied during a voltage clamp recording.
|
Stimulus voltage applied during a voltage clamp recording.
|
||||||
|
@ -180,6 +251,15 @@ class VoltageClampStimulusSeries(PatchClampSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class VoltageClampStimulusSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Stimulus voltage applied.
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
unit:Optional[str]= Field(None, 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'.""")
|
||||||
|
value:Any= Field(...)
|
||||||
|
|
||||||
|
|
||||||
class IntracellularElectrode(NWBContainer):
|
class IntracellularElectrode(NWBContainer):
|
||||||
"""
|
"""
|
||||||
An intracellular electrode and its metadata.
|
An intracellular electrode and its metadata.
|
||||||
|
@ -206,7 +286,22 @@ class SweepTable(DynamicTable):
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
|
class SweepTableSeriesIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index for series.
|
||||||
|
"""
|
||||||
|
name:Literal["series_index"]= Field("series_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 IntracellularElectrodesTable(DynamicTable):
|
class IntracellularElectrodesTable(DynamicTable):
|
||||||
|
@ -218,7 +313,7 @@ class IntracellularElectrodesTable(DynamicTable):
|
||||||
electrode:Optional[List[IntracellularElectrode]]= Field(default_factory=list, description="""Column for storing the reference to the intracellular electrode.""")
|
electrode:Optional[List[IntracellularElectrode]]= Field(default_factory=list, description="""Column for storing the reference to the intracellular electrode.""")
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
class IntracellularStimuliTable(DynamicTable):
|
class IntracellularStimuliTable(DynamicTable):
|
||||||
|
@ -230,7 +325,21 @@ class IntracellularStimuliTable(DynamicTable):
|
||||||
stimulus:IntracellularStimuliTableStimulus= Field(..., description="""Column storing the reference to the recorded stimulus for the recording (rows).""")
|
stimulus:IntracellularStimuliTableStimulus= Field(..., description="""Column storing the reference to the recorded stimulus for the recording (rows).""")
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
|
class IntracellularStimuliTableStimulus(TimeSeriesReferenceVectorData):
|
||||||
|
"""
|
||||||
|
Column storing the reference to the recorded stimulus for the recording (rows).
|
||||||
|
"""
|
||||||
|
name:Literal["stimulus"]= Field("stimulus")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 IntracellularResponsesTable(DynamicTable):
|
class IntracellularResponsesTable(DynamicTable):
|
||||||
|
@ -242,14 +351,28 @@ class IntracellularResponsesTable(DynamicTable):
|
||||||
response:IntracellularResponsesTableResponse= Field(..., description="""Column storing the reference to the recorded response for the recording (rows)""")
|
response:IntracellularResponsesTableResponse= Field(..., description="""Column storing the reference to the recorded response for the recording (rows)""")
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
|
class IntracellularResponsesTableResponse(TimeSeriesReferenceVectorData):
|
||||||
|
"""
|
||||||
|
Column storing the reference to the recorded response for the recording (rows)
|
||||||
|
"""
|
||||||
|
name:Literal["response"]= Field("response")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 IntracellularRecordingsTable(AlignedDynamicTable):
|
class IntracellularRecordingsTable(AlignedDynamicTable):
|
||||||
"""
|
"""
|
||||||
A table to group together a stimulus and response from a single electrode and a single simultaneous recording. Each row in the table represents a single recording consisting typically of a stimulus and a corresponding response. In some cases, however, only a stimulus or a response is recorded as part of an experiment. In this case, both the stimulus and response will point to the same TimeSeries while the idx_start and count of the invalid column will be set to -1, thus, indicating that no values have been recorded for the stimulus or response, respectively. Note, a recording MUST contain at least a stimulus or a response. Typically the stimulus and response are PatchClampSeries. However, the use of AD/DA channels that are not associated to an electrode is also common in intracellular electrophysiology, in which case other TimeSeries may be used.
|
A table to group together a stimulus and response from a single electrode and a single simultaneous recording. Each row in the table represents a single recording consisting typically of a stimulus and a corresponding response. In some cases, however, only a stimulus or a response is recorded as part of an experiment. In this case, both the stimulus and response will point to the same TimeSeries while the idx_start and count of the invalid column will be set to -1, thus, indicating that no values have been recorded for the stimulus or response, respectively. Note, a recording MUST contain at least a stimulus or a response. Typically the stimulus and response are PatchClampSeries. However, the use of AD/DA channels that are not associated to an electrode is also common in intracellular electrophysiology, in which case other TimeSeries may be used.
|
||||||
"""
|
"""
|
||||||
name: str = Field("intracellular_recordings", const=True)
|
name:Literal["intracellular_recordings"]= Field("intracellular_recordings")
|
||||||
description:Optional[str]= Field(None, description="""Description of the contents of this table. Inherited from AlignedDynamicTable and overwritten here to fix the value of the attribute.""")
|
description:Optional[str]= Field(None, description="""Description of the contents of this table. Inherited from AlignedDynamicTable and overwritten here to fix the value of the attribute.""")
|
||||||
electrodes:IntracellularElectrodesTable= Field(..., description="""Table for storing intracellular electrode related metadata.""")
|
electrodes:IntracellularElectrodesTable= Field(..., description="""Table for storing intracellular electrode related metadata.""")
|
||||||
stimuli:IntracellularStimuliTable= Field(..., description="""Table for storing intracellular stimulus related metadata.""")
|
stimuli:IntracellularStimuliTable= Field(..., description="""Table for storing intracellular stimulus related metadata.""")
|
||||||
|
@ -258,60 +381,180 @@ class IntracellularRecordingsTable(AlignedDynamicTable):
|
||||||
dynamic_table:Optional[List[DynamicTable]]= Field(default_factory=list, description="""A DynamicTable representing a particular category for columns in the AlignedDynamicTable parent container. The table MUST be aligned with (i.e., have the same number of rows) as all other DynamicTables stored in the AlignedDynamicTable parent container. The name of the category is given by the name of the DynamicTable and its description by the description attribute of the DynamicTable.""")
|
dynamic_table:Optional[List[DynamicTable]]= Field(default_factory=list, description="""A DynamicTable representing a particular category for columns in the AlignedDynamicTable parent container. The table MUST be aligned with (i.e., have the same number of rows) as all other DynamicTables stored in the AlignedDynamicTable parent container. The name of the category is given by the name of the DynamicTable and its description by the description attribute of the DynamicTable.""")
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
class SimultaneousRecordingsTable(DynamicTable):
|
class SimultaneousRecordingsTable(DynamicTable):
|
||||||
"""
|
"""
|
||||||
A table for grouping different intracellular recordings from the IntracellularRecordingsTable table together that were recorded simultaneously from different electrodes.
|
A table for grouping different intracellular recordings from the IntracellularRecordingsTable table together that were recorded simultaneously from different electrodes.
|
||||||
"""
|
"""
|
||||||
name: str = Field("simultaneous_recordings", const=True)
|
name:Literal["simultaneous_recordings"]= Field("simultaneous_recordings")
|
||||||
recordings:SimultaneousRecordingsTableRecordings= Field(..., description="""A reference to one or more rows in the IntracellularRecordingsTable table.""")
|
recordings:SimultaneousRecordingsTableRecordings= Field(..., description="""A reference to one or more rows in the IntracellularRecordingsTable table.""")
|
||||||
recordings_index:SimultaneousRecordingsTableRecordingsIndex= Field(..., description="""Index dataset for the recordings column.""")
|
recordings_index:SimultaneousRecordingsTableRecordingsIndex= Field(..., description="""Index dataset for the recordings column.""")
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
|
class SimultaneousRecordingsTableRecordings(DynamicTableRegion):
|
||||||
|
"""
|
||||||
|
A reference to one or more rows in the IntracellularRecordingsTable table.
|
||||||
|
"""
|
||||||
|
name:Literal["recordings"]= Field("recordings")
|
||||||
|
table:Optional[IntracellularRecordingsTable]= Field(None, description="""Reference to the IntracellularRecordingsTable table that this table region applies to. This specializes the attribute inherited from DynamicTableRegion to fix the type of table that can be referenced here.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what this table region points to.""")
|
||||||
|
array: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 SimultaneousRecordingsTableRecordingsIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index dataset for the recordings column.
|
||||||
|
"""
|
||||||
|
name:Literal["recordings_index"]= Field("recordings_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 SequentialRecordingsTable(DynamicTable):
|
class SequentialRecordingsTable(DynamicTable):
|
||||||
"""
|
"""
|
||||||
A table for grouping different sequential recordings from the SimultaneousRecordingsTable table together. This is typically used to group together sequential recordings where a sequence of stimuli of the same type with varying parameters have been presented in a sequence.
|
A table for grouping different sequential recordings from the SimultaneousRecordingsTable table together. This is typically used to group together sequential recordings where a sequence of stimuli of the same type with varying parameters have been presented in a sequence.
|
||||||
"""
|
"""
|
||||||
name: str = Field("sequential_recordings", const=True)
|
name:Literal["sequential_recordings"]= Field("sequential_recordings")
|
||||||
simultaneous_recordings:SequentialRecordingsTableSimultaneousRecordings= Field(..., description="""A reference to one or more rows in the SimultaneousRecordingsTable table.""")
|
simultaneous_recordings:SequentialRecordingsTableSimultaneousRecordings= Field(..., description="""A reference to one or more rows in the SimultaneousRecordingsTable table.""")
|
||||||
simultaneous_recordings_index:SequentialRecordingsTableSimultaneousRecordingsIndex= Field(..., description="""Index dataset for the simultaneous_recordings column.""")
|
simultaneous_recordings_index:SequentialRecordingsTableSimultaneousRecordingsIndex= Field(..., description="""Index dataset for the simultaneous_recordings column.""")
|
||||||
stimulus_type:Optional[List[str]]= Field(default_factory=list, description="""The type of stimulus used for the sequential recording.""")
|
stimulus_type:Optional[List[str]]= Field(default_factory=list, description="""The type of stimulus used for the sequential recording.""")
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
|
class SequentialRecordingsTableSimultaneousRecordings(DynamicTableRegion):
|
||||||
|
"""
|
||||||
|
A reference to one or more rows in the SimultaneousRecordingsTable table.
|
||||||
|
"""
|
||||||
|
name:Literal["simultaneous_recordings"]= Field("simultaneous_recordings")
|
||||||
|
table:Optional[SimultaneousRecordingsTable]= Field(None, description="""Reference to the SimultaneousRecordingsTable table that this table region applies to. This specializes the attribute inherited from DynamicTableRegion to fix the type of table that can be referenced here.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what this table region points to.""")
|
||||||
|
array: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 SequentialRecordingsTableSimultaneousRecordingsIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index dataset for the simultaneous_recordings column.
|
||||||
|
"""
|
||||||
|
name:Literal["simultaneous_recordings_index"]= Field("simultaneous_recordings_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 RepetitionsTable(DynamicTable):
|
class RepetitionsTable(DynamicTable):
|
||||||
"""
|
"""
|
||||||
A table for grouping different sequential intracellular recordings together. With each SequentialRecording typically representing a particular type of stimulus, the RepetitionsTable table is typically used to group sets of stimuli applied in sequence.
|
A table for grouping different sequential intracellular recordings together. With each SequentialRecording typically representing a particular type of stimulus, the RepetitionsTable table is typically used to group sets of stimuli applied in sequence.
|
||||||
"""
|
"""
|
||||||
name: str = Field("repetitions", const=True)
|
name:Literal["repetitions"]= Field("repetitions")
|
||||||
sequential_recordings:RepetitionsTableSequentialRecordings= Field(..., description="""A reference to one or more rows in the SequentialRecordingsTable table.""")
|
sequential_recordings:RepetitionsTableSequentialRecordings= Field(..., description="""A reference to one or more rows in the SequentialRecordingsTable table.""")
|
||||||
sequential_recordings_index:RepetitionsTableSequentialRecordingsIndex= Field(..., description="""Index dataset for the sequential_recordings column.""")
|
sequential_recordings_index:RepetitionsTableSequentialRecordingsIndex= Field(..., description="""Index dataset for the sequential_recordings column.""")
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
|
class RepetitionsTableSequentialRecordings(DynamicTableRegion):
|
||||||
|
"""
|
||||||
|
A reference to one or more rows in the SequentialRecordingsTable table.
|
||||||
|
"""
|
||||||
|
name:Literal["sequential_recordings"]= Field("sequential_recordings")
|
||||||
|
table:Optional[SequentialRecordingsTable]= Field(None, description="""Reference to the SequentialRecordingsTable table that this table region applies to. This specializes the attribute inherited from DynamicTableRegion to fix the type of table that can be referenced here.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what this table region points to.""")
|
||||||
|
array: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 RepetitionsTableSequentialRecordingsIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index dataset for the sequential_recordings column.
|
||||||
|
"""
|
||||||
|
name:Literal["sequential_recordings_index"]= Field("sequential_recordings_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 ExperimentalConditionsTable(DynamicTable):
|
class ExperimentalConditionsTable(DynamicTable):
|
||||||
"""
|
"""
|
||||||
A table for grouping different intracellular recording repetitions together that belong to the same experimental condition.
|
A table for grouping different intracellular recording repetitions together that belong to the same experimental condition.
|
||||||
"""
|
"""
|
||||||
name: str = Field("experimental_conditions", const=True)
|
name:Literal["experimental_conditions"]= Field("experimental_conditions")
|
||||||
repetitions:ExperimentalConditionsTableRepetitions= Field(..., description="""A reference to one or more rows in the RepetitionsTable table.""")
|
repetitions:ExperimentalConditionsTableRepetitions= Field(..., description="""A reference to one or more rows in the RepetitionsTable table.""")
|
||||||
repetitions_index:ExperimentalConditionsTableRepetitionsIndex= Field(..., description="""Index dataset for the repetitions column.""")
|
repetitions_index:ExperimentalConditionsTableRepetitionsIndex= Field(..., description="""Index dataset for the repetitions column.""")
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
|
class ExperimentalConditionsTableRepetitions(DynamicTableRegion):
|
||||||
|
"""
|
||||||
|
A reference to one or more rows in the RepetitionsTable table.
|
||||||
|
"""
|
||||||
|
name:Literal["repetitions"]= Field("repetitions")
|
||||||
|
table:Optional[RepetitionsTable]= Field(None, description="""Reference to the RepetitionsTable table that this table region applies to. This specializes the attribute inherited from DynamicTableRegion to fix the type of table that can be referenced here.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what this table region points to.""")
|
||||||
|
array: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 ExperimentalConditionsTableRepetitionsIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index dataset for the repetitions column.
|
||||||
|
"""
|
||||||
|
name:Literal["repetitions_index"]= Field("repetitions_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -319,18 +562,40 @@ class ExperimentalConditionsTable(DynamicTable):
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
||||||
PatchClampSeries.model_rebuild()
|
PatchClampSeries.model_rebuild()
|
||||||
CurrentClampSeries.model_rebuild()
|
CurrentClampSeries.model_rebuild()
|
||||||
|
CurrentClampSeriesData.model_rebuild()
|
||||||
IZeroClampSeries.model_rebuild()
|
IZeroClampSeries.model_rebuild()
|
||||||
CurrentClampStimulusSeries.model_rebuild()
|
CurrentClampStimulusSeries.model_rebuild()
|
||||||
|
CurrentClampStimulusSeriesData.model_rebuild()
|
||||||
VoltageClampSeries.model_rebuild()
|
VoltageClampSeries.model_rebuild()
|
||||||
|
VoltageClampSeriesData.model_rebuild()
|
||||||
|
VoltageClampSeriesCapacitanceFast.model_rebuild()
|
||||||
|
VoltageClampSeriesCapacitanceSlow.model_rebuild()
|
||||||
|
VoltageClampSeriesResistanceCompBandwidth.model_rebuild()
|
||||||
|
VoltageClampSeriesResistanceCompCorrection.model_rebuild()
|
||||||
|
VoltageClampSeriesResistanceCompPrediction.model_rebuild()
|
||||||
|
VoltageClampSeriesWholeCellCapacitanceComp.model_rebuild()
|
||||||
|
VoltageClampSeriesWholeCellSeriesResistanceComp.model_rebuild()
|
||||||
VoltageClampStimulusSeries.model_rebuild()
|
VoltageClampStimulusSeries.model_rebuild()
|
||||||
|
VoltageClampStimulusSeriesData.model_rebuild()
|
||||||
IntracellularElectrode.model_rebuild()
|
IntracellularElectrode.model_rebuild()
|
||||||
SweepTable.model_rebuild()
|
SweepTable.model_rebuild()
|
||||||
|
SweepTableSeriesIndex.model_rebuild()
|
||||||
IntracellularElectrodesTable.model_rebuild()
|
IntracellularElectrodesTable.model_rebuild()
|
||||||
IntracellularStimuliTable.model_rebuild()
|
IntracellularStimuliTable.model_rebuild()
|
||||||
|
IntracellularStimuliTableStimulus.model_rebuild()
|
||||||
IntracellularResponsesTable.model_rebuild()
|
IntracellularResponsesTable.model_rebuild()
|
||||||
|
IntracellularResponsesTableResponse.model_rebuild()
|
||||||
IntracellularRecordingsTable.model_rebuild()
|
IntracellularRecordingsTable.model_rebuild()
|
||||||
SimultaneousRecordingsTable.model_rebuild()
|
SimultaneousRecordingsTable.model_rebuild()
|
||||||
|
SimultaneousRecordingsTableRecordings.model_rebuild()
|
||||||
|
SimultaneousRecordingsTableRecordingsIndex.model_rebuild()
|
||||||
SequentialRecordingsTable.model_rebuild()
|
SequentialRecordingsTable.model_rebuild()
|
||||||
|
SequentialRecordingsTableSimultaneousRecordings.model_rebuild()
|
||||||
|
SequentialRecordingsTableSimultaneousRecordingsIndex.model_rebuild()
|
||||||
RepetitionsTable.model_rebuild()
|
RepetitionsTable.model_rebuild()
|
||||||
|
RepetitionsTableSequentialRecordings.model_rebuild()
|
||||||
|
RepetitionsTableSequentialRecordingsIndex.model_rebuild()
|
||||||
ExperimentalConditionsTable.model_rebuild()
|
ExperimentalConditionsTable.model_rebuild()
|
||||||
|
ExperimentalConditionsTableRepetitions.model_rebuild()
|
||||||
|
ExperimentalConditionsTableRepetitionsIndex.model_rebuild()
|
||||||
|
|
|
@ -1,319 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
from datetime import datetime, date
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Dict, Optional, Any, Union
|
|
||||||
from pydantic import BaseModel as BaseModel, Field
|
|
||||||
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
|
||||||
import sys
|
|
||||||
if sys.version_info >= (3, 8):
|
|
||||||
from typing import Literal
|
|
||||||
else:
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
|
|
||||||
from .hdmf_common_table import (
|
|
||||||
DynamicTableRegion,
|
|
||||||
VectorIndex
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_icephys import (
|
|
||||||
SequentialRecordingsTable,
|
|
||||||
RepetitionsTable,
|
|
||||||
SimultaneousRecordingsTable,
|
|
||||||
IntracellularRecordingsTable
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_base import (
|
|
||||||
TimeSeriesReferenceVectorData
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
|
||||||
version = "None"
|
|
||||||
|
|
||||||
class ConfiguredBaseModel(BaseModel,
|
|
||||||
validate_assignment = True,
|
|
||||||
validate_default = True,
|
|
||||||
extra = 'forbid',
|
|
||||||
arbitrary_types_allowed = True,
|
|
||||||
use_enum_values = True):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class CurrentClampSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Recorded voltage.
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
unit: Optional[str] = Field(None, 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'.""")
|
|
||||||
|
|
||||||
|
|
||||||
class CurrentClampStimulusSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Stimulus current applied.
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
unit: Optional[str] = Field(None, 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'.""")
|
|
||||||
|
|
||||||
|
|
||||||
class VoltageClampSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Recorded current.
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
unit: Optional[str] = Field(None, 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'.""")
|
|
||||||
|
|
||||||
|
|
||||||
class VoltageClampSeriesCapacitanceFast(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Fast capacitance, in farads.
|
|
||||||
"""
|
|
||||||
name: str = Field("capacitance_fast", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement for capacitance_fast, which is fixed to 'farads'.""")
|
|
||||||
|
|
||||||
|
|
||||||
class VoltageClampSeriesCapacitanceSlow(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Slow capacitance, in farads.
|
|
||||||
"""
|
|
||||||
name: str = Field("capacitance_slow", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement for capacitance_fast, which is fixed to 'farads'.""")
|
|
||||||
|
|
||||||
|
|
||||||
class VoltageClampSeriesResistanceCompBandwidth(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Resistance compensation bandwidth, in hertz.
|
|
||||||
"""
|
|
||||||
name: str = Field("resistance_comp_bandwidth", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement for resistance_comp_bandwidth, which is fixed to 'hertz'.""")
|
|
||||||
|
|
||||||
|
|
||||||
class VoltageClampSeriesResistanceCompCorrection(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Resistance compensation correction, in percent.
|
|
||||||
"""
|
|
||||||
name: str = Field("resistance_comp_correction", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement for resistance_comp_correction, which is fixed to 'percent'.""")
|
|
||||||
|
|
||||||
|
|
||||||
class VoltageClampSeriesResistanceCompPrediction(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Resistance compensation prediction, in percent.
|
|
||||||
"""
|
|
||||||
name: str = Field("resistance_comp_prediction", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement for resistance_comp_prediction, which is fixed to 'percent'.""")
|
|
||||||
|
|
||||||
|
|
||||||
class VoltageClampSeriesWholeCellCapacitanceComp(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Whole cell capacitance compensation, in farads.
|
|
||||||
"""
|
|
||||||
name: str = Field("whole_cell_capacitance_comp", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement for whole_cell_capacitance_comp, which is fixed to 'farads'.""")
|
|
||||||
|
|
||||||
|
|
||||||
class VoltageClampSeriesWholeCellSeriesResistanceComp(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Whole cell series resistance compensation, in ohms.
|
|
||||||
"""
|
|
||||||
name: str = Field("whole_cell_series_resistance_comp", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement for whole_cell_series_resistance_comp, which is fixed to 'ohms'.""")
|
|
||||||
|
|
||||||
|
|
||||||
class VoltageClampStimulusSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Stimulus voltage applied.
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
unit: Optional[str] = Field(None, 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'.""")
|
|
||||||
|
|
||||||
|
|
||||||
class SweepTableSeriesIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index for series.
|
|
||||||
"""
|
|
||||||
name: str = Field("series_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 IntracellularStimuliTableStimulus(TimeSeriesReferenceVectorData):
|
|
||||||
"""
|
|
||||||
Column storing the reference to the recorded stimulus for the recording (rows).
|
|
||||||
"""
|
|
||||||
name: str = Field("stimulus", const=True)
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 IntracellularResponsesTableResponse(TimeSeriesReferenceVectorData):
|
|
||||||
"""
|
|
||||||
Column storing the reference to the recorded response for the recording (rows)
|
|
||||||
"""
|
|
||||||
name: str = Field("response", const=True)
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 SimultaneousRecordingsTableRecordings(DynamicTableRegion):
|
|
||||||
"""
|
|
||||||
A reference to one or more rows in the IntracellularRecordingsTable table.
|
|
||||||
"""
|
|
||||||
name: str = Field("recordings", const=True)
|
|
||||||
table: Optional[IntracellularRecordingsTable] = Field(None, description="""Reference to the IntracellularRecordingsTable table that this table region applies to. This specializes the attribute inherited from DynamicTableRegion to fix the type of table that can be referenced here.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what this table region points to.""")
|
|
||||||
array: 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 SimultaneousRecordingsTableRecordingsIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index dataset for the recordings column.
|
|
||||||
"""
|
|
||||||
name: str = Field("recordings_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 SequentialRecordingsTableSimultaneousRecordings(DynamicTableRegion):
|
|
||||||
"""
|
|
||||||
A reference to one or more rows in the SimultaneousRecordingsTable table.
|
|
||||||
"""
|
|
||||||
name: str = Field("simultaneous_recordings", const=True)
|
|
||||||
table: Optional[SimultaneousRecordingsTable] = Field(None, description="""Reference to the SimultaneousRecordingsTable table that this table region applies to. This specializes the attribute inherited from DynamicTableRegion to fix the type of table that can be referenced here.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what this table region points to.""")
|
|
||||||
array: 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 SequentialRecordingsTableSimultaneousRecordingsIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index dataset for the simultaneous_recordings column.
|
|
||||||
"""
|
|
||||||
name: str = Field("simultaneous_recordings_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 RepetitionsTableSequentialRecordings(DynamicTableRegion):
|
|
||||||
"""
|
|
||||||
A reference to one or more rows in the SequentialRecordingsTable table.
|
|
||||||
"""
|
|
||||||
name: str = Field("sequential_recordings", const=True)
|
|
||||||
table: Optional[SequentialRecordingsTable] = Field(None, description="""Reference to the SequentialRecordingsTable table that this table region applies to. This specializes the attribute inherited from DynamicTableRegion to fix the type of table that can be referenced here.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what this table region points to.""")
|
|
||||||
array: 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 RepetitionsTableSequentialRecordingsIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index dataset for the sequential_recordings column.
|
|
||||||
"""
|
|
||||||
name: str = Field("sequential_recordings_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 ExperimentalConditionsTableRepetitions(DynamicTableRegion):
|
|
||||||
"""
|
|
||||||
A reference to one or more rows in the RepetitionsTable table.
|
|
||||||
"""
|
|
||||||
name: str = Field("repetitions", const=True)
|
|
||||||
table: Optional[RepetitionsTable] = Field(None, description="""Reference to the RepetitionsTable table that this table region applies to. This specializes the attribute inherited from DynamicTableRegion to fix the type of table that can be referenced here.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what this table region points to.""")
|
|
||||||
array: 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 ExperimentalConditionsTableRepetitionsIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index dataset for the repetitions column.
|
|
||||||
"""
|
|
||||||
name: str = Field("repetitions_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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
|
|
||||||
CurrentClampSeriesData.model_rebuild()
|
|
||||||
CurrentClampStimulusSeriesData.model_rebuild()
|
|
||||||
VoltageClampSeriesData.model_rebuild()
|
|
||||||
VoltageClampSeriesCapacitanceFast.model_rebuild()
|
|
||||||
VoltageClampSeriesCapacitanceSlow.model_rebuild()
|
|
||||||
VoltageClampSeriesResistanceCompBandwidth.model_rebuild()
|
|
||||||
VoltageClampSeriesResistanceCompCorrection.model_rebuild()
|
|
||||||
VoltageClampSeriesResistanceCompPrediction.model_rebuild()
|
|
||||||
VoltageClampSeriesWholeCellCapacitanceComp.model_rebuild()
|
|
||||||
VoltageClampSeriesWholeCellSeriesResistanceComp.model_rebuild()
|
|
||||||
VoltageClampStimulusSeriesData.model_rebuild()
|
|
||||||
SweepTableSeriesIndex.model_rebuild()
|
|
||||||
IntracellularStimuliTableStimulus.model_rebuild()
|
|
||||||
IntracellularResponsesTableResponse.model_rebuild()
|
|
||||||
SimultaneousRecordingsTableRecordings.model_rebuild()
|
|
||||||
SimultaneousRecordingsTableRecordingsIndex.model_rebuild()
|
|
||||||
SequentialRecordingsTableSimultaneousRecordings.model_rebuild()
|
|
||||||
SequentialRecordingsTableSimultaneousRecordingsIndex.model_rebuild()
|
|
||||||
RepetitionsTableSequentialRecordings.model_rebuild()
|
|
||||||
RepetitionsTableSequentialRecordingsIndex.model_rebuild()
|
|
||||||
ExperimentalConditionsTableRepetitions.model_rebuild()
|
|
||||||
ExperimentalConditionsTableRepetitionsIndex.model_rebuild()
|
|
||||||
|
|
|
@ -12,17 +12,10 @@ else:
|
||||||
|
|
||||||
|
|
||||||
from .core_nwb_base import (
|
from .core_nwb_base import (
|
||||||
|
TimeSeriesStartingTime,
|
||||||
|
Image,
|
||||||
TimeSeries,
|
TimeSeries,
|
||||||
Image
|
TimeSeriesSync
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_image_include import (
|
|
||||||
ImageSeriesData,
|
|
||||||
RGBAImageArray,
|
|
||||||
GrayscaleImageArray,
|
|
||||||
RGBImageArray,
|
|
||||||
OpticalSeriesFieldOfView,
|
|
||||||
OpticalSeriesData
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,6 +79,17 @@ class ImageSeries(TimeSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class ImageSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["* frame, * x, * y"], Number],
|
||||||
|
NDArray[Shape["* frame, * x, * y, * z"], Number]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
class ImageMaskSeries(ImageSeries):
|
class ImageMaskSeries(ImageSeries):
|
||||||
"""
|
"""
|
||||||
An alpha mask that is applied to a presented visual stimulus. The 'data' array contains an array of mask values that are applied to the displayed image. Mask values are stored as RGBA. Mask can vary with time. The timestamps array indicates the starting time of a mask, and that mask pattern continues until it's explicitly changed.
|
An alpha mask that is applied to a presented visual stimulus. The 'data' array contains an array of mask values that are applied to the displayed image. Mask values are stored as RGBA. Mask can vary with time. The timestamps array indicates the starting time of a mask, and that mask pattern continues until it's explicitly changed.
|
||||||
|
@ -125,6 +129,28 @@ class OpticalSeries(ImageSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class OpticalSeriesFieldOfView(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Width, height and depth of image, or imaged area, in meters.
|
||||||
|
"""
|
||||||
|
name:Literal["field_of_view"]= Field("field_of_view")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["2 width_height"], Float32],
|
||||||
|
NDArray[Shape["2 width_height, 3 width_height_depth"], Float32]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class OpticalSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Images presented to subject, either grayscale or RGB
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["* frame, * x, * y"], Number],
|
||||||
|
NDArray[Shape["* frame, * x, * y, 3 r_g_b"], Number]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
class IndexSeries(TimeSeries):
|
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.
|
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.
|
||||||
|
@ -147,7 +173,10 @@ GrayscaleImage.model_rebuild()
|
||||||
RGBImage.model_rebuild()
|
RGBImage.model_rebuild()
|
||||||
RGBAImage.model_rebuild()
|
RGBAImage.model_rebuild()
|
||||||
ImageSeries.model_rebuild()
|
ImageSeries.model_rebuild()
|
||||||
|
ImageSeriesData.model_rebuild()
|
||||||
ImageMaskSeries.model_rebuild()
|
ImageMaskSeries.model_rebuild()
|
||||||
OpticalSeries.model_rebuild()
|
OpticalSeries.model_rebuild()
|
||||||
|
OpticalSeriesFieldOfView.model_rebuild()
|
||||||
|
OpticalSeriesData.model_rebuild()
|
||||||
IndexSeries.model_rebuild()
|
IndexSeries.model_rebuild()
|
||||||
|
|
|
@ -1,118 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
from datetime import datetime, date
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Dict, Optional, Any, Union
|
|
||||||
from pydantic import BaseModel as BaseModel, Field
|
|
||||||
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
|
||||||
import sys
|
|
||||||
if sys.version_info >= (3, 8):
|
|
||||||
from typing import Literal
|
|
||||||
else:
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
|
|
||||||
from .nwb_language import (
|
|
||||||
Arraylike
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
|
||||||
version = "None"
|
|
||||||
|
|
||||||
class ConfiguredBaseModel(BaseModel,
|
|
||||||
validate_assignment = True,
|
|
||||||
validate_default = True,
|
|
||||||
extra = 'forbid',
|
|
||||||
arbitrary_types_allowed = True,
|
|
||||||
use_enum_values = True):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class GrayscaleImageArray(Arraylike):
|
|
||||||
|
|
||||||
x: float = Field(...)
|
|
||||||
y: float = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class RGBImageArray(Arraylike):
|
|
||||||
|
|
||||||
x: float = Field(...)
|
|
||||||
y: float = Field(...)
|
|
||||||
r_g_b: float = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class RGBAImageArray(Arraylike):
|
|
||||||
|
|
||||||
x: float = Field(...)
|
|
||||||
y: float = Field(...)
|
|
||||||
r_g_b_a: float = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class ImageSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["* frame, * x, * y"], Number],
|
|
||||||
NDArray[Shape["* frame, * x, * y, * z"], Number]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImageSeriesDataArray(Arraylike):
|
|
||||||
|
|
||||||
frame: float = Field(...)
|
|
||||||
x: float = Field(...)
|
|
||||||
y: float = Field(...)
|
|
||||||
z: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class OpticalSeriesFieldOfView(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Width, height and depth of image, or imaged area, in meters.
|
|
||||||
"""
|
|
||||||
name: str = Field("field_of_view", const=True)
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["2 width_height"], Float32],
|
|
||||||
NDArray[Shape["2 width_height, 3 width_height_depth"], Float32]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class OpticalSeriesFieldOfViewArray(Arraylike):
|
|
||||||
|
|
||||||
width_height: Optional[float] = Field(None)
|
|
||||||
width_height_depth: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class OpticalSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Images presented to subject, either grayscale or RGB
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["* frame, * x, * y"], Number],
|
|
||||||
NDArray[Shape["* frame, * x, * y, 3 r_g_b"], Number]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class OpticalSeriesDataArray(Arraylike):
|
|
||||||
|
|
||||||
frame: float = Field(...)
|
|
||||||
x: float = Field(...)
|
|
||||||
y: float = Field(...)
|
|
||||||
r_g_b: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Model rebuild
|
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
||||||
GrayscaleImageArray.model_rebuild()
|
|
||||||
RGBImageArray.model_rebuild()
|
|
||||||
RGBAImageArray.model_rebuild()
|
|
||||||
ImageSeriesData.model_rebuild()
|
|
||||||
ImageSeriesDataArray.model_rebuild()
|
|
||||||
OpticalSeriesFieldOfView.model_rebuild()
|
|
||||||
OpticalSeriesFieldOfViewArray.model_rebuild()
|
|
||||||
OpticalSeriesData.model_rebuild()
|
|
||||||
OpticalSeriesDataArray.model_rebuild()
|
|
||||||
|
|
|
@ -11,28 +11,9 @@ else:
|
||||||
from typing_extensions import Literal
|
from typing_extensions import Literal
|
||||||
|
|
||||||
|
|
||||||
from .hdmf_common_table import (
|
|
||||||
DynamicTable
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_misc_include import (
|
|
||||||
UnitsElectrodes,
|
|
||||||
UnitsElectrodesIndex,
|
|
||||||
UnitsObsIntervalsIndex,
|
|
||||||
UnitsSpikeTimes,
|
|
||||||
UnitsSpikeTimesIndex,
|
|
||||||
UnitsWaveformSd,
|
|
||||||
UnitsWaveformMean,
|
|
||||||
UnitsWaveforms,
|
|
||||||
AbstractFeatureSeriesData,
|
|
||||||
UnitsWaveformsIndexIndex,
|
|
||||||
UnitsObsIntervals,
|
|
||||||
UnitsWaveformsIndex,
|
|
||||||
DecompositionSeriesData,
|
|
||||||
DecompositionSeriesSourceChannels
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_base import (
|
from .core_nwb_base import (
|
||||||
|
TimeSeriesStartingTime,
|
||||||
|
TimeSeriesSync,
|
||||||
TimeSeries
|
TimeSeries
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -40,6 +21,13 @@ from .core_nwb_ecephys import (
|
||||||
ElectrodeGroup
|
ElectrodeGroup
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from .hdmf_common_table import (
|
||||||
|
VectorIndex,
|
||||||
|
DynamicTable,
|
||||||
|
VectorData,
|
||||||
|
DynamicTableRegion
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
metamodel_version = "None"
|
||||||
version = "None"
|
version = "None"
|
||||||
|
@ -70,6 +58,18 @@ class AbstractFeatureSeries(TimeSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class AbstractFeatureSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Values of each feature at each time.
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
unit:Optional[str]= Field(None, description="""Since there can be different units for different features, store the units in 'feature_units'. The default value for this attribute is \"see 'feature_units'\".""")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["* num_times"], Number],
|
||||||
|
NDArray[Shape["* num_times, * num_features"], Number]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
class AnnotationSeries(TimeSeries):
|
class AnnotationSeries(TimeSeries):
|
||||||
"""
|
"""
|
||||||
Stores user annotations made during an experiment. The data[] field stores a text array, and timestamps are stored for each annotation (ie, interval=1). This is largely an alias to a standard TimeSeries storing a text array but that is identifiable as storing annotations in a machine-readable way.
|
Stores user annotations made during an experiment. The data[] field stores a text array, and timestamps are stored for each annotation (ie, interval=1). This is largely an alias to a standard TimeSeries storing a text array but that is identifiable as storing annotations in a machine-readable way.
|
||||||
|
@ -118,6 +118,30 @@ class DecompositionSeries(TimeSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class DecompositionSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Data decomposed into frequency bands.
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
unit:Optional[str]= Field(None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""")
|
||||||
|
array:Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], Number]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class DecompositionSeriesSourceChannels(DynamicTableRegion):
|
||||||
|
"""
|
||||||
|
DynamicTableRegion pointer to the channels that this decomposition series was generated from.
|
||||||
|
"""
|
||||||
|
name:Literal["source_channels"]= Field("source_channels")
|
||||||
|
table:Optional[DynamicTable]= Field(None, description="""Reference to the DynamicTable object that this region applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what this table region points to.""")
|
||||||
|
array: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 Units(DynamicTable):
|
class Units(DynamicTable):
|
||||||
"""
|
"""
|
||||||
Data about spiking units. Event times of observed units (e.g. cell, synapse, etc.) should be concatenated and stored in spike_times.
|
Data about spiking units. Event times of observed units (e.g. cell, synapse, etc.) should be concatenated and stored in spike_times.
|
||||||
|
@ -138,15 +162,196 @@ class Units(DynamicTable):
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
|
class UnitsSpikeTimesIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index into the spike_times dataset.
|
||||||
|
"""
|
||||||
|
name:Literal["spike_times_index"]= Field("spike_times_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 UnitsSpikeTimes(VectorData):
|
||||||
|
"""
|
||||||
|
Spike times for each unit in seconds.
|
||||||
|
"""
|
||||||
|
name:Literal["spike_times"]= Field("spike_times")
|
||||||
|
resolution:Optional[float]= Field(None, description="""The smallest possible difference between two spike times. Usually 1 divided by the acquisition sampling rate from which spike times were extracted, but could be larger if the acquisition time series was downsampled or smaller if the acquisition time series was smoothed/interpolated and it is possible for the spike time to be between samples.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 UnitsObsIntervalsIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index into the obs_intervals dataset.
|
||||||
|
"""
|
||||||
|
name:Literal["obs_intervals_index"]= Field("obs_intervals_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 UnitsObsIntervals(VectorData):
|
||||||
|
"""
|
||||||
|
Observation intervals for each unit.
|
||||||
|
"""
|
||||||
|
name:Literal["obs_intervals"]= Field("obs_intervals")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 UnitsElectrodesIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index into electrodes.
|
||||||
|
"""
|
||||||
|
name:Literal["electrodes_index"]= Field("electrodes_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 UnitsElectrodes(DynamicTableRegion):
|
||||||
|
"""
|
||||||
|
Electrode that each spike unit came from, specified using a DynamicTableRegion.
|
||||||
|
"""
|
||||||
|
name:Literal["electrodes"]= Field("electrodes")
|
||||||
|
table:Optional[DynamicTable]= Field(None, description="""Reference to the DynamicTable object that this region applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what this table region points to.""")
|
||||||
|
array: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 UnitsWaveformMean(VectorData):
|
||||||
|
"""
|
||||||
|
Spike waveform mean for each spike unit.
|
||||||
|
"""
|
||||||
|
name:Literal["waveform_mean"]= Field("waveform_mean")
|
||||||
|
sampling_rate:Optional[float]= Field(None, description="""Sampling rate, in hertz.""")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit of measurement. This value is fixed to 'volts'.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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.
|
||||||
|
"""
|
||||||
|
name:Literal["waveform_sd"]= Field("waveform_sd")
|
||||||
|
sampling_rate:Optional[float]= Field(None, description="""Sampling rate, in hertz.""")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit of measurement. This value is fixed to 'volts'.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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.
|
||||||
|
"""
|
||||||
|
name:Literal["waveforms"]= Field("waveforms")
|
||||||
|
sampling_rate:Optional[float]= Field(None, description="""Sampling rate, in hertz.""")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit of measurement. This value is fixed to 'volts'.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 UnitsWaveformsIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail.
|
||||||
|
"""
|
||||||
|
name:Literal["waveforms_index"]= Field("waveforms_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 UnitsWaveformsIndexIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail.
|
||||||
|
"""
|
||||||
|
name:Literal["waveforms_index_index"]= Field("waveforms_index_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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
|
# Model rebuild
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
||||||
AbstractFeatureSeries.model_rebuild()
|
AbstractFeatureSeries.model_rebuild()
|
||||||
|
AbstractFeatureSeriesData.model_rebuild()
|
||||||
AnnotationSeries.model_rebuild()
|
AnnotationSeries.model_rebuild()
|
||||||
IntervalSeries.model_rebuild()
|
IntervalSeries.model_rebuild()
|
||||||
DecompositionSeries.model_rebuild()
|
DecompositionSeries.model_rebuild()
|
||||||
|
DecompositionSeriesData.model_rebuild()
|
||||||
|
DecompositionSeriesSourceChannels.model_rebuild()
|
||||||
Units.model_rebuild()
|
Units.model_rebuild()
|
||||||
|
UnitsSpikeTimesIndex.model_rebuild()
|
||||||
|
UnitsSpikeTimes.model_rebuild()
|
||||||
|
UnitsObsIntervalsIndex.model_rebuild()
|
||||||
|
UnitsObsIntervals.model_rebuild()
|
||||||
|
UnitsElectrodesIndex.model_rebuild()
|
||||||
|
UnitsElectrodes.model_rebuild()
|
||||||
|
UnitsWaveformMean.model_rebuild()
|
||||||
|
UnitsWaveformSd.model_rebuild()
|
||||||
|
UnitsWaveforms.model_rebuild()
|
||||||
|
UnitsWaveformsIndex.model_rebuild()
|
||||||
|
UnitsWaveformsIndexIndex.model_rebuild()
|
||||||
|
|
|
@ -1,272 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
from datetime import datetime, date
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Dict, Optional, Any, Union
|
|
||||||
from pydantic import BaseModel as BaseModel, Field
|
|
||||||
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
|
||||||
import sys
|
|
||||||
if sys.version_info >= (3, 8):
|
|
||||||
from typing import Literal
|
|
||||||
else:
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
|
|
||||||
from .hdmf_common_table import (
|
|
||||||
DynamicTableRegion,
|
|
||||||
VectorData,
|
|
||||||
VectorIndex
|
|
||||||
)
|
|
||||||
|
|
||||||
from .nwb_language import (
|
|
||||||
Arraylike
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
|
||||||
version = "None"
|
|
||||||
|
|
||||||
class ConfiguredBaseModel(BaseModel,
|
|
||||||
validate_assignment = True,
|
|
||||||
validate_default = True,
|
|
||||||
extra = 'forbid',
|
|
||||||
arbitrary_types_allowed = True,
|
|
||||||
use_enum_values = True):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class AbstractFeatureSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Values of each feature at each time.
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Since there can be different units for different features, store the units in 'feature_units'. The default value for this attribute is \"see 'feature_units'\".""")
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["* num_times"], Number],
|
|
||||||
NDArray[Shape["* num_times, * num_features"], Number]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class AbstractFeatureSeriesDataArray(Arraylike):
|
|
||||||
|
|
||||||
num_times: float = Field(...)
|
|
||||||
num_features: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class DecompositionSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Data decomposed into frequency bands.
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Base unit of measurement for working with the data. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply 'data' by 'conversion'.""")
|
|
||||||
array: Optional[NDArray[Shape["* num_times, * num_channels, * num_bands"], Number]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class DecompositionSeriesDataArray(Arraylike):
|
|
||||||
|
|
||||||
num_times: float = Field(...)
|
|
||||||
num_channels: float = Field(...)
|
|
||||||
num_bands: float = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class DecompositionSeriesSourceChannels(DynamicTableRegion):
|
|
||||||
"""
|
|
||||||
DynamicTableRegion pointer to the channels that this decomposition series was generated from.
|
|
||||||
"""
|
|
||||||
name: str = Field("source_channels", const=True)
|
|
||||||
table: Optional[DynamicTable] = Field(None, description="""Reference to the DynamicTable object that this region applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what this table region points to.""")
|
|
||||||
array: 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 UnitsSpikeTimesIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index into the spike_times dataset.
|
|
||||||
"""
|
|
||||||
name: str = Field("spike_times_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 UnitsSpikeTimes(VectorData):
|
|
||||||
"""
|
|
||||||
Spike times for each unit in seconds.
|
|
||||||
"""
|
|
||||||
name: str = Field("spike_times", const=True)
|
|
||||||
resolution: Optional[float] = Field(None, description="""The smallest possible difference between two spike times. Usually 1 divided by the acquisition sampling rate from which spike times were extracted, but could be larger if the acquisition time series was downsampled or smaller if the acquisition time series was smoothed/interpolated and it is possible for the spike time to be between samples.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 UnitsObsIntervalsIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index into the obs_intervals dataset.
|
|
||||||
"""
|
|
||||||
name: str = Field("obs_intervals_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 UnitsObsIntervals(VectorData):
|
|
||||||
"""
|
|
||||||
Observation intervals for each unit.
|
|
||||||
"""
|
|
||||||
name: str = Field("obs_intervals", const=True)
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 UnitsElectrodesIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index into electrodes.
|
|
||||||
"""
|
|
||||||
name: str = Field("electrodes_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 UnitsElectrodes(DynamicTableRegion):
|
|
||||||
"""
|
|
||||||
Electrode that each spike unit came from, specified using a DynamicTableRegion.
|
|
||||||
"""
|
|
||||||
name: str = Field("electrodes", const=True)
|
|
||||||
table: Optional[DynamicTable] = Field(None, description="""Reference to the DynamicTable object that this region applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what this table region points to.""")
|
|
||||||
array: 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 UnitsWaveformMean(VectorData):
|
|
||||||
"""
|
|
||||||
Spike waveform mean for each spike unit.
|
|
||||||
"""
|
|
||||||
name: str = Field("waveform_mean", const=True)
|
|
||||||
sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""")
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement. This value is fixed to 'volts'.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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.
|
|
||||||
"""
|
|
||||||
name: str = Field("waveform_sd", const=True)
|
|
||||||
sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""")
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement. This value is fixed to 'volts'.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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.
|
|
||||||
"""
|
|
||||||
name: str = Field("waveforms", const=True)
|
|
||||||
sampling_rate: Optional[float] = Field(None, description="""Sampling rate, in hertz.""")
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement. This value is fixed to 'volts'.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 UnitsWaveformsIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index into the waveforms dataset. One value for every spike event. See 'waveforms' for more detail.
|
|
||||||
"""
|
|
||||||
name: str = Field("waveforms_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 UnitsWaveformsIndexIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index into the waveforms_index dataset. One value for every unit (row in the table). See 'waveforms' for more detail.
|
|
||||||
"""
|
|
||||||
name: str = Field("waveforms_index_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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
|
|
||||||
AbstractFeatureSeriesData.model_rebuild()
|
|
||||||
AbstractFeatureSeriesDataArray.model_rebuild()
|
|
||||||
DecompositionSeriesData.model_rebuild()
|
|
||||||
DecompositionSeriesDataArray.model_rebuild()
|
|
||||||
DecompositionSeriesSourceChannels.model_rebuild()
|
|
||||||
UnitsSpikeTimesIndex.model_rebuild()
|
|
||||||
UnitsSpikeTimes.model_rebuild()
|
|
||||||
UnitsObsIntervalsIndex.model_rebuild()
|
|
||||||
UnitsObsIntervals.model_rebuild()
|
|
||||||
UnitsElectrodesIndex.model_rebuild()
|
|
||||||
UnitsElectrodes.model_rebuild()
|
|
||||||
UnitsWaveformMean.model_rebuild()
|
|
||||||
UnitsWaveformSd.model_rebuild()
|
|
||||||
UnitsWaveforms.model_rebuild()
|
|
||||||
UnitsWaveformsIndex.model_rebuild()
|
|
||||||
UnitsWaveformsIndexIndex.model_rebuild()
|
|
||||||
|
|
|
@ -12,8 +12,10 @@ else:
|
||||||
|
|
||||||
|
|
||||||
from .core_nwb_base import (
|
from .core_nwb_base import (
|
||||||
NWBContainer,
|
TimeSeriesStartingTime,
|
||||||
TimeSeries
|
TimeSeries,
|
||||||
|
TimeSeriesSync,
|
||||||
|
NWBContainer
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
from datetime import datetime, date
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Dict, Optional, Any, Union
|
|
||||||
from pydantic import BaseModel as BaseModel, Field
|
|
||||||
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
|
||||||
import sys
|
|
||||||
if sys.version_info >= (3, 8):
|
|
||||||
from typing import Literal
|
|
||||||
else:
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
|
||||||
version = "None"
|
|
||||||
|
|
||||||
class ConfiguredBaseModel(BaseModel,
|
|
||||||
validate_assignment = True,
|
|
||||||
validate_default = True,
|
|
||||||
extra = 'forbid',
|
|
||||||
arbitrary_types_allowed = True,
|
|
||||||
use_enum_values = True):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class OptogeneticSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Applied power for optogenetic stimulus, in watts.
|
|
||||||
"""
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit of measurement for data, which is fixed to 'watts'.""")
|
|
||||||
data: List[float] = Field(default_factory=list, description="""Applied power for optogenetic stimulus, in watts.""")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Model rebuild
|
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
||||||
OptogeneticSeriesData.model_rebuild()
|
|
||||||
|
|
|
@ -12,29 +12,23 @@ else:
|
||||||
|
|
||||||
|
|
||||||
from .core_nwb_base import (
|
from .core_nwb_base import (
|
||||||
|
TimeSeriesStartingTime,
|
||||||
|
NWBContainer,
|
||||||
|
TimeSeriesSync,
|
||||||
TimeSeries,
|
TimeSeries,
|
||||||
NWBDataInterface,
|
NWBDataInterface
|
||||||
NWBContainer
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_ophys_include import (
|
|
||||||
RoiResponseSeriesRois,
|
|
||||||
TwoPhotonSeriesFieldOfView,
|
|
||||||
ImagingPlaneOriginCoords,
|
|
||||||
RoiResponseSeriesData,
|
|
||||||
PlaneSegmentationPixelMaskIndex,
|
|
||||||
PlaneSegmentationImageMask,
|
|
||||||
ImagingPlaneGridSpacing,
|
|
||||||
PlaneSegmentationVoxelMaskIndex,
|
|
||||||
ImagingPlaneManifold
|
|
||||||
)
|
|
||||||
|
|
||||||
from .hdmf_common_table import (
|
|
||||||
DynamicTable
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from .core_nwb_image import (
|
from .core_nwb_image import (
|
||||||
ImageSeries
|
ImageSeries,
|
||||||
|
ImageSeriesData
|
||||||
|
)
|
||||||
|
|
||||||
|
from .hdmf_common_table import (
|
||||||
|
VectorIndex,
|
||||||
|
DynamicTable,
|
||||||
|
VectorData,
|
||||||
|
DynamicTableRegion
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,6 +89,17 @@ class TwoPhotonSeries(ImageSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class TwoPhotonSeriesFieldOfView(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Width, height and depth of image, or imaged area, in meters.
|
||||||
|
"""
|
||||||
|
name:Literal["field_of_view"]= Field("field_of_view")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["2 width_height"], Float32],
|
||||||
|
NDArray[Shape["2 width_height, 3 width_height_depth"], Float32]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
class RoiResponseSeries(TimeSeries):
|
class RoiResponseSeries(TimeSeries):
|
||||||
"""
|
"""
|
||||||
ROI responses over an imaging plane. The first dimension represents time. The second dimension, if present, represents ROIs.
|
ROI responses over an imaging plane. The first dimension represents time. The second dimension, if present, represents ROIs.
|
||||||
|
@ -111,6 +116,32 @@ class RoiResponseSeries(TimeSeries):
|
||||||
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
sync:Optional[TimeSeriesSync]= Field(None, description="""Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of 'sync' are mostly for archival purposes.""")
|
||||||
|
|
||||||
|
|
||||||
|
class RoiResponseSeriesData(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Signals from ROIs.
|
||||||
|
"""
|
||||||
|
name:Literal["data"]= Field("data")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["* num_times"], Number],
|
||||||
|
NDArray[Shape["* num_times, * num_ROIs"], Number]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class RoiResponseSeriesRois(DynamicTableRegion):
|
||||||
|
"""
|
||||||
|
DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.
|
||||||
|
"""
|
||||||
|
name:Literal["rois"]= Field("rois")
|
||||||
|
table:Optional[DynamicTable]= Field(None, description="""Reference to the DynamicTable object that this region applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what this table region points to.""")
|
||||||
|
array: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 DfOverF(NWBDataInterface):
|
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).
|
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).
|
||||||
|
@ -149,7 +180,51 @@ class PlaneSegmentation(DynamicTable):
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
|
class PlaneSegmentationImageMask(VectorData):
|
||||||
|
"""
|
||||||
|
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.
|
||||||
|
"""
|
||||||
|
name:Literal["image_mask"]= Field("image_mask")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 PlaneSegmentationPixelMaskIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index into pixel_mask.
|
||||||
|
"""
|
||||||
|
name:Literal["pixel_mask_index"]= Field("pixel_mask_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 PlaneSegmentationVoxelMaskIndex(VectorIndex):
|
||||||
|
"""
|
||||||
|
Index into voxel_mask.
|
||||||
|
"""
|
||||||
|
name:Literal["voxel_mask_index"]= Field("voxel_mask_index")
|
||||||
|
target:Optional[VectorData]= Field(None, description="""Reference to the target dataset that this index applies to.""")
|
||||||
|
description:Optional[str]= Field(None, description="""Description of what these vectors represent.""")
|
||||||
|
array: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 ImagingPlane(NWBContainer):
|
class ImagingPlane(NWBContainer):
|
||||||
|
@ -169,6 +244,43 @@ class ImagingPlane(NWBContainer):
|
||||||
optical_channel:List[OpticalChannel]= Field(default_factory=list, description="""An optical channel used to record from an imaging plane.""")
|
optical_channel:List[OpticalChannel]= Field(default_factory=list, description="""An optical channel used to record from an imaging plane.""")
|
||||||
|
|
||||||
|
|
||||||
|
class ImagingPlaneManifold(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing.
|
||||||
|
"""
|
||||||
|
name:Literal["manifold"]= Field("manifold")
|
||||||
|
conversion:Optional[float]= Field(None, description="""Scalar to multiply each element in data to convert it to the specified 'unit'. If the data are stored in acquisition system units or other units that require a conversion to be interpretable, multiply the data by 'conversion' to convert the data to the specified 'unit'. e.g. if the data acquisition system stores values in this object as pixels from x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then the 'conversion' multiplier to get from raw data acquisition pixel units to meters is 2/1000.""")
|
||||||
|
unit:Optional[str]= Field(None, description="""Base unit of measurement for working with the data. The default value is 'meters'.""")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["* height, * width, 3 x_y_z"], Float32],
|
||||||
|
NDArray[Shape["* height, * width, 3 x_y_z, * depth"], Float32]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class ImagingPlaneOriginCoords(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma).
|
||||||
|
"""
|
||||||
|
name:Literal["origin_coords"]= Field("origin_coords")
|
||||||
|
unit:Optional[str]= Field(None, description="""Measurement units for origin_coords. The default value is 'meters'.""")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["2 x_y"], Float32],
|
||||||
|
NDArray[Shape["2 x_y, 3 x_y_z"], Float32]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class ImagingPlaneGridSpacing(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid.
|
||||||
|
"""
|
||||||
|
name:Literal["grid_spacing"]= Field("grid_spacing")
|
||||||
|
unit:Optional[str]= Field(None, description="""Measurement units for grid_spacing. The default value is 'meters'.""")
|
||||||
|
array:Optional[Union[
|
||||||
|
NDArray[Shape["2 x_y"], Float32],
|
||||||
|
NDArray[Shape["2 x_y, 3 x_y_z"], Float32]
|
||||||
|
]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
class OpticalChannel(NWBContainer):
|
class OpticalChannel(NWBContainer):
|
||||||
"""
|
"""
|
||||||
An optical channel used to record from an imaging plane.
|
An optical channel used to record from an imaging plane.
|
||||||
|
@ -200,12 +312,21 @@ class CorrectedImageStack(NWBDataInterface):
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
||||||
OnePhotonSeries.model_rebuild()
|
OnePhotonSeries.model_rebuild()
|
||||||
TwoPhotonSeries.model_rebuild()
|
TwoPhotonSeries.model_rebuild()
|
||||||
|
TwoPhotonSeriesFieldOfView.model_rebuild()
|
||||||
RoiResponseSeries.model_rebuild()
|
RoiResponseSeries.model_rebuild()
|
||||||
|
RoiResponseSeriesData.model_rebuild()
|
||||||
|
RoiResponseSeriesRois.model_rebuild()
|
||||||
DfOverF.model_rebuild()
|
DfOverF.model_rebuild()
|
||||||
Fluorescence.model_rebuild()
|
Fluorescence.model_rebuild()
|
||||||
ImageSegmentation.model_rebuild()
|
ImageSegmentation.model_rebuild()
|
||||||
PlaneSegmentation.model_rebuild()
|
PlaneSegmentation.model_rebuild()
|
||||||
|
PlaneSegmentationImageMask.model_rebuild()
|
||||||
|
PlaneSegmentationPixelMaskIndex.model_rebuild()
|
||||||
|
PlaneSegmentationVoxelMaskIndex.model_rebuild()
|
||||||
ImagingPlane.model_rebuild()
|
ImagingPlane.model_rebuild()
|
||||||
|
ImagingPlaneManifold.model_rebuild()
|
||||||
|
ImagingPlaneOriginCoords.model_rebuild()
|
||||||
|
ImagingPlaneGridSpacing.model_rebuild()
|
||||||
OpticalChannel.model_rebuild()
|
OpticalChannel.model_rebuild()
|
||||||
MotionCorrection.model_rebuild()
|
MotionCorrection.model_rebuild()
|
||||||
CorrectedImageStack.model_rebuild()
|
CorrectedImageStack.model_rebuild()
|
||||||
|
|
|
@ -1,204 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
from datetime import datetime, date
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Dict, Optional, Any, Union
|
|
||||||
from pydantic import BaseModel as BaseModel, Field
|
|
||||||
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
|
||||||
import sys
|
|
||||||
if sys.version_info >= (3, 8):
|
|
||||||
from typing import Literal
|
|
||||||
else:
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
|
|
||||||
from .hdmf_common_table import (
|
|
||||||
DynamicTableRegion,
|
|
||||||
VectorData,
|
|
||||||
VectorIndex
|
|
||||||
)
|
|
||||||
|
|
||||||
from .nwb_language import (
|
|
||||||
Arraylike
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
|
||||||
version = "None"
|
|
||||||
|
|
||||||
class ConfiguredBaseModel(BaseModel,
|
|
||||||
validate_assignment = True,
|
|
||||||
validate_default = True,
|
|
||||||
extra = 'forbid',
|
|
||||||
arbitrary_types_allowed = True,
|
|
||||||
use_enum_values = True):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class TwoPhotonSeriesFieldOfView(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Width, height and depth of image, or imaged area, in meters.
|
|
||||||
"""
|
|
||||||
name: str = Field("field_of_view", const=True)
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["2 width|height"], Float32],
|
|
||||||
NDArray[Shape["2 width|height, 3 width|height|depth"], Float32]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class TwoPhotonSeriesFieldOfViewArray(Arraylike):
|
|
||||||
|
|
||||||
width|height: Optional[float] = Field(None)
|
|
||||||
width|height|depth: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class RoiResponseSeriesData(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Signals from ROIs.
|
|
||||||
"""
|
|
||||||
name: str = Field("data", const=True)
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["* num_times"], Number],
|
|
||||||
NDArray[Shape["* num_times, * num_ROIs"], Number]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class RoiResponseSeriesDataArray(Arraylike):
|
|
||||||
|
|
||||||
num_times: float = Field(...)
|
|
||||||
num_ROIs: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class RoiResponseSeriesRois(DynamicTableRegion):
|
|
||||||
"""
|
|
||||||
DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.
|
|
||||||
"""
|
|
||||||
name: str = Field("rois", const=True)
|
|
||||||
table: Optional[DynamicTable] = Field(None, description="""Reference to the DynamicTable object that this region applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what this table region points to.""")
|
|
||||||
array: 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 PlaneSegmentationImageMask(VectorData):
|
|
||||||
"""
|
|
||||||
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.
|
|
||||||
"""
|
|
||||||
name: str = Field("image_mask", const=True)
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 PlaneSegmentationPixelMaskIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index into pixel_mask.
|
|
||||||
"""
|
|
||||||
name: str = Field("pixel_mask_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 PlaneSegmentationVoxelMaskIndex(VectorIndex):
|
|
||||||
"""
|
|
||||||
Index into voxel_mask.
|
|
||||||
"""
|
|
||||||
name: str = Field("voxel_mask_index", const=True)
|
|
||||||
target: Optional[VectorData] = Field(None, description="""Reference to the target dataset that this index applies to.""")
|
|
||||||
description: Optional[str] = Field(None, description="""Description of what these vectors represent.""")
|
|
||||||
array: 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 ImagingPlaneManifold(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
DEPRECATED Physical position of each pixel. 'xyz' represents the position of the pixel relative to the defined coordinate space. Deprecated in favor of origin_coords and grid_spacing.
|
|
||||||
"""
|
|
||||||
name: str = Field("manifold", const=True)
|
|
||||||
conversion: Optional[float] = Field(None, description="""Scalar to multiply each element in data to convert it to the specified 'unit'. If the data are stored in acquisition system units or other units that require a conversion to be interpretable, multiply the data by 'conversion' to convert the data to the specified 'unit'. e.g. if the data acquisition system stores values in this object as pixels from x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then the 'conversion' multiplier to get from raw data acquisition pixel units to meters is 2/1000.""")
|
|
||||||
unit: Optional[str] = Field(None, description="""Base unit of measurement for working with the data. The default value is 'meters'.""")
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["* height, * width, 3 x_y_z"], Float32],
|
|
||||||
NDArray[Shape["* height, * width, 3 x_y_z, * depth"], Float32]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingPlaneManifoldArray(Arraylike):
|
|
||||||
|
|
||||||
height: float = Field(...)
|
|
||||||
width: float = Field(...)
|
|
||||||
x_y_z: float = Field(...)
|
|
||||||
depth: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingPlaneOriginCoords(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma).
|
|
||||||
"""
|
|
||||||
name: str = Field("origin_coords", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Measurement units for origin_coords. The default value is 'meters'.""")
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["2 x_y"], Float32],
|
|
||||||
NDArray[Shape["2 x_y, 3 x_y_z"], Float32]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingPlaneOriginCoordsArray(Arraylike):
|
|
||||||
|
|
||||||
x_y: Optional[float] = Field(None)
|
|
||||||
x_y_z: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingPlaneGridSpacing(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid.
|
|
||||||
"""
|
|
||||||
name: str = Field("grid_spacing", const=True)
|
|
||||||
unit: Optional[str] = Field(None, description="""Measurement units for grid_spacing. The default value is 'meters'.""")
|
|
||||||
array: Optional[Union[
|
|
||||||
NDArray[Shape["2 x_y"], Float32],
|
|
||||||
NDArray[Shape["2 x_y, 3 x_y_z"], Float32]
|
|
||||||
]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingPlaneGridSpacingArray(Arraylike):
|
|
||||||
|
|
||||||
x_y: Optional[float] = Field(None)
|
|
||||||
x_y_z: Optional[float] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Model rebuild
|
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
||||||
TwoPhotonSeriesFieldOfView.model_rebuild()
|
|
||||||
TwoPhotonSeriesFieldOfViewArray.model_rebuild()
|
|
||||||
RoiResponseSeriesData.model_rebuild()
|
|
||||||
RoiResponseSeriesDataArray.model_rebuild()
|
|
||||||
RoiResponseSeriesRois.model_rebuild()
|
|
||||||
PlaneSegmentationImageMask.model_rebuild()
|
|
||||||
PlaneSegmentationPixelMaskIndex.model_rebuild()
|
|
||||||
PlaneSegmentationVoxelMaskIndex.model_rebuild()
|
|
||||||
ImagingPlaneManifold.model_rebuild()
|
|
||||||
ImagingPlaneManifoldArray.model_rebuild()
|
|
||||||
ImagingPlaneOriginCoords.model_rebuild()
|
|
||||||
ImagingPlaneOriginCoordsArray.model_rebuild()
|
|
||||||
ImagingPlaneGridSpacing.model_rebuild()
|
|
||||||
ImagingPlaneGridSpacingArray.model_rebuild()
|
|
||||||
|
|
|
@ -11,16 +11,6 @@ else:
|
||||||
from typing_extensions import Literal
|
from typing_extensions import Literal
|
||||||
|
|
||||||
|
|
||||||
from .core_nwb_retinotopy_include import (
|
|
||||||
ImagingRetinotopyAxis1PowerMap,
|
|
||||||
ImagingRetinotopyAxis1PhaseMap,
|
|
||||||
ImagingRetinotopyVasculatureImage,
|
|
||||||
ImagingRetinotopySignMap,
|
|
||||||
ImagingRetinotopyAxis2PowerMap,
|
|
||||||
ImagingRetinotopyAxis2PhaseMap,
|
|
||||||
ImagingRetinotopyFocalDepthImage
|
|
||||||
)
|
|
||||||
|
|
||||||
from .core_nwb_base import (
|
from .core_nwb_base import (
|
||||||
NWBDataInterface
|
NWBDataInterface
|
||||||
)
|
)
|
||||||
|
@ -53,8 +43,94 @@ class ImagingRetinotopy(NWBDataInterface):
|
||||||
vasculature_image:ImagingRetinotopyVasculatureImage= Field(..., description="""Gray-scale anatomical image of cortical surface. Array structure: [rows][columns]""")
|
vasculature_image:ImagingRetinotopyVasculatureImage= Field(..., description="""Gray-scale anatomical image of cortical surface. Array structure: [rows][columns]""")
|
||||||
|
|
||||||
|
|
||||||
|
class ImagingRetinotopyAxis1PhaseMap(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Phase response to stimulus on the first measured axis.
|
||||||
|
"""
|
||||||
|
name:Literal["axis_1_phase_map"]= Field("axis_1_phase_map")
|
||||||
|
dimension:Optional[int]= Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
||||||
|
field_of_view:Optional[float]= Field(None, description="""Size of viewing area, in meters.""")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit that axis data is stored in (e.g., degrees).""")
|
||||||
|
array:Optional[NDArray[Shape["* num_rows, * num_cols"], Float32]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class ImagingRetinotopyAxis1PowerMap(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
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.
|
||||||
|
"""
|
||||||
|
name:Literal["axis_1_power_map"]= Field("axis_1_power_map")
|
||||||
|
dimension:Optional[int]= Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
||||||
|
field_of_view:Optional[float]= Field(None, description="""Size of viewing area, in meters.""")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit that axis data is stored in (e.g., degrees).""")
|
||||||
|
array:Optional[NDArray[Shape["* num_rows, * num_cols"], Float32]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class ImagingRetinotopyAxis2PhaseMap(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Phase response to stimulus on the second measured axis.
|
||||||
|
"""
|
||||||
|
name:Literal["axis_2_phase_map"]= Field("axis_2_phase_map")
|
||||||
|
dimension:Optional[int]= Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
||||||
|
field_of_view:Optional[float]= Field(None, description="""Size of viewing area, in meters.""")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit that axis data is stored in (e.g., degrees).""")
|
||||||
|
array:Optional[NDArray[Shape["* num_rows, * num_cols"], Float32]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class ImagingRetinotopyAxis2PowerMap(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
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.
|
||||||
|
"""
|
||||||
|
name:Literal["axis_2_power_map"]= Field("axis_2_power_map")
|
||||||
|
dimension:Optional[int]= Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
||||||
|
field_of_view:Optional[float]= Field(None, description="""Size of viewing area, in meters.""")
|
||||||
|
unit:Optional[str]= Field(None, description="""Unit that axis data is stored in (e.g., degrees).""")
|
||||||
|
array:Optional[NDArray[Shape["* num_rows, * num_cols"], Float32]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class ImagingRetinotopyFocalDepthImage(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Gray-scale image taken with same settings/parameters (e.g., focal depth, wavelength) as data collection. Array format: [rows][columns].
|
||||||
|
"""
|
||||||
|
name:Literal["focal_depth_image"]= Field("focal_depth_image")
|
||||||
|
bits_per_pixel:Optional[int]= Field(None, description="""Number of bits used to represent each value. This is necessary to determine maximum (white) pixel value.""")
|
||||||
|
dimension:Optional[int]= Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
||||||
|
field_of_view:Optional[float]= Field(None, description="""Size of viewing area, in meters.""")
|
||||||
|
focal_depth:Optional[float]= Field(None, description="""Focal depth offset, in meters.""")
|
||||||
|
format:Optional[str]= Field(None, description="""Format of image. Right now only 'raw' is supported.""")
|
||||||
|
array:Optional[NDArray[Shape["* num_rows, * num_cols"], UInt16]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class ImagingRetinotopySignMap(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Sine of the angle between the direction of the gradient in axis_1 and axis_2.
|
||||||
|
"""
|
||||||
|
name:Literal["sign_map"]= Field("sign_map")
|
||||||
|
dimension:Optional[int]= Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
||||||
|
field_of_view:Optional[float]= Field(None, description="""Size of viewing area, in meters.""")
|
||||||
|
array:Optional[NDArray[Shape["* num_rows, * num_cols"], Float32]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
class ImagingRetinotopyVasculatureImage(ConfiguredBaseModel):
|
||||||
|
"""
|
||||||
|
Gray-scale anatomical image of cortical surface. Array structure: [rows][columns]
|
||||||
|
"""
|
||||||
|
name:Literal["vasculature_image"]= Field("vasculature_image")
|
||||||
|
bits_per_pixel:Optional[int]= Field(None, description="""Number of bits used to represent each value. This is necessary to determine maximum (white) pixel value""")
|
||||||
|
dimension:Optional[int]= Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
||||||
|
field_of_view:Optional[float]= Field(None, description="""Size of viewing area, in meters.""")
|
||||||
|
format:Optional[str]= Field(None, description="""Format of image. Right now only 'raw' is supported.""")
|
||||||
|
array:Optional[NDArray[Shape["* num_rows, * num_cols"], UInt16]]= Field(None)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Model rebuild
|
# Model rebuild
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
||||||
ImagingRetinotopy.model_rebuild()
|
ImagingRetinotopy.model_rebuild()
|
||||||
|
ImagingRetinotopyAxis1PhaseMap.model_rebuild()
|
||||||
|
ImagingRetinotopyAxis1PowerMap.model_rebuild()
|
||||||
|
ImagingRetinotopyAxis2PhaseMap.model_rebuild()
|
||||||
|
ImagingRetinotopyAxis2PowerMap.model_rebuild()
|
||||||
|
ImagingRetinotopyFocalDepthImage.model_rebuild()
|
||||||
|
ImagingRetinotopySignMap.model_rebuild()
|
||||||
|
ImagingRetinotopyVasculatureImage.model_rebuild()
|
||||||
|
|
|
@ -1,169 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
from datetime import datetime, date
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Dict, Optional, Any, Union
|
|
||||||
from pydantic import BaseModel as BaseModel, Field
|
|
||||||
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
|
||||||
import sys
|
|
||||||
if sys.version_info >= (3, 8):
|
|
||||||
from typing import Literal
|
|
||||||
else:
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
|
|
||||||
from .nwb_language import (
|
|
||||||
Arraylike
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
|
||||||
version = "None"
|
|
||||||
|
|
||||||
class ConfiguredBaseModel(BaseModel,
|
|
||||||
validate_assignment = True,
|
|
||||||
validate_default = True,
|
|
||||||
extra = 'forbid',
|
|
||||||
arbitrary_types_allowed = True,
|
|
||||||
use_enum_values = True):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopyAxis1PhaseMap(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Phase response to stimulus on the first measured axis.
|
|
||||||
"""
|
|
||||||
name: str = Field("axis_1_phase_map", const=True)
|
|
||||||
dimension: Optional[int] = Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
|
||||||
field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""")
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit that axis data is stored in (e.g., degrees).""")
|
|
||||||
array: Optional[NDArray[Shape["* num_rows, * num_cols"], Float32]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopyAxis1PhaseMapArray(Arraylike):
|
|
||||||
|
|
||||||
num_rows: float = Field(...)
|
|
||||||
num_cols: float = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopyAxis1PowerMap(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
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.
|
|
||||||
"""
|
|
||||||
name: str = Field("axis_1_power_map", const=True)
|
|
||||||
dimension: Optional[int] = Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
|
||||||
field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""")
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit that axis data is stored in (e.g., degrees).""")
|
|
||||||
array: Optional[NDArray[Shape["* num_rows, * num_cols"], Float32]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopyAxis1PowerMapArray(Arraylike):
|
|
||||||
|
|
||||||
num_rows: float = Field(...)
|
|
||||||
num_cols: float = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopyAxis2PhaseMap(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Phase response to stimulus on the second measured axis.
|
|
||||||
"""
|
|
||||||
name: str = Field("axis_2_phase_map", const=True)
|
|
||||||
dimension: Optional[int] = Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
|
||||||
field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""")
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit that axis data is stored in (e.g., degrees).""")
|
|
||||||
array: Optional[NDArray[Shape["* num_rows, * num_cols"], Float32]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopyAxis2PhaseMapArray(Arraylike):
|
|
||||||
|
|
||||||
num_rows: float = Field(...)
|
|
||||||
num_cols: float = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopyAxis2PowerMap(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
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.
|
|
||||||
"""
|
|
||||||
name: str = Field("axis_2_power_map", const=True)
|
|
||||||
dimension: Optional[int] = Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
|
||||||
field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""")
|
|
||||||
unit: Optional[str] = Field(None, description="""Unit that axis data is stored in (e.g., degrees).""")
|
|
||||||
array: Optional[NDArray[Shape["* num_rows, * num_cols"], Float32]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopyAxis2PowerMapArray(Arraylike):
|
|
||||||
|
|
||||||
num_rows: float = Field(...)
|
|
||||||
num_cols: float = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopyFocalDepthImage(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Gray-scale image taken with same settings/parameters (e.g., focal depth, wavelength) as data collection. Array format: [rows][columns].
|
|
||||||
"""
|
|
||||||
name: str = Field("focal_depth_image", const=True)
|
|
||||||
bits_per_pixel: Optional[int] = Field(None, description="""Number of bits used to represent each value. This is necessary to determine maximum (white) pixel value.""")
|
|
||||||
dimension: Optional[int] = Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
|
||||||
field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""")
|
|
||||||
focal_depth: Optional[float] = Field(None, description="""Focal depth offset, in meters.""")
|
|
||||||
format: Optional[str] = Field(None, description="""Format of image. Right now only 'raw' is supported.""")
|
|
||||||
array: Optional[NDArray[Shape["* num_rows, * num_cols"], UInt16]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopyFocalDepthImageArray(Arraylike):
|
|
||||||
|
|
||||||
num_rows: int = Field(...)
|
|
||||||
num_cols: int = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopySignMap(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Sine of the angle between the direction of the gradient in axis_1 and axis_2.
|
|
||||||
"""
|
|
||||||
name: str = Field("sign_map", const=True)
|
|
||||||
dimension: Optional[int] = Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
|
||||||
field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""")
|
|
||||||
array: Optional[NDArray[Shape["* num_rows, * num_cols"], Float32]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopySignMapArray(Arraylike):
|
|
||||||
|
|
||||||
num_rows: float = Field(...)
|
|
||||||
num_cols: float = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopyVasculatureImage(ConfiguredBaseModel):
|
|
||||||
"""
|
|
||||||
Gray-scale anatomical image of cortical surface. Array structure: [rows][columns]
|
|
||||||
"""
|
|
||||||
name: str = Field("vasculature_image", const=True)
|
|
||||||
bits_per_pixel: Optional[int] = Field(None, description="""Number of bits used to represent each value. This is necessary to determine maximum (white) pixel value""")
|
|
||||||
dimension: Optional[int] = Field(None, description="""Number of rows and columns in the image. NOTE: row, column representation is equivalent to height, width.""")
|
|
||||||
field_of_view: Optional[float] = Field(None, description="""Size of viewing area, in meters.""")
|
|
||||||
format: Optional[str] = Field(None, description="""Format of image. Right now only 'raw' is supported.""")
|
|
||||||
array: Optional[NDArray[Shape["* num_rows, * num_cols"], UInt16]] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagingRetinotopyVasculatureImageArray(Arraylike):
|
|
||||||
|
|
||||||
num_rows: int = Field(...)
|
|
||||||
num_cols: int = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Model rebuild
|
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
||||||
ImagingRetinotopyAxis1PhaseMap.model_rebuild()
|
|
||||||
ImagingRetinotopyAxis1PhaseMapArray.model_rebuild()
|
|
||||||
ImagingRetinotopyAxis1PowerMap.model_rebuild()
|
|
||||||
ImagingRetinotopyAxis1PowerMapArray.model_rebuild()
|
|
||||||
ImagingRetinotopyAxis2PhaseMap.model_rebuild()
|
|
||||||
ImagingRetinotopyAxis2PhaseMapArray.model_rebuild()
|
|
||||||
ImagingRetinotopyAxis2PowerMap.model_rebuild()
|
|
||||||
ImagingRetinotopyAxis2PowerMapArray.model_rebuild()
|
|
||||||
ImagingRetinotopyFocalDepthImage.model_rebuild()
|
|
||||||
ImagingRetinotopyFocalDepthImageArray.model_rebuild()
|
|
||||||
ImagingRetinotopySignMap.model_rebuild()
|
|
||||||
ImagingRetinotopySignMapArray.model_rebuild()
|
|
||||||
ImagingRetinotopyVasculatureImage.model_rebuild()
|
|
||||||
ImagingRetinotopyVasculatureImageArray.model_rebuild()
|
|
||||||
|
|
|
@ -11,6 +11,25 @@ else:
|
||||||
from typing_extensions import Literal
|
from typing_extensions import Literal
|
||||||
|
|
||||||
|
|
||||||
|
from .hdmf_common_sparse import (
|
||||||
|
CSRMatrix
|
||||||
|
)
|
||||||
|
|
||||||
|
from .hdmf_common_base import (
|
||||||
|
Data,
|
||||||
|
Container,
|
||||||
|
SimpleMultiContainer
|
||||||
|
)
|
||||||
|
|
||||||
|
from .hdmf_common_table import (
|
||||||
|
VectorData,
|
||||||
|
VectorIndex,
|
||||||
|
ElementIdentifiers,
|
||||||
|
DynamicTableRegion,
|
||||||
|
DynamicTable,
|
||||||
|
AlignedDynamicTable
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
metamodel_version = "None"
|
||||||
version = "1.8.0"
|
version = "1.8.0"
|
||||||
|
|
|
@ -43,7 +43,7 @@ class SimpleMultiContainer(Container):
|
||||||
A simple Container for holding onto multiple containers.
|
A simple Container for holding onto multiple containers.
|
||||||
"""
|
"""
|
||||||
name:str= Field(...)
|
name:str= Field(...)
|
||||||
Data: Optional[List[Data]] = Field(default_factory=list, description="""Data objects held within this SimpleMultiContainer.""")
|
data:Optional[List[Data]]= Field(default_factory=list, description="""Data objects held within this SimpleMultiContainer.""")
|
||||||
container:Optional[List[Container]]= Field(default_factory=list, description="""Container objects held within this SimpleMultiContainer.""")
|
container:Optional[List[Container]]= Field(default_factory=list, description="""Container objects held within this SimpleMultiContainer.""")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,13 +12,8 @@ else:
|
||||||
|
|
||||||
|
|
||||||
from .hdmf_common_base import (
|
from .hdmf_common_base import (
|
||||||
Data,
|
Container,
|
||||||
Container
|
Data
|
||||||
)
|
|
||||||
|
|
||||||
from .hdmf_common_table_include import (
|
|
||||||
VectorDataArray,
|
|
||||||
ElementIdentifiersArray
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,7 +89,7 @@ class DynamicTable(Container):
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
class AlignedDynamicTable(DynamicTable):
|
class AlignedDynamicTable(DynamicTable):
|
||||||
|
@ -107,7 +102,7 @@ class AlignedDynamicTable(DynamicTable):
|
||||||
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
colnames:Optional[str]= Field(None, description="""The names of the columns in this table. This should be used to specify an order to the columns.""")
|
||||||
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
description:Optional[str]= Field(None, description="""Description of what is in this dynamic table.""")
|
||||||
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
id:List[int]= Field(default_factory=list, description="""Array of unique identifiers for the rows of this dynamic table.""")
|
||||||
VectorData: Optional[List[VectorData]] = Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
vector_data:Optional[List[VectorData]]= Field(default_factory=list, description="""Vector columns, including index columns, of this dynamic table.""")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
from datetime import datetime, date
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Dict, Optional, Any, Union
|
|
||||||
from pydantic import BaseModel as BaseModel, Field
|
|
||||||
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
|
||||||
import sys
|
|
||||||
if sys.version_info >= (3, 8):
|
|
||||||
from typing import Literal
|
|
||||||
else:
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
|
|
||||||
from .nwb_language import (
|
|
||||||
Arraylike
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
|
||||||
version = "None"
|
|
||||||
|
|
||||||
class ConfiguredBaseModel(BaseModel,
|
|
||||||
validate_assignment = True,
|
|
||||||
validate_default = True,
|
|
||||||
extra = 'forbid',
|
|
||||||
arbitrary_types_allowed = True,
|
|
||||||
use_enum_values = True):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class VectorDataArray(Arraylike):
|
|
||||||
|
|
||||||
dim0: Any = Field(...)
|
|
||||||
dim1: Optional[Any] = Field(None)
|
|
||||||
dim2: Optional[Any] = Field(None)
|
|
||||||
dim3: Optional[Any] = Field(None)
|
|
||||||
|
|
||||||
|
|
||||||
class ElementIdentifiersArray(Arraylike):
|
|
||||||
|
|
||||||
num_elements: int = Field(...)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Model rebuild
|
|
||||||
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
||||||
VectorDataArray.model_rebuild()
|
|
||||||
ElementIdentifiersArray.model_rebuild()
|
|
||||||
|
|
|
@ -11,6 +11,29 @@ else:
|
||||||
from typing_extensions import Literal
|
from typing_extensions import Literal
|
||||||
|
|
||||||
|
|
||||||
|
from .hdmf_experimental_resources import (
|
||||||
|
HERD
|
||||||
|
)
|
||||||
|
|
||||||
|
from .hdmf_common_base import (
|
||||||
|
Data,
|
||||||
|
Container,
|
||||||
|
SimpleMultiContainer
|
||||||
|
)
|
||||||
|
|
||||||
|
from .hdmf_experimental_experimental import (
|
||||||
|
EnumData
|
||||||
|
)
|
||||||
|
|
||||||
|
from .hdmf_common_table import (
|
||||||
|
VectorData,
|
||||||
|
VectorIndex,
|
||||||
|
ElementIdentifiers,
|
||||||
|
DynamicTableRegion,
|
||||||
|
DynamicTable,
|
||||||
|
AlignedDynamicTable
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
metamodel_version = "None"
|
metamodel_version = "None"
|
||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
|
|
|
@ -1,170 +0,0 @@
|
||||||
name: core.nwb.base.include
|
|
||||||
id: core.nwb.base.include
|
|
||||||
imports:
|
|
||||||
- hdmf-common.base
|
|
||||||
- hdmf-common.table
|
|
||||||
- nwb.language
|
|
||||||
- core.nwb.base.include
|
|
||||||
- core.nwb.base
|
|
||||||
default_prefix: core.nwb.base.include/
|
|
||||||
classes:
|
|
||||||
Image__Array:
|
|
||||||
name: Image__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
x:
|
|
||||||
name: x
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
y:
|
|
||||||
name: y
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
r, g, b:
|
|
||||||
name: r, g, b
|
|
||||||
range: numeric
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 3
|
|
||||||
maximum_cardinality: 3
|
|
||||||
r, g, b, a:
|
|
||||||
name: r, g, b, a
|
|
||||||
range: numeric
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 4
|
|
||||||
maximum_cardinality: 4
|
|
||||||
ImageReferences__Array:
|
|
||||||
name: ImageReferences__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_images:
|
|
||||||
name: num_images
|
|
||||||
range: Image
|
|
||||||
required: true
|
|
||||||
TimeSeries__data:
|
|
||||||
name: TimeSeries__data
|
|
||||||
description: Data values. Data can be in 1-D, 2-D, 3-D, or 4-D. The first dimension
|
|
||||||
should always represent time. This can also be used to store binary data (e.g.,
|
|
||||||
image frames). This can also be a link to data stored in an external file.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(data)
|
|
||||||
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.
|
|
||||||
range: float32
|
|
||||||
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
|
|
||||||
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.
|
|
||||||
range: float32
|
|
||||||
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
|
|
||||||
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
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: TimeSeries__data__Array
|
|
||||||
TimeSeries__data__Array:
|
|
||||||
name: TimeSeries__data__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_times:
|
|
||||||
name: num_times
|
|
||||||
range: AnyType
|
|
||||||
required: true
|
|
||||||
num_DIM2:
|
|
||||||
name: num_DIM2
|
|
||||||
range: AnyType
|
|
||||||
required: false
|
|
||||||
num_DIM3:
|
|
||||||
name: num_DIM3
|
|
||||||
range: AnyType
|
|
||||||
required: false
|
|
||||||
num_DIM4:
|
|
||||||
name: num_DIM4
|
|
||||||
range: AnyType
|
|
||||||
required: false
|
|
||||||
TimeSeries__starting_time:
|
|
||||||
name: TimeSeries__starting_time
|
|
||||||
description: Timestamp of the first sample in seconds. When timestamps are uniformly
|
|
||||||
spaced, the timestamp of the first sample can be specified and all subsequent
|
|
||||||
ones calculated from the sampling rate attribute.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(starting_time)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: starting_time
|
|
||||||
rate:
|
|
||||||
name: rate
|
|
||||||
description: Sampling rate, in Hz.
|
|
||||||
range: float32
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit of measurement for time, which is fixed to 'seconds'.
|
|
||||||
range: text
|
|
||||||
TimeSeries__sync:
|
|
||||||
name: TimeSeries__sync
|
|
||||||
description: Lab-specific time and sync information as provided directly from
|
|
||||||
hardware devices and that is necessary for aligning all acquired time information
|
|
||||||
to a common timebase. The timestamp array stores time in the common timebase.
|
|
||||||
This group will usually only be populated in TimeSeries that are stored external
|
|
||||||
to the NWB file, in files storing raw data. Once timestamp data is calculated,
|
|
||||||
the contents of 'sync' are mostly for archival purposes.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(sync)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: sync
|
|
||||||
Images__order_of_images:
|
|
||||||
name: Images__order_of_images
|
|
||||||
description: Ordered dataset of references to Image objects stored in the parent
|
|
||||||
group. Each Image object in the Images group should be stored once and only
|
|
||||||
once, so the dataset should have the same length as the number of images.
|
|
||||||
is_a: ImageReferences
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(order_of_images)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: order_of_images
|
|
|
@ -4,8 +4,6 @@ imports:
|
||||||
- hdmf-common.base
|
- hdmf-common.base
|
||||||
- hdmf-common.table
|
- hdmf-common.table
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- core.nwb.base.include
|
|
||||||
- core.nwb.base
|
|
||||||
default_prefix: core.nwb.base/
|
default_prefix: core.nwb.base/
|
||||||
classes:
|
classes:
|
||||||
NWBData:
|
NWBData:
|
||||||
|
@ -53,6 +51,30 @@ classes:
|
||||||
name: array
|
name: array
|
||||||
range: Image__Array
|
range: Image__Array
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
Image__Array:
|
||||||
|
name: Image__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
x:
|
||||||
|
name: x
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
y:
|
||||||
|
name: y
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
r, g, b:
|
||||||
|
name: r, g, b
|
||||||
|
range: numeric
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 3
|
||||||
|
maximum_cardinality: 3
|
||||||
|
r, g, b, a:
|
||||||
|
name: r, g, b, a
|
||||||
|
range: numeric
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 4
|
||||||
|
maximum_cardinality: 4
|
||||||
ImageReferences:
|
ImageReferences:
|
||||||
name: ImageReferences
|
name: ImageReferences
|
||||||
description: Ordered dataset of references to Image objects.
|
description: Ordered dataset of references to Image objects.
|
||||||
|
@ -66,6 +88,14 @@ classes:
|
||||||
name: array
|
name: array
|
||||||
range: ImageReferences__Array
|
range: ImageReferences__Array
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
ImageReferences__Array:
|
||||||
|
name: ImageReferences__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_images:
|
||||||
|
name: num_images
|
||||||
|
range: Image
|
||||||
|
required: true
|
||||||
NWBContainer:
|
NWBContainer:
|
||||||
name: NWBContainer
|
name: NWBContainer
|
||||||
description: An abstract data type for a generic container storing collections
|
description: An abstract data type for a generic container storing collections
|
||||||
|
@ -159,6 +189,125 @@ classes:
|
||||||
range: TimeSeries__sync
|
range: TimeSeries__sync
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
TimeSeries__data:
|
||||||
|
name: TimeSeries__data
|
||||||
|
description: Data values. Data can be in 1-D, 2-D, 3-D, or 4-D. The first dimension
|
||||||
|
should always represent time. This can also be used to store binary data (e.g.,
|
||||||
|
image frames). This can also be a link to data stored in an external file.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(data)
|
||||||
|
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.
|
||||||
|
range: float32
|
||||||
|
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
|
||||||
|
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.
|
||||||
|
range: float32
|
||||||
|
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
|
||||||
|
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
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: TimeSeries__data__Array
|
||||||
|
TimeSeries__data__Array:
|
||||||
|
name: TimeSeries__data__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_times:
|
||||||
|
name: num_times
|
||||||
|
range: AnyType
|
||||||
|
required: true
|
||||||
|
num_DIM2:
|
||||||
|
name: num_DIM2
|
||||||
|
range: AnyType
|
||||||
|
required: false
|
||||||
|
num_DIM3:
|
||||||
|
name: num_DIM3
|
||||||
|
range: AnyType
|
||||||
|
required: false
|
||||||
|
num_DIM4:
|
||||||
|
name: num_DIM4
|
||||||
|
range: AnyType
|
||||||
|
required: false
|
||||||
|
TimeSeries__starting_time:
|
||||||
|
name: TimeSeries__starting_time
|
||||||
|
description: Timestamp of the first sample in seconds. When timestamps are uniformly
|
||||||
|
spaced, the timestamp of the first sample can be specified and all subsequent
|
||||||
|
ones calculated from the sampling rate attribute.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(starting_time)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: starting_time
|
||||||
|
rate:
|
||||||
|
name: rate
|
||||||
|
description: Sampling rate, in Hz.
|
||||||
|
range: float32
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit of measurement for time, which is fixed to 'seconds'.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: float64
|
||||||
|
required: true
|
||||||
|
TimeSeries__sync:
|
||||||
|
name: TimeSeries__sync
|
||||||
|
description: Lab-specific time and sync information as provided directly from
|
||||||
|
hardware devices and that is necessary for aligning all acquired time information
|
||||||
|
to a common timebase. The timestamp array stores time in the common timebase.
|
||||||
|
This group will usually only be populated in TimeSeries that are stored external
|
||||||
|
to the NWB file, in files storing raw data. Once timestamp data is calculated,
|
||||||
|
the contents of 'sync' are mostly for archival purposes.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(sync)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: sync
|
||||||
ProcessingModule:
|
ProcessingModule:
|
||||||
name: ProcessingModule
|
name: ProcessingModule
|
||||||
description: A collection of processed data.
|
description: A collection of processed data.
|
||||||
|
@ -216,3 +365,16 @@ classes:
|
||||||
range: Images__order_of_images
|
range: Images__order_of_images
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
Images__order_of_images:
|
||||||
|
name: Images__order_of_images
|
||||||
|
description: Ordered dataset of references to Image objects stored in the parent
|
||||||
|
group. Each Image object in the Images group should be stored once and only
|
||||||
|
once, so the dataset should have the same length as the number of images.
|
||||||
|
is_a: ImageReferences
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(order_of_images)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: order_of_images
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
name: core.nwb.behavior.include
|
|
||||||
id: core.nwb.behavior.include
|
|
||||||
imports:
|
|
||||||
- core.nwb.base
|
|
||||||
- core.nwb.misc
|
|
||||||
- nwb.language
|
|
||||||
- core.nwb.behavior.include
|
|
||||||
- core.nwb.behavior
|
|
||||||
default_prefix: core.nwb.behavior.include/
|
|
||||||
classes:
|
|
||||||
SpatialSeries__data:
|
|
||||||
name: SpatialSeries__data
|
|
||||||
description: 1-D or 2-D array storing position or direction relative to some reference
|
|
||||||
frame.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(data)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: data
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
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'.
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: SpatialSeries__data__Array
|
|
||||||
SpatialSeries__data__Array:
|
|
||||||
name: SpatialSeries__data__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_times:
|
|
||||||
name: num_times
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
x:
|
|
||||||
name: x
|
|
||||||
range: numeric
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 1
|
|
||||||
maximum_cardinality: 1
|
|
||||||
x,y:
|
|
||||||
name: x,y
|
|
||||||
range: numeric
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 2
|
|
||||||
maximum_cardinality: 2
|
|
||||||
x,y,z:
|
|
||||||
name: x,y,z
|
|
||||||
range: numeric
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 3
|
|
||||||
maximum_cardinality: 3
|
|
|
@ -4,8 +4,6 @@ imports:
|
||||||
- core.nwb.base
|
- core.nwb.base
|
||||||
- core.nwb.misc
|
- core.nwb.misc
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- core.nwb.behavior.include
|
|
||||||
- core.nwb.behavior
|
|
||||||
default_prefix: core.nwb.behavior/
|
default_prefix: core.nwb.behavior/
|
||||||
classes:
|
classes:
|
||||||
SpatialSeries:
|
SpatialSeries:
|
||||||
|
@ -39,6 +37,53 @@ classes:
|
||||||
range: text
|
range: text
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
SpatialSeries__data:
|
||||||
|
name: SpatialSeries__data
|
||||||
|
description: 1-D or 2-D array storing position or direction relative to some reference
|
||||||
|
frame.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(data)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: data
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
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'.
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: SpatialSeries__data__Array
|
||||||
|
SpatialSeries__data__Array:
|
||||||
|
name: SpatialSeries__data__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_times:
|
||||||
|
name: num_times
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
x:
|
||||||
|
name: x
|
||||||
|
range: numeric
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 1
|
||||||
|
maximum_cardinality: 1
|
||||||
|
x,y:
|
||||||
|
name: x,y
|
||||||
|
range: numeric
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 2
|
||||||
|
maximum_cardinality: 2
|
||||||
|
x,y,z:
|
||||||
|
name: x,y,z
|
||||||
|
range: numeric
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 3
|
||||||
|
maximum_cardinality: 3
|
||||||
BehavioralEpochs:
|
BehavioralEpochs:
|
||||||
name: BehavioralEpochs
|
name: BehavioralEpochs
|
||||||
description: TimeSeries for storing behavioral epochs. The objective of this
|
description: TimeSeries for storing behavioral epochs. The objective of this
|
||||||
|
|
|
@ -3,7 +3,6 @@ id: core.nwb.device
|
||||||
imports:
|
imports:
|
||||||
- core.nwb.base
|
- core.nwb.base
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- core.nwb.device
|
|
||||||
default_prefix: core.nwb.device/
|
default_prefix: core.nwb.device/
|
||||||
classes:
|
classes:
|
||||||
Device:
|
Device:
|
||||||
|
|
|
@ -1,187 +0,0 @@
|
||||||
name: core.nwb.ecephys.include
|
|
||||||
id: core.nwb.ecephys.include
|
|
||||||
imports:
|
|
||||||
- core.nwb.base
|
|
||||||
- hdmf-common.table
|
|
||||||
- core.nwb.device
|
|
||||||
- nwb.language
|
|
||||||
- core.nwb.ecephys.include
|
|
||||||
- core.nwb.ecephys
|
|
||||||
default_prefix: core.nwb.ecephys.include/
|
|
||||||
classes:
|
|
||||||
ElectricalSeries__data:
|
|
||||||
name: ElectricalSeries__data
|
|
||||||
description: Recorded voltage data.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(data)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: data
|
|
||||||
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'.
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ElectricalSeries__data__Array
|
|
||||||
ElectricalSeries__data__Array:
|
|
||||||
name: ElectricalSeries__data__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_times:
|
|
||||||
name: num_times
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
num_channels:
|
|
||||||
name: num_channels
|
|
||||||
range: numeric
|
|
||||||
required: false
|
|
||||||
num_samples:
|
|
||||||
name: num_samples
|
|
||||||
range: numeric
|
|
||||||
required: false
|
|
||||||
ElectricalSeries__electrodes:
|
|
||||||
name: ElectricalSeries__electrodes
|
|
||||||
description: DynamicTableRegion pointer to the electrodes that this time series
|
|
||||||
was generated from.
|
|
||||||
is_a: DynamicTableRegion
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(electrodes)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: electrodes
|
|
||||||
SpikeEventSeries__data:
|
|
||||||
name: SpikeEventSeries__data
|
|
||||||
description: Spike waveforms.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(data)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: data
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit of measurement for waveforms, which is fixed to 'volts'.
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: SpikeEventSeries__data__Array
|
|
||||||
SpikeEventSeries__data__Array:
|
|
||||||
name: SpikeEventSeries__data__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_events:
|
|
||||||
name: num_events
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
num_samples:
|
|
||||||
name: num_samples
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
num_channels:
|
|
||||||
name: num_channels
|
|
||||||
range: numeric
|
|
||||||
required: false
|
|
||||||
FeatureExtraction__features:
|
|
||||||
name: FeatureExtraction__features
|
|
||||||
description: Multi-dimensional array of features extracted from each event.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(features)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: features
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: FeatureExtraction__features__Array
|
|
||||||
FeatureExtraction__features__Array:
|
|
||||||
name: FeatureExtraction__features__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_events:
|
|
||||||
name: num_events
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
num_channels:
|
|
||||||
name: num_channels
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
num_features:
|
|
||||||
name: num_features
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
FeatureExtraction__electrodes:
|
|
||||||
name: FeatureExtraction__electrodes
|
|
||||||
description: DynamicTableRegion pointer to the electrodes that this time series
|
|
||||||
was generated from.
|
|
||||||
is_a: DynamicTableRegion
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(electrodes)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: electrodes
|
|
||||||
ClusterWaveforms__waveform_mean:
|
|
||||||
name: ClusterWaveforms__waveform_mean
|
|
||||||
description: The mean waveform for each cluster, using the same indices for each
|
|
||||||
wave as cluster numbers in the associated Clustering module (i.e, cluster 3
|
|
||||||
is in array slot [3]). Waveforms corresponding to gaps in cluster sequence should
|
|
||||||
be empty (e.g., zero- filled)
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(waveform_mean)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: waveform_mean
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ClusterWaveforms__waveform_mean__Array
|
|
||||||
ClusterWaveforms__waveform_mean__Array:
|
|
||||||
name: ClusterWaveforms__waveform_mean__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_clusters:
|
|
||||||
name: num_clusters
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
num_samples:
|
|
||||||
name: num_samples
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
ClusterWaveforms__waveform_sd:
|
|
||||||
name: ClusterWaveforms__waveform_sd
|
|
||||||
description: Stdev of waveforms for each cluster, using the same indices as in
|
|
||||||
mean
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(waveform_sd)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: waveform_sd
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ClusterWaveforms__waveform_sd__Array
|
|
||||||
ClusterWaveforms__waveform_sd__Array:
|
|
||||||
name: ClusterWaveforms__waveform_sd__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_clusters:
|
|
||||||
name: num_clusters
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
num_samples:
|
|
||||||
name: num_samples
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
|
@ -5,8 +5,6 @@ imports:
|
||||||
- hdmf-common.table
|
- hdmf-common.table
|
||||||
- core.nwb.device
|
- core.nwb.device
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- core.nwb.ecephys.include
|
|
||||||
- core.nwb.ecephys
|
|
||||||
default_prefix: core.nwb.ecephys/
|
default_prefix: core.nwb.ecephys/
|
||||||
classes:
|
classes:
|
||||||
ElectricalSeries:
|
ElectricalSeries:
|
||||||
|
@ -59,6 +57,54 @@ classes:
|
||||||
range: float32
|
range: float32
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
ElectricalSeries__data:
|
||||||
|
name: ElectricalSeries__data
|
||||||
|
description: Recorded voltage data.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(data)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: data
|
||||||
|
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'.
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ElectricalSeries__data__Array
|
||||||
|
ElectricalSeries__data__Array:
|
||||||
|
name: ElectricalSeries__data__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_times:
|
||||||
|
name: num_times
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
num_channels:
|
||||||
|
name: num_channels
|
||||||
|
range: numeric
|
||||||
|
required: false
|
||||||
|
num_samples:
|
||||||
|
name: num_samples
|
||||||
|
range: numeric
|
||||||
|
required: false
|
||||||
|
ElectricalSeries__electrodes:
|
||||||
|
name: ElectricalSeries__electrodes
|
||||||
|
description: DynamicTableRegion pointer to the electrodes that this time series
|
||||||
|
was generated from.
|
||||||
|
is_a: DynamicTableRegion
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(electrodes)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: electrodes
|
||||||
SpikeEventSeries:
|
SpikeEventSeries:
|
||||||
name: SpikeEventSeries
|
name: SpikeEventSeries
|
||||||
description: 'Stores snapshots/snippets of recorded spike events (i.e., threshold
|
description: 'Stores snapshots/snippets of recorded spike events (i.e., threshold
|
||||||
|
@ -91,6 +137,39 @@ classes:
|
||||||
range: float64
|
range: float64
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
SpikeEventSeries__data:
|
||||||
|
name: SpikeEventSeries__data
|
||||||
|
description: Spike waveforms.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(data)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: data
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit of measurement for waveforms, which is fixed to 'volts'.
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: SpikeEventSeries__data__Array
|
||||||
|
SpikeEventSeries__data__Array:
|
||||||
|
name: SpikeEventSeries__data__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_events:
|
||||||
|
name: num_events
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
num_samples:
|
||||||
|
name: num_samples
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
num_channels:
|
||||||
|
name: num_channels
|
||||||
|
range: numeric
|
||||||
|
required: false
|
||||||
FeatureExtraction:
|
FeatureExtraction:
|
||||||
name: FeatureExtraction
|
name: FeatureExtraction
|
||||||
description: Features, such as PC1 and PC2, that are extracted from signals stored
|
description: Features, such as PC1 and PC2, that are extracted from signals stored
|
||||||
|
@ -128,6 +207,47 @@ classes:
|
||||||
range: FeatureExtraction__electrodes
|
range: FeatureExtraction__electrodes
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
FeatureExtraction__features:
|
||||||
|
name: FeatureExtraction__features
|
||||||
|
description: Multi-dimensional array of features extracted from each event.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(features)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: features
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: FeatureExtraction__features__Array
|
||||||
|
FeatureExtraction__features__Array:
|
||||||
|
name: FeatureExtraction__features__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_events:
|
||||||
|
name: num_events
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
num_channels:
|
||||||
|
name: num_channels
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
num_features:
|
||||||
|
name: num_features
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
FeatureExtraction__electrodes:
|
||||||
|
name: FeatureExtraction__electrodes
|
||||||
|
description: DynamicTableRegion pointer to the electrodes that this time series
|
||||||
|
was generated from.
|
||||||
|
is_a: DynamicTableRegion
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(electrodes)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: electrodes
|
||||||
EventDetection:
|
EventDetection:
|
||||||
name: EventDetection
|
name: EventDetection
|
||||||
description: Detected spike events from voltage trace(s).
|
description: Detected spike events from voltage trace(s).
|
||||||
|
@ -287,6 +407,60 @@ classes:
|
||||||
range: ClusterWaveforms__waveform_sd
|
range: ClusterWaveforms__waveform_sd
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
ClusterWaveforms__waveform_mean:
|
||||||
|
name: ClusterWaveforms__waveform_mean
|
||||||
|
description: The mean waveform for each cluster, using the same indices for each
|
||||||
|
wave as cluster numbers in the associated Clustering module (i.e, cluster 3
|
||||||
|
is in array slot [3]). Waveforms corresponding to gaps in cluster sequence should
|
||||||
|
be empty (e.g., zero- filled)
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(waveform_mean)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: waveform_mean
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ClusterWaveforms__waveform_mean__Array
|
||||||
|
ClusterWaveforms__waveform_mean__Array:
|
||||||
|
name: ClusterWaveforms__waveform_mean__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_clusters:
|
||||||
|
name: num_clusters
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
num_samples:
|
||||||
|
name: num_samples
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
ClusterWaveforms__waveform_sd:
|
||||||
|
name: ClusterWaveforms__waveform_sd
|
||||||
|
description: Stdev of waveforms for each cluster, using the same indices as in
|
||||||
|
mean
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(waveform_sd)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: waveform_sd
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ClusterWaveforms__waveform_sd__Array
|
||||||
|
ClusterWaveforms__waveform_sd__Array:
|
||||||
|
name: ClusterWaveforms__waveform_sd__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_clusters:
|
||||||
|
name: num_clusters
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
num_samples:
|
||||||
|
name: num_samples
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
Clustering:
|
Clustering:
|
||||||
name: Clustering
|
name: Clustering
|
||||||
description: DEPRECATED Clustered spike data, whether from automatic clustering
|
description: DEPRECATED Clustered spike data, whether from automatic clustering
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
name: core.nwb.epoch.include
|
|
||||||
id: core.nwb.epoch.include
|
|
||||||
imports:
|
|
||||||
- hdmf-common.table
|
|
||||||
- core.nwb.base
|
|
||||||
- nwb.language
|
|
||||||
- core.nwb.epoch.include
|
|
||||||
- core.nwb.epoch
|
|
||||||
default_prefix: core.nwb.epoch.include/
|
|
||||||
classes:
|
|
||||||
TimeIntervals__tags_index:
|
|
||||||
name: TimeIntervals__tags_index
|
|
||||||
description: Index for tags.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(tags_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: tags_index
|
|
||||||
TimeIntervals__timeseries:
|
|
||||||
name: TimeIntervals__timeseries
|
|
||||||
description: An index into a TimeSeries object.
|
|
||||||
is_a: TimeSeriesReferenceVectorData
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(timeseries)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: timeseries
|
|
||||||
TimeIntervals__timeseries_index:
|
|
||||||
name: TimeIntervals__timeseries_index
|
|
||||||
description: Index for timeseries.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(timeseries_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: timeseries_index
|
|
|
@ -4,8 +4,6 @@ imports:
|
||||||
- hdmf-common.table
|
- hdmf-common.table
|
||||||
- core.nwb.base
|
- core.nwb.base
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- core.nwb.epoch.include
|
|
||||||
- core.nwb.epoch
|
|
||||||
default_prefix: core.nwb.epoch/
|
default_prefix: core.nwb.epoch/
|
||||||
classes:
|
classes:
|
||||||
TimeIntervals:
|
TimeIntervals:
|
||||||
|
@ -52,3 +50,36 @@ classes:
|
||||||
range: TimeIntervals__timeseries_index
|
range: TimeIntervals__timeseries_index
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
TimeIntervals__tags_index:
|
||||||
|
name: TimeIntervals__tags_index
|
||||||
|
description: Index for tags.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(tags_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: tags_index
|
||||||
|
TimeIntervals__timeseries:
|
||||||
|
name: TimeIntervals__timeseries
|
||||||
|
description: An index into a TimeSeries object.
|
||||||
|
is_a: TimeSeriesReferenceVectorData
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(timeseries)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: timeseries
|
||||||
|
TimeIntervals__timeseries_index:
|
||||||
|
name: TimeIntervals__timeseries_index
|
||||||
|
description: Index for timeseries.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(timeseries_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: timeseries_index
|
||||||
|
|
|
@ -1,399 +0,0 @@
|
||||||
name: core.nwb.file.include
|
|
||||||
id: core.nwb.file.include
|
|
||||||
imports:
|
|
||||||
- core.nwb.base
|
|
||||||
- hdmf-common.table
|
|
||||||
- core.nwb.device
|
|
||||||
- core.nwb.ecephys
|
|
||||||
- core.nwb.icephys
|
|
||||||
- core.nwb.ogen
|
|
||||||
- core.nwb.ophys
|
|
||||||
- core.nwb.epoch
|
|
||||||
- core.nwb.misc
|
|
||||||
- nwb.language
|
|
||||||
- core.nwb.file.include
|
|
||||||
- core.nwb.file
|
|
||||||
default_prefix: core.nwb.file.include/
|
|
||||||
classes:
|
|
||||||
NWBFile__stimulus:
|
|
||||||
name: NWBFile__stimulus
|
|
||||||
description: Data pushed into the system (eg, video stimulus, sound, voltage,
|
|
||||||
etc) and secondary representations of that data (eg, measurements of something
|
|
||||||
used as a stimulus). This group should be made read-only after experiment complete
|
|
||||||
and timestamps are corrected to common timebase. Stores both presented stimuli
|
|
||||||
and stimulus templates, the latter in case the same stimulus is presented multiple
|
|
||||||
times, or is pulled from an external stimulus library. Stimuli are here defined
|
|
||||||
as any signal that is pushed into the system as part of the experiment (eg,
|
|
||||||
sound, video, voltage, etc). Many different experiments can use the same stimuli,
|
|
||||||
and stimuli can be re-used during an experiment. The stimulus group is organized
|
|
||||||
so that one version of template stimuli can be stored and these be used multiple
|
|
||||||
times. These templates can exist in the present file or can be linked to a remote
|
|
||||||
library file.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(stimulus)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: stimulus
|
|
||||||
presentation:
|
|
||||||
name: presentation
|
|
||||||
description: Stimuli presented during the experiment.
|
|
||||||
multivalued: true
|
|
||||||
any_of:
|
|
||||||
- range: TimeSeries
|
|
||||||
templates:
|
|
||||||
name: templates
|
|
||||||
description: Template stimuli. Timestamps in templates are based on stimulus
|
|
||||||
design and are relative to the beginning of the stimulus. When templates
|
|
||||||
are used, the stimulus instances must convert presentation times to the
|
|
||||||
experiment`s time reference frame.
|
|
||||||
multivalued: true
|
|
||||||
any_of:
|
|
||||||
- range: TimeSeries
|
|
||||||
- range: Images
|
|
||||||
NWBFile__general:
|
|
||||||
name: NWBFile__general
|
|
||||||
description: Experimental metadata, including protocol, notes and description
|
|
||||||
of hardware device(s). The metadata stored in this section should be used to
|
|
||||||
describe the experiment. Metadata necessary for interpreting the data is stored
|
|
||||||
with the data. General experimental metadata, including animal strain, experimental
|
|
||||||
protocols, experimenter, devices, etc, are stored under 'general'. Core metadata
|
|
||||||
(e.g., that required to interpret data fields) is stored with the data itself,
|
|
||||||
and implicitly defined by the file specification (e.g., time is in seconds).
|
|
||||||
The strategy used here for storing non-core metadata is to use free-form text
|
|
||||||
fields, such as would appear in sentences or paragraphs from a Methods section.
|
|
||||||
Metadata fields are text to enable them to be more general, for example to represent
|
|
||||||
ranges instead of numerical values. Machine-readable metadata is stored as attributes
|
|
||||||
to these free-form datasets. All entries in the below table are to be included
|
|
||||||
when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology
|
|
||||||
experiment) should not be created unless there is data to store within them.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(general)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: general
|
|
||||||
data_collection:
|
|
||||||
name: data_collection
|
|
||||||
description: Notes about data collection and analysis.
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
experiment_description:
|
|
||||||
name: experiment_description
|
|
||||||
description: General description of the experiment.
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
experimenter:
|
|
||||||
name: experimenter
|
|
||||||
description: Name of person(s) who performed the experiment. Can also specify
|
|
||||||
roles of different people involved.
|
|
||||||
multivalued: true
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
institution:
|
|
||||||
name: institution
|
|
||||||
description: Institution(s) where experiment was performed.
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
keywords:
|
|
||||||
name: keywords
|
|
||||||
description: Terms to search over.
|
|
||||||
multivalued: true
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
lab:
|
|
||||||
name: lab
|
|
||||||
description: Laboratory where experiment was performed.
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
notes:
|
|
||||||
name: notes
|
|
||||||
description: Notes about the experiment.
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: 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.
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
protocol:
|
|
||||||
name: protocol
|
|
||||||
description: Experimental protocol, if applicable. e.g., include IACUC protocol
|
|
||||||
number.
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
related_publications:
|
|
||||||
name: related_publications
|
|
||||||
description: Publication information. PMID, DOI, URL, etc.
|
|
||||||
multivalued: true
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
session_id:
|
|
||||||
name: session_id
|
|
||||||
description: Lab-specific ID for the session.
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
slices:
|
|
||||||
name: slices
|
|
||||||
description: Description of slices, including information about preparation
|
|
||||||
thickness, orientation, temperature, and bath solution.
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
source_script:
|
|
||||||
name: source_script
|
|
||||||
description: Script file or link to public source code used to create this
|
|
||||||
NWB file.
|
|
||||||
multivalued: false
|
|
||||||
range: NWBFile__general__source_script
|
|
||||||
required: false
|
|
||||||
stimulus:
|
|
||||||
name: stimulus
|
|
||||||
description: Notes about stimuli, such as how and where they were presented.
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
surgery:
|
|
||||||
name: surgery
|
|
||||||
description: Narrative description about surgery/surgeries, including date(s)
|
|
||||||
and who performed surgery.
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
virus:
|
|
||||||
name: virus
|
|
||||||
description: Information about virus(es) used in experiments, including virus
|
|
||||||
ID, source, date made, injection location, volume, etc.
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: 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.
|
|
||||||
multivalued: true
|
|
||||||
range: LabMetaData
|
|
||||||
required: false
|
|
||||||
devices:
|
|
||||||
name: devices
|
|
||||||
description: Description of hardware devices used during experiment, e.g.,
|
|
||||||
monitors, ADC boards, microscopes, etc.
|
|
||||||
multivalued: true
|
|
||||||
any_of:
|
|
||||||
- range: Device
|
|
||||||
subject:
|
|
||||||
name: subject
|
|
||||||
description: Information about the animal or person from which the data was
|
|
||||||
measured.
|
|
||||||
multivalued: false
|
|
||||||
range: Subject
|
|
||||||
required: false
|
|
||||||
extracellular_ephys:
|
|
||||||
name: extracellular_ephys
|
|
||||||
description: Metadata related to extracellular electrophysiology.
|
|
||||||
multivalued: false
|
|
||||||
range: NWBFile__general__extracellular_ephys
|
|
||||||
required: false
|
|
||||||
intracellular_ephys:
|
|
||||||
name: intracellular_ephys
|
|
||||||
description: Metadata related to intracellular electrophysiology.
|
|
||||||
multivalued: false
|
|
||||||
range: NWBFile__general__intracellular_ephys
|
|
||||||
required: false
|
|
||||||
optogenetics:
|
|
||||||
name: optogenetics
|
|
||||||
description: Metadata describing optogenetic stimuluation.
|
|
||||||
multivalued: true
|
|
||||||
any_of:
|
|
||||||
- range: OptogeneticStimulusSite
|
|
||||||
optophysiology:
|
|
||||||
name: optophysiology
|
|
||||||
description: Metadata related to optophysiology.
|
|
||||||
multivalued: true
|
|
||||||
any_of:
|
|
||||||
- range: ImagingPlane
|
|
||||||
NWBFile__general__source_script:
|
|
||||||
name: NWBFile__general__source_script
|
|
||||||
description: Script file or link to public source code used to create this NWB
|
|
||||||
file.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(source_script)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: source_script
|
|
||||||
file_name:
|
|
||||||
name: file_name
|
|
||||||
description: Name of script file.
|
|
||||||
range: text
|
|
||||||
NWBFile__general__extracellular_ephys:
|
|
||||||
name: NWBFile__general__extracellular_ephys
|
|
||||||
description: Metadata related to extracellular electrophysiology.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(extracellular_ephys)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: extracellular_ephys
|
|
||||||
electrode_group:
|
|
||||||
name: electrode_group
|
|
||||||
description: Physical group of electrodes.
|
|
||||||
multivalued: true
|
|
||||||
range: ElectrodeGroup
|
|
||||||
required: false
|
|
||||||
electrodes:
|
|
||||||
name: electrodes
|
|
||||||
description: A table of all electrodes (i.e. channels) used for recording.
|
|
||||||
multivalued: false
|
|
||||||
range: DynamicTable
|
|
||||||
required: false
|
|
||||||
NWBFile__general__intracellular_ephys:
|
|
||||||
name: NWBFile__general__intracellular_ephys
|
|
||||||
description: Metadata related to intracellular electrophysiology.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(intracellular_ephys)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: intracellular_ephys
|
|
||||||
filtering:
|
|
||||||
name: filtering
|
|
||||||
description: '[DEPRECATED] Use IntracellularElectrode.filtering instead. Description
|
|
||||||
of filtering used. Includes filtering type and parameters, frequency fall-off,
|
|
||||||
etc. If this changes between TimeSeries, filter description should be stored
|
|
||||||
as a text attribute for each TimeSeries.'
|
|
||||||
multivalued: false
|
|
||||||
range: text
|
|
||||||
required: false
|
|
||||||
intracellular_electrode:
|
|
||||||
name: intracellular_electrode
|
|
||||||
description: An intracellular electrode.
|
|
||||||
multivalued: true
|
|
||||||
range: IntracellularElectrode
|
|
||||||
required: false
|
|
||||||
sweep_table:
|
|
||||||
name: sweep_table
|
|
||||||
description: '[DEPRECATED] Table used to group different PatchClampSeries.
|
|
||||||
SweepTable is being replaced by IntracellularRecordingsTable and SimultaneousRecordingsTable
|
|
||||||
tables. Additional SequentialRecordingsTable, RepetitionsTable and ExperimentalConditions
|
|
||||||
tables provide enhanced support for experiment metadata.'
|
|
||||||
multivalued: false
|
|
||||||
range: SweepTable
|
|
||||||
required: false
|
|
||||||
intracellular_recordings:
|
|
||||||
name: intracellular_recordings
|
|
||||||
description: A table to group together a stimulus and response from a single
|
|
||||||
electrode and a single simultaneous recording. Each row in the table represents
|
|
||||||
a single recording consisting typically of a stimulus and a corresponding
|
|
||||||
response. In some cases, however, only a stimulus or a response are recorded
|
|
||||||
as as part of an experiment. In this case both, the stimulus and response
|
|
||||||
will point to the same TimeSeries while the idx_start and count of the invalid
|
|
||||||
column will be set to -1, thus, indicating that no values have been recorded
|
|
||||||
for the stimulus or response, respectively. Note, a recording MUST contain
|
|
||||||
at least a stimulus or a response. Typically the stimulus and response are
|
|
||||||
PatchClampSeries. However, the use of AD/DA channels that are not associated
|
|
||||||
to an electrode is also common in intracellular electrophysiology, in which
|
|
||||||
case other TimeSeries may be used.
|
|
||||||
multivalued: false
|
|
||||||
range: IntracellularRecordingsTable
|
|
||||||
required: false
|
|
||||||
simultaneous_recordings:
|
|
||||||
name: simultaneous_recordings
|
|
||||||
description: A table for grouping different intracellular recordings from
|
|
||||||
the IntracellularRecordingsTable table together that were recorded simultaneously
|
|
||||||
from different electrodes
|
|
||||||
multivalued: false
|
|
||||||
range: SimultaneousRecordingsTable
|
|
||||||
required: false
|
|
||||||
sequential_recordings:
|
|
||||||
name: sequential_recordings
|
|
||||||
description: A table for grouping different sequential recordings from the
|
|
||||||
SimultaneousRecordingsTable table together. This is typically used to group
|
|
||||||
together sequential recordings where the a sequence of stimuli of the same
|
|
||||||
type with varying parameters have been presented in a sequence.
|
|
||||||
multivalued: false
|
|
||||||
range: SequentialRecordingsTable
|
|
||||||
required: false
|
|
||||||
repetitions:
|
|
||||||
name: repetitions
|
|
||||||
description: A table for grouping different sequential intracellular recordings
|
|
||||||
together. With each SequentialRecording typically representing a particular
|
|
||||||
type of stimulus, the RepetitionsTable table is typically used to group
|
|
||||||
sets of stimuli applied in sequence.
|
|
||||||
multivalued: false
|
|
||||||
range: RepetitionsTable
|
|
||||||
required: false
|
|
||||||
experimental_conditions:
|
|
||||||
name: experimental_conditions
|
|
||||||
description: A table for grouping different intracellular recording repetitions
|
|
||||||
together that belong to the same experimental experimental_conditions.
|
|
||||||
multivalued: false
|
|
||||||
range: ExperimentalConditionsTable
|
|
||||||
required: false
|
|
||||||
NWBFile__intervals:
|
|
||||||
name: NWBFile__intervals
|
|
||||||
description: Experimental intervals, whether that be logically distinct sub-experiments
|
|
||||||
having a particular scientific goal, trials (see trials subgroup) during an
|
|
||||||
experiment, or epochs (see epochs subgroup) deriving from analysis of data.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(intervals)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: intervals
|
|
||||||
epochs:
|
|
||||||
name: epochs
|
|
||||||
description: Divisions in time marking experimental stages or sub-divisions
|
|
||||||
of a single recording session.
|
|
||||||
multivalued: false
|
|
||||||
range: TimeIntervals
|
|
||||||
required: false
|
|
||||||
trials:
|
|
||||||
name: trials
|
|
||||||
description: Repeated experimental events that have a logical grouping.
|
|
||||||
multivalued: false
|
|
||||||
range: TimeIntervals
|
|
||||||
required: false
|
|
||||||
invalid_times:
|
|
||||||
name: invalid_times
|
|
||||||
description: Time intervals that should be removed from analysis.
|
|
||||||
multivalued: false
|
|
||||||
range: TimeIntervals
|
|
||||||
required: false
|
|
||||||
time_intervals:
|
|
||||||
name: time_intervals
|
|
||||||
description: Optional additional table(s) for describing other experimental
|
|
||||||
time intervals.
|
|
||||||
multivalued: true
|
|
||||||
range: TimeIntervals
|
|
||||||
required: false
|
|
||||||
Subject__age:
|
|
||||||
name: Subject__age
|
|
||||||
description: Age of subject. Can be supplied instead of 'date_of_birth'.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(age)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: age
|
|
||||||
reference:
|
|
||||||
name: reference
|
|
||||||
description: Age is with reference to this event. Can be 'birth' or 'gestational'.
|
|
||||||
If reference is omitted, 'birth' is implied.
|
|
||||||
range: text
|
|
|
@ -11,8 +11,6 @@ imports:
|
||||||
- core.nwb.epoch
|
- core.nwb.epoch
|
||||||
- core.nwb.misc
|
- core.nwb.misc
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- core.nwb.file.include
|
|
||||||
- core.nwb.file
|
|
||||||
default_prefix: core.nwb.file/
|
default_prefix: core.nwb.file/
|
||||||
classes:
|
classes:
|
||||||
ScratchData:
|
ScratchData:
|
||||||
|
@ -199,6 +197,377 @@ classes:
|
||||||
range: Units
|
range: Units
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
NWBFile__stimulus:
|
||||||
|
name: NWBFile__stimulus
|
||||||
|
description: Data pushed into the system (eg, video stimulus, sound, voltage,
|
||||||
|
etc) and secondary representations of that data (eg, measurements of something
|
||||||
|
used as a stimulus). This group should be made read-only after experiment complete
|
||||||
|
and timestamps are corrected to common timebase. Stores both presented stimuli
|
||||||
|
and stimulus templates, the latter in case the same stimulus is presented multiple
|
||||||
|
times, or is pulled from an external stimulus library. Stimuli are here defined
|
||||||
|
as any signal that is pushed into the system as part of the experiment (eg,
|
||||||
|
sound, video, voltage, etc). Many different experiments can use the same stimuli,
|
||||||
|
and stimuli can be re-used during an experiment. The stimulus group is organized
|
||||||
|
so that one version of template stimuli can be stored and these be used multiple
|
||||||
|
times. These templates can exist in the present file or can be linked to a remote
|
||||||
|
library file.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(stimulus)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: stimulus
|
||||||
|
presentation:
|
||||||
|
name: presentation
|
||||||
|
description: Stimuli presented during the experiment.
|
||||||
|
multivalued: true
|
||||||
|
any_of:
|
||||||
|
- range: TimeSeries
|
||||||
|
templates:
|
||||||
|
name: templates
|
||||||
|
description: Template stimuli. Timestamps in templates are based on stimulus
|
||||||
|
design and are relative to the beginning of the stimulus. When templates
|
||||||
|
are used, the stimulus instances must convert presentation times to the
|
||||||
|
experiment`s time reference frame.
|
||||||
|
multivalued: true
|
||||||
|
any_of:
|
||||||
|
- range: TimeSeries
|
||||||
|
- range: Images
|
||||||
|
NWBFile__general:
|
||||||
|
name: NWBFile__general
|
||||||
|
description: Experimental metadata, including protocol, notes and description
|
||||||
|
of hardware device(s). The metadata stored in this section should be used to
|
||||||
|
describe the experiment. Metadata necessary for interpreting the data is stored
|
||||||
|
with the data. General experimental metadata, including animal strain, experimental
|
||||||
|
protocols, experimenter, devices, etc, are stored under 'general'. Core metadata
|
||||||
|
(e.g., that required to interpret data fields) is stored with the data itself,
|
||||||
|
and implicitly defined by the file specification (e.g., time is in seconds).
|
||||||
|
The strategy used here for storing non-core metadata is to use free-form text
|
||||||
|
fields, such as would appear in sentences or paragraphs from a Methods section.
|
||||||
|
Metadata fields are text to enable them to be more general, for example to represent
|
||||||
|
ranges instead of numerical values. Machine-readable metadata is stored as attributes
|
||||||
|
to these free-form datasets. All entries in the below table are to be included
|
||||||
|
when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology
|
||||||
|
experiment) should not be created unless there is data to store within them.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(general)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: general
|
||||||
|
data_collection:
|
||||||
|
name: data_collection
|
||||||
|
description: Notes about data collection and analysis.
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
experiment_description:
|
||||||
|
name: experiment_description
|
||||||
|
description: General description of the experiment.
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
experimenter:
|
||||||
|
name: experimenter
|
||||||
|
description: Name of person(s) who performed the experiment. Can also specify
|
||||||
|
roles of different people involved.
|
||||||
|
multivalued: true
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
institution:
|
||||||
|
name: institution
|
||||||
|
description: Institution(s) where experiment was performed.
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
keywords:
|
||||||
|
name: keywords
|
||||||
|
description: Terms to search over.
|
||||||
|
multivalued: true
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
lab:
|
||||||
|
name: lab
|
||||||
|
description: Laboratory where experiment was performed.
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
notes:
|
||||||
|
name: notes
|
||||||
|
description: Notes about the experiment.
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: 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.
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
protocol:
|
||||||
|
name: protocol
|
||||||
|
description: Experimental protocol, if applicable. e.g., include IACUC protocol
|
||||||
|
number.
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
related_publications:
|
||||||
|
name: related_publications
|
||||||
|
description: Publication information. PMID, DOI, URL, etc.
|
||||||
|
multivalued: true
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
session_id:
|
||||||
|
name: session_id
|
||||||
|
description: Lab-specific ID for the session.
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
slices:
|
||||||
|
name: slices
|
||||||
|
description: Description of slices, including information about preparation
|
||||||
|
thickness, orientation, temperature, and bath solution.
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
source_script:
|
||||||
|
name: source_script
|
||||||
|
description: Script file or link to public source code used to create this
|
||||||
|
NWB file.
|
||||||
|
multivalued: false
|
||||||
|
range: NWBFile__general__source_script
|
||||||
|
required: false
|
||||||
|
stimulus:
|
||||||
|
name: stimulus
|
||||||
|
description: Notes about stimuli, such as how and where they were presented.
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
surgery:
|
||||||
|
name: surgery
|
||||||
|
description: Narrative description about surgery/surgeries, including date(s)
|
||||||
|
and who performed surgery.
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
virus:
|
||||||
|
name: virus
|
||||||
|
description: Information about virus(es) used in experiments, including virus
|
||||||
|
ID, source, date made, injection location, volume, etc.
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: 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.
|
||||||
|
multivalued: true
|
||||||
|
range: LabMetaData
|
||||||
|
required: false
|
||||||
|
devices:
|
||||||
|
name: devices
|
||||||
|
description: Description of hardware devices used during experiment, e.g.,
|
||||||
|
monitors, ADC boards, microscopes, etc.
|
||||||
|
multivalued: true
|
||||||
|
any_of:
|
||||||
|
- range: Device
|
||||||
|
subject:
|
||||||
|
name: subject
|
||||||
|
description: Information about the animal or person from which the data was
|
||||||
|
measured.
|
||||||
|
multivalued: false
|
||||||
|
range: Subject
|
||||||
|
required: false
|
||||||
|
extracellular_ephys:
|
||||||
|
name: extracellular_ephys
|
||||||
|
description: Metadata related to extracellular electrophysiology.
|
||||||
|
multivalued: false
|
||||||
|
range: NWBFile__general__extracellular_ephys
|
||||||
|
required: false
|
||||||
|
intracellular_ephys:
|
||||||
|
name: intracellular_ephys
|
||||||
|
description: Metadata related to intracellular electrophysiology.
|
||||||
|
multivalued: false
|
||||||
|
range: NWBFile__general__intracellular_ephys
|
||||||
|
required: false
|
||||||
|
optogenetics:
|
||||||
|
name: optogenetics
|
||||||
|
description: Metadata describing optogenetic stimuluation.
|
||||||
|
multivalued: true
|
||||||
|
any_of:
|
||||||
|
- range: OptogeneticStimulusSite
|
||||||
|
optophysiology:
|
||||||
|
name: optophysiology
|
||||||
|
description: Metadata related to optophysiology.
|
||||||
|
multivalued: true
|
||||||
|
any_of:
|
||||||
|
- range: ImagingPlane
|
||||||
|
NWBFile__general__source_script:
|
||||||
|
name: NWBFile__general__source_script
|
||||||
|
description: Script file or link to public source code used to create this NWB
|
||||||
|
file.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(source_script)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: source_script
|
||||||
|
file_name:
|
||||||
|
name: file_name
|
||||||
|
description: Name of script file.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: text
|
||||||
|
required: true
|
||||||
|
NWBFile__general__extracellular_ephys:
|
||||||
|
name: NWBFile__general__extracellular_ephys
|
||||||
|
description: Metadata related to extracellular electrophysiology.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(extracellular_ephys)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: extracellular_ephys
|
||||||
|
electrode_group:
|
||||||
|
name: electrode_group
|
||||||
|
description: Physical group of electrodes.
|
||||||
|
multivalued: true
|
||||||
|
range: ElectrodeGroup
|
||||||
|
required: false
|
||||||
|
electrodes:
|
||||||
|
name: electrodes
|
||||||
|
description: A table of all electrodes (i.e. channels) used for recording.
|
||||||
|
multivalued: false
|
||||||
|
range: DynamicTable
|
||||||
|
required: false
|
||||||
|
NWBFile__general__intracellular_ephys:
|
||||||
|
name: NWBFile__general__intracellular_ephys
|
||||||
|
description: Metadata related to intracellular electrophysiology.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(intracellular_ephys)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: intracellular_ephys
|
||||||
|
filtering:
|
||||||
|
name: filtering
|
||||||
|
description: '[DEPRECATED] Use IntracellularElectrode.filtering instead. Description
|
||||||
|
of filtering used. Includes filtering type and parameters, frequency fall-off,
|
||||||
|
etc. If this changes between TimeSeries, filter description should be stored
|
||||||
|
as a text attribute for each TimeSeries.'
|
||||||
|
multivalued: false
|
||||||
|
range: text
|
||||||
|
required: false
|
||||||
|
intracellular_electrode:
|
||||||
|
name: intracellular_electrode
|
||||||
|
description: An intracellular electrode.
|
||||||
|
multivalued: true
|
||||||
|
range: IntracellularElectrode
|
||||||
|
required: false
|
||||||
|
sweep_table:
|
||||||
|
name: sweep_table
|
||||||
|
description: '[DEPRECATED] Table used to group different PatchClampSeries.
|
||||||
|
SweepTable is being replaced by IntracellularRecordingsTable and SimultaneousRecordingsTable
|
||||||
|
tables. Additional SequentialRecordingsTable, RepetitionsTable and ExperimentalConditions
|
||||||
|
tables provide enhanced support for experiment metadata.'
|
||||||
|
multivalued: false
|
||||||
|
range: SweepTable
|
||||||
|
required: false
|
||||||
|
intracellular_recordings:
|
||||||
|
name: intracellular_recordings
|
||||||
|
description: A table to group together a stimulus and response from a single
|
||||||
|
electrode and a single simultaneous recording. Each row in the table represents
|
||||||
|
a single recording consisting typically of a stimulus and a corresponding
|
||||||
|
response. In some cases, however, only a stimulus or a response are recorded
|
||||||
|
as as part of an experiment. In this case both, the stimulus and response
|
||||||
|
will point to the same TimeSeries while the idx_start and count of the invalid
|
||||||
|
column will be set to -1, thus, indicating that no values have been recorded
|
||||||
|
for the stimulus or response, respectively. Note, a recording MUST contain
|
||||||
|
at least a stimulus or a response. Typically the stimulus and response are
|
||||||
|
PatchClampSeries. However, the use of AD/DA channels that are not associated
|
||||||
|
to an electrode is also common in intracellular electrophysiology, in which
|
||||||
|
case other TimeSeries may be used.
|
||||||
|
multivalued: false
|
||||||
|
range: IntracellularRecordingsTable
|
||||||
|
required: false
|
||||||
|
simultaneous_recordings:
|
||||||
|
name: simultaneous_recordings
|
||||||
|
description: A table for grouping different intracellular recordings from
|
||||||
|
the IntracellularRecordingsTable table together that were recorded simultaneously
|
||||||
|
from different electrodes
|
||||||
|
multivalued: false
|
||||||
|
range: SimultaneousRecordingsTable
|
||||||
|
required: false
|
||||||
|
sequential_recordings:
|
||||||
|
name: sequential_recordings
|
||||||
|
description: A table for grouping different sequential recordings from the
|
||||||
|
SimultaneousRecordingsTable table together. This is typically used to group
|
||||||
|
together sequential recordings where the a sequence of stimuli of the same
|
||||||
|
type with varying parameters have been presented in a sequence.
|
||||||
|
multivalued: false
|
||||||
|
range: SequentialRecordingsTable
|
||||||
|
required: false
|
||||||
|
repetitions:
|
||||||
|
name: repetitions
|
||||||
|
description: A table for grouping different sequential intracellular recordings
|
||||||
|
together. With each SequentialRecording typically representing a particular
|
||||||
|
type of stimulus, the RepetitionsTable table is typically used to group
|
||||||
|
sets of stimuli applied in sequence.
|
||||||
|
multivalued: false
|
||||||
|
range: RepetitionsTable
|
||||||
|
required: false
|
||||||
|
experimental_conditions:
|
||||||
|
name: experimental_conditions
|
||||||
|
description: A table for grouping different intracellular recording repetitions
|
||||||
|
together that belong to the same experimental experimental_conditions.
|
||||||
|
multivalued: false
|
||||||
|
range: ExperimentalConditionsTable
|
||||||
|
required: false
|
||||||
|
NWBFile__intervals:
|
||||||
|
name: NWBFile__intervals
|
||||||
|
description: Experimental intervals, whether that be logically distinct sub-experiments
|
||||||
|
having a particular scientific goal, trials (see trials subgroup) during an
|
||||||
|
experiment, or epochs (see epochs subgroup) deriving from analysis of data.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(intervals)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: intervals
|
||||||
|
epochs:
|
||||||
|
name: epochs
|
||||||
|
description: Divisions in time marking experimental stages or sub-divisions
|
||||||
|
of a single recording session.
|
||||||
|
multivalued: false
|
||||||
|
range: TimeIntervals
|
||||||
|
required: false
|
||||||
|
trials:
|
||||||
|
name: trials
|
||||||
|
description: Repeated experimental events that have a logical grouping.
|
||||||
|
multivalued: false
|
||||||
|
range: TimeIntervals
|
||||||
|
required: false
|
||||||
|
invalid_times:
|
||||||
|
name: invalid_times
|
||||||
|
description: Time intervals that should be removed from analysis.
|
||||||
|
multivalued: false
|
||||||
|
range: TimeIntervals
|
||||||
|
required: false
|
||||||
|
time_intervals:
|
||||||
|
name: time_intervals
|
||||||
|
description: Optional additional table(s) for describing other experimental
|
||||||
|
time intervals.
|
||||||
|
multivalued: true
|
||||||
|
range: TimeIntervals
|
||||||
|
required: false
|
||||||
LabMetaData:
|
LabMetaData:
|
||||||
name: LabMetaData
|
name: LabMetaData
|
||||||
description: Lab-specific meta-data.
|
description: Lab-specific meta-data.
|
||||||
|
@ -275,3 +644,22 @@ classes:
|
||||||
range: text
|
range: text
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
Subject__age:
|
||||||
|
name: Subject__age
|
||||||
|
description: Age of subject. Can be supplied instead of 'date_of_birth'.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(age)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: age
|
||||||
|
reference:
|
||||||
|
name: reference
|
||||||
|
description: Age is with reference to this event. Can be 'birth' or 'gestational'.
|
||||||
|
If reference is omitted, 'birth' is implied.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: text
|
||||||
|
required: true
|
||||||
|
|
|
@ -1,332 +0,0 @@
|
||||||
name: core.nwb.icephys.include
|
|
||||||
id: core.nwb.icephys.include
|
|
||||||
imports:
|
|
||||||
- core.nwb.base
|
|
||||||
- core.nwb.device
|
|
||||||
- hdmf-common.table
|
|
||||||
- nwb.language
|
|
||||||
- core.nwb.icephys.include
|
|
||||||
- core.nwb.icephys
|
|
||||||
default_prefix: core.nwb.icephys.include/
|
|
||||||
classes:
|
|
||||||
CurrentClampSeries__data:
|
|
||||||
name: CurrentClampSeries__data
|
|
||||||
description: Recorded voltage.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(data)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: data
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
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'.
|
|
||||||
range: text
|
|
||||||
CurrentClampStimulusSeries__data:
|
|
||||||
name: CurrentClampStimulusSeries__data
|
|
||||||
description: Stimulus current applied.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(data)
|
|
||||||
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'.
|
|
||||||
range: text
|
|
||||||
VoltageClampSeries__data:
|
|
||||||
name: VoltageClampSeries__data
|
|
||||||
description: Recorded current.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(data)
|
|
||||||
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'.
|
|
||||||
range: text
|
|
||||||
VoltageClampSeries__capacitance_fast:
|
|
||||||
name: VoltageClampSeries__capacitance_fast
|
|
||||||
description: Fast capacitance, in farads.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(capacitance_fast)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: capacitance_fast
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit of measurement for capacitance_fast, which is fixed to 'farads'.
|
|
||||||
range: text
|
|
||||||
VoltageClampSeries__capacitance_slow:
|
|
||||||
name: VoltageClampSeries__capacitance_slow
|
|
||||||
description: Slow capacitance, in farads.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(capacitance_slow)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: capacitance_slow
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit of measurement for capacitance_fast, which is fixed to 'farads'.
|
|
||||||
range: text
|
|
||||||
VoltageClampSeries__resistance_comp_bandwidth:
|
|
||||||
name: VoltageClampSeries__resistance_comp_bandwidth
|
|
||||||
description: Resistance compensation bandwidth, in hertz.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(resistance_comp_bandwidth)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: resistance_comp_bandwidth
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit of measurement for resistance_comp_bandwidth, which is fixed
|
|
||||||
to 'hertz'.
|
|
||||||
range: text
|
|
||||||
VoltageClampSeries__resistance_comp_correction:
|
|
||||||
name: VoltageClampSeries__resistance_comp_correction
|
|
||||||
description: Resistance compensation correction, in percent.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(resistance_comp_correction)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: resistance_comp_correction
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit of measurement for resistance_comp_correction, which is
|
|
||||||
fixed to 'percent'.
|
|
||||||
range: text
|
|
||||||
VoltageClampSeries__resistance_comp_prediction:
|
|
||||||
name: VoltageClampSeries__resistance_comp_prediction
|
|
||||||
description: Resistance compensation prediction, in percent.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(resistance_comp_prediction)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: resistance_comp_prediction
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit of measurement for resistance_comp_prediction, which is
|
|
||||||
fixed to 'percent'.
|
|
||||||
range: text
|
|
||||||
VoltageClampSeries__whole_cell_capacitance_comp:
|
|
||||||
name: VoltageClampSeries__whole_cell_capacitance_comp
|
|
||||||
description: Whole cell capacitance compensation, in farads.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(whole_cell_capacitance_comp)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: whole_cell_capacitance_comp
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit of measurement for whole_cell_capacitance_comp, which is
|
|
||||||
fixed to 'farads'.
|
|
||||||
range: text
|
|
||||||
VoltageClampSeries__whole_cell_series_resistance_comp:
|
|
||||||
name: VoltageClampSeries__whole_cell_series_resistance_comp
|
|
||||||
description: Whole cell series resistance compensation, in ohms.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(whole_cell_series_resistance_comp)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: whole_cell_series_resistance_comp
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit of measurement for whole_cell_series_resistance_comp, which
|
|
||||||
is fixed to 'ohms'.
|
|
||||||
range: text
|
|
||||||
VoltageClampStimulusSeries__data:
|
|
||||||
name: VoltageClampStimulusSeries__data
|
|
||||||
description: Stimulus voltage applied.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(data)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: data
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
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'.
|
|
||||||
range: text
|
|
||||||
SweepTable__series_index:
|
|
||||||
name: SweepTable__series_index
|
|
||||||
description: Index for series.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(series_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: series_index
|
|
||||||
IntracellularStimuliTable__stimulus:
|
|
||||||
name: IntracellularStimuliTable__stimulus
|
|
||||||
description: Column storing the reference to the recorded stimulus for the recording
|
|
||||||
(rows).
|
|
||||||
is_a: TimeSeriesReferenceVectorData
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(stimulus)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: stimulus
|
|
||||||
IntracellularResponsesTable__response:
|
|
||||||
name: IntracellularResponsesTable__response
|
|
||||||
description: Column storing the reference to the recorded response for the recording
|
|
||||||
(rows)
|
|
||||||
is_a: TimeSeriesReferenceVectorData
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(response)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: response
|
|
||||||
SimultaneousRecordingsTable__recordings:
|
|
||||||
name: SimultaneousRecordingsTable__recordings
|
|
||||||
description: A reference to one or more rows in the IntracellularRecordingsTable
|
|
||||||
table.
|
|
||||||
is_a: DynamicTableRegion
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(recordings)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: recordings
|
|
||||||
table:
|
|
||||||
name: table
|
|
||||||
description: Reference to the IntracellularRecordingsTable table that this
|
|
||||||
table region applies to. This specializes the attribute inherited from DynamicTableRegion
|
|
||||||
to fix the type of table that can be referenced here.
|
|
||||||
range: IntracellularRecordingsTable
|
|
||||||
SimultaneousRecordingsTable__recordings_index:
|
|
||||||
name: SimultaneousRecordingsTable__recordings_index
|
|
||||||
description: Index dataset for the recordings column.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(recordings_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: recordings_index
|
|
||||||
SequentialRecordingsTable__simultaneous_recordings:
|
|
||||||
name: SequentialRecordingsTable__simultaneous_recordings
|
|
||||||
description: A reference to one or more rows in the SimultaneousRecordingsTable
|
|
||||||
table.
|
|
||||||
is_a: DynamicTableRegion
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(simultaneous_recordings)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: simultaneous_recordings
|
|
||||||
table:
|
|
||||||
name: table
|
|
||||||
description: Reference to the SimultaneousRecordingsTable table that this
|
|
||||||
table region applies to. This specializes the attribute inherited from DynamicTableRegion
|
|
||||||
to fix the type of table that can be referenced here.
|
|
||||||
range: SimultaneousRecordingsTable
|
|
||||||
SequentialRecordingsTable__simultaneous_recordings_index:
|
|
||||||
name: SequentialRecordingsTable__simultaneous_recordings_index
|
|
||||||
description: Index dataset for the simultaneous_recordings column.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(simultaneous_recordings_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: simultaneous_recordings_index
|
|
||||||
RepetitionsTable__sequential_recordings:
|
|
||||||
name: RepetitionsTable__sequential_recordings
|
|
||||||
description: A reference to one or more rows in the SequentialRecordingsTable
|
|
||||||
table.
|
|
||||||
is_a: DynamicTableRegion
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(sequential_recordings)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: sequential_recordings
|
|
||||||
table:
|
|
||||||
name: table
|
|
||||||
description: Reference to the SequentialRecordingsTable table that this table
|
|
||||||
region applies to. This specializes the attribute inherited from DynamicTableRegion
|
|
||||||
to fix the type of table that can be referenced here.
|
|
||||||
range: SequentialRecordingsTable
|
|
||||||
RepetitionsTable__sequential_recordings_index:
|
|
||||||
name: RepetitionsTable__sequential_recordings_index
|
|
||||||
description: Index dataset for the sequential_recordings column.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(sequential_recordings_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: sequential_recordings_index
|
|
||||||
ExperimentalConditionsTable__repetitions:
|
|
||||||
name: ExperimentalConditionsTable__repetitions
|
|
||||||
description: A reference to one or more rows in the RepetitionsTable table.
|
|
||||||
is_a: DynamicTableRegion
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(repetitions)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: repetitions
|
|
||||||
table:
|
|
||||||
name: table
|
|
||||||
description: Reference to the RepetitionsTable table that this table region
|
|
||||||
applies to. This specializes the attribute inherited from DynamicTableRegion
|
|
||||||
to fix the type of table that can be referenced here.
|
|
||||||
range: RepetitionsTable
|
|
||||||
ExperimentalConditionsTable__repetitions_index:
|
|
||||||
name: ExperimentalConditionsTable__repetitions_index
|
|
||||||
description: Index dataset for the repetitions column.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(repetitions_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: repetitions_index
|
|
|
@ -5,8 +5,6 @@ imports:
|
||||||
- core.nwb.device
|
- core.nwb.device
|
||||||
- hdmf-common.table
|
- hdmf-common.table
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- core.nwb.icephys.include
|
|
||||||
- core.nwb.icephys
|
|
||||||
default_prefix: core.nwb.icephys/
|
default_prefix: core.nwb.icephys/
|
||||||
classes:
|
classes:
|
||||||
PatchClampSeries:
|
PatchClampSeries:
|
||||||
|
@ -77,6 +75,27 @@ classes:
|
||||||
range: float32
|
range: float32
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
CurrentClampSeries__data:
|
||||||
|
name: CurrentClampSeries__data
|
||||||
|
description: Recorded voltage.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(data)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: data
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
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'.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: AnyType
|
||||||
|
required: true
|
||||||
IZeroClampSeries:
|
IZeroClampSeries:
|
||||||
name: IZeroClampSeries
|
name: IZeroClampSeries
|
||||||
description: Voltage data from an intracellular recording when all current and
|
description: Voltage data from an intracellular recording when all current and
|
||||||
|
@ -129,6 +148,27 @@ classes:
|
||||||
range: CurrentClampStimulusSeries__data
|
range: CurrentClampStimulusSeries__data
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
CurrentClampStimulusSeries__data:
|
||||||
|
name: CurrentClampStimulusSeries__data
|
||||||
|
description: Stimulus current applied.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(data)
|
||||||
|
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'.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: AnyType
|
||||||
|
required: true
|
||||||
VoltageClampSeries:
|
VoltageClampSeries:
|
||||||
name: VoltageClampSeries
|
name: VoltageClampSeries
|
||||||
description: Current data from an intracellular voltage-clamp recording. A corresponding
|
description: Current data from an intracellular voltage-clamp recording. A corresponding
|
||||||
|
@ -189,6 +229,158 @@ classes:
|
||||||
range: VoltageClampSeries__whole_cell_series_resistance_comp
|
range: VoltageClampSeries__whole_cell_series_resistance_comp
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
VoltageClampSeries__data:
|
||||||
|
name: VoltageClampSeries__data
|
||||||
|
description: Recorded current.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(data)
|
||||||
|
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'.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: AnyType
|
||||||
|
required: true
|
||||||
|
VoltageClampSeries__capacitance_fast:
|
||||||
|
name: VoltageClampSeries__capacitance_fast
|
||||||
|
description: Fast capacitance, in farads.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(capacitance_fast)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: capacitance_fast
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit of measurement for capacitance_fast, which is fixed to 'farads'.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
VoltageClampSeries__capacitance_slow:
|
||||||
|
name: VoltageClampSeries__capacitance_slow
|
||||||
|
description: Slow capacitance, in farads.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(capacitance_slow)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: capacitance_slow
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit of measurement for capacitance_fast, which is fixed to 'farads'.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
VoltageClampSeries__resistance_comp_bandwidth:
|
||||||
|
name: VoltageClampSeries__resistance_comp_bandwidth
|
||||||
|
description: Resistance compensation bandwidth, in hertz.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(resistance_comp_bandwidth)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: resistance_comp_bandwidth
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit of measurement for resistance_comp_bandwidth, which is fixed
|
||||||
|
to 'hertz'.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
VoltageClampSeries__resistance_comp_correction:
|
||||||
|
name: VoltageClampSeries__resistance_comp_correction
|
||||||
|
description: Resistance compensation correction, in percent.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(resistance_comp_correction)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: resistance_comp_correction
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit of measurement for resistance_comp_correction, which is
|
||||||
|
fixed to 'percent'.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
VoltageClampSeries__resistance_comp_prediction:
|
||||||
|
name: VoltageClampSeries__resistance_comp_prediction
|
||||||
|
description: Resistance compensation prediction, in percent.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(resistance_comp_prediction)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: resistance_comp_prediction
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit of measurement for resistance_comp_prediction, which is
|
||||||
|
fixed to 'percent'.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
VoltageClampSeries__whole_cell_capacitance_comp:
|
||||||
|
name: VoltageClampSeries__whole_cell_capacitance_comp
|
||||||
|
description: Whole cell capacitance compensation, in farads.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(whole_cell_capacitance_comp)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: whole_cell_capacitance_comp
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit of measurement for whole_cell_capacitance_comp, which is
|
||||||
|
fixed to 'farads'.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
VoltageClampSeries__whole_cell_series_resistance_comp:
|
||||||
|
name: VoltageClampSeries__whole_cell_series_resistance_comp
|
||||||
|
description: Whole cell series resistance compensation, in ohms.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(whole_cell_series_resistance_comp)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: whole_cell_series_resistance_comp
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit of measurement for whole_cell_series_resistance_comp, which
|
||||||
|
is fixed to 'ohms'.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
VoltageClampStimulusSeries:
|
VoltageClampStimulusSeries:
|
||||||
name: VoltageClampStimulusSeries
|
name: VoltageClampStimulusSeries
|
||||||
description: Stimulus voltage applied during a voltage clamp recording.
|
description: Stimulus voltage applied during a voltage clamp recording.
|
||||||
|
@ -205,6 +397,27 @@ classes:
|
||||||
range: VoltageClampStimulusSeries__data
|
range: VoltageClampStimulusSeries__data
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
VoltageClampStimulusSeries__data:
|
||||||
|
name: VoltageClampStimulusSeries__data
|
||||||
|
description: Stimulus voltage applied.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(data)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: data
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
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'.
|
||||||
|
range: text
|
||||||
|
value:
|
||||||
|
name: value
|
||||||
|
range: AnyType
|
||||||
|
required: true
|
||||||
IntracellularElectrode:
|
IntracellularElectrode:
|
||||||
name: IntracellularElectrode
|
name: IntracellularElectrode
|
||||||
description: An intracellular electrode and its metadata.
|
description: An intracellular electrode and its metadata.
|
||||||
|
@ -294,6 +507,17 @@ classes:
|
||||||
range: SweepTable__series_index
|
range: SweepTable__series_index
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
SweepTable__series_index:
|
||||||
|
name: SweepTable__series_index
|
||||||
|
description: Index for series.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(series_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: series_index
|
||||||
IntracellularElectrodesTable:
|
IntracellularElectrodesTable:
|
||||||
name: IntracellularElectrodesTable
|
name: IntracellularElectrodesTable
|
||||||
description: Table for storing intracellular electrode related metadata.
|
description: Table for storing intracellular electrode related metadata.
|
||||||
|
@ -334,6 +558,18 @@ classes:
|
||||||
range: IntracellularStimuliTable__stimulus
|
range: IntracellularStimuliTable__stimulus
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
IntracellularStimuliTable__stimulus:
|
||||||
|
name: IntracellularStimuliTable__stimulus
|
||||||
|
description: Column storing the reference to the recorded stimulus for the recording
|
||||||
|
(rows).
|
||||||
|
is_a: TimeSeriesReferenceVectorData
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(stimulus)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: stimulus
|
||||||
IntracellularResponsesTable:
|
IntracellularResponsesTable:
|
||||||
name: IntracellularResponsesTable
|
name: IntracellularResponsesTable
|
||||||
description: Table for storing intracellular response related metadata.
|
description: Table for storing intracellular response related metadata.
|
||||||
|
@ -355,6 +591,18 @@ classes:
|
||||||
range: IntracellularResponsesTable__response
|
range: IntracellularResponsesTable__response
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
IntracellularResponsesTable__response:
|
||||||
|
name: IntracellularResponsesTable__response
|
||||||
|
description: Column storing the reference to the recorded response for the recording
|
||||||
|
(rows)
|
||||||
|
is_a: TimeSeriesReferenceVectorData
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(response)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: response
|
||||||
IntracellularRecordingsTable:
|
IntracellularRecordingsTable:
|
||||||
name: IntracellularRecordingsTable
|
name: IntracellularRecordingsTable
|
||||||
description: A table to group together a stimulus and response from a single electrode
|
description: A table to group together a stimulus and response from a single electrode
|
||||||
|
@ -427,6 +675,35 @@ classes:
|
||||||
range: SimultaneousRecordingsTable__recordings_index
|
range: SimultaneousRecordingsTable__recordings_index
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
SimultaneousRecordingsTable__recordings:
|
||||||
|
name: SimultaneousRecordingsTable__recordings
|
||||||
|
description: A reference to one or more rows in the IntracellularRecordingsTable
|
||||||
|
table.
|
||||||
|
is_a: DynamicTableRegion
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(recordings)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: recordings
|
||||||
|
table:
|
||||||
|
name: table
|
||||||
|
description: Reference to the IntracellularRecordingsTable table that this
|
||||||
|
table region applies to. This specializes the attribute inherited from DynamicTableRegion
|
||||||
|
to fix the type of table that can be referenced here.
|
||||||
|
range: IntracellularRecordingsTable
|
||||||
|
SimultaneousRecordingsTable__recordings_index:
|
||||||
|
name: SimultaneousRecordingsTable__recordings_index
|
||||||
|
description: Index dataset for the recordings column.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(recordings_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: recordings_index
|
||||||
SequentialRecordingsTable:
|
SequentialRecordingsTable:
|
||||||
name: SequentialRecordingsTable
|
name: SequentialRecordingsTable
|
||||||
description: A table for grouping different sequential recordings from the SimultaneousRecordingsTable
|
description: A table for grouping different sequential recordings from the SimultaneousRecordingsTable
|
||||||
|
@ -460,6 +737,35 @@ classes:
|
||||||
multivalued: true
|
multivalued: true
|
||||||
range: text
|
range: text
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
SequentialRecordingsTable__simultaneous_recordings:
|
||||||
|
name: SequentialRecordingsTable__simultaneous_recordings
|
||||||
|
description: A reference to one or more rows in the SimultaneousRecordingsTable
|
||||||
|
table.
|
||||||
|
is_a: DynamicTableRegion
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(simultaneous_recordings)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: simultaneous_recordings
|
||||||
|
table:
|
||||||
|
name: table
|
||||||
|
description: Reference to the SimultaneousRecordingsTable table that this
|
||||||
|
table region applies to. This specializes the attribute inherited from DynamicTableRegion
|
||||||
|
to fix the type of table that can be referenced here.
|
||||||
|
range: SimultaneousRecordingsTable
|
||||||
|
SequentialRecordingsTable__simultaneous_recordings_index:
|
||||||
|
name: SequentialRecordingsTable__simultaneous_recordings_index
|
||||||
|
description: Index dataset for the simultaneous_recordings column.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(simultaneous_recordings_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: simultaneous_recordings_index
|
||||||
RepetitionsTable:
|
RepetitionsTable:
|
||||||
name: RepetitionsTable
|
name: RepetitionsTable
|
||||||
description: A table for grouping different sequential intracellular recordings
|
description: A table for grouping different sequential intracellular recordings
|
||||||
|
@ -488,6 +794,35 @@ classes:
|
||||||
range: RepetitionsTable__sequential_recordings_index
|
range: RepetitionsTable__sequential_recordings_index
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
RepetitionsTable__sequential_recordings:
|
||||||
|
name: RepetitionsTable__sequential_recordings
|
||||||
|
description: A reference to one or more rows in the SequentialRecordingsTable
|
||||||
|
table.
|
||||||
|
is_a: DynamicTableRegion
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(sequential_recordings)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: sequential_recordings
|
||||||
|
table:
|
||||||
|
name: table
|
||||||
|
description: Reference to the SequentialRecordingsTable table that this table
|
||||||
|
region applies to. This specializes the attribute inherited from DynamicTableRegion
|
||||||
|
to fix the type of table that can be referenced here.
|
||||||
|
range: SequentialRecordingsTable
|
||||||
|
RepetitionsTable__sequential_recordings_index:
|
||||||
|
name: RepetitionsTable__sequential_recordings_index
|
||||||
|
description: Index dataset for the sequential_recordings column.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(sequential_recordings_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: sequential_recordings_index
|
||||||
ExperimentalConditionsTable:
|
ExperimentalConditionsTable:
|
||||||
name: ExperimentalConditionsTable
|
name: ExperimentalConditionsTable
|
||||||
description: A table for grouping different intracellular recording repetitions
|
description: A table for grouping different intracellular recording repetitions
|
||||||
|
@ -513,3 +848,31 @@ classes:
|
||||||
range: ExperimentalConditionsTable__repetitions_index
|
range: ExperimentalConditionsTable__repetitions_index
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
ExperimentalConditionsTable__repetitions:
|
||||||
|
name: ExperimentalConditionsTable__repetitions
|
||||||
|
description: A reference to one or more rows in the RepetitionsTable table.
|
||||||
|
is_a: DynamicTableRegion
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(repetitions)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: repetitions
|
||||||
|
table:
|
||||||
|
name: table
|
||||||
|
description: Reference to the RepetitionsTable table that this table region
|
||||||
|
applies to. This specializes the attribute inherited from DynamicTableRegion
|
||||||
|
to fix the type of table that can be referenced here.
|
||||||
|
range: RepetitionsTable
|
||||||
|
ExperimentalConditionsTable__repetitions_index:
|
||||||
|
name: ExperimentalConditionsTable__repetitions_index
|
||||||
|
description: Index dataset for the repetitions column.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(repetitions_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: repetitions_index
|
||||||
|
|
|
@ -1,156 +0,0 @@
|
||||||
name: core.nwb.image.include
|
|
||||||
id: core.nwb.image.include
|
|
||||||
imports:
|
|
||||||
- core.nwb.base
|
|
||||||
- core.nwb.device
|
|
||||||
- nwb.language
|
|
||||||
- core.nwb.image.include
|
|
||||||
- core.nwb.image
|
|
||||||
default_prefix: core.nwb.image.include/
|
|
||||||
classes:
|
|
||||||
GrayscaleImage__Array:
|
|
||||||
name: GrayscaleImage__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
x:
|
|
||||||
name: x
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
y:
|
|
||||||
name: y
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
RGBImage__Array:
|
|
||||||
name: RGBImage__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
x:
|
|
||||||
name: x
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
y:
|
|
||||||
name: y
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
r, g, b:
|
|
||||||
name: r, g, b
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
minimum_cardinality: 3
|
|
||||||
maximum_cardinality: 3
|
|
||||||
RGBAImage__Array:
|
|
||||||
name: RGBAImage__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
x:
|
|
||||||
name: x
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
y:
|
|
||||||
name: y
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
r, g, b, a:
|
|
||||||
name: r, g, b, a
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
minimum_cardinality: 4
|
|
||||||
maximum_cardinality: 4
|
|
||||||
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)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: data
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ImageSeries__data__Array
|
|
||||||
ImageSeries__data__Array:
|
|
||||||
name: ImageSeries__data__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
frame:
|
|
||||||
name: frame
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
x:
|
|
||||||
name: x
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
y:
|
|
||||||
name: y
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
z:
|
|
||||||
name: z
|
|
||||||
range: numeric
|
|
||||||
required: false
|
|
||||||
OpticalSeries__field_of_view:
|
|
||||||
name: OpticalSeries__field_of_view
|
|
||||||
description: Width, height and depth of image, or imaged area, in meters.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(field_of_view)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: field_of_view
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: OpticalSeries__field_of_view__Array
|
|
||||||
OpticalSeries__field_of_view__Array:
|
|
||||||
name: OpticalSeries__field_of_view__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
width, height:
|
|
||||||
name: width, height
|
|
||||||
range: float32
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 2
|
|
||||||
maximum_cardinality: 2
|
|
||||||
width, height, depth:
|
|
||||||
name: width, height, depth
|
|
||||||
range: float32
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 3
|
|
||||||
maximum_cardinality: 3
|
|
||||||
OpticalSeries__data:
|
|
||||||
name: OpticalSeries__data
|
|
||||||
description: Images presented to subject, either grayscale or RGB
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(data)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: data
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: OpticalSeries__data__Array
|
|
||||||
OpticalSeries__data__Array:
|
|
||||||
name: OpticalSeries__data__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
frame:
|
|
||||||
name: frame
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
x:
|
|
||||||
name: x
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
y:
|
|
||||||
name: y
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
r, g, b:
|
|
||||||
name: r, g, b
|
|
||||||
range: numeric
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 3
|
|
||||||
maximum_cardinality: 3
|
|
|
@ -4,8 +4,6 @@ imports:
|
||||||
- core.nwb.base
|
- core.nwb.base
|
||||||
- core.nwb.device
|
- core.nwb.device
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- core.nwb.image.include
|
|
||||||
- core.nwb.image
|
|
||||||
default_prefix: core.nwb.image/
|
default_prefix: core.nwb.image/
|
||||||
classes:
|
classes:
|
||||||
GrayscaleImage:
|
GrayscaleImage:
|
||||||
|
@ -21,6 +19,18 @@ classes:
|
||||||
name: array
|
name: array
|
||||||
range: GrayscaleImage__Array
|
range: GrayscaleImage__Array
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
GrayscaleImage__Array:
|
||||||
|
name: GrayscaleImage__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
x:
|
||||||
|
name: x
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
y:
|
||||||
|
name: y
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
RGBImage:
|
RGBImage:
|
||||||
name: RGBImage
|
name: RGBImage
|
||||||
description: A color image.
|
description: A color image.
|
||||||
|
@ -34,6 +44,24 @@ classes:
|
||||||
name: array
|
name: array
|
||||||
range: RGBImage__Array
|
range: RGBImage__Array
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
RGBImage__Array:
|
||||||
|
name: RGBImage__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
x:
|
||||||
|
name: x
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
y:
|
||||||
|
name: y
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
r, g, b:
|
||||||
|
name: r, g, b
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
minimum_cardinality: 3
|
||||||
|
maximum_cardinality: 3
|
||||||
RGBAImage:
|
RGBAImage:
|
||||||
name: RGBAImage
|
name: RGBAImage
|
||||||
description: A color image with transparency.
|
description: A color image with transparency.
|
||||||
|
@ -47,6 +75,24 @@ classes:
|
||||||
name: array
|
name: array
|
||||||
range: RGBAImage__Array
|
range: RGBAImage__Array
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
RGBAImage__Array:
|
||||||
|
name: RGBAImage__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
x:
|
||||||
|
name: x
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
y:
|
||||||
|
name: y
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
r, g, b, a:
|
||||||
|
name: r, g, b, a
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
minimum_cardinality: 4
|
||||||
|
maximum_cardinality: 4
|
||||||
ImageSeries:
|
ImageSeries:
|
||||||
name: ImageSeries
|
name: ImageSeries
|
||||||
description: General image data that is common between acquisition and stimulus
|
description: General image data that is common between acquisition and stimulus
|
||||||
|
@ -94,6 +140,40 @@ classes:
|
||||||
range: text
|
range: text
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
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)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: data
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ImageSeries__data__Array
|
||||||
|
ImageSeries__data__Array:
|
||||||
|
name: ImageSeries__data__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
frame:
|
||||||
|
name: frame
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
x:
|
||||||
|
name: x
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
y:
|
||||||
|
name: y
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
z:
|
||||||
|
name: z
|
||||||
|
range: numeric
|
||||||
|
required: false
|
||||||
ImageMaskSeries:
|
ImageMaskSeries:
|
||||||
name: ImageMaskSeries
|
name: ImageMaskSeries
|
||||||
description: An alpha mask that is applied to a presented visual stimulus. The
|
description: An alpha mask that is applied to a presented visual stimulus. The
|
||||||
|
@ -147,6 +227,70 @@ classes:
|
||||||
range: text
|
range: text
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
OpticalSeries__field_of_view:
|
||||||
|
name: OpticalSeries__field_of_view
|
||||||
|
description: Width, height and depth of image, or imaged area, in meters.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(field_of_view)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: field_of_view
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: OpticalSeries__field_of_view__Array
|
||||||
|
OpticalSeries__field_of_view__Array:
|
||||||
|
name: OpticalSeries__field_of_view__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
width, height:
|
||||||
|
name: width, height
|
||||||
|
range: float32
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 2
|
||||||
|
maximum_cardinality: 2
|
||||||
|
width, height, depth:
|
||||||
|
name: width, height, depth
|
||||||
|
range: float32
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 3
|
||||||
|
maximum_cardinality: 3
|
||||||
|
OpticalSeries__data:
|
||||||
|
name: OpticalSeries__data
|
||||||
|
description: Images presented to subject, either grayscale or RGB
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(data)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: data
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: OpticalSeries__data__Array
|
||||||
|
OpticalSeries__data__Array:
|
||||||
|
name: OpticalSeries__data__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
frame:
|
||||||
|
name: frame
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
x:
|
||||||
|
name: x
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
y:
|
||||||
|
name: y
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
r, g, b:
|
||||||
|
name: r, g, b
|
||||||
|
range: numeric
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 3
|
||||||
|
maximum_cardinality: 3
|
||||||
IndexSeries:
|
IndexSeries:
|
||||||
name: IndexSeries
|
name: IndexSeries
|
||||||
description: Stores indices to image frames stored in an ImageSeries. The purpose
|
description: Stores indices to image frames stored in an ImageSeries. The purpose
|
||||||
|
|
|
@ -1,266 +0,0 @@
|
||||||
name: core.nwb.misc.include
|
|
||||||
id: core.nwb.misc.include
|
|
||||||
imports:
|
|
||||||
- core.nwb.base
|
|
||||||
- hdmf-common.table
|
|
||||||
- core.nwb.ecephys
|
|
||||||
- nwb.language
|
|
||||||
- core.nwb.misc.include
|
|
||||||
- core.nwb.misc
|
|
||||||
default_prefix: core.nwb.misc.include/
|
|
||||||
classes:
|
|
||||||
AbstractFeatureSeries__data:
|
|
||||||
name: AbstractFeatureSeries__data
|
|
||||||
description: Values of each feature at each time.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(data)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: data
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
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'".
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: AbstractFeatureSeries__data__Array
|
|
||||||
AbstractFeatureSeries__data__Array:
|
|
||||||
name: AbstractFeatureSeries__data__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_times:
|
|
||||||
name: num_times
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
num_features:
|
|
||||||
name: num_features
|
|
||||||
range: numeric
|
|
||||||
required: false
|
|
||||||
DecompositionSeries__data:
|
|
||||||
name: DecompositionSeries__data
|
|
||||||
description: Data decomposed into frequency bands.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(data)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: data
|
|
||||||
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
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: DecompositionSeries__data__Array
|
|
||||||
DecompositionSeries__data__Array:
|
|
||||||
name: DecompositionSeries__data__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_times:
|
|
||||||
name: num_times
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
num_channels:
|
|
||||||
name: num_channels
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
num_bands:
|
|
||||||
name: num_bands
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
DecompositionSeries__source_channels:
|
|
||||||
name: DecompositionSeries__source_channels
|
|
||||||
description: DynamicTableRegion pointer to the channels that this decomposition
|
|
||||||
series was generated from.
|
|
||||||
is_a: DynamicTableRegion
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(source_channels)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: source_channels
|
|
||||||
Units__spike_times_index:
|
|
||||||
name: Units__spike_times_index
|
|
||||||
description: Index into the spike_times dataset.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(spike_times_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: spike_times_index
|
|
||||||
Units__spike_times:
|
|
||||||
name: Units__spike_times
|
|
||||||
description: Spike times for each unit in seconds.
|
|
||||||
is_a: VectorData
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(spike_times)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: spike_times
|
|
||||||
resolution:
|
|
||||||
name: resolution
|
|
||||||
description: The smallest possible difference between two spike times. Usually
|
|
||||||
1 divided by the acquisition sampling rate from which spike times were extracted,
|
|
||||||
but could be larger if the acquisition time series was downsampled or smaller
|
|
||||||
if the acquisition time series was smoothed/interpolated and it is possible
|
|
||||||
for the spike time to be between samples.
|
|
||||||
range: float64
|
|
||||||
Units__obs_intervals_index:
|
|
||||||
name: Units__obs_intervals_index
|
|
||||||
description: Index into the obs_intervals dataset.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(obs_intervals_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: obs_intervals_index
|
|
||||||
Units__obs_intervals:
|
|
||||||
name: Units__obs_intervals
|
|
||||||
description: Observation intervals for each unit.
|
|
||||||
is_a: VectorData
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(obs_intervals)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: obs_intervals
|
|
||||||
Units__electrodes_index:
|
|
||||||
name: Units__electrodes_index
|
|
||||||
description: Index into electrodes.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(electrodes_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: electrodes_index
|
|
||||||
Units__electrodes:
|
|
||||||
name: Units__electrodes
|
|
||||||
description: Electrode that each spike unit came from, specified using a DynamicTableRegion.
|
|
||||||
is_a: DynamicTableRegion
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(electrodes)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: electrodes
|
|
||||||
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)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: waveform_mean
|
|
||||||
sampling_rate:
|
|
||||||
name: sampling_rate
|
|
||||||
description: Sampling rate, in hertz.
|
|
||||||
range: float32
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit of measurement. This value is fixed to 'volts'.
|
|
||||||
range: text
|
|
||||||
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)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: waveform_sd
|
|
||||||
sampling_rate:
|
|
||||||
name: sampling_rate
|
|
||||||
description: Sampling rate, in hertz.
|
|
||||||
range: float32
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit of measurement. This value is fixed to 'volts'.
|
|
||||||
range: text
|
|
||||||
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)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: waveforms
|
|
||||||
sampling_rate:
|
|
||||||
name: sampling_rate
|
|
||||||
description: Sampling rate, in hertz.
|
|
||||||
range: float32
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit of measurement. This value is fixed to 'volts'.
|
|
||||||
range: text
|
|
||||||
Units__waveforms_index:
|
|
||||||
name: Units__waveforms_index
|
|
||||||
description: Index into the waveforms dataset. One value for every spike event.
|
|
||||||
See 'waveforms' for more detail.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(waveforms_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: waveforms_index
|
|
||||||
Units__waveforms_index_index:
|
|
||||||
name: Units__waveforms_index_index
|
|
||||||
description: Index into the waveforms_index dataset. One value for every unit
|
|
||||||
(row in the table). See 'waveforms' for more detail.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(waveforms_index_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: waveforms_index_index
|
|
|
@ -5,8 +5,6 @@ imports:
|
||||||
- hdmf-common.table
|
- hdmf-common.table
|
||||||
- core.nwb.ecephys
|
- core.nwb.ecephys
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- core.nwb.misc.include
|
|
||||||
- core.nwb.misc
|
|
||||||
default_prefix: core.nwb.misc/
|
default_prefix: core.nwb.misc/
|
||||||
classes:
|
classes:
|
||||||
AbstractFeatureSeries:
|
AbstractFeatureSeries:
|
||||||
|
@ -45,6 +43,37 @@ classes:
|
||||||
range: text
|
range: text
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
AbstractFeatureSeries__data:
|
||||||
|
name: AbstractFeatureSeries__data
|
||||||
|
description: Values of each feature at each time.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(data)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: data
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
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'".
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: AbstractFeatureSeries__data__Array
|
||||||
|
AbstractFeatureSeries__data__Array:
|
||||||
|
name: AbstractFeatureSeries__data__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_times:
|
||||||
|
name: num_times
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
num_features:
|
||||||
|
name: num_features
|
||||||
|
range: numeric
|
||||||
|
required: false
|
||||||
AnnotationSeries:
|
AnnotationSeries:
|
||||||
name: AnnotationSeries
|
name: AnnotationSeries
|
||||||
description: Stores user annotations made during an experiment. The data[] field
|
description: Stores user annotations made during an experiment. The data[] field
|
||||||
|
@ -122,6 +151,53 @@ classes:
|
||||||
range: DynamicTable
|
range: DynamicTable
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
DecompositionSeries__data:
|
||||||
|
name: DecompositionSeries__data
|
||||||
|
description: Data decomposed into frequency bands.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(data)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: data
|
||||||
|
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
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: DecompositionSeries__data__Array
|
||||||
|
DecompositionSeries__data__Array:
|
||||||
|
name: DecompositionSeries__data__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_times:
|
||||||
|
name: num_times
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
num_channels:
|
||||||
|
name: num_channels
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
num_bands:
|
||||||
|
name: num_bands
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
DecompositionSeries__source_channels:
|
||||||
|
name: DecompositionSeries__source_channels
|
||||||
|
description: DynamicTableRegion pointer to the channels that this decomposition
|
||||||
|
series was generated from.
|
||||||
|
is_a: DynamicTableRegion
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(source_channels)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: source_channels
|
||||||
Units:
|
Units:
|
||||||
name: Units
|
name: Units
|
||||||
description: Data about spiking units. Event times of observed units (e.g. cell,
|
description: Data about spiking units. Event times of observed units (e.g. cell,
|
||||||
|
@ -228,3 +304,180 @@ classes:
|
||||||
range: Units__waveforms_index_index
|
range: Units__waveforms_index_index
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
Units__spike_times_index:
|
||||||
|
name: Units__spike_times_index
|
||||||
|
description: Index into the spike_times dataset.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(spike_times_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: spike_times_index
|
||||||
|
Units__spike_times:
|
||||||
|
name: Units__spike_times
|
||||||
|
description: Spike times for each unit in seconds.
|
||||||
|
is_a: VectorData
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(spike_times)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: spike_times
|
||||||
|
resolution:
|
||||||
|
name: resolution
|
||||||
|
description: The smallest possible difference between two spike times. Usually
|
||||||
|
1 divided by the acquisition sampling rate from which spike times were extracted,
|
||||||
|
but could be larger if the acquisition time series was downsampled or smaller
|
||||||
|
if the acquisition time series was smoothed/interpolated and it is possible
|
||||||
|
for the spike time to be between samples.
|
||||||
|
range: float64
|
||||||
|
Units__obs_intervals_index:
|
||||||
|
name: Units__obs_intervals_index
|
||||||
|
description: Index into the obs_intervals dataset.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(obs_intervals_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: obs_intervals_index
|
||||||
|
Units__obs_intervals:
|
||||||
|
name: Units__obs_intervals
|
||||||
|
description: Observation intervals for each unit.
|
||||||
|
is_a: VectorData
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(obs_intervals)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: obs_intervals
|
||||||
|
Units__electrodes_index:
|
||||||
|
name: Units__electrodes_index
|
||||||
|
description: Index into electrodes.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(electrodes_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: electrodes_index
|
||||||
|
Units__electrodes:
|
||||||
|
name: Units__electrodes
|
||||||
|
description: Electrode that each spike unit came from, specified using a DynamicTableRegion.
|
||||||
|
is_a: DynamicTableRegion
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(electrodes)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: electrodes
|
||||||
|
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)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: waveform_mean
|
||||||
|
sampling_rate:
|
||||||
|
name: sampling_rate
|
||||||
|
description: Sampling rate, in hertz.
|
||||||
|
range: float32
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit of measurement. This value is fixed to 'volts'.
|
||||||
|
range: text
|
||||||
|
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)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: waveform_sd
|
||||||
|
sampling_rate:
|
||||||
|
name: sampling_rate
|
||||||
|
description: Sampling rate, in hertz.
|
||||||
|
range: float32
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit of measurement. This value is fixed to 'volts'.
|
||||||
|
range: text
|
||||||
|
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)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: waveforms
|
||||||
|
sampling_rate:
|
||||||
|
name: sampling_rate
|
||||||
|
description: Sampling rate, in hertz.
|
||||||
|
range: float32
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit of measurement. This value is fixed to 'volts'.
|
||||||
|
range: text
|
||||||
|
Units__waveforms_index:
|
||||||
|
name: Units__waveforms_index
|
||||||
|
description: Index into the waveforms dataset. One value for every spike event.
|
||||||
|
See 'waveforms' for more detail.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(waveforms_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: waveforms_index
|
||||||
|
Units__waveforms_index_index:
|
||||||
|
name: Units__waveforms_index_index
|
||||||
|
description: Index into the waveforms_index dataset. One value for every unit
|
||||||
|
(row in the table). See 'waveforms' for more detail.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(waveforms_index_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: waveforms_index_index
|
||||||
|
|
|
@ -4,7 +4,6 @@ imports:
|
||||||
- core.nwb.base
|
- core.nwb.base
|
||||||
- core.nwb.device
|
- core.nwb.device
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- core.nwb.ogen
|
|
||||||
default_prefix: core.nwb.ogen/
|
default_prefix: core.nwb.ogen/
|
||||||
classes:
|
classes:
|
||||||
OptogeneticSeries:
|
OptogeneticSeries:
|
||||||
|
|
|
@ -1,235 +0,0 @@
|
||||||
name: core.nwb.ophys.include
|
|
||||||
id: core.nwb.ophys.include
|
|
||||||
imports:
|
|
||||||
- core.nwb.image
|
|
||||||
- core.nwb.base
|
|
||||||
- hdmf-common.table
|
|
||||||
- core.nwb.device
|
|
||||||
- nwb.language
|
|
||||||
- core.nwb.ophys.include
|
|
||||||
- core.nwb.ophys
|
|
||||||
default_prefix: core.nwb.ophys.include/
|
|
||||||
classes:
|
|
||||||
TwoPhotonSeries__field_of_view:
|
|
||||||
name: TwoPhotonSeries__field_of_view
|
|
||||||
description: Width, height and depth of image, or imaged area, in meters.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(field_of_view)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: field_of_view
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: TwoPhotonSeries__field_of_view__Array
|
|
||||||
TwoPhotonSeries__field_of_view__Array:
|
|
||||||
name: TwoPhotonSeries__field_of_view__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
width|height:
|
|
||||||
name: width|height
|
|
||||||
range: float32
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 2
|
|
||||||
maximum_cardinality: 2
|
|
||||||
width|height|depth:
|
|
||||||
name: width|height|depth
|
|
||||||
range: float32
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 3
|
|
||||||
maximum_cardinality: 3
|
|
||||||
RoiResponseSeries__data:
|
|
||||||
name: RoiResponseSeries__data
|
|
||||||
description: Signals from ROIs.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(data)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: data
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: RoiResponseSeries__data__Array
|
|
||||||
RoiResponseSeries__data__Array:
|
|
||||||
name: RoiResponseSeries__data__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_times:
|
|
||||||
name: num_times
|
|
||||||
range: numeric
|
|
||||||
required: true
|
|
||||||
num_ROIs:
|
|
||||||
name: num_ROIs
|
|
||||||
range: numeric
|
|
||||||
required: false
|
|
||||||
RoiResponseSeries__rois:
|
|
||||||
name: RoiResponseSeries__rois
|
|
||||||
description: DynamicTableRegion referencing into an ROITable containing information
|
|
||||||
on the ROIs stored in this timeseries.
|
|
||||||
is_a: DynamicTableRegion
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(rois)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: rois
|
|
||||||
PlaneSegmentation__image_mask:
|
|
||||||
name: PlaneSegmentation__image_mask
|
|
||||||
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.
|
|
||||||
is_a: VectorData
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(image_mask)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: image_mask
|
|
||||||
PlaneSegmentation__pixel_mask_index:
|
|
||||||
name: PlaneSegmentation__pixel_mask_index
|
|
||||||
description: Index into pixel_mask.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(pixel_mask_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: pixel_mask_index
|
|
||||||
PlaneSegmentation__voxel_mask_index:
|
|
||||||
name: PlaneSegmentation__voxel_mask_index
|
|
||||||
description: Index into voxel_mask.
|
|
||||||
is_a: VectorIndex
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(voxel_mask_index)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: voxel_mask_index
|
|
||||||
ImagingPlane__manifold:
|
|
||||||
name: ImagingPlane__manifold
|
|
||||||
description: DEPRECATED Physical position of each pixel. 'xyz' represents the
|
|
||||||
position of the pixel relative to the defined coordinate space. Deprecated in
|
|
||||||
favor of origin_coords and grid_spacing.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(manifold)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: manifold
|
|
||||||
conversion:
|
|
||||||
name: conversion
|
|
||||||
description: Scalar to multiply each element in data to convert it to the
|
|
||||||
specified 'unit'. If the data are stored in acquisition system units or
|
|
||||||
other units that require a conversion to be interpretable, multiply the
|
|
||||||
data by 'conversion' to convert the data to the specified 'unit'. e.g. if
|
|
||||||
the data acquisition system stores values in this object as pixels from
|
|
||||||
x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then
|
|
||||||
the 'conversion' multiplier to get from raw data acquisition pixel units
|
|
||||||
to meters is 2/1000.
|
|
||||||
range: float32
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Base unit of measurement for working with the data. The default
|
|
||||||
value is 'meters'.
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ImagingPlane__manifold__Array
|
|
||||||
ImagingPlane__manifold__Array:
|
|
||||||
name: ImagingPlane__manifold__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
height:
|
|
||||||
name: height
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
width:
|
|
||||||
name: width
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
x, y, z:
|
|
||||||
name: x, y, z
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
minimum_cardinality: 3
|
|
||||||
maximum_cardinality: 3
|
|
||||||
depth:
|
|
||||||
name: depth
|
|
||||||
range: float32
|
|
||||||
required: false
|
|
||||||
ImagingPlane__origin_coords:
|
|
||||||
name: ImagingPlane__origin_coords
|
|
||||||
description: Physical location of the first element of the imaging plane (0, 0)
|
|
||||||
for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the
|
|
||||||
physical location is relative to (e.g., bregma).
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(origin_coords)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: origin_coords
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Measurement units for origin_coords. The default value is 'meters'.
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ImagingPlane__origin_coords__Array
|
|
||||||
ImagingPlane__origin_coords__Array:
|
|
||||||
name: ImagingPlane__origin_coords__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
x, y:
|
|
||||||
name: x, y
|
|
||||||
range: float32
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 2
|
|
||||||
maximum_cardinality: 2
|
|
||||||
x, y, z:
|
|
||||||
name: x, y, z
|
|
||||||
range: float32
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 3
|
|
||||||
maximum_cardinality: 3
|
|
||||||
ImagingPlane__grid_spacing:
|
|
||||||
name: ImagingPlane__grid_spacing
|
|
||||||
description: Space between pixels in (x, y) or voxels in (x, y, z) directions,
|
|
||||||
in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame
|
|
||||||
to interpret the grid.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(grid_spacing)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: grid_spacing
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Measurement units for grid_spacing. The default value is 'meters'.
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ImagingPlane__grid_spacing__Array
|
|
||||||
ImagingPlane__grid_spacing__Array:
|
|
||||||
name: ImagingPlane__grid_spacing__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
x, y:
|
|
||||||
name: x, y
|
|
||||||
range: float32
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 2
|
|
||||||
maximum_cardinality: 2
|
|
||||||
x, y, z:
|
|
||||||
name: x, y, z
|
|
||||||
range: float32
|
|
||||||
required: false
|
|
||||||
minimum_cardinality: 3
|
|
||||||
maximum_cardinality: 3
|
|
|
@ -6,8 +6,6 @@ imports:
|
||||||
- hdmf-common.table
|
- hdmf-common.table
|
||||||
- core.nwb.device
|
- core.nwb.device
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- core.nwb.ophys.include
|
|
||||||
- core.nwb.ophys
|
|
||||||
default_prefix: core.nwb.ophys/
|
default_prefix: core.nwb.ophys/
|
||||||
classes:
|
classes:
|
||||||
OnePhotonSeries:
|
OnePhotonSeries:
|
||||||
|
@ -72,6 +70,35 @@ classes:
|
||||||
range: TwoPhotonSeries__field_of_view
|
range: TwoPhotonSeries__field_of_view
|
||||||
required: false
|
required: false
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
TwoPhotonSeries__field_of_view:
|
||||||
|
name: TwoPhotonSeries__field_of_view
|
||||||
|
description: Width, height and depth of image, or imaged area, in meters.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(field_of_view)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: field_of_view
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: TwoPhotonSeries__field_of_view__Array
|
||||||
|
TwoPhotonSeries__field_of_view__Array:
|
||||||
|
name: TwoPhotonSeries__field_of_view__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
width|height:
|
||||||
|
name: width|height
|
||||||
|
range: float32
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 2
|
||||||
|
maximum_cardinality: 2
|
||||||
|
width|height|depth:
|
||||||
|
name: width|height|depth
|
||||||
|
range: float32
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 3
|
||||||
|
maximum_cardinality: 3
|
||||||
RoiResponseSeries:
|
RoiResponseSeries:
|
||||||
name: RoiResponseSeries
|
name: RoiResponseSeries
|
||||||
description: ROI responses over an imaging plane. The first dimension represents
|
description: ROI responses over an imaging plane. The first dimension represents
|
||||||
|
@ -96,6 +123,43 @@ classes:
|
||||||
range: RoiResponseSeries__rois
|
range: RoiResponseSeries__rois
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
RoiResponseSeries__data:
|
||||||
|
name: RoiResponseSeries__data
|
||||||
|
description: Signals from ROIs.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(data)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: data
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: RoiResponseSeries__data__Array
|
||||||
|
RoiResponseSeries__data__Array:
|
||||||
|
name: RoiResponseSeries__data__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_times:
|
||||||
|
name: num_times
|
||||||
|
range: numeric
|
||||||
|
required: true
|
||||||
|
num_ROIs:
|
||||||
|
name: num_ROIs
|
||||||
|
range: numeric
|
||||||
|
required: false
|
||||||
|
RoiResponseSeries__rois:
|
||||||
|
name: RoiResponseSeries__rois
|
||||||
|
description: DynamicTableRegion referencing into an ROITable containing information
|
||||||
|
on the ROIs stored in this timeseries.
|
||||||
|
is_a: DynamicTableRegion
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(rois)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: rois
|
||||||
DfOverF:
|
DfOverF:
|
||||||
name: DfOverF
|
name: DfOverF
|
||||||
description: dF/F information about a region of interest (ROI). Storage hierarchy
|
description: dF/F information about a region of interest (ROI). Storage hierarchy
|
||||||
|
@ -204,6 +268,40 @@ classes:
|
||||||
any_of:
|
any_of:
|
||||||
- range: ImageSeries
|
- range: ImageSeries
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
PlaneSegmentation__image_mask:
|
||||||
|
name: PlaneSegmentation__image_mask
|
||||||
|
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.
|
||||||
|
is_a: VectorData
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(image_mask)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: image_mask
|
||||||
|
PlaneSegmentation__pixel_mask_index:
|
||||||
|
name: PlaneSegmentation__pixel_mask_index
|
||||||
|
description: Index into pixel_mask.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(pixel_mask_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: pixel_mask_index
|
||||||
|
PlaneSegmentation__voxel_mask_index:
|
||||||
|
name: PlaneSegmentation__voxel_mask_index
|
||||||
|
description: Index into voxel_mask.
|
||||||
|
is_a: VectorIndex
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(voxel_mask_index)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: voxel_mask_index
|
||||||
ImagingPlane:
|
ImagingPlane:
|
||||||
name: ImagingPlane
|
name: ImagingPlane
|
||||||
description: An imaging plane and its metadata.
|
description: An imaging plane and its metadata.
|
||||||
|
@ -299,6 +397,129 @@ classes:
|
||||||
range: OpticalChannel
|
range: OpticalChannel
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
ImagingPlane__manifold:
|
||||||
|
name: ImagingPlane__manifold
|
||||||
|
description: DEPRECATED Physical position of each pixel. 'xyz' represents the
|
||||||
|
position of the pixel relative to the defined coordinate space. Deprecated in
|
||||||
|
favor of origin_coords and grid_spacing.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(manifold)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: manifold
|
||||||
|
conversion:
|
||||||
|
name: conversion
|
||||||
|
description: Scalar to multiply each element in data to convert it to the
|
||||||
|
specified 'unit'. If the data are stored in acquisition system units or
|
||||||
|
other units that require a conversion to be interpretable, multiply the
|
||||||
|
data by 'conversion' to convert the data to the specified 'unit'. e.g. if
|
||||||
|
the data acquisition system stores values in this object as pixels from
|
||||||
|
x = -500 to 499, y = -500 to 499 that correspond to a 2 m x 2 m range, then
|
||||||
|
the 'conversion' multiplier to get from raw data acquisition pixel units
|
||||||
|
to meters is 2/1000.
|
||||||
|
range: float32
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Base unit of measurement for working with the data. The default
|
||||||
|
value is 'meters'.
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ImagingPlane__manifold__Array
|
||||||
|
ImagingPlane__manifold__Array:
|
||||||
|
name: ImagingPlane__manifold__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
height:
|
||||||
|
name: height
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
width:
|
||||||
|
name: width
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
x, y, z:
|
||||||
|
name: x, y, z
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
minimum_cardinality: 3
|
||||||
|
maximum_cardinality: 3
|
||||||
|
depth:
|
||||||
|
name: depth
|
||||||
|
range: float32
|
||||||
|
required: false
|
||||||
|
ImagingPlane__origin_coords:
|
||||||
|
name: ImagingPlane__origin_coords
|
||||||
|
description: Physical location of the first element of the imaging plane (0, 0)
|
||||||
|
for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the
|
||||||
|
physical location is relative to (e.g., bregma).
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(origin_coords)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: origin_coords
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Measurement units for origin_coords. The default value is 'meters'.
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ImagingPlane__origin_coords__Array
|
||||||
|
ImagingPlane__origin_coords__Array:
|
||||||
|
name: ImagingPlane__origin_coords__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
x, y:
|
||||||
|
name: x, y
|
||||||
|
range: float32
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 2
|
||||||
|
maximum_cardinality: 2
|
||||||
|
x, y, z:
|
||||||
|
name: x, y, z
|
||||||
|
range: float32
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 3
|
||||||
|
maximum_cardinality: 3
|
||||||
|
ImagingPlane__grid_spacing:
|
||||||
|
name: ImagingPlane__grid_spacing
|
||||||
|
description: Space between pixels in (x, y) or voxels in (x, y, z) directions,
|
||||||
|
in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame
|
||||||
|
to interpret the grid.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(grid_spacing)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: grid_spacing
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Measurement units for grid_spacing. The default value is 'meters'.
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ImagingPlane__grid_spacing__Array
|
||||||
|
ImagingPlane__grid_spacing__Array:
|
||||||
|
name: ImagingPlane__grid_spacing__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
x, y:
|
||||||
|
name: x, y
|
||||||
|
range: float32
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 2
|
||||||
|
maximum_cardinality: 2
|
||||||
|
x, y, z:
|
||||||
|
name: x, y, z
|
||||||
|
range: float32
|
||||||
|
required: false
|
||||||
|
minimum_cardinality: 3
|
||||||
|
maximum_cardinality: 3
|
||||||
OpticalChannel:
|
OpticalChannel:
|
||||||
name: OpticalChannel
|
name: OpticalChannel
|
||||||
description: An optical channel used to record from an imaging plane.
|
description: An optical channel used to record from an imaging plane.
|
||||||
|
|
|
@ -1,290 +0,0 @@
|
||||||
name: core.nwb.retinotopy.include
|
|
||||||
id: core.nwb.retinotopy.include
|
|
||||||
imports:
|
|
||||||
- core.nwb.base
|
|
||||||
- nwb.language
|
|
||||||
- core.nwb.retinotopy.include
|
|
||||||
- core.nwb.retinotopy
|
|
||||||
default_prefix: core.nwb.retinotopy.include/
|
|
||||||
classes:
|
|
||||||
ImagingRetinotopy__axis_1_phase_map:
|
|
||||||
name: ImagingRetinotopy__axis_1_phase_map
|
|
||||||
description: Phase response to stimulus on the first measured axis.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(axis_1_phase_map)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: axis_1_phase_map
|
|
||||||
dimension:
|
|
||||||
name: dimension
|
|
||||||
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
|
||||||
is equivalent to height, width.'
|
|
||||||
range: int32
|
|
||||||
field_of_view:
|
|
||||||
name: field_of_view
|
|
||||||
description: Size of viewing area, in meters.
|
|
||||||
range: float32
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit that axis data is stored in (e.g., degrees).
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ImagingRetinotopy__axis_1_phase_map__Array
|
|
||||||
ImagingRetinotopy__axis_1_phase_map__Array:
|
|
||||||
name: ImagingRetinotopy__axis_1_phase_map__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_rows:
|
|
||||||
name: num_rows
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
num_cols:
|
|
||||||
name: num_cols
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
ImagingRetinotopy__axis_1_power_map:
|
|
||||||
name: ImagingRetinotopy__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.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(axis_1_power_map)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: axis_1_power_map
|
|
||||||
dimension:
|
|
||||||
name: dimension
|
|
||||||
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
|
||||||
is equivalent to height, width.'
|
|
||||||
range: int32
|
|
||||||
field_of_view:
|
|
||||||
name: field_of_view
|
|
||||||
description: Size of viewing area, in meters.
|
|
||||||
range: float32
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit that axis data is stored in (e.g., degrees).
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ImagingRetinotopy__axis_1_power_map__Array
|
|
||||||
ImagingRetinotopy__axis_1_power_map__Array:
|
|
||||||
name: ImagingRetinotopy__axis_1_power_map__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_rows:
|
|
||||||
name: num_rows
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
num_cols:
|
|
||||||
name: num_cols
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
ImagingRetinotopy__axis_2_phase_map:
|
|
||||||
name: ImagingRetinotopy__axis_2_phase_map
|
|
||||||
description: Phase response to stimulus on the second measured axis.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(axis_2_phase_map)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: axis_2_phase_map
|
|
||||||
dimension:
|
|
||||||
name: dimension
|
|
||||||
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
|
||||||
is equivalent to height, width.'
|
|
||||||
range: int32
|
|
||||||
field_of_view:
|
|
||||||
name: field_of_view
|
|
||||||
description: Size of viewing area, in meters.
|
|
||||||
range: float32
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit that axis data is stored in (e.g., degrees).
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ImagingRetinotopy__axis_2_phase_map__Array
|
|
||||||
ImagingRetinotopy__axis_2_phase_map__Array:
|
|
||||||
name: ImagingRetinotopy__axis_2_phase_map__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_rows:
|
|
||||||
name: num_rows
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
num_cols:
|
|
||||||
name: num_cols
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
ImagingRetinotopy__axis_2_power_map:
|
|
||||||
name: ImagingRetinotopy__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.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(axis_2_power_map)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: axis_2_power_map
|
|
||||||
dimension:
|
|
||||||
name: dimension
|
|
||||||
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
|
||||||
is equivalent to height, width.'
|
|
||||||
range: int32
|
|
||||||
field_of_view:
|
|
||||||
name: field_of_view
|
|
||||||
description: Size of viewing area, in meters.
|
|
||||||
range: float32
|
|
||||||
unit:
|
|
||||||
name: unit
|
|
||||||
description: Unit that axis data is stored in (e.g., degrees).
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ImagingRetinotopy__axis_2_power_map__Array
|
|
||||||
ImagingRetinotopy__axis_2_power_map__Array:
|
|
||||||
name: ImagingRetinotopy__axis_2_power_map__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_rows:
|
|
||||||
name: num_rows
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
num_cols:
|
|
||||||
name: num_cols
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
ImagingRetinotopy__focal_depth_image:
|
|
||||||
name: ImagingRetinotopy__focal_depth_image
|
|
||||||
description: 'Gray-scale image taken with same settings/parameters (e.g., focal
|
|
||||||
depth, wavelength) as data collection. Array format: [rows][columns].'
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(focal_depth_image)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: focal_depth_image
|
|
||||||
bits_per_pixel:
|
|
||||||
name: bits_per_pixel
|
|
||||||
description: Number of bits used to represent each value. This is necessary
|
|
||||||
to determine maximum (white) pixel value.
|
|
||||||
range: int32
|
|
||||||
dimension:
|
|
||||||
name: dimension
|
|
||||||
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
|
||||||
is equivalent to height, width.'
|
|
||||||
range: int32
|
|
||||||
field_of_view:
|
|
||||||
name: field_of_view
|
|
||||||
description: Size of viewing area, in meters.
|
|
||||||
range: float32
|
|
||||||
focal_depth:
|
|
||||||
name: focal_depth
|
|
||||||
description: Focal depth offset, in meters.
|
|
||||||
range: float32
|
|
||||||
format:
|
|
||||||
name: format
|
|
||||||
description: Format of image. Right now only 'raw' is supported.
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ImagingRetinotopy__focal_depth_image__Array
|
|
||||||
ImagingRetinotopy__focal_depth_image__Array:
|
|
||||||
name: ImagingRetinotopy__focal_depth_image__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_rows:
|
|
||||||
name: num_rows
|
|
||||||
range: uint16
|
|
||||||
required: true
|
|
||||||
num_cols:
|
|
||||||
name: num_cols
|
|
||||||
range: uint16
|
|
||||||
required: true
|
|
||||||
ImagingRetinotopy__sign_map:
|
|
||||||
name: ImagingRetinotopy__sign_map
|
|
||||||
description: Sine of the angle between the direction of the gradient in axis_1
|
|
||||||
and axis_2.
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(sign_map)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: sign_map
|
|
||||||
dimension:
|
|
||||||
name: dimension
|
|
||||||
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
|
||||||
is equivalent to height, width.'
|
|
||||||
range: int32
|
|
||||||
field_of_view:
|
|
||||||
name: field_of_view
|
|
||||||
description: Size of viewing area, in meters.
|
|
||||||
range: float32
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ImagingRetinotopy__sign_map__Array
|
|
||||||
ImagingRetinotopy__sign_map__Array:
|
|
||||||
name: ImagingRetinotopy__sign_map__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_rows:
|
|
||||||
name: num_rows
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
num_cols:
|
|
||||||
name: num_cols
|
|
||||||
range: float32
|
|
||||||
required: true
|
|
||||||
ImagingRetinotopy__vasculature_image:
|
|
||||||
name: ImagingRetinotopy__vasculature_image
|
|
||||||
description: 'Gray-scale anatomical image of cortical surface. Array structure:
|
|
||||||
[rows][columns]'
|
|
||||||
attributes:
|
|
||||||
name:
|
|
||||||
name: name
|
|
||||||
ifabsent: string(vasculature_image)
|
|
||||||
range: string
|
|
||||||
required: true
|
|
||||||
equals_string: vasculature_image
|
|
||||||
bits_per_pixel:
|
|
||||||
name: bits_per_pixel
|
|
||||||
description: Number of bits used to represent each value. This is necessary
|
|
||||||
to determine maximum (white) pixel value
|
|
||||||
range: int32
|
|
||||||
dimension:
|
|
||||||
name: dimension
|
|
||||||
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
|
||||||
is equivalent to height, width.'
|
|
||||||
range: int32
|
|
||||||
field_of_view:
|
|
||||||
name: field_of_view
|
|
||||||
description: Size of viewing area, in meters.
|
|
||||||
range: float32
|
|
||||||
format:
|
|
||||||
name: format
|
|
||||||
description: Format of image. Right now only 'raw' is supported.
|
|
||||||
range: text
|
|
||||||
array:
|
|
||||||
name: array
|
|
||||||
range: ImagingRetinotopy__vasculature_image__Array
|
|
||||||
ImagingRetinotopy__vasculature_image__Array:
|
|
||||||
name: ImagingRetinotopy__vasculature_image__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_rows:
|
|
||||||
name: num_rows
|
|
||||||
range: uint16
|
|
||||||
required: true
|
|
||||||
num_cols:
|
|
||||||
name: num_cols
|
|
||||||
range: uint16
|
|
||||||
required: true
|
|
|
@ -3,8 +3,6 @@ id: core.nwb.retinotopy
|
||||||
imports:
|
imports:
|
||||||
- core.nwb.base
|
- core.nwb.base
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- core.nwb.retinotopy.include
|
|
||||||
- core.nwb.retinotopy
|
|
||||||
default_prefix: core.nwb.retinotopy/
|
default_prefix: core.nwb.retinotopy/
|
||||||
classes:
|
classes:
|
||||||
ImagingRetinotopy:
|
ImagingRetinotopy:
|
||||||
|
@ -80,3 +78,284 @@ classes:
|
||||||
range: ImagingRetinotopy__vasculature_image
|
range: ImagingRetinotopy__vasculature_image
|
||||||
required: true
|
required: true
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
ImagingRetinotopy__axis_1_phase_map:
|
||||||
|
name: ImagingRetinotopy__axis_1_phase_map
|
||||||
|
description: Phase response to stimulus on the first measured axis.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(axis_1_phase_map)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: axis_1_phase_map
|
||||||
|
dimension:
|
||||||
|
name: dimension
|
||||||
|
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
||||||
|
is equivalent to height, width.'
|
||||||
|
range: int32
|
||||||
|
field_of_view:
|
||||||
|
name: field_of_view
|
||||||
|
description: Size of viewing area, in meters.
|
||||||
|
range: float32
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit that axis data is stored in (e.g., degrees).
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ImagingRetinotopy__axis_1_phase_map__Array
|
||||||
|
ImagingRetinotopy__axis_1_phase_map__Array:
|
||||||
|
name: ImagingRetinotopy__axis_1_phase_map__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_rows:
|
||||||
|
name: num_rows
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
num_cols:
|
||||||
|
name: num_cols
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
ImagingRetinotopy__axis_1_power_map:
|
||||||
|
name: ImagingRetinotopy__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.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(axis_1_power_map)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: axis_1_power_map
|
||||||
|
dimension:
|
||||||
|
name: dimension
|
||||||
|
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
||||||
|
is equivalent to height, width.'
|
||||||
|
range: int32
|
||||||
|
field_of_view:
|
||||||
|
name: field_of_view
|
||||||
|
description: Size of viewing area, in meters.
|
||||||
|
range: float32
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit that axis data is stored in (e.g., degrees).
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ImagingRetinotopy__axis_1_power_map__Array
|
||||||
|
ImagingRetinotopy__axis_1_power_map__Array:
|
||||||
|
name: ImagingRetinotopy__axis_1_power_map__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_rows:
|
||||||
|
name: num_rows
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
num_cols:
|
||||||
|
name: num_cols
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
ImagingRetinotopy__axis_2_phase_map:
|
||||||
|
name: ImagingRetinotopy__axis_2_phase_map
|
||||||
|
description: Phase response to stimulus on the second measured axis.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(axis_2_phase_map)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: axis_2_phase_map
|
||||||
|
dimension:
|
||||||
|
name: dimension
|
||||||
|
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
||||||
|
is equivalent to height, width.'
|
||||||
|
range: int32
|
||||||
|
field_of_view:
|
||||||
|
name: field_of_view
|
||||||
|
description: Size of viewing area, in meters.
|
||||||
|
range: float32
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit that axis data is stored in (e.g., degrees).
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ImagingRetinotopy__axis_2_phase_map__Array
|
||||||
|
ImagingRetinotopy__axis_2_phase_map__Array:
|
||||||
|
name: ImagingRetinotopy__axis_2_phase_map__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_rows:
|
||||||
|
name: num_rows
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
num_cols:
|
||||||
|
name: num_cols
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
ImagingRetinotopy__axis_2_power_map:
|
||||||
|
name: ImagingRetinotopy__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.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(axis_2_power_map)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: axis_2_power_map
|
||||||
|
dimension:
|
||||||
|
name: dimension
|
||||||
|
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
||||||
|
is equivalent to height, width.'
|
||||||
|
range: int32
|
||||||
|
field_of_view:
|
||||||
|
name: field_of_view
|
||||||
|
description: Size of viewing area, in meters.
|
||||||
|
range: float32
|
||||||
|
unit:
|
||||||
|
name: unit
|
||||||
|
description: Unit that axis data is stored in (e.g., degrees).
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ImagingRetinotopy__axis_2_power_map__Array
|
||||||
|
ImagingRetinotopy__axis_2_power_map__Array:
|
||||||
|
name: ImagingRetinotopy__axis_2_power_map__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_rows:
|
||||||
|
name: num_rows
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
num_cols:
|
||||||
|
name: num_cols
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
ImagingRetinotopy__focal_depth_image:
|
||||||
|
name: ImagingRetinotopy__focal_depth_image
|
||||||
|
description: 'Gray-scale image taken with same settings/parameters (e.g., focal
|
||||||
|
depth, wavelength) as data collection. Array format: [rows][columns].'
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(focal_depth_image)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: focal_depth_image
|
||||||
|
bits_per_pixel:
|
||||||
|
name: bits_per_pixel
|
||||||
|
description: Number of bits used to represent each value. This is necessary
|
||||||
|
to determine maximum (white) pixel value.
|
||||||
|
range: int32
|
||||||
|
dimension:
|
||||||
|
name: dimension
|
||||||
|
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
||||||
|
is equivalent to height, width.'
|
||||||
|
range: int32
|
||||||
|
field_of_view:
|
||||||
|
name: field_of_view
|
||||||
|
description: Size of viewing area, in meters.
|
||||||
|
range: float32
|
||||||
|
focal_depth:
|
||||||
|
name: focal_depth
|
||||||
|
description: Focal depth offset, in meters.
|
||||||
|
range: float32
|
||||||
|
format:
|
||||||
|
name: format
|
||||||
|
description: Format of image. Right now only 'raw' is supported.
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ImagingRetinotopy__focal_depth_image__Array
|
||||||
|
ImagingRetinotopy__focal_depth_image__Array:
|
||||||
|
name: ImagingRetinotopy__focal_depth_image__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_rows:
|
||||||
|
name: num_rows
|
||||||
|
range: uint16
|
||||||
|
required: true
|
||||||
|
num_cols:
|
||||||
|
name: num_cols
|
||||||
|
range: uint16
|
||||||
|
required: true
|
||||||
|
ImagingRetinotopy__sign_map:
|
||||||
|
name: ImagingRetinotopy__sign_map
|
||||||
|
description: Sine of the angle between the direction of the gradient in axis_1
|
||||||
|
and axis_2.
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(sign_map)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: sign_map
|
||||||
|
dimension:
|
||||||
|
name: dimension
|
||||||
|
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
||||||
|
is equivalent to height, width.'
|
||||||
|
range: int32
|
||||||
|
field_of_view:
|
||||||
|
name: field_of_view
|
||||||
|
description: Size of viewing area, in meters.
|
||||||
|
range: float32
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ImagingRetinotopy__sign_map__Array
|
||||||
|
ImagingRetinotopy__sign_map__Array:
|
||||||
|
name: ImagingRetinotopy__sign_map__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_rows:
|
||||||
|
name: num_rows
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
num_cols:
|
||||||
|
name: num_cols
|
||||||
|
range: float32
|
||||||
|
required: true
|
||||||
|
ImagingRetinotopy__vasculature_image:
|
||||||
|
name: ImagingRetinotopy__vasculature_image
|
||||||
|
description: 'Gray-scale anatomical image of cortical surface. Array structure:
|
||||||
|
[rows][columns]'
|
||||||
|
attributes:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
ifabsent: string(vasculature_image)
|
||||||
|
range: string
|
||||||
|
required: true
|
||||||
|
equals_string: vasculature_image
|
||||||
|
bits_per_pixel:
|
||||||
|
name: bits_per_pixel
|
||||||
|
description: Number of bits used to represent each value. This is necessary
|
||||||
|
to determine maximum (white) pixel value
|
||||||
|
range: int32
|
||||||
|
dimension:
|
||||||
|
name: dimension
|
||||||
|
description: 'Number of rows and columns in the image. NOTE: row, column representation
|
||||||
|
is equivalent to height, width.'
|
||||||
|
range: int32
|
||||||
|
field_of_view:
|
||||||
|
name: field_of_view
|
||||||
|
description: Size of viewing area, in meters.
|
||||||
|
range: float32
|
||||||
|
format:
|
||||||
|
name: format
|
||||||
|
description: Format of image. Right now only 'raw' is supported.
|
||||||
|
range: text
|
||||||
|
array:
|
||||||
|
name: array
|
||||||
|
range: ImagingRetinotopy__vasculature_image__Array
|
||||||
|
ImagingRetinotopy__vasculature_image__Array:
|
||||||
|
name: ImagingRetinotopy__vasculature_image__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_rows:
|
||||||
|
name: num_rows
|
||||||
|
range: uint16
|
||||||
|
required: true
|
||||||
|
num_cols:
|
||||||
|
name: num_cols
|
||||||
|
range: uint16
|
||||||
|
required: true
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
name: core
|
name: core
|
||||||
|
annotations:
|
||||||
|
namespace:
|
||||||
|
tag: namespace
|
||||||
|
value: 'True'
|
||||||
description: NWB namespace
|
description: NWB namespace
|
||||||
id: core
|
id: core
|
||||||
version: 2.6.0-alpha
|
version: 2.6.0-alpha
|
||||||
|
|
|
@ -2,7 +2,6 @@ name: hdmf-common.base
|
||||||
id: hdmf-common.base
|
id: hdmf-common.base
|
||||||
imports:
|
imports:
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- hdmf-common.base
|
|
||||||
default_prefix: hdmf-common.base/
|
default_prefix: hdmf-common.base/
|
||||||
classes:
|
classes:
|
||||||
Data:
|
Data:
|
||||||
|
|
|
@ -3,7 +3,6 @@ id: hdmf-common.sparse
|
||||||
imports:
|
imports:
|
||||||
- hdmf-common.base
|
- hdmf-common.base
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- hdmf-common.sparse
|
|
||||||
default_prefix: hdmf-common.sparse/
|
default_prefix: hdmf-common.sparse/
|
||||||
classes:
|
classes:
|
||||||
CSRMatrix:
|
CSRMatrix:
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
name: hdmf-common.table.include
|
|
||||||
id: hdmf-common.table.include
|
|
||||||
imports:
|
|
||||||
- hdmf-common.base
|
|
||||||
- nwb.language
|
|
||||||
- hdmf-common.table.include
|
|
||||||
- hdmf-common.table
|
|
||||||
default_prefix: hdmf-common.table.include/
|
|
||||||
classes:
|
|
||||||
VectorData__Array:
|
|
||||||
name: VectorData__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
dim0:
|
|
||||||
name: dim0
|
|
||||||
range: AnyType
|
|
||||||
required: true
|
|
||||||
dim1:
|
|
||||||
name: dim1
|
|
||||||
range: AnyType
|
|
||||||
required: false
|
|
||||||
dim2:
|
|
||||||
name: dim2
|
|
||||||
range: AnyType
|
|
||||||
required: false
|
|
||||||
dim3:
|
|
||||||
name: dim3
|
|
||||||
range: AnyType
|
|
||||||
required: false
|
|
||||||
ElementIdentifiers__Array:
|
|
||||||
name: ElementIdentifiers__Array
|
|
||||||
is_a: Arraylike
|
|
||||||
attributes:
|
|
||||||
num_elements:
|
|
||||||
name: num_elements
|
|
||||||
range: int
|
|
||||||
required: true
|
|
|
@ -3,8 +3,6 @@ id: hdmf-common.table
|
||||||
imports:
|
imports:
|
||||||
- hdmf-common.base
|
- hdmf-common.base
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- hdmf-common.table.include
|
|
||||||
- hdmf-common.table
|
|
||||||
default_prefix: hdmf-common.table/
|
default_prefix: hdmf-common.table/
|
||||||
classes:
|
classes:
|
||||||
VectorData:
|
VectorData:
|
||||||
|
@ -31,6 +29,26 @@ classes:
|
||||||
name: array
|
name: array
|
||||||
range: VectorData__Array
|
range: VectorData__Array
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
VectorData__Array:
|
||||||
|
name: VectorData__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
dim0:
|
||||||
|
name: dim0
|
||||||
|
range: AnyType
|
||||||
|
required: true
|
||||||
|
dim1:
|
||||||
|
name: dim1
|
||||||
|
range: AnyType
|
||||||
|
required: false
|
||||||
|
dim2:
|
||||||
|
name: dim2
|
||||||
|
range: AnyType
|
||||||
|
required: false
|
||||||
|
dim3:
|
||||||
|
name: dim3
|
||||||
|
range: AnyType
|
||||||
|
required: false
|
||||||
VectorIndex:
|
VectorIndex:
|
||||||
name: VectorIndex
|
name: VectorIndex
|
||||||
description: Used with VectorData to encode a ragged array. An array of indices
|
description: Used with VectorData to encode a ragged array. An array of indices
|
||||||
|
@ -63,6 +81,14 @@ classes:
|
||||||
name: array
|
name: array
|
||||||
range: ElementIdentifiers__Array
|
range: ElementIdentifiers__Array
|
||||||
tree_root: true
|
tree_root: true
|
||||||
|
ElementIdentifiers__Array:
|
||||||
|
name: ElementIdentifiers__Array
|
||||||
|
is_a: Arraylike
|
||||||
|
attributes:
|
||||||
|
num_elements:
|
||||||
|
name: num_elements
|
||||||
|
range: int
|
||||||
|
required: true
|
||||||
DynamicTableRegion:
|
DynamicTableRegion:
|
||||||
name: DynamicTableRegion
|
name: DynamicTableRegion
|
||||||
description: DynamicTableRegion provides a link from one table to an index or
|
description: DynamicTableRegion provides a link from one table to an index or
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
name: hdmf-common
|
name: hdmf-common
|
||||||
|
annotations:
|
||||||
|
namespace:
|
||||||
|
tag: namespace
|
||||||
|
value: 'True'
|
||||||
description: Common data structures provided by HDMF
|
description: Common data structures provided by HDMF
|
||||||
id: hdmf-common
|
id: hdmf-common
|
||||||
version: 1.8.0
|
version: 1.8.0
|
||||||
|
|
|
@ -3,7 +3,6 @@ id: hdmf-experimental.experimental
|
||||||
imports:
|
imports:
|
||||||
- hdmf-common.table
|
- hdmf-common.table
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- hdmf-experimental.experimental
|
|
||||||
default_prefix: hdmf-experimental.experimental/
|
default_prefix: hdmf-experimental.experimental/
|
||||||
classes:
|
classes:
|
||||||
EnumData:
|
EnumData:
|
||||||
|
|
|
@ -3,7 +3,6 @@ id: hdmf-experimental.resources
|
||||||
imports:
|
imports:
|
||||||
- hdmf-common.base
|
- hdmf-common.base
|
||||||
- nwb.language
|
- nwb.language
|
||||||
- hdmf-experimental.resources
|
|
||||||
default_prefix: hdmf-experimental.resources/
|
default_prefix: hdmf-experimental.resources/
|
||||||
classes:
|
classes:
|
||||||
HERD:
|
HERD:
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
name: hdmf-experimental
|
name: hdmf-experimental
|
||||||
|
annotations:
|
||||||
|
namespace:
|
||||||
|
tag: namespace
|
||||||
|
value: 'True'
|
||||||
description: Experimental data structures provided by HDMF. These are not guaranteed
|
description: Experimental data structures provided by HDMF. These are not guaranteed
|
||||||
to be available in the future.
|
to be available in the future.
|
||||||
id: hdmf-experimental
|
id: hdmf-experimental
|
||||||
|
|
153
nwb_linkml/translate.py
Normal file
153
nwb_linkml/translate.py
Normal file
|
@ -0,0 +1,153 @@
|
||||||
|
"""
|
||||||
|
Convenience functions for translating NWB schema
|
||||||
|
"""
|
||||||
|
import pdb
|
||||||
|
import tempfile
|
||||||
|
from typing import List, Optional, Dict
|
||||||
|
from types import ModuleType
|
||||||
|
from pathlib import Path
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
|
import h5py
|
||||||
|
from linkml_runtime import SchemaView
|
||||||
|
from linkml_runtime.linkml_model import SchemaDefinition
|
||||||
|
from linkml_runtime.dumpers import yaml_dumper
|
||||||
|
from linkml_runtime.utils.compile_python import compile_python
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
from nwb_schema_language import Namespaces
|
||||||
|
from nwb_linkml.io import load_schema_file
|
||||||
|
from nwb_linkml.generators.pydantic import NWBPydanticGenerator
|
||||||
|
from nwb_linkml.map import apply_preload
|
||||||
|
from nwb_linkml.adapters import SchemaAdapter, NamespacesAdapter
|
||||||
|
|
||||||
|
def make_namespace_adapter(schema: dict) -> NamespacesAdapter:
|
||||||
|
"""
|
||||||
|
Create a :class:`.NamespacesAdapter` from a dictionary of loaded schema + namespace as are commonly
|
||||||
|
serialized in nwbfiles under /specifications
|
||||||
|
|
||||||
|
Args:
|
||||||
|
schema:
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
"""
|
||||||
|
namespace = Namespaces(**schema['namespace'])
|
||||||
|
schema_adapters = [] # type: List[SchemaAdapter]
|
||||||
|
|
||||||
|
for schema_name, schema_dict in schema.items():
|
||||||
|
if schema_name == 'namespace':
|
||||||
|
continue
|
||||||
|
path = Path(schema_name + '.yaml')
|
||||||
|
schema_adapters.append(load_schema_file(path, schema_dict))
|
||||||
|
|
||||||
|
ns_adapter = NamespacesAdapter(
|
||||||
|
namespaces=namespace,
|
||||||
|
schemas=schema_adapters
|
||||||
|
)
|
||||||
|
return ns_adapter
|
||||||
|
|
||||||
|
def populate_namespaces_imports(namespaces: List[NamespacesAdapter]) -> List[NamespacesAdapter]:
|
||||||
|
"""
|
||||||
|
Given a set of :class:`.NamespacesAdapter`s, populate their imports with the other namespaces, if necessary
|
||||||
|
"""
|
||||||
|
for ns in namespaces:
|
||||||
|
needed_imports = []
|
||||||
|
for imported_ns in ns.namespaces.namespaces:
|
||||||
|
for imported_sch in imported_ns.schema_:
|
||||||
|
if imported_sch.namespace and not imported_sch.source:
|
||||||
|
needed_imports.append(imported_sch.namespace)
|
||||||
|
|
||||||
|
# find the import among the namespaces we have
|
||||||
|
for other_ns in namespaces:
|
||||||
|
if any([imported_ns.name in needed_imports for imported_ns in other_ns.namespaces.namespaces]):
|
||||||
|
ns.imported.append(other_ns)
|
||||||
|
return namespaces
|
||||||
|
|
||||||
|
def translate_namespaces(namespaces: NamespacesAdapter, base_dir: Path) -> List[Path]:
|
||||||
|
"""
|
||||||
|
Write translated namespaces to disk
|
||||||
|
"""
|
||||||
|
built_schemas = namespaces.build().schemas
|
||||||
|
base_dir = Path(base_dir)
|
||||||
|
|
||||||
|
paths = []
|
||||||
|
for schema in built_schemas:
|
||||||
|
output_file = base_dir / (schema.name + '.yaml')
|
||||||
|
paths.append(output_file)
|
||||||
|
yaml_dumper.dump(schema, output_file)
|
||||||
|
return paths
|
||||||
|
|
||||||
|
def generate_pydantic(
|
||||||
|
namespaces: NamespacesAdapter,
|
||||||
|
schema_dir:Optional[Path]=None,
|
||||||
|
pydantic_dir:Optional[Path]=None
|
||||||
|
) -> ModuleType:
|
||||||
|
if schema_dir is None:
|
||||||
|
temp_schema_dir = tempfile.TemporaryDirectory()
|
||||||
|
schema_dir = Path(temp_schema_dir.name)
|
||||||
|
if pydantic_dir is None:
|
||||||
|
temp_pydantic_dir = tempfile.TemporaryDirectory()
|
||||||
|
pydantic_dir = Path(temp_pydantic_dir.name)
|
||||||
|
|
||||||
|
if any(schema_dir.glob('*.yaml')):
|
||||||
|
# read already generated schema, do nothing here
|
||||||
|
schema_paths = list(schema_dir.glob('*.yaml'))
|
||||||
|
else:
|
||||||
|
# generate schema files
|
||||||
|
schema_paths = translate_namespaces(namespaces, base_dir=schema_dir)
|
||||||
|
|
||||||
|
# just generate the namespace file, which should import everything
|
||||||
|
|
||||||
|
ns_file = [s_path for s_path in schema_paths if s_path.stem == namespaces.namespaces.namespaces[0].name]
|
||||||
|
if len(ns_file) == 0:
|
||||||
|
raise ValueError("Could not find main namespace file")
|
||||||
|
ns_file = ns_file[0]
|
||||||
|
|
||||||
|
generator = NWBPydanticGenerator(
|
||||||
|
str(ns_file),
|
||||||
|
split=False,
|
||||||
|
emit_metadata=True,
|
||||||
|
gen_classvars=True,
|
||||||
|
gen_slots=True,
|
||||||
|
pydantic_version='2'
|
||||||
|
)
|
||||||
|
serialized = generator.serialize()
|
||||||
|
with open(pydantic_dir / 'models.py', 'w') as mfile:
|
||||||
|
mfile.write(serialized)
|
||||||
|
module = generator.compile_module(pydantic_dir)
|
||||||
|
return module
|
||||||
|
|
||||||
|
def generate_from_nwbfile(path:Path) -> Dict[str, ModuleType]:
|
||||||
|
namespaces = []
|
||||||
|
h5f = h5py.File(path, 'r')
|
||||||
|
for ns_name, ns in h5f['specifications'].items():
|
||||||
|
ns_schema = {}
|
||||||
|
for version in ns.values():
|
||||||
|
for schema_name, schema in version.items():
|
||||||
|
# read the source json binary string
|
||||||
|
sch_str = schema[()]
|
||||||
|
sch_dict = json.loads(sch_str)
|
||||||
|
ns_schema[schema_name] = apply_preload(sch_dict)
|
||||||
|
namespaces.append(ns_schema)
|
||||||
|
|
||||||
|
adapters = [make_namespace_adapter(sch) for sch in namespaces]
|
||||||
|
adapters = populate_namespaces_imports(adapters)
|
||||||
|
pydantic_modules = {
|
||||||
|
adapter.namespaces.namespaces[0].name: generate_pydantic(adapter)
|
||||||
|
for adapter in adapters
|
||||||
|
}
|
||||||
|
return pydantic_modules
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -112,8 +112,8 @@ class Namespace(ConfiguredBaseModel):
|
||||||
full_name: Optional[str] = Field(None, description="""Optional string with extended full name for the namespace.""")
|
full_name: Optional[str] = Field(None, description="""Optional string with extended full name for the namespace.""")
|
||||||
version: str = Field(...)
|
version: str = Field(...)
|
||||||
date: Optional[datetime ] = Field(None, description="""Date that a namespace was last modified or released""")
|
date: Optional[datetime ] = Field(None, description="""Date that a namespace was last modified or released""")
|
||||||
author: List[str] = Field(default_factory=list, description="""List of strings with the names of the authors of the namespace.""")
|
author: List[str] | str = Field(default_factory=list, description="""List of strings with the names of the authors of the namespace.""")
|
||||||
contact: List[str] = Field(default_factory=list, description="""List of strings with the contact information for the authors. Ordering of the contacts should match the ordering of the authors.""")
|
contact: List[str] | str = Field(default_factory=list, description="""List of strings with the contact information for the authors. Ordering of the contacts should match the ordering of the authors.""")
|
||||||
schema_: Optional[List[Schema]] = Field(alias="schema", default_factory=list, description="""List of the schema to be included in this namespace.""")
|
schema_: Optional[List[Schema]] = Field(alias="schema", default_factory=list, description="""List of the schema to be included in this namespace.""")
|
||||||
|
|
||||||
|
|
||||||
|
|
35
poetry.lock
generated
35
poetry.lock
generated
|
@ -490,6 +490,39 @@ files = [
|
||||||
docs = ["Sphinx", "docutils (<0.18)"]
|
docs = ["Sphinx", "docutils (<0.18)"]
|
||||||
test = ["faulthandler", "objgraph", "psutil"]
|
test = ["faulthandler", "objgraph", "psutil"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "h5py"
|
||||||
|
version = "3.9.0"
|
||||||
|
description = "Read and write HDF5 files from Python"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.8"
|
||||||
|
files = [
|
||||||
|
{file = "h5py-3.9.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eb7bdd5e601dd1739698af383be03f3dad0465fe67184ebd5afca770f50df9d6"},
|
||||||
|
{file = "h5py-3.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:78e44686334cbbf2dd21d9df15823bc38663f27a3061f6a032c68a3e30c47bf7"},
|
||||||
|
{file = "h5py-3.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f68b41efd110ce9af1cbe6fa8af9f4dcbadace6db972d30828b911949e28fadd"},
|
||||||
|
{file = "h5py-3.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:12aa556d540f11a2cae53ea7cfb94017353bd271fb3962e1296b342f6550d1b8"},
|
||||||
|
{file = "h5py-3.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:d97409e17915798029e297a84124705c8080da901307ea58f29234e09b073ddc"},
|
||||||
|
{file = "h5py-3.9.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:551e358db05a874a0f827b22e95b30092f2303edc4b91bb62ad2f10e0236e1a0"},
|
||||||
|
{file = "h5py-3.9.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6822a814b9d8b8363ff102f76ea8d026f0ca25850bb579d85376029ee3e73b93"},
|
||||||
|
{file = "h5py-3.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54f01202cdea754ab4227dd27014bdbd561a4bbe4b631424fd812f7c2ce9c6ac"},
|
||||||
|
{file = "h5py-3.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64acceaf6aff92af091a4b83f6dee3cf8d3061f924a6bb3a33eb6c4658a8348b"},
|
||||||
|
{file = "h5py-3.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:804c7fb42a34c8ab3a3001901c977a5c24d2e9c586a0f3e7c0a389130b4276fc"},
|
||||||
|
{file = "h5py-3.9.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8d9492391ff5c3c80ec30ae2fe82a3f0efd1e750833739c25b0d090e3be1b095"},
|
||||||
|
{file = "h5py-3.9.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9da9e7e63376c32704e37ad4cea2dceae6964cee0d8515185b3ab9cbd6b947bc"},
|
||||||
|
{file = "h5py-3.9.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a4e20897c88759cbcbd38fb45b507adc91af3e0f67722aa302d71f02dd44d286"},
|
||||||
|
{file = "h5py-3.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dbf5225543ca35ce9f61c950b73899a82be7ba60d58340e76d0bd42bf659235a"},
|
||||||
|
{file = "h5py-3.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:36408f8c62f50007d14e000f9f3acf77e103b9e932c114cbe52a3089e50ebf94"},
|
||||||
|
{file = "h5py-3.9.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:23e74b878bbe1653ab34ca49b83cac85529cd0b36b9d625516c5830cc5ca2eac"},
|
||||||
|
{file = "h5py-3.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3f457089c5d524b7998e3649bc63240679b8fb0a3859ea53bbb06841f3d755f1"},
|
||||||
|
{file = "h5py-3.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a6284061f3214335e1eec883a6ee497dbe7a79f19e6a57fed2dd1f03acd5a8cb"},
|
||||||
|
{file = "h5py-3.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95f7a745efd0d56076999b52e8da5fad5d30823bac98b59c68ae75588d09991a"},
|
||||||
|
{file = "h5py-3.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:79bbca34696c6f9eeeb36a91776070c49a060b2879828e2c8fa6c58b8ed10dd1"},
|
||||||
|
{file = "h5py-3.9.0.tar.gz", hash = "sha256:e604db6521c1e367c6bd7fad239c847f53cc46646f2d2651372d05ae5e95f817"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
numpy = ">=1.17.3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hbreader"
|
name = "hbreader"
|
||||||
version = "0.9.1"
|
version = "0.9.1"
|
||||||
|
@ -2158,4 +2191,4 @@ tests = ["pytest", "pytest-depends"]
|
||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = "^3.11"
|
python-versions = "^3.11"
|
||||||
content-hash = "b552d70308f5b757a624b3d0046e54af4297bfba994a8019f4b366cce2fbe06f"
|
content-hash = "4b3073d732a5ddcc84db255baea64e2df0414967995d20bd902f83a39de0bc10"
|
||||||
|
|
|
@ -23,6 +23,7 @@ dash = {version="^2.12.1", optional=true}
|
||||||
dash-cytoscape = {version="^0.3.0", optional=true}
|
dash-cytoscape = {version="^0.3.0", optional=true}
|
||||||
nptyping = "^2.5.0"
|
nptyping = "^2.5.0"
|
||||||
pydantic = "^2.3.0"
|
pydantic = "^2.3.0"
|
||||||
|
h5py = "^3.9.0"
|
||||||
|
|
||||||
[tool.poetry.extras]
|
[tool.poetry.extras]
|
||||||
dev = ["nwb_schema_language"]
|
dev = ["nwb_schema_language"]
|
||||||
|
|
9
tests/test_translate.py
Normal file
9
tests/test_translate.py
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
import pytest
|
||||||
|
from pathlib import Path
|
||||||
|
from nwb_linkml.translate import generate_from_nwbfile
|
||||||
|
|
||||||
|
def test_generate_pydantic():
|
||||||
|
#NWBFILE = Path('/Users/jonny/Dropbox/lab/p2p_ld/data/nwb/sub-738651046_ses-760693773.nwb')
|
||||||
|
|
||||||
|
#pydantic_module = generate_from_nwbfile(NWBFILE)
|
||||||
|
|
Loading…
Reference in a new issue