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

fix monitor bug #336

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading