Skip to content

Commit

Permalink
Merge branch 'swap_to_um' into add_roi_response_series
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD authored Jul 18, 2024
2 parents 1e372e9 + bb24934 commit 6f7e49d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/pynwb/ndx_microscopy/testing/_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -233,10 +233,10 @@ 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:
Expand Down Expand Up @@ -265,7 +265,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,
Expand Down Expand Up @@ -371,7 +371,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,
Expand All @@ -380,9 +380,9 @@ def mock_VariableDepthMultiChannelMicroscopyVolume(

series_data = data if data is not None else np.ones(shape=(15, 5, 5))
volume_depth_per_frame_in_um = (
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
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))
Expand Down

0 comments on commit 6f7e49d

Please sign in to comment.