Skip to content

Commit

Permalink
TST: Apply changes to keywords for defininng Image to tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwboth committed Oct 9, 2023
1 parent c77cd6b commit ac31f7a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tests/unit/test_arithmetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_superposition_2d():
def test_superposition_2d_spacetime():

meta = {
"dim": 2,
"space_dim": 2,
"series": True,
"time": [0, 1, 2, 3, 4],
}
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def read_test_image(img_id: str) -> tuple[np.ndarray, dict]:

# ! ---- Define some metadata corresponding to the input array
info = {
"dim": 2,
"space_dim": 2,
"indexing": "ij",
}

Expand Down Expand Up @@ -148,7 +148,7 @@ def test_rotation():
img_array[4:6, 2:8] = 1

info = {
"dim": 2,
"space_dim": 2,
"indexing": "ij",
}

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_initialize_general_image():
info = {
"scalar": False,
"series": False,
"dim": 2,
"space_dim": 2,
"indexing": "ij",
"dimensions": [1.5, 2.8],
}
Expand Down Expand Up @@ -70,7 +70,7 @@ def test_initialize_optical_image():
info = {
"series": False,
"scalar": False,
"dim": 2,
"space_dim": 2,
"indexing": "ij",
"dimensions": [1.5, 2.8],
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_image_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def read_test_image(img_id: str) -> tuple[Optional[np.ndarray], Optional[dict],

# ! ---- Define some metadata corresponding to the input array
info = {
"dim": 2,
"space_dim": 2,
"orientation": "ij",
}

Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_subregion.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_time_interval_scalar_image_2d():

# Construct space-time image
meta = {
"dim": 2,
"space_dim": 2,
"series": True,
"time": [0, 1, 2, 3, 4],
}
Expand All @@ -37,7 +37,7 @@ def test_time_interval_scalar_image_2d_reset_time():

# Construct space-time image
meta = {
"dim": 2,
"space_dim": 2,
"series": True,
"time": [0, 1, 2, 3, 4],
}
Expand All @@ -63,7 +63,7 @@ def test_time_interval_advanced():

# Construct space-time image
meta = {
"dim": 3,
"space_dim": 3,
"series": True,
"scalar": False,
"time": [0, 1, 2, 3, 4],
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_wasserstein.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
cols = rows
src_square_2d = np.zeros((rows, cols), dtype=float)
src_square_2d[2:5, 2:5] = 1
meta_2d = {"width": 1, "height": 1, "dim": 2, "scalar": True}
meta_2d = {"width": 1, "height": 1, "space_dim": 2, "scalar": True}
src_image_2d = darsia.Image(src_square_2d, **meta_2d)

# Coarse dst image
Expand All @@ -36,7 +36,7 @@
pages = 1
src_square_3d = np.zeros((rows, cols, pages), dtype=float)
src_square_3d[2:5, 2:5, 0] = 1
meta_3d = {"dimensions": [1, 1, 1], "dim": 3, "series": False, "scalar": True}
meta_3d = {"dimensions": [1, 1, 1], "space_dim": 3, "series": False, "scalar": True}
src_image_3d = darsia.Image(src_square_3d, **meta_3d)

# Coarse dst image
Expand Down

0 comments on commit ac31f7a

Please sign in to comment.