Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions dandi/metadata/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,9 +828,9 @@ class Neurodatum(TypedDict):
"technique": "fourier analysis technique",
"approach": None,
},
"OptogeneticStimulusSIte": {
"OptogeneticStimulusSite": {
"module": "ogen",
"neurodata_type": "OptogeneticStimulusSIte",
"neurodata_type": "OptogeneticStimulusSite",
"technique": None,
"approach": "optogenetic approach",
},
Expand All @@ -840,6 +840,36 @@ class Neurodatum(TypedDict):
"technique": None,
"approach": "optogenetic approach",
},
"PoseEstimationSeries": {
"module": "ndx-pose",
"neurodata_type": "PoseEstimationSeries",
"technique": "pose estimation technique",
"approach": "behavioral approach",
},
"PoseEstimation": {
"module": "ndx-pose",
"neurodata_type": "PoseEstimation",
"technique": "pose estimation technique",
"approach": "behavioral approach",
},
"PoseTraining": {
"module": "ndx-pose",
"neurodata_type": "PoseTraining",
"technique": "pose estimation technique",
"approach": "behavioral approach",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on a more general note, i'm a bit confused about why pose training is a data type, as that doesn't seem to reflect behavior per se, and also why it is a pose estimation technique.

some of these are direct measurement techniques or estimation techniques, but this one seems odd.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PoseTraining is a group consisting of training frames and source videos. A training frame refers to a frame from a source video and an the locations of each node of 1 or more skeletons, often from human labeling. So PoseTraining isn't exactly a data type but indicative of the NWB file containing training data for pose estimation methods. Should I pick out a different data type to detect instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should consider data type as a broad umbrella of what data is generated from or used for (for example there is fourier analysis above). it could be associated with a "pose estimation training technique"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it. that makes sense

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rly here we have 2 extensions listed to assist with importing https://github.com/dandi/dandi-cli/blob/HEAD/dandi/metadata/nwb.py#L99 -- should we also add extension information into this 'registry' and use it there too? or may be it is no longer even needed?

},
"FiberPhotometryResponseSeries": {
"module": "ndx-fiber-photometry",
"neurodata_type": "FiberPhotometryResponseSeries",
"technique": "fiber photometry technique; optical technique",
"approach": "calcium imaging; cell population imaging",
},
"FiberPhotometryResponseSeries_old": {
"module": "ndx-photometry", # deprecated and replaced by ndx-fiber-photometry
"neurodata_type": "FiberPhotometryResponseSeries",
"technique": "fiber photometry technique; optical technique",
"approach": "calcium imaging; cell population imaging",
},
}


Expand Down
44 changes: 42 additions & 2 deletions dandi/tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,11 +788,11 @@ def test_species_map():
},
),
(
["OptogeneticStimulusSIte"],
["OptogeneticStimulusSite"],
{
"approach": ["optogenetic approach"],
"measurementTechnique": None,
"variableMeasured": ["OptogeneticStimulusSIte"],
"variableMeasured": ["OptogeneticStimulusSite"],
},
),
(
Expand All @@ -803,6 +803,46 @@ def test_species_map():
"variableMeasured": ["OptogeneticSeries"],
},
),
(
["PoseEstimationSeries"],
{
"approach": ["behavioral approach"],
"measurementTechnique": ["pose estimation technique"],
"variableMeasured": ["PoseEstimationSeries"],
},
),
(
["PoseEstimation"],
{
"approach": ["behavioral approach"],
"measurementTechnique": ["pose estimation technique"],
"variableMeasured": ["PoseEstimation"],
},
),
(
["PoseTraining"],
{
"approach": ["behavioral approach"],
"measurementTechnique": ["pose estimation technique"],
"variableMeasured": ["PoseTraining"],
},
),
(
["FiberPhotometryResponseSeries"],
{
"approach": ["fiber photometry technique; optical technique"],
"measurementTechnique": ["calcium imaging; cell population imaging"],
"variableMeasured": ["FiberPhotometryResponseSeries"],
},
),
(
["FiberPhotometryResponseSeries_old"],
{
"approach": ["fiber photometry technique; optical technique"],
"measurementTechnique": ["calcium imaging; cell population imaging"],
"variableMeasured": ["FiberPhotometryResponseSeries"],
},
),
(
# the tricky case of having number of instances of the data type
# https://github.com/dandi/dandi-cli/issues/890
Expand Down
Loading