Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bwohlberg committed Jan 18, 2024
1 parent ad9d35e commit 64ef13d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scico/linop/xray/astra.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,13 @@ def __init__(
raise ValueError("Expected det_count to be a tuple with 2 elements.")
if angles is not None:
Nview = angles.size
self.angles: np.ndarray = np.array(angles)
else:
Nview = vectors.shape[0]
self.vectors: np.ndarray = np.array(vectors)
output_shape: Shape = (det_count[0], Nview, det_count[1])

# Set up all the ASTRA config
self.det_count = det_count
self.vectors: np.ndarray = np.array(vectors)

assert isinstance(det_count, (list, tuple))
if angles is not None:
self.proj_geom = astra.create_proj_geom(
Expand All @@ -263,11 +262,11 @@ def __init__(
det_spacing[1],
det_count[0],
det_count[1],
angles,
self.angles,
)
else:
self.proj_geom = astra.create_proj_geom(
"parallel3d_vec", det_count[0], det_count[1], vectors
"parallel3d_vec", det_count[0], det_count[1], self.vectors
)

self.input_shape: tuple = input_shape
Expand Down

0 comments on commit 64ef13d

Please sign in to comment.