diff --git a/README.md b/README.md index 347baaf..148426c 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,7 @@ classDiagram -------------------------------------- data : numeric, frame x height x width --> unit : text - depth_per_frame : numeric, length of frames - -- > unit : text, default="micrometers" + depth_per_frame_in_um : numeric, length of frames -------------------------------------- links diff --git a/spec/ndx-microscopy.extensions.yaml b/spec/ndx-microscopy.extensions.yaml index 2fc474b..118a9da 100644 --- a/spec/ndx-microscopy.extensions.yaml +++ b/spec/ndx-microscopy.extensions.yaml @@ -308,8 +308,8 @@ groups: doc: Volumetric imaging data acquired over an irregular number and amount of depths; for instance, when using an electrically tunable lens. datasets: - - name: depth_per_frame_in_mm - doc: Depth of each frame in the data array. + - name: depth_per_frame_in_um + doc: Depth in micrometers of each frame in the data array. These values offset the 'z' value of the `origin_coordinates` of the linked `imaging_space` object. dtype: numeric dims: @@ -471,9 +471,8 @@ groups: - null - null - null - - name: depth_per_frame_in_mm - doc: Depth of each frame in the data array. - These values offset the 'z' value of the `origin_coordinates` of the linked `imaging_space` object. + - name: depth_per_frame_in_um + doc: Depth in micrometers of each frame in the data array. dtype: numeric dims: - depths diff --git a/src/pynwb/ndx_microscopy/testing/_mock.py b/src/pynwb/ndx_microscopy/testing/_mock.py index 482e308..862889d 100644 --- a/src/pynwb/ndx_microscopy/testing/_mock.py +++ b/src/pynwb/ndx_microscopy/testing/_mock.py @@ -223,7 +223,7 @@ def mock_VariableDepthMicroscopySeries( name: Optional[str] = None, description: str = "This is a mock instance of a PlanarMicroscopySeries type to be used for rapid testing.", data: Optional[np.ndarray] = None, - depth_per_frame_in_mm: Optional[np.ndarray] = None, + depth_per_frame_in_um: Optional[np.ndarray] = None, unit: str = "a.u.", conversion: float = 1.0, offset: float = 0.0, @@ -233,10 +233,11 @@ def mock_VariableDepthMicroscopySeries( ) -> ndx_microscopy.VariableDepthMicroscopySeries: series_name = name or name_generator("VariableDepthMicroscopySeries") series_data = data if data is not None else np.ones(shape=(15, 5, 5)) - series_depth_per_frame_in_mm = ( - depth_per_frame_in_mm - if depth_per_frame_in_mm is not None - else np.linspace(start=0.0, stop=1.0, num=series_data.shape[0]) + + depth_per_frame_in_um = ( + depth_per_frame_in_um + if depth_per_frame_in_um is not None + else np.linspace(start=0.0, stop=30.0, num=series_data.shape[0]) ) if timestamps is None: @@ -265,7 +266,7 @@ def mock_VariableDepthMicroscopySeries( imaging_space=imaging_space, optical_channel=optical_channel, data=series_data, - depth_per_frame_in_mm=series_depth_per_frame_in_mm, + depth_per_frame_in_um=depth_per_frame_in_um, unit=unit, conversion=conversion, offset=offset, @@ -371,7 +372,7 @@ def mock_VariableDepthMultiChannelMicroscopyVolume( name: Optional[str] = None, description: str = "This is a mock instance of a MultiChannelMicroscopyVolume type to be used for rapid testing.", data: Optional[np.ndarray] = None, - depth_per_frame_in_mm: Optional[np.ndarray] = None, + depth_per_frame_in_um: Optional[np.ndarray] = None, unit: str = "n.a.", conversion: float = 1.0, offset: float = 0.0, @@ -379,10 +380,11 @@ def mock_VariableDepthMultiChannelMicroscopyVolume( series_name = name or name_generator("MultiChannelMicroscopyVolume") series_data = data if data is not None else np.ones(shape=(15, 5, 5)) - volume_depth_per_frame_in_mm = ( - depth_per_frame_in_mm - if depth_per_frame_in_mm is not None - else np.linspace(start=0.0, stop=1.0, num=series_data.shape[0]) + + volume_depth_per_frame_in_um = ( + depth_per_frame_in_um + if depth_per_frame_in_um is not None + else np.linspace(start=0.0, stop=30.0, num=series_data.shape[0]) ) imaging_data = data if data is not None else np.ones(shape=(10, 20, 7, 3)) @@ -394,7 +396,7 @@ def mock_VariableDepthMultiChannelMicroscopyVolume( light_sources=light_sources, optical_channels=optical_channels, data=imaging_data, - depth_per_frame_in_mm=volume_depth_per_frame_in_mm, + depth_per_frame_in_um=volume_depth_per_frame_in_um, unit=unit, conversion=conversion, offset=offset,