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

XRayTransform2D fails adjoint test #560

Closed
bwohlberg opened this issue Oct 15, 2024 · 2 comments · Fixed by #561
Closed

XRayTransform2D fails adjoint test #560

bwohlberg opened this issue Oct 15, 2024 · 2 comments · Fixed by #561
Assignees
Labels
bug Something isn't working

Comments

@bwohlberg
Copy link
Collaborator

This example demonstrates a case in which scico.linop.xray.XRayTransform2D does not have a properly matched adjoint:

import numpy as np
from scico.linop import valid_adjoint
from scico.linop.xray import XRayTransform2D

N = 256
det_count = int(N * 1.05 / np.sqrt(2.0))
dx = 1.0 / np.sqrt(2)
n_projection = 360
angles = np.linspace(0, np.pi, n_projection, endpoint=False)
A = XRayTransform2D((N, N), angles, det_count=det_count, dx=dx)
print(f"Adjoint test pass: {valid_adjoint(A, A.T, eps=1e-5)}")
print(f"Adjoint accuracy: {valid_adjoint(A, A.T, eps=None):.3e}")

The test passes if det_count = N.

It would be worth adding a test for this to the tests for this module!

@bwohlberg bwohlberg added the bug Something isn't working label Oct 15, 2024
@Michael-T-McCann
Copy link
Contributor

Add test for this and for the 3D case.

@bwohlberg
Copy link
Collaborator Author

Closed by #561.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants