Skip to content

Commit

Permalink
added schema for functional properties (#86)
Browse files Browse the repository at this point in the history
* added schema for functional propertoes

* tied the schema to the upper level
  • Loading branch information
sdorkenw authored May 9, 2024
1 parent 34f8f7f commit 189aea7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions emannotationschemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
FunctionalUnitCoregistration,
FunctionalUnitCoregistrationExtended,
)
from emannotationschemas.schemas.functional_props import FunctionalPropertiesBCM
from emannotationschemas.schemas.postsynaptic_compartment import PostsynapticCompartment
from emannotationschemas.schemas.base import (
FlatSegmentationReferenceSinglePoint,
Expand Down Expand Up @@ -72,6 +73,7 @@
"microns_func_coreg": FunctionalCoregistration,
"microns_func_unit_coreg": FunctionalUnitCoregistration,
"func_unit_ext_coreg": FunctionalUnitCoregistrationExtended,
"func_properties_bcm": FunctionalPropertiesBCM,
"simple_reference": ReferenceAnnotation,
"reference_tag": ReferenceTagAnnotation,
"cell_type_local": CellTypeLocal,
Expand Down Expand Up @@ -106,6 +108,7 @@
"bound_tag_valid": BoundTagWithValid,
}


def get_types():
return [k for k in type_mapping.keys()]

Expand Down
30 changes: 30 additions & 0 deletions emannotationschemas/schemas/functional_props.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import marshmallow as mm
from emannotationschemas.schemas.base import (
ReferenceAnnotation,
)


class FunctionalPropertiesBCM(ReferenceAnnotation):
session = mm.fields.Int(required=True, description="session ID of imaging")
scan_idx = mm.fields.Int(
required=True, description="index of the scan within the session"
)
unit_id = mm.fields.Int(
required=True, description="unique functional cell ID within the scan"
)
pref_ori = mm.fields.Float(
required=True, desription="preferred orientation in radians (0 - pi)"
)
pref_dir = mm.fields.Float(
required=True, desription="preferred direction in radians (0 - 2pi)"
)
gOSI = mm.fields.Float(
required=True, desription="global orientation selectivity index"
)
gDSI = mm.fields.Float(
required=True, desription="global direction selectivity index"
)
cc_abs = mm.fields.Float(
required=True,
desription="prediction performance of the model, higher is better",
)

0 comments on commit 189aea7

Please sign in to comment.