diff --git a/README.md b/README.md index 7ca1276..1520848 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ classDiagram label : text description : text, optional manufacturer : text, optional - injection_location : text, optional + injection_brain_region : text, optional injection_coordinates_in_mm : numeric, length 3, optional } class Effector{ @@ -41,7 +41,7 @@ classDiagram label : text description : text, optional manufacturer : text, optional - injection_location : text, optional + injection_brain_region : text, optional injection_coordinates_in_mm : numeric, length 3, optional } ``` @@ -139,6 +139,7 @@ classDiagram detector_type : text, optional detected_wavelength_in_nm : numeric, optional gain : numeric, optional + gain_unit : text, false } class ObjectiveLens{ <> @@ -148,18 +149,10 @@ classDiagram numerical_aperture : numeric, optional magnification : numeric, optional } - class Microscope{ - <> - -------------------------------------- - attributes - -------------------------------------- - microscopy_type : text, optional - doi : text, optional - } + ExcitationSource *-- DeviceModel : extends PulsedExcitationSource *-- ExcitationSource : extends Photodetector *-- DeviceModel : extends - Microscope *-- DeviceModel : extends ObjectiveLens *-- DeviceModel : extends OpticalFilter *-- DeviceModel : extends BandOpticalFilter *-- OpticalFilter : extends diff --git a/spec/ndx-ophys-devices.extensions.yaml b/spec/ndx-ophys-devices.extensions.yaml index cb185ba..31ad50c 100644 --- a/spec/ndx-ophys-devices.extensions.yaml +++ b/spec/ndx-ophys-devices.extensions.yaml @@ -16,13 +16,13 @@ groups: doc: Indicator standard notation. - name: description dtype: text - doc: Effector description. + doc: Indicator description. required: false - name: manufacturer dtype: text - doc: Effector manufacturer. + doc: Indicator manufacturer. required: false - - name: injection_location + - name: injection_brain_region dtype: text doc: Injection brain region name. required: false @@ -101,6 +101,11 @@ groups: - name: gain dtype: float doc: Gain on the photodetector. + required: false + - name: gain_unit + dtype: text + doc: Gain on the photodetector. + required: false - neurodata_type_def: DichroicMirror neurodata_type_inc: DeviceModel doc: Extends DeviceModel to hold a Dichroic Mirror. @@ -202,7 +207,7 @@ groups: dtype: text doc: Effector manufacturer. required: false - - name: injection_location + - name: injection_brain_region dtype: text doc: Injection brain region name. required: false @@ -211,19 +216,7 @@ groups: shape: - 3 doc: - Indicator injection location in stereotactic coordinates (AP, ML, DV) mm + Effector injection location in stereotactic coordinates (AP, ML, DV) mm relative to Bregma. required: false - - neurodata_type_def: Microscope - neurodata_type_inc: DeviceModel - doc: Extends DeviceModel to hold a Microscope. - attributes: - - name: microscopy_type - dtype: text - doc: - Type of microscope used to capture the image (e.g., inverted, upright, light - sheet, confocal, two photon). - - name: doi - dtype: text - doc: The publication link for custom-built microscope. - required: false + diff --git a/src/pynwb/ndx_ophys_devices/testing/__init__.py b/src/pynwb/ndx_ophys_devices/testing/__init__.py index 55cac0c..64da8df 100644 --- a/src/pynwb/ndx_ophys_devices/testing/__init__.py +++ b/src/pynwb/ndx_ophys_devices/testing/__init__.py @@ -11,7 +11,6 @@ mock_ObjectiveLens, mock_ExcitationSource, mock_PulsedExcitationSource, - mock_Microscope, ) __all__ = [ @@ -27,5 +26,4 @@ "mock_ObjectiveLens", "mock_ExcitationSource", "mock_PulsedExcitationSource", - "mock_Microscope", ] diff --git a/src/pynwb/ndx_ophys_devices/testing/_mock.py b/src/pynwb/ndx_ophys_devices/testing/_mock.py index 14af526..6ff3f09 100644 --- a/src/pynwb/ndx_ophys_devices/testing/_mock.py +++ b/src/pynwb/ndx_ophys_devices/testing/_mock.py @@ -27,7 +27,7 @@ def mock_Indicator( description: str = "This is a mock instance of a Indicator type to be used for rapid testing.", manufacturer: str = "A fake manufacturer of the mock indicator.", label: str = "A fake label of the indicator.", - injection_location: str = "A fake injection location of the indicator.", + injection_brain_region: str = "A fake injection brain region of the indicator.", injection_coordinates_in_mm: list = [3.0, 2.0, 1.0], ) -> ndx_ophys_devices.Indicator: indicator = ndx_ophys_devices.Indicator( @@ -35,7 +35,7 @@ def mock_Indicator( description=description, manufacturer=manufacturer, label=label, - injection_location=injection_location, + injection_brain_region=injection_brain_region, injection_coordinates_in_mm=injection_coordinates_in_mm, ) return indicator @@ -47,7 +47,7 @@ def mock_Effector( description: str = "This is a mock instance of a Effector type to be used for rapid testing.", manufacturer: str = "A fake manufacturer of the mock effector.", label: str = "A fake label of the effector.", - injection_location: str = "A fake injection location of the effector.", + injection_brain_region: str = "A fake injection brain region of the effector.", injection_coordinates_in_mm: list = [3.0, 2.0, 1.0], ) -> ndx_ophys_devices.Effector: effector = ndx_ophys_devices.Effector( @@ -55,7 +55,7 @@ def mock_Effector( description=description, manufacturer=manufacturer, label=label, - injection_location=injection_location, + injection_brain_region=injection_brain_region, injection_coordinates_in_mm=injection_coordinates_in_mm, ) return effector @@ -90,6 +90,7 @@ def mock_Photodetector( detector_type: str = "PMT", detected_wavelength_in_nm: float = 520.0, gain: float = 100.0, + gain_unit: str = "A/W", ) -> ndx_ophys_devices.Photodetector: photodetector = ndx_ophys_devices.Photodetector( name=name or name_generator("Photodetector"), @@ -99,6 +100,7 @@ def mock_Photodetector( detector_type=detector_type, detected_wavelength_in_nm=detected_wavelength_in_nm, gain=gain, + gain_unit=gain_unit, ) return photodetector @@ -215,24 +217,6 @@ def mock_ObjectiveLens( return objective_lens -def mock_Microscope( - *, - name: Optional[str] = None, - description: str = "This is a mock instance of a Microscope type to be used for rapid testing.", - manufacturer: str = "A fake manufacturer of the mock microscope.", - model: str = "A fake model of the mock microscope.", - microscopy_type: str = "Two photon.", -) -> ndx_ophys_devices.Microscope: - microscope = ndx_ophys_devices.Microscope( - name=name or name_generator("Microscope"), - description=description, - manufacturer=manufacturer, - model=model, - microscopy_type=microscopy_type, - ) - return microscope - - def mock_ExcitationSource( *, name: Optional[str] = None, diff --git a/src/pynwb/tests/test_constructors.py b/src/pynwb/tests/test_constructors.py index b163648..b1d452b 100644 --- a/src/pynwb/tests/test_constructors.py +++ b/src/pynwb/tests/test_constructors.py @@ -15,7 +15,6 @@ mock_ObjectiveLens, mock_ExcitationSource, mock_PulsedExcitationSource, - mock_Microscope, ) @@ -59,10 +58,6 @@ def test_constructor_objective_lens(): mock_ObjectiveLens() -def test_constructor_microscope(): - mock_Microscope() - - def test_constructor_excitation_source(): mock_ExcitationSource() diff --git a/src/pynwb/tests/test_ophysdevices.py b/src/pynwb/tests/test_ophysdevices.py index e78ff63..53ebfb1 100644 --- a/src/pynwb/tests/test_ophysdevices.py +++ b/src/pynwb/tests/test_ophysdevices.py @@ -15,7 +15,6 @@ mock_ObjectiveLens, mock_ExcitationSource, mock_PulsedExcitationSource, - mock_Microscope, ) @@ -59,10 +58,6 @@ def test_constructor_objective_lens(): mock_ObjectiveLens() -def test_constructor_microscope(): - mock_Microscope() - - def test_constructor_excitation_source(): mock_ExcitationSource() @@ -72,7 +67,7 @@ def test_constructor_pulsed_excitation_source(): @pytest.fixture(scope="module") -def nwbfile_with_microscopy(): +def nwbfile_with_ophys_devices(): nwbfile = mock_NWBFile() mock_DeviceModel() @@ -87,7 +82,6 @@ def nwbfile_with_microscopy(): mock_EdgeOpticalFilter() mock_Effector() mock_ObjectiveLens() - mock_Microscope() return nwbfile