Skip to content

Commit

Permalink
BUG: Fixing align_joint for gridrec (#499)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Ching <carterbox@users.noreply.github.com>
  • Loading branch information
mdw771 and carterbox committed Jun 30, 2020
1 parent a5e60c9 commit f852a4a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source/tomopy/prep/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ def align_joint(
# Initialization of reconstruction.
rec = 1e-12 * np.ones((prj.shape[1], prj.shape[2], prj.shape[2]))

extra_kwargs = {}
if algorithm != 'gridrec':
extra_kwargs['num_iter'] = 1

# Register each image frame-by-frame.
for n in range(iters):

Expand All @@ -304,7 +308,7 @@ def align_joint(

# Reconstruct image.
rec = recon(prj, ang, center=center, algorithm=algorithm,
num_iter=1, init_recon=_rec)
init_recon=_rec, **extra_kwargs)

# Re-project data and obtain simulated data.
sim = project(rec, ang, center=center, pad=False)
Expand Down Expand Up @@ -1053,4 +1057,4 @@ def load_distortion_coefs(file_path):
xcenter = list_data[0]
ycenter = list_data[1]
list_fact = list_data[2:]
return xcenter, ycenter, list_fact
return xcenter, ycenter, list_fact

0 comments on commit f852a4a

Please sign in to comment.