Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-T-McCann committed Oct 15, 2024
1 parent c58b819 commit 908cb25
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions scico/linop/xray/_xray.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,28 @@ def __init__(
)

def project(self, im: ArrayLike) -> snp.Array:
"""Compute X-ray projection."""
"""Compute X-ray projection, equivalent to `H @ im`.
Args:
im: Input array representing the image to project.
"""
return XRayTransform2D._project(im, self.x0, self.dx, self.y0, self.ny, self.angles)

def back_project(self, y: ArrayLike) -> snp.Array:
"""Compute X-ray back projection"""
"""Compute X-ray back projection, equivalent to `H.T @ y`.
Args:
y: Input array representing the sinogram to back project.
"""
return XRayTransform2D._back_project(y, self.x0, self.dx, self.nx, self.y0, self.angles)

@staticmethod
@partial(jax.jit, static_argnames=["ny"])
def _project(
im: ArrayLike, x0: ArrayLike, dx: ArrayLike, y0: float, ny: int, angles: ArrayLike
) -> snp.Array:
r"""
r"""Compute X-ray projection.
Args:
im: Input array, (M, N).
x0: (x, y) position of the corner of the pixel im[0,0].
Expand Down Expand Up @@ -171,7 +180,8 @@ def _project(
def _back_project(
y: ArrayLike, x0: ArrayLike, dx: ArrayLike, nx: Shape, y0: float, angles: ArrayLike
) -> ArrayLike:
r"""
r"""Compute X-ray back projection.
Args:
y: Input projection, (num_angles, N).
x0: (x, y) position of the corner of the pixel im[0,0].
Expand Down

0 comments on commit 908cb25

Please sign in to comment.