From 88adc1359d162bb0c118b6edb0a06a60754cb200 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Thu, 27 Aug 2026 11:20:41 -0400 Subject: [PATCH] Use clean fiber photometry terms; add photometry table and device types Use "fiber photometry approach" and "fiber photometry technique" for the photometry types. Semicolon-joined strings like "fiber photometry technique; optical technique" would become a single unfacetable term, and "calcium imaging" is inaccurate for the many photometry datasets using dLight or GRAB sensors to measure neurotransmitters rather than calcium. Add the metadata table types from the deprecated ndx-photometry and the container, table, and device types from ndx-fiber-photometry so files carrying only those are still marked. Drop the unused dandi/metadata/neurodata_typemap.py for now; the expanded map can be reintroduced when it is wired into the code. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Wuywpnnb3Q57q6oeMZ4God --- dandi/metadata/neurodata_typemap.py | 1201 --------------------------- dandi/metadata/util.py | 68 +- dandi/tests/test_metadata.py | 14 +- 3 files changed, 77 insertions(+), 1206 deletions(-) delete mode 100644 dandi/metadata/neurodata_typemap.py diff --git a/dandi/metadata/neurodata_typemap.py b/dandi/metadata/neurodata_typemap.py deleted file mode 100644 index d55fd4d47..000000000 --- a/dandi/metadata/neurodata_typemap.py +++ /dev/null @@ -1,1201 +0,0 @@ -neurodata_typemap: dict[str, dict[str, str | None]] = { - # base module - "ImageSeries": { - "module": "base", - "neurodata_type": "ImageSeries", - "technique": None, - "approach": None, - }, - "NWBFile": { - "module": "base", - "neurodata_type": "NWBFile", - "technique": None, - "approach": None, - }, - "ProcessingModule": { - "module": "base", - "neurodata_type": "ProcessingModule", - "technique": "analytical technique", - "approach": None, - }, - "TimeSeries": { - "module": "base", - "neurodata_type": "TimeSeries", - "technique": None, - "approach": None, - }, - - # behavior module - "AnnotatedEventsTable": { - "module": "behavior", - "neurodata_type": "AnnotatedEventsTable", - "technique": "behavioral technique", - "approach": "behavioral approach", - }, - "BehavioralEpochs": { - "module": "behavior", - "neurodata_type": "BehavioralEpochs", - "technique": "behavioral technique", - "approach": "behavioral approach", - }, - "BehavioralEvents": { - "module": "behavior", - "neurodata_type": "BehavioralEvents", - "technique": "behavioral technique", - "approach": "behavioral approach", - }, - "BehavioralTimeSeries": { - "module": "behavior", - "neurodata_type": "BehavioralTimeSeries", - "technique": "behavioral technique", - "approach": "behavioral approach", - }, - "CompassDirection": { - "module": "behavior", - "neurodata_type": "CompassDirection", - "technique": "behavioral technique", - "approach": "behavioral approach", - }, - "EllipseEyeTracking": { - "module": "behavior", - "neurodata_type": "EllipseEyeTracking", - "technique": "eye tracking technique", - "approach": "behavioral approach", - }, - "EllipseSeries": { - "module": "behavior", - "neurodata_type": "EllipseSeries", - "technique": "eye tracking technique", - "approach": "behavioral approach", - }, - "EventTypesTable": { - "module": "behavior", - "neurodata_type": "EventTypesTable", - "technique": None, - "approach": "behavioral approach", - }, - "Eventlog": { - "module": "behavior", - "neurodata_type": "Eventlog", - "technique": "behavioral technique", - "approach": "behavioral approach", - }, - "Events": { - "module": "behavior", - "neurodata_type": "Events", - "technique": "behavioral technique", - "approach": "behavioral approach", - }, - "EventsTable": { - "module": "behavior", - "neurodata_type": "EventsTable", - "technique": None, - "approach": "behavioral approach", - }, - "EyeTracking": { - "module": "behavior", - "neurodata_type": "EyeTracking", - "technique": "behavioral technique", - "approach": "behavioral approach", - }, - "LabeledEvents": { - "module": "behavior", - "neurodata_type": "LabeledEvents", - "technique": "behavioral technique", - "approach": "behavioral approach", - }, - "MoSeqExtractGroup": { - "module": "behavior", - "neurodata_type": "MoSeqExtractGroup", - "technique": "motion analysis technique", - "approach": "behavioral approach", - }, - "MoSeqExtractParameterGroup": { - "module": "behavior", - "neurodata_type": "MoSeqExtractParameterGroup", - "technique": "motion analysis technique", - "approach": "behavioral approach", - }, - "Position": { - "module": "behavior", - "neurodata_type": "Position", - "technique": "behavioral technique", - "approach": "behavioral approach", - }, - "PupilTracking": { - "module": "behavior", - "neurodata_type": "PupilTracking", - "technique": "eye tracking technique", - "approach": "behavioral approach", - }, - "Skeleton": { - "module": "behavior", - "neurodata_type": "Skeleton", - "technique": None, - "approach": "behavioral approach", - }, - "SpatialSeries": { - "module": "behavior", - "neurodata_type": "SpatialSeries", - "technique": "behavioral technique", - "approach": "behavioral approach", - }, - - # device module - "CameraDevice": { - "module": "device", - "neurodata_type": "CameraDevice", - "technique": "photographic technique", - "approach": None, - }, - "DataAcqDevice": { - "module": "device", - "neurodata_type": "DataAcqDevice", - "technique": None, - "approach": None, - }, - "Device": { - "module": "device", - "neurodata_type": "Device", - "technique": None, - "approach": None, - }, - "EcephysEyeTrackingRigMetadata": { - "module": "device", - "neurodata_type": "EcephysEyeTrackingRigMetadata", - "technique": "eye tracking technique", - "approach": "behavioral approach", - }, - "HeaderDevice": { - "module": "device", - "neurodata_type": "HeaderDevice", - "technique": None, - "approach": None, - }, - "LabNotebookDevice": { - "module": "device", - "neurodata_type": "LabNotebookDevice", - "technique": None, - "approach": None, - }, - "Microscope": { - "module": "device", - "neurodata_type": "Microscope", - "technique": None, - "approach": "microscopy approach", - }, - "Miniscope": { - "module": "device", - "neurodata_type": "Miniscope", - "technique": None, - "approach": "microscopy approach", - }, - "NIRSDevice": { - "module": "device", - "neurodata_type": "NIRSDevice", - "technique": None, - "approach": "near-infrared spectroscopy", - }, - "TestpulseDevice": { - "module": "device", - "neurodata_type": "TestpulseDevice", - "technique": None, - "approach": None, - }, - "UserCommentDevice": { - "module": "device", - "neurodata_type": "UserCommentDevice", - "technique": None, - "approach": None, - }, - - # ecephys module - "EcephysCSD": { - "module": "ecephys", - "neurodata_type": "EcephysCSD", - "technique": "current source density technique", - "approach": "electrophysiological approach", - }, - "EcephysElectrodeGroup": { - "module": "ecephys", - "neurodata_type": "EcephysElectrodeGroup", - "technique": "surgical technique", - "approach": "electrophysiological approach", - }, - "EcephysProbe": { - "module": "ecephys", - "neurodata_type": "EcephysProbe", - "technique": "surgical technique", - "approach": "electrophysiological approach", - }, - "ElectricalSeries": { - "module": "ecephys", - "neurodata_type": "ElectricalSeries", - "technique": "multi electrode extracellular electrophysiology recording technique", - "approach": "electrophysiological approach", - }, - "ElectrodeGroup": { - "module": "ecephys", - "neurodata_type": "ElectrodeGroup", - "technique": "surgical technique", - "approach": "electrophysiological approach", - }, - "ElectrodesTable": { - "module": "ecephys", - "neurodata_type": "ElectrodesTable", - "technique": None, - "approach": "electrophysiological approach", - }, - "FilteredEphys": { - "module": "ecephys", - "neurodata_type": "FilteredEphys", - "technique": "signal filtering technique", - "approach": "electrophysiological approach", - }, - "IblProbes": { - "module": "ecephys", - "neurodata_type": "IblProbes", - "technique": "surgical technique", - "approach": "electrophysiological approach", - }, - "LFP": { - "module": "ecephys", - "neurodata_type": "LFP", - "technique": "signal filtering technique", - "approach": "electrophysiological approach", - }, - "NwbElectrodeGroup": { - "module": "ecephys", - "neurodata_type": "NwbElectrodeGroup", - "technique": "surgical technique", - "approach": "electrophysiological approach", - }, - "Probe": { - "module": "ecephys", - "neurodata_type": "Probe", - "technique": "surgical technique", - "approach": "electrophysiological approach", - }, - "Shank": { - "module": "ecephys", - "neurodata_type": "Shank", - "technique": "surgical technique", - "approach": "electrophysiological approach", - }, - "ShanksElectrode": { - "module": "ecephys", - "neurodata_type": "ShanksElectrode", - "technique": "surgical technique", - "approach": "electrophysiological approach", - }, - "SpikeEventSeries": { - "module": "ecephys", - "neurodata_type": "SpikeEventSeries", - "technique": "spike sorting technique", - "approach": "electrophysiological approach", - }, - - # fiberphotometry module - "FiberPhotometry": { - "module": "fiberphotometry", - "neurodata_type": "FiberPhotometry", - "technique": "fiber photometry technique; optical technique", - "approach": "calcium imaging; cell population imaging", - }, - "FiberPhotometryResponseSeries": { - "module": "fiberphotometry", - "neurodata_type": "FiberPhotometryResponseSeries", - "technique": "fiber photometry technique; optical technique", - "approach": "calcium imaging; cell population imaging", - }, - "FiberPhotometrySeries": { - "module": "fiberphotometry", - "neurodata_type": "FiberPhotometrySeries", - "technique": "fiber photometry technique; optical technique", - "approach": "calcium imaging; cell population imaging", - }, - "FiberPhotometryTable": { - "module": "fiberphotometry", - "neurodata_type": "FiberPhotometryTable", - "technique": None, - "approach": "calcium imaging; cell population imaging", - }, - "FibersTable": { - "module": "fiberphotometry", - "neurodata_type": "FibersTable", - "technique": None, - "approach": "calcium imaging; cell population imaging", - }, - "OpticalFiber": { - "module": "fiberphotometry", - "neurodata_type": "OpticalFiber", - "technique": "surgical technique", - "approach": "calcium imaging; cell population imaging", - }, - "Photodetector": { - "module": "fiberphotometry", - "neurodata_type": "Photodetector", - "technique": None, - "approach": "calcium imaging; cell population imaging", - }, - "PhotodetectorsTable": { - "module": "fiberphotometry", - "neurodata_type": "PhotodetectorsTable", - "technique": None, - "approach": "calcium imaging; cell population imaging", - }, - - # icephys module - "CommandedVoltageSeries": { - "module": "icephys", - "neurodata_type": "CommandedVoltageSeries", - "technique": "voltage control technique", - "approach": "electrophysiological approach", - }, - "CompartmentSeries": { - "module": "icephys", - "neurodata_type": "CompartmentSeries", - "technique": "compartmental recording technique", - "approach": "electrophysiological approach", - }, - "Compartments": { - "module": "icephys", - "neurodata_type": "Compartments", - "technique": "compartmental recording technique", - "approach": "electrophysiological approach", - }, - "CurrentClampSeries": { - "module": "icephys", - "neurodata_type": "CurrentClampSeries", - "technique": "current clamp technique", - "approach": "electrophysiological approach", - }, - "CurrentClampStimulusSeries": { - "module": "icephys", - "neurodata_type": "CurrentClampStimulusSeries", - "technique": "current clamp technique", - "approach": "electrophysiological approach", - }, - "IZeroClampSeries": { - "module": "icephys", - "neurodata_type": "IZeroClampSeries", - "technique": "current clamp technique", - "approach": "electrophysiological approach", - }, - "IntracellularElectrode": { - "module": "icephys", - "neurodata_type": "IntracellularElectrode", - "technique": "surgical technique", - "approach": "electrophysiological approach", - }, - "IntracellularElectrodesTable": { - "module": "icephys", - "neurodata_type": "IntracellularElectrodesTable", - "technique": None, - "approach": "electrophysiological approach", - }, - "IntracellularRecordingsTable": { - "module": "icephys", - "neurodata_type": "IntracellularRecordingsTable", - "technique": None, - "approach": "electrophysiological approach", - }, - "IntracellularResponsesTable": { - "module": "icephys", - "neurodata_type": "IntracellularResponsesTable", - "technique": None, - "approach": "electrophysiological approach", - }, - "IntracellularStimuliTable": { - "module": "icephys", - "neurodata_type": "IntracellularStimuliTable", - "technique": None, - "approach": "electrophysiological approach", - }, - "PatchClampSeries": { - "module": "icephys", - "neurodata_type": "PatchClampSeries", - "technique": "patch clamp technique", - "approach": "electrophysiological approach", - }, - "SequentialRecordingsTable": { - "module": "icephys", - "neurodata_type": "SequentialRecordingsTable", - "technique": None, - "approach": "electrophysiological approach", - }, - "SimultaneousRecordingsTable": { - "module": "icephys", - "neurodata_type": "SimultaneousRecordingsTable", - "technique": None, - "approach": "electrophysiological approach", - }, - "SweepTable": { - "module": "icephys", - "neurodata_type": "SweepTable", - "technique": None, - "approach": "electrophysiological approach", - }, - "VoltageClampSeries": { - "module": "icephys", - "neurodata_type": "VoltageClampSeries", - "technique": "voltage clamp technique", - "approach": "electrophysiological approach", - }, - "VoltageClampStimulusSeries": { - "module": "icephys", - "neurodata_type": "VoltageClampStimulusSeries", - "technique": "voltage clamp technique", - "approach": "electrophysiological approach", - }, - - # image module - "GrayscaleImage": { - "module": "image", - "neurodata_type": "GrayscaleImage", - "technique": "photographic technique", - "approach": None, - }, - "Image": { - "module": "image", - "neurodata_type": "Image", - "technique": "photographic technique", - "approach": None, - }, - "Images": { - "module": "image", - "neurodata_type": "Images", - "technique": "photographic technique", - "approach": None, - }, - "RGBAImage": { - "module": "image", - "neurodata_type": "RGBAImage", - "technique": "photographic technique", - "approach": None, - }, - "RGBImage": { - "module": "image", - "neurodata_type": "RGBImage", - "technique": "photographic technique", - "approach": None, - }, - - # misc module - "AnnotationSeries": { - "module": "misc", - "neurodata_type": "AnnotationSeries", - "technique": "annotation technique", - "approach": None, - }, - "AssociatedFiles": { - "module": "misc", - "neurodata_type": "AssociatedFiles", - "technique": "file management technique", - "approach": None, - }, - "DandiIcephysMetadata": { - "module": "misc", - "neurodata_type": "DandiIcephysMetadata", - "technique": None, - "approach": "electrophysiological approach", - }, - "DecompositionSeries": { - "module": "misc", - "neurodata_type": "DecompositionSeries", - "technique": "fourier analysis technique", - "approach": None, - }, - "DynamicTable": { - "module": "misc", - "neurodata_type": "DynamicTable", - "technique": None, - "approach": None, - }, - "DynamicTableRegion": { - "module": "misc", - "neurodata_type": "DynamicTableRegion", - "technique": None, - "approach": None, - }, - "ElementIdentifiers": { - "module": "misc", - "neurodata_type": "ElementIdentifiers", - "technique": None, - "approach": None, - }, - "ExperimentalConditionsTable": { - "module": "misc", - "neurodata_type": "ExperimentalConditionsTable", - "technique": None, - "approach": None, - }, - "GeneratedBy": { - "module": "misc", - "neurodata_type": "GeneratedBy", - "technique": None, - "approach": None, - }, - "IblSessionData": { - "module": "misc", - "neurodata_type": "IblSessionData", - "technique": None, - "approach": None, - }, - "ImageMaskSeries": { - "module": "misc", - "neurodata_type": "ImageMaskSeries", - "technique": "image segmentation technique", - "approach": None, - }, - "ImageReferences": { - "module": "misc", - "neurodata_type": "ImageReferences", - "technique": None, - "approach": None, - }, - "IndexSeries": { - "module": "misc", - "neurodata_type": "IndexSeries", - "technique": None, - "approach": None, - }, - "IntervalSeries": { - "module": "misc", - "neurodata_type": "IntervalSeries", - "technique": None, - "approach": None, - }, - "LabMetaData": { - "module": "misc", - "neurodata_type": "LabMetaData", - "technique": None, - "approach": None, - }, - "LabMetaDataMouse": { - "module": "misc", - "neurodata_type": "LabMetaDataMouse", - "technique": None, - "approach": None, - }, - "LabMetaDataSession": { - "module": "misc", - "neurodata_type": "LabMetaDataSession", - "technique": None, - "approach": None, - }, - "LabMetaData_ext": { - "module": "misc", - "neurodata_type": "LabMetaData_ext", - "technique": None, - "approach": None, - }, - "LabNotebook": { - "module": "misc", - "neurodata_type": "LabNotebook", - "technique": None, - "approach": None, - }, - "LabNotebookNumericalKeys": { - "module": "misc", - "neurodata_type": "LabNotebookNumericalKeys", - "technique": None, - "approach": None, - }, - "LabNotebookNumericalValues": { - "module": "misc", - "neurodata_type": "LabNotebookNumericalValues", - "technique": None, - "approach": None, - }, - "LabNotebookTextualKeys": { - "module": "misc", - "neurodata_type": "LabNotebookTextualKeys", - "technique": None, - "approach": None, - }, - "LabNotebookTextualValues": { - "module": "misc", - "neurodata_type": "LabNotebookTextualValues", - "technique": None, - "approach": None, - }, - "NDXICEphysFile": { - "module": "misc", - "neurodata_type": "NDXICEphysFile", - "technique": None, - "approach": None, - }, - "NwbImageSeries": { - "module": "misc", - "neurodata_type": "NwbImageSeries", - "technique": None, - "approach": None, - }, - "OphysMetadata": { - "module": "misc", - "neurodata_type": "OphysMetadata", - "technique": None, - "approach": "microscopy approach", - }, - "OpticalChannelReferences": { - "module": "misc", - "neurodata_type": "OpticalChannelReferences", - "technique": None, - "approach": None, - }, - "RepetitionsTable": { - "module": "misc", - "neurodata_type": "RepetitionsTable", - "technique": None, - "approach": None, - }, - "Results": { - "module": "misc", - "neurodata_type": "Results", - "technique": None, - "approach": None, - }, - "ResultsNumericalKeys": { - "module": "misc", - "neurodata_type": "ResultsNumericalKeys", - "technique": None, - "approach": None, - }, - "ResultsNumericalValues": { - "module": "misc", - "neurodata_type": "ResultsNumericalValues", - "technique": None, - "approach": None, - }, - "ResultsTextualKeys": { - "module": "misc", - "neurodata_type": "ResultsTextualKeys", - "technique": None, - "approach": None, - }, - "ResultsTextualValues": { - "module": "misc", - "neurodata_type": "ResultsTextualValues", - "technique": None, - "approach": None, - }, - "ScratchData": { - "module": "misc", - "neurodata_type": "ScratchData", - "technique": None, - "approach": None, - }, - "SimulationMetaData": { - "module": "misc", - "neurodata_type": "SimulationMetaData", - "technique": None, - "approach": None, - }, - "StimulusSetReferenced": { - "module": "misc", - "neurodata_type": "StimulusSetReferenced", - "technique": None, - "approach": None, - }, - "StimulusSetReferencedFolder": { - "module": "misc", - "neurodata_type": "StimulusSetReferencedFolder", - "technique": None, - "approach": None, - }, - "StimulusSetReferencedWaveform": { - "module": "misc", - "neurodata_type": "StimulusSetReferencedWaveform", - "technique": None, - "approach": None, - }, - "StimulusSetWavebuilderParameter": { - "module": "misc", - "neurodata_type": "StimulusSetWavebuilderParameter", - "technique": None, - "approach": None, - }, - "StimulusSetWavebuilderParameterText": { - "module": "misc", - "neurodata_type": "StimulusSetWavebuilderParameterText", - "technique": None, - "approach": None, - }, - "StimulusSetWavebuilderSegmentTypes": { - "module": "misc", - "neurodata_type": "StimulusSetWavebuilderSegmentTypes", - "technique": None, - "approach": None, - }, - "StimulusSets": { - "module": "misc", - "neurodata_type": "StimulusSets", - "technique": None, - "approach": None, - }, - "Testpulse": { - "module": "misc", - "neurodata_type": "Testpulse", - "technique": None, - "approach": None, - }, - "TestpulseMetadata": { - "module": "misc", - "neurodata_type": "TestpulseMetadata", - "technique": None, - "approach": None, - }, - "TestpulseRawData": { - "module": "misc", - "neurodata_type": "TestpulseRawData", - "technique": None, - "approach": None, - }, - "TimeIntervals": { - "module": "misc", - "neurodata_type": "TimeIntervals", - "technique": None, - "approach": None, - }, - "TimeSeriesReferenceVectorData": { - "module": "misc", - "neurodata_type": "TimeSeriesReferenceVectorData", - "technique": None, - "approach": None, - }, - "TimestampVectorData": { - "module": "misc", - "neurodata_type": "TimestampVectorData", - "technique": None, - "approach": None, - }, - "TtlTypesTable": { - "module": "misc", - "neurodata_type": "TtlTypesTable", - "technique": None, - "approach": "behavioral approach", - }, - "TtlsTable": { - "module": "misc", - "neurodata_type": "TtlsTable", - "technique": None, - "approach": "behavioral approach", - }, - "TurnerLabMetaData": { - "module": "misc", - "neurodata_type": "TurnerLabMetaData", - "technique": None, - "approach": None, - }, - "UserComment": { - "module": "misc", - "neurodata_type": "UserComment", - "technique": None, - "approach": None, - }, - "UserCommentString": { - "module": "misc", - "neurodata_type": "UserCommentString", - "technique": None, - "approach": None, - }, - "VectorData": { - "module": "misc", - "neurodata_type": "VectorData", - "technique": None, - "approach": None, - }, - "VectorIndex": { - "module": "misc", - "neurodata_type": "VectorIndex", - "technique": None, - "approach": None, - }, - "experimentlevel1": { - "module": "misc", - "neurodata_type": "experimentlevel1", - "technique": None, - "approach": None, - }, - "experimentlevel2": { - "module": "misc", - "neurodata_type": "experimentlevel2", - "technique": None, - "approach": None, - }, - "experimentlevel3": { - "module": "misc", - "neurodata_type": "experimentlevel3", - "technique": None, - "approach": None, - }, - "experimentlevel4": { - "module": "misc", - "neurodata_type": "experimentlevel4", - "technique": None, - "approach": None, - }, - "ibl_bwm_metadata": { - "module": "misc", - "neurodata_type": "ibl_bwm_metadata", - "technique": None, - "approach": None, - }, - - # motion module - "PoseEstimation": { - "module": "motion", - "neurodata_type": "PoseEstimation", - "technique": "pose estimation technique", - "approach": "behavioral approach", - }, - "PoseEstimationSeries": { - "module": "motion", - "neurodata_type": "PoseEstimationSeries", - "technique": "pose estimation technique", - "approach": "behavioral approach", - }, - - # nirs module - "NIRSChannelsTable": { - "module": "nirs", - "neurodata_type": "NIRSChannelsTable", - "technique": None, - "approach": "near-infrared spectroscopy", - }, - "NIRSDetectorsTable": { - "module": "nirs", - "neurodata_type": "NIRSDetectorsTable", - "technique": None, - "approach": "near-infrared spectroscopy", - }, - "NIRSSeries": { - "module": "nirs", - "neurodata_type": "NIRSSeries", - "technique": "near-infrared spectroscopy technique", - "approach": "near-infrared spectroscopy", - }, - "NIRSSourcesTable": { - "module": "nirs", - "neurodata_type": "NIRSSourcesTable", - "technique": None, - "approach": "near-infrared spectroscopy", - }, - - # ogen module - "OptogeneticSeries": { - "module": "ogen", - "neurodata_type": "OptogeneticSeries", - "technique": "optogenetic stimulation technique", - "approach": "optogenetic approach", - }, - "OptogeneticStimulusSite": { - "module": "ogen", - "neurodata_type": "OptogeneticStimulusSite", - "technique": None, - "approach": "optogenetic approach", - }, - "OptogeneticStimulusTarget": { - "module": "ogen", - "neurodata_type": "OptogeneticStimulusTarget", - "technique": None, - "approach": "optogenetic approach", - }, - "PatternedOptogeneticStimulusSite": { - "module": "ogen", - "neurodata_type": "PatternedOptogeneticStimulusSite", - "technique": "optogenetic stimulation technique", - "approach": "optogenetic approach", - }, - "PatternedOptogeneticStimulusTable": { - "module": "ogen", - "neurodata_type": "PatternedOptogeneticStimulusTable", - "technique": None, - "approach": "optogenetic approach", - }, - "TemporalFocusing": { - "module": "ogen", - "neurodata_type": "TemporalFocusing", - "technique": "optogenetic stimulation technique", - "approach": "optogenetic approach", - }, - - # ophys module - "BandOpticalFilter": { - "module": "ophys", - "neurodata_type": "BandOpticalFilter", - "technique": "optical filtering technique", - "approach": "microscopy approach", - }, - "CorrectedImageStack": { - "module": "ophys", - "neurodata_type": "CorrectedImageStack", - "technique": "image correction technique", - "approach": "microscopy approach", - }, - "DepthImageSeries": { - "module": "ophys", - "neurodata_type": "DepthImageSeries", - "technique": "depth imaging technique", - "approach": "microscopy approach", - }, - "DfOverF": { - "module": "ophys", - "neurodata_type": "DfOverF", - "technique": "fluorescence imaging technique", - "approach": "calcium imaging; cell population imaging", - }, - "DffSeries": { - "module": "ophys", - "neurodata_type": "DffSeries", - "technique": "fluorescence imaging technique", - "approach": "calcium imaging; cell population imaging", - }, - "DichroicMirror": { - "module": "ophys", - "neurodata_type": "DichroicMirror", - "technique": "optical filtering technique", - "approach": "microscopy approach", - }, - "EXTRACTSegmentation": { - "module": "ophys", - "neurodata_type": "EXTRACTSegmentation", - "technique": "image segmentation technique", - "approach": "microscopy approach; cell population imaging", - }, - "ExcitationSource": { - "module": "ophys", - "neurodata_type": "ExcitationSource", - "technique": None, - "approach": "microscopy approach", - }, - "ExcitationSourcesTable": { - "module": "ophys", - "neurodata_type": "ExcitationSourcesTable", - "technique": None, - "approach": "microscopy approach", - }, - "Fluorescence": { - "module": "ophys", - "neurodata_type": "Fluorescence", - "technique": "fluorescence imaging technique", - "approach": "calcium imaging; cell population imaging", - }, - "FluorophoresTable": { - "module": "ophys", - "neurodata_type": "FluorophoresTable", - "technique": None, - "approach": "microscopy approach", - }, - "ImageSegmentation": { - "module": "ophys", - "neurodata_type": "ImageSegmentation", - "technique": "image segmentation technique", - "approach": "microscopy approach; cell population imaging", - }, - "ImagingPlane": { - "module": "ophys", - "neurodata_type": "ImagingPlane", - "technique": None, - "approach": "microscopy approach; cell population imaging", - }, - "ImagingVolume": { - "module": "ophys", - "neurodata_type": "ImagingVolume", - "technique": "volumetric imaging technique", - "approach": "microscopy approach; cell population imaging", - }, - "Indicator": { - "module": "ophys", - "neurodata_type": "Indicator", - "technique": None, - "approach": "microscopy approach", - }, - "LightSource": { - "module": "ophys", - "neurodata_type": "LightSource", - "technique": None, - "approach": "microscopy approach", - }, - "MicroscopyLightSource": { - "module": "ophys", - "neurodata_type": "MicroscopyLightSource", - "technique": None, - "approach": "microscopy approach", - }, - "MicroscopyOpticalChannel": { - "module": "ophys", - "neurodata_type": "MicroscopyOpticalChannel", - "technique": None, - "approach": "microscopy approach", - }, - "MicroscopyPlaneSegmentation": { - "module": "ophys", - "neurodata_type": "MicroscopyPlaneSegmentation", - "technique": "image segmentation technique", - "approach": "microscopy approach; cell population imaging", - }, - "MicroscopyResponseSeries": { - "module": "ophys", - "neurodata_type": "MicroscopyResponseSeries", - "technique": "optical imaging technique", - "approach": "microscopy approach", - }, - "MicroscopyResponseSeriesContainer": { - "module": "ophys", - "neurodata_type": "MicroscopyResponseSeriesContainer", - "technique": None, - "approach": "microscopy approach", - }, - "MicroscopySegmentations": { - "module": "ophys", - "neurodata_type": "MicroscopySegmentations", - "technique": "image segmentation technique", - "approach": "microscopy approach; cell population imaging", - }, - "MotionCorrection": { - "module": "ophys", - "neurodata_type": "MotionCorrection", - "technique": "image correction technique", - "approach": "microscopy approach", - }, - "MultiChannelVolume": { - "module": "ophys", - "neurodata_type": "MultiChannelVolume", - "technique": "volumetric imaging technique", - "approach": "microscopy approach", - }, - "MultiChannelVolumeSeries": { - "module": "ophys", - "neurodata_type": "MultiChannelVolumeSeries", - "technique": "volumetric imaging technique", - "approach": "microscopy approach", - }, - "OnePhotonSeries": { - "module": "ophys", - "neurodata_type": "OnePhotonSeries", - "technique": "one-photon microscopy technique", - "approach": "microscopy approach; cell population imaging", - }, - "OphysEventDetection": { - "module": "ophys", - "neurodata_type": "OphysEventDetection", - "technique": "event detection technique", - "approach": "microscopy approach; cell population imaging", - }, - "OpticalChannel": { - "module": "ophys", - "neurodata_type": "OpticalChannel", - "technique": None, - "approach": "microscopy approach; cell population imaging", - }, - "OpticalChannelPlus": { - "module": "ophys", - "neurodata_type": "OpticalChannelPlus", - "technique": None, - "approach": "microscopy approach", - }, - "OpticalSeries": { - "module": "ophys", - "neurodata_type": "OpticalSeries", - "technique": "optical imaging technique", - "approach": "microscopy approach", - }, - "PlanarImagingSpace": { - "module": "ophys", - "neurodata_type": "PlanarImagingSpace", - "technique": None, - "approach": "microscopy approach", - }, - "PlaneSegmentation": { - "module": "ophys", - "neurodata_type": "PlaneSegmentation", - "technique": None, - "approach": "microscopy approach; cell population imaging", - }, - "RoiResponseSeries": { - "module": "ophys", - "neurodata_type": "RoiResponseSeries", - "technique": "fluorescence imaging technique", - "approach": "calcium imaging; cell population imaging", - }, - "SegmentationLabels": { - "module": "ophys", - "neurodata_type": "SegmentationLabels", - "technique": None, - "approach": "microscopy approach; cell population imaging", - }, - "TwoPhotonSeries": { - "module": "ophys", - "neurodata_type": "TwoPhotonSeries", - "technique": "two-photon microscopy technique", - "approach": "microscopy approach; cell population imaging", - }, - "VariableDepthMicroscopySeries": { - "module": "ophys", - "neurodata_type": "VariableDepthMicroscopySeries", - "technique": "volumetric imaging technique", - "approach": "microscopy approach", - }, - "VariableDepthMultiChannelMicroscopyVolume": { - "module": "ophys", - "neurodata_type": "VariableDepthMultiChannelMicroscopyVolume", - "technique": "volumetric imaging technique", - "approach": "microscopy approach", - }, - "VolumetricImagingSpace": { - "module": "ophys", - "neurodata_type": "VolumetricImagingSpace", - "technique": None, - "approach": "microscopy approach", - }, - - # sortedunits module - "Units": { - "module": "sortedunits", - "neurodata_type": "Units", - "technique": "spike sorting technique", - "approach": "electrophysiological approach", - }, - - # spectrum module - "Spectrum": { - "module": "spectrum", - "neurodata_type": "Spectrum", - "technique": "fourier analysis technique", - "approach": None, - }, - - # subject module - "CElegansSubject": { - "module": "subject", - "neurodata_type": "CElegansSubject", - "technique": None, - "approach": None, - }, - "CreSubject": { - "module": "subject", - "neurodata_type": "CreSubject", - "technique": None, - "approach": None, - }, - "EcephysSpecimen": { - "module": "subject", - "neurodata_type": "EcephysSpecimen", - "technique": None, - "approach": "electrophysiological approach", - }, - "IblSubject": { - "module": "subject", - "neurodata_type": "IblSubject", - "technique": None, - "approach": None, - }, - "Subject": { - "module": "subject", - "neurodata_type": "Subject", - "technique": None, - "approach": None, - }, -} diff --git a/dandi/metadata/util.py b/dandi/metadata/util.py index 978e09831..ab020fc59 100644 --- a/dandi/metadata/util.py +++ b/dandi/metadata/util.py @@ -993,12 +993,74 @@ class Neurodatum(TypedDict): "technique": "pose estimation training technique", "approach": "behavioral approach", }, + # from both the deprecated ndx-photometry and the new ndx-fiber-photometry "FiberPhotometryResponseSeries": { "module": "fiberphotometry", - # this can come from both the old ndx-photometry and the new ndx-fiber-photometry "neurodata_type": "FiberPhotometryResponseSeries", - "technique": "fiber photometry technique; optical technique", - "approach": "calcium imaging; cell population imaging", + "technique": "fiber photometry technique", + "approach": "fiber photometry approach", + }, + # from the deprecated ndx-photometry + "FibersTable": { + "module": "fiberphotometry", + "neurodata_type": "FibersTable", + "technique": None, + "approach": "fiber photometry approach", + }, + "ExcitationSourcesTable": { + "module": "fiberphotometry", + "neurodata_type": "ExcitationSourcesTable", + "technique": None, + "approach": "fiber photometry approach", + }, + "PhotodetectorsTable": { + "module": "fiberphotometry", + "neurodata_type": "PhotodetectorsTable", + "technique": None, + "approach": "fiber photometry approach", + }, + "FluorophoresTable": { + "module": "fiberphotometry", + "neurodata_type": "FluorophoresTable", + "technique": None, + "approach": "fiber photometry approach", + }, + # from ndx-fiber-photometry + "FiberPhotometry": { + "module": "fiberphotometry", + "neurodata_type": "FiberPhotometry", + "technique": None, + "approach": "fiber photometry approach", + }, + "FiberPhotometryTable": { + "module": "fiberphotometry", + "neurodata_type": "FiberPhotometryTable", + "technique": None, + "approach": "fiber photometry approach", + }, + "OpticalFiber": { + "module": "fiberphotometry", + "neurodata_type": "OpticalFiber", + "technique": None, + "approach": "fiber photometry approach", + }, + "ExcitationSource": { + "module": "fiberphotometry", + "neurodata_type": "ExcitationSource", + "technique": None, + "approach": "fiber photometry approach", + }, + "Photodetector": { + "module": "fiberphotometry", + "neurodata_type": "Photodetector", + "technique": None, + "approach": "fiber photometry approach", + }, + "Indicator": { + "module": "fiberphotometry", + "neurodata_type": "Indicator", + "technique": None, + "approach": "fiber photometry approach", }, } diff --git a/dandi/tests/test_metadata.py b/dandi/tests/test_metadata.py index 539b9b5ac..67948d377 100644 --- a/dandi/tests/test_metadata.py +++ b/dandi/tests/test_metadata.py @@ -1257,11 +1257,21 @@ def test_species_record_matching_methods() -> None: ( ["FiberPhotometryResponseSeries"], { - "approach": ["calcium imaging; cell population imaging"], - "measurementTechnique": ["fiber photometry technique; optical technique"], + "approach": ["fiber photometry approach"], + "measurementTechnique": ["fiber photometry technique"], "variableMeasured": ["FiberPhotometryResponseSeries"], }, ), + pytest.param( + # ndx-photometry metadata tables alone should mark the asset + ["FibersTable"], + { + "approach": ["fiber photometry approach"], + "measurementTechnique": None, + "variableMeasured": ["FibersTable"], + }, + marks=pytest.mark.ai_generated, + ), ( # the tricky case of having number of instances of the data type # https://github.com/dandi/dandi-cli/issues/890