Skip to content

Commit

Permalink
Merge pull request #336 from jonwright/master
Browse files Browse the repository at this point in the history
fix monitor bug
  • Loading branch information
jonwright authored Oct 15, 2024
2 parents 152b0c9 + 9b0669b commit f6e76d3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ImageD11/sinograms/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def get_monitor(self, name="fpico6"):
lo, hi = [int(v) for v in slc[1:-1].split(":")]
mon = hin[snum]["measurement"][name][lo:hi]
else:
mon = hin[snum]["measurement"][name][:]
mon = hin[scan]["measurement"][name][:]
monitor.append(mon)
self.monitor = np.concatenate(monitor).reshape(self.shape)
return self.monitor
Expand Down
11 changes: 8 additions & 3 deletions ImageD11/sinograms/roi_iradon.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,13 @@ def correct_recon_central_zingers(recon, radius=25):


def run_iradon(sino, angles, pad=20, shift=0,
workers=1, mask=None,
apply_halfmask=False, mask_central_zingers=False, central_mask_radius=25):
workers=1,
mask=None,
apply_halfmask=False,
mask_central_zingers=False,
central_mask_radius=25,
filter_name='hamming',
):
"""Applies an iradon to a sinogram, with an optional pad
Calculates scaled-up output size from pad value
Applies projection shifts of shift
Expand All @@ -550,7 +555,7 @@ def run_iradon(sino, angles, pad=20, shift=0,
mask=mask,
output_size=outsize,
projection_shifts=np.full(sino.shape, shift),
filter_name='hamming',
filter_name=filter_name,
interpolation='linear',
workers=workers)

Expand Down
5 changes: 4 additions & 1 deletion ImageD11/sinograms/sinogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ def recon(self,
iradon -> ImageD11.sinograms.roi_iradon.run_iradon
{ pad=20, shift=0, workers=1, mask=None,
apply_halfmask=False, mask_central_zingers=False, central_mask_radius=25 }
apply_halfmask=False,
mask_central_zingers=False,
central_mask_radius=25,
filter_name='hamming'}
mlem : ImageD11.sinograms.roi_iradon.run_mlem
{ mask=None, pad=20, shift=0, workers=1, niter=20, apply_halfmask=False,
mask_central_zingers=False, central_mask_radius=25 }
Expand Down

0 comments on commit f6e76d3

Please sign in to comment.