Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement III] Swap to um for depth #18

Merged
merged 54 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
97bfa20
add multichannel volume
CodyCBakerPhD Jun 24, 2024
91db41b
swap to datainterface
CodyCBakerPhD Jun 24, 2024
200eb9b
fix import
CodyCBakerPhD Jun 24, 2024
b84aa0b
fix test name
CodyCBakerPhD Jun 24, 2024
c27778f
Merge branch 'avoid_name_collision' into both_prs_together
CodyCBakerPhD Jun 26, 2024
c8b5dfd
fix intercompatability
CodyCBakerPhD Jun 26, 2024
ad6b5e7
fix light sources
CodyCBakerPhD Jun 26, 2024
8b69db4
fix
CodyCBakerPhD Jun 26, 2024
00d2270
add plane segmentation stuff
CodyCBakerPhD Jun 26, 2024
c6b529c
fix autogenerated arg
CodyCBakerPhD Jun 26, 2024
22836ed
variable depth volume
CodyCBakerPhD Jun 26, 2024
9ad9f4b
swap to um
CodyCBakerPhD Jun 26, 2024
13be731
Merge branch 'main' into add_multichannel_volume
CodyCBakerPhD Jun 27, 2024
da5a1b2
Merge branch 'add_multichannel_volume' into both_prs_together
CodyCBakerPhD Jun 27, 2024
f9c93a2
Merge pull request #16 from catalystneuro/both_prs_together
CodyCBakerPhD Jun 27, 2024
a00fa42
Merge branch 'add_multichannel_volume' into all_previous_prs_and_vari…
CodyCBakerPhD Jun 27, 2024
7b1d5f2
Merge branch 'all_previous_prs_and_variable_depth_static' into swap_t…
CodyCBakerPhD Jun 27, 2024
0423071
ryans suggestion
CodyCBakerPhD Jul 11, 2024
dd9ecb5
adjust to use full list
CodyCBakerPhD Jul 11, 2024
dbdad41
adjust constructor test
CodyCBakerPhD Jul 11, 2024
963e894
reorder kwargs in mock
CodyCBakerPhD Jul 11, 2024
0962561
adjust kwargs order in mock
CodyCBakerPhD Jul 11, 2024
7a7ae66
Implement lists of object references with tests
Jul 11, 2024
4a6444a
Adjust constructor test to match
Jul 11, 2024
4912507
fix outer spec to match altered one
Jul 11, 2024
523d972
Merge branch 'add_multichannel_volume' into all_previous_prs_and_vari…
CodyCBakerPhD Jul 12, 2024
5b645de
Update spec/ndx-microscopy.extensions.yaml
CodyCBakerPhD Jul 12, 2024
eb9ee22
Update spec/ndx-microscopy.extensions.yaml
CodyCBakerPhD Jul 12, 2024
2b5ef41
Merge branch 'all_previous_prs_and_variable_depth_static' into swap_t…
CodyCBakerPhD Jul 15, 2024
5f12ff7
resolve conflicts
CodyCBakerPhD Jul 17, 2024
bb380a4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 17, 2024
94ee228
alessandras comments and tests
CodyCBakerPhD Jul 17, 2024
0501249
Merge branch 'all_previous_prs_and_variable_depth_static' of https://…
CodyCBakerPhD Jul 17, 2024
e583e39
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 17, 2024
eaf57c9
Merge branch 'all_previous_prs_and_variable_depth_static' into swap_t…
CodyCBakerPhD Jul 17, 2024
b581087
fix import
CodyCBakerPhD Jul 17, 2024
4a5e9c5
Merge branch 'all_previous_prs_and_variable_depth_static' of https://…
CodyCBakerPhD Jul 17, 2024
c4e8f3a
fix import
CodyCBakerPhD Jul 17, 2024
ff59317
Merge branch 'all_previous_prs_and_variable_depth_static' into swap_t…
CodyCBakerPhD Jul 17, 2024
93a72a8
fix import
CodyCBakerPhD Jul 17, 2024
a300f9d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 17, 2024
335c81d
debug
CodyCBakerPhD Jul 17, 2024
70fa119
debugs
CodyCBakerPhD Jul 17, 2024
a3ea976
Merge branch 'all_previous_prs_and_variable_depth_static' into swap_t…
CodyCBakerPhD Jul 17, 2024
5ac7eef
debugs
CodyCBakerPhD Jul 17, 2024
7effd8e
debugs
CodyCBakerPhD Jul 17, 2024
1d6fede
debugs
CodyCBakerPhD Jul 17, 2024
1d68a4a
debugs
CodyCBakerPhD Jul 17, 2024
5400462
debugs
CodyCBakerPhD Jul 18, 2024
8e67e51
Merge branch 'all_previous_prs_and_variable_depth_static' into swap_t…
CodyCBakerPhD Jul 18, 2024
bb24934
debugs
CodyCBakerPhD Jul 18, 2024
6b2635a
Merge branch 'main' into swap_to_um
CodyCBakerPhD Jul 19, 2024
b3e9b8d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 19, 2024
6c208b6
Update README.md
CodyCBakerPhD Jul 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions spec/ndx-microscopy.extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
26 changes: 14 additions & 12 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,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:
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -371,18 +372,19 @@ 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,
) -> ndx_microscopy.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))
Expand All @@ -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,
Expand Down
Loading