diff --git a/spec/ndx-microscopy.extensions.yaml b/spec/ndx-microscopy.extensions.yaml index 5f87b77..b0fcf96 100644 --- a/spec/ndx-microscopy.extensions.yaml +++ b/spec/ndx-microscopy.extensions.yaml @@ -107,7 +107,7 @@ groups: - null doc: Link to the objective lens device. quantity: "?" - + - neurodata_type_def: Microscopy neurodata_type_inc: LabMetaData doc: Extends LabMetaData to hold all Microscopy metadata. diff --git a/src/pynwb/ndx_microscopy/__init__.py b/src/pynwb/ndx_microscopy/__init__.py index abe2175..522a268 100644 --- a/src/pynwb/ndx_microscopy/__init__.py +++ b/src/pynwb/ndx_microscopy/__init__.py @@ -21,15 +21,16 @@ load_namespaces(str(__spec_path)) from ndx_ophys_devices import ( - Indicator, - ExcitationSource, - Photodetector, - DichroicMirror, BandOpticalFilter, + DichroicMirror, EdgeOpticalFilter, - ObjectiveLens, + ExcitationSource, + Indicator, Microscope, + ObjectiveLens, + Photodetector, ) + Microscopy = get_class("Microscopy", extension_name) MicroscopyTable = get_class("MicroscopyTable", extension_name) ImagingSpace = get_class("ImagingSpace", extension_name) diff --git a/src/pynwb/ndx_microscopy/testing/_mock.py b/src/pynwb/ndx_microscopy/testing/_mock.py index fd24185..84848cd 100644 --- a/src/pynwb/ndx_microscopy/testing/_mock.py +++ b/src/pynwb/ndx_microscopy/testing/_mock.py @@ -107,7 +107,7 @@ def mock_PlanarMicroscopySeries( planar_microscopy_series = ndx_microscopy.PlanarMicroscopySeries( name=series_name, description=description, - microscopy_table_region = microscopy_table_region, + microscopy_table_region=microscopy_table_region, data=series_data, unit=unit, conversion=conversion, @@ -163,7 +163,7 @@ def mock_VariableDepthMicroscopySeries( variable_depth_microscopy_series = ndx_microscopy.VariableDepthMicroscopySeries( name=series_name, description=description, - microscopy_table_region = microscopy_table_region, + microscopy_table_region=microscopy_table_region, data=series_data, depth_per_frame_in_mm=series_depth_per_frame_in_mm, unit=unit, @@ -213,7 +213,7 @@ def mock_VolumetricMicroscopySeries( volumetric_microscopy_series = ndx_microscopy.VolumetricMicroscopySeries( name=series_name, description=description, - microscopy_table_region = microscopy_table_region, + microscopy_table_region=microscopy_table_region, data=series_data, unit=unit, conversion=conversion, diff --git a/src/pynwb/tests/test_constructors.py b/src/pynwb/tests/test_constructors.py index 4356417..9d78539 100644 --- a/src/pynwb/tests/test_constructors.py +++ b/src/pynwb/tests/test_constructors.py @@ -1,16 +1,15 @@ """Test in-memory Python API constructors for ndx-microscopy extension.""" import pytest - from ndx_ophys_devices.testing import ( - mock_Indicator, - mock_Photodetector, - mock_DichroicMirror, mock_BandOpticalFilter, + mock_DichroicMirror, mock_EdgeOpticalFilter, - mock_ObjectiveLens, mock_ExcitationSource, + mock_Indicator, mock_Microscope, + mock_ObjectiveLens, + mock_Photodetector, ) from ndx_microscopy.testing import ( @@ -22,6 +21,8 @@ mock_VolumetricImagingSpace, mock_VolumetricMicroscopySeries, ) + + def test_constructor_microscopy(): mock_Microscopy() @@ -46,7 +47,7 @@ def test_constructor_planar_microscopy_series(): def test_constructor_variable_depth_microscopy_series(): imaging_space = mock_PlanarImagingSpace() - mock_VariableDepthMicroscopySeries(imaging_space=imaging_space ) + mock_VariableDepthMicroscopySeries(imaging_space=imaging_space) def test_constructor_volumetric_microscopy_series(): diff --git a/src/pynwb/tests/test_ndx_microscopy.py b/src/pynwb/tests/test_ndx_microscopy.py index a60854e..c056f09 100644 --- a/src/pynwb/tests/test_ndx_microscopy.py +++ b/src/pynwb/tests/test_ndx_microscopy.py @@ -44,9 +44,7 @@ def test_constructor_planar_microscopy_series(): light_source = mock_ExcitationSource() imaging_space = mock_PlanarImagingSpace(microscope=microscope) - mock_PlanarMicroscopySeries( - microscope=microscope, light_source=light_source, imaging_space=imaging_space - ) + mock_PlanarMicroscopySeries(microscope=microscope, light_source=light_source, imaging_space=imaging_space) def test_constructor_variable_depth_microscopy_series(): @@ -54,9 +52,7 @@ def test_constructor_variable_depth_microscopy_series(): light_source = mock_ExcitationSource() imaging_space = mock_PlanarImagingSpace(microscope=microscope) - mock_VariableDepthMicroscopySeries( - microscope=microscope, light_source=light_source, imaging_space=imaging_space - ) + mock_VariableDepthMicroscopySeries(microscope=microscope, light_source=light_source, imaging_space=imaging_space) def test_constructor_volumetric_microscopy_series(): @@ -64,9 +60,7 @@ def test_constructor_volumetric_microscopy_series(): light_source = mock_ExcitationSource() imaging_space = mock_PlanarImagingSpace(microscope=microscope) - mock_VolumetricMicroscopySeries( - microscope=microscope, light_source=light_source, imaging_space=imaging_space - ) + mock_VolumetricMicroscopySeries(microscope=microscope, light_source=light_source, imaging_space=imaging_space) @pytest.fixture(scope="module") @@ -77,9 +71,7 @@ def nwbfile_with_microscopy(): light_source = mock_ExcitationSource() imaging_space = mock_PlanarImagingSpace(microscope=microscope) - mock_PlanarMicroscopySeries( - microscope=microscope, light_source=light_source, imaging_space=imaging_space - ) + mock_PlanarMicroscopySeries(microscope=microscope, light_source=light_source, imaging_space=imaging_space) return nwbfile