Skip to content

Commit

Permalink
removes cupy regularisers from pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
dkazanc committed Jan 30, 2025
1 parent 5e29c82 commit d6ad4c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions httomolibgpu/recon/rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ def find_center_vo(
ind: Optional[int] = None,
average_radius: int = 0,
cor_initialisation_value: Optional[float] = None,
smin: int = -100,
smax: int = 100,
smin: int = -50,
smax: int = 50,
srad: float = 6.0,
step: float = 0.25,
step: float = 0.5,
ratio: float = 0.5,
drop: int = 20,
) -> np.float32:
Expand Down Expand Up @@ -117,7 +117,7 @@ def find_center_vo(
average_radius = ind
if ind > 0:
_sino = cp.mean(
data[:, ind - average_radius : ind + average_radius, :], axis=1
data[:, ind - average_radius : ind + average_radius + 1, :], axis=1
)
else:
_sino = data[:, ind, :]
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ dependencies = [
"pillow",
"scikit-image",
"tomobar",
"ccpi-regularisation-cupy"
]

[project.optional-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_recon/test_rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_find_center_vo_ones(ensure_clean_memory):
mat = cp.ones(shape=(103, 450, 230), dtype=cp.float32)
cor = find_center_vo(mat)

assert_allclose(cor, 8)
assert_allclose(cor, 58)
mat = None #: free up GPU memory


Expand All @@ -44,7 +44,7 @@ def test_find_center_vo_random(ensure_clean_memory):
data_host = np.random.random_sample(size=(900, 1, 1280)).astype(np.float32) * 2.0
data = cp.asarray(data_host, dtype=np.float32)
cent = find_center_vo(data)
assert_allclose(cent, 550.25)
assert_allclose(cent, 680.5)


def test_find_center_vo_calculate_chunks():
Expand Down

0 comments on commit d6ad4c4

Please sign in to comment.