Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandratrapani committed Dec 19, 2024
1 parent 8b90262 commit cd590bf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
10 changes: 8 additions & 2 deletions spec/ndx-microscopy.extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ groups:
required: false

- neurodata_type_def: ExcitationLightPath
neurodata_type_inc: NWBContainer
neurodata_type_inc: LabMetaData
doc: Excitation light path that illuminates an imaging space.
attributes:
- name: excitation_wavelength_in_nm
dtype: numeric
doc: Excitation wavelength of light, in nanometers.
- name: description
dtype: text
doc: Description of the excitation light path.
links:
- name: excitation_source
target_type: ExcitationSource
Expand All @@ -27,12 +30,15 @@ groups:
required: false

- neurodata_type_def: EmissionLightPath
neurodata_type_inc: NWBContainer
neurodata_type_inc: LabMetaData
doc: Emission light path from an imaging space.
attributes:
- name: emission_wavelength_in_nm
dtype: numeric
doc: Emission wavelength of light, in nanometers.
- name: description
dtype: text
doc: Description of the emission light path.
links:
- name: photodetector
target_type: Photodetector
Expand Down
14 changes: 7 additions & 7 deletions src/pynwb/tests/test_roundtrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_roundtrip(self):
excitation_light_path = mock_ExcitationLightPath(name="ExcitationLightPath")
nwbfile.add_lab_meta_data(lab_meta_data=excitation_light_path)

imaging_space = mock_PlanarImagingSpace(name="PlanarImagingSpace", microscope=microscope)
imaging_space = mock_PlanarImagingSpace(name="PlanarImagingSpace")
nwbfile.add_lab_meta_data(lab_meta_data=imaging_space) # Would prefer .add_imaging_spacec()

emission_light_path = mock_EmissionLightPath(name="EmissionLightPath")
Expand Down Expand Up @@ -87,7 +87,7 @@ def test_roundtrip(self):
excitation_light_path = mock_ExcitationLightPath(name="ExcitationLightPath")
nwbfile.add_lab_meta_data(lab_meta_data=excitation_light_path)

imaging_space = mock_VolumetricImagingSpace(name="VolumetricImagingSpace", microscope=microscope)
imaging_space = mock_VolumetricImagingSpace(name="VolumetricImagingSpace")
nwbfile.add_lab_meta_data(lab_meta_data=imaging_space) # Would prefer .add_imaging_spacec()

emission_light_path = mock_EmissionLightPath(name="EmissionLightPath")
Expand Down Expand Up @@ -137,7 +137,7 @@ def test_roundtrip(self):
excitation_light_path = mock_ExcitationLightPath(name="ExcitationLightPath")
nwbfile.add_lab_meta_data(lab_meta_data=excitation_light_path)

imaging_space = mock_PlanarImagingSpace(name="PlanarImagingSpace", microscope=microscope)
imaging_space = mock_PlanarImagingSpace(name="PlanarImagingSpace")
nwbfile.add_lab_meta_data(lab_meta_data=imaging_space) # Would prefer .add_imaging_space()

emission_light_path = mock_EmissionLightPath(name="EmissionLightPath")
Expand Down Expand Up @@ -184,7 +184,7 @@ def test_roundtrip(self):
microscope = mock_Microscope(name="Microscope")
nwbfile.add_device(devices=microscope)

imaging_space = mock_VolumetricImagingSpace(name="VolumetricImagingSpace", microscope=microscope)
imaging_space = mock_VolumetricImagingSpace(name="VolumetricImagingSpace")
nwbfile.add_lab_meta_data(lab_meta_data=imaging_space) # Would prefer .add_imaging_space()

excitation_light_paths = list()
Expand All @@ -198,7 +198,7 @@ def test_roundtrip(self):
emission_light_paths.append(emission_light_path_0)

# TODO: It might be more convenient in Python to have a custom constructor that takes in a list of
# light sources and optical channels and does the VectorData wrapping internally
# excitation light paths and emission light paths and does the VectorData wrapping internally
excitation_light_paths_used_by_volume = pynwb.base.VectorData(
name="excitation_light_paths",
description="Light sources used by this MultiChannelVolume.",
Expand Down Expand Up @@ -253,7 +253,7 @@ def test_roundtrip(self):
microscope = mock_Microscope(name="Microscope")
nwbfile.add_device(devices=microscope)

imaging_space = mock_PlanarImagingSpace(name="PlanarImagingSpace", microscope=microscope)
imaging_space = mock_PlanarImagingSpace(name="PlanarImagingSpace")
nwbfile.add_lab_meta_data(lab_meta_data=imaging_space) # Would prefer .add_imaging_space()

plane_segmentation_1 = mock_MicroscopyPlaneSegmentation(
Expand Down Expand Up @@ -298,7 +298,7 @@ def test_roundtrip(self):
microscope = mock_Microscope(name="Microscope")
nwbfile.add_device(devices=microscope)

imaging_space = mock_PlanarImagingSpace(name="PlanarImagingSpace", microscope=microscope)
imaging_space = mock_PlanarImagingSpace(name="PlanarImagingSpace")
nwbfile.add_lab_meta_data(lab_meta_data=imaging_space) # Would prefer .add_imaging_space()

microscopy_plane_segmentations = mock_MicroscopyPlaneSegmentation(
Expand Down

0 comments on commit cd590bf

Please sign in to comment.