Skip to content

Commit

Permalink
run_OSEM/BSREM: reduce frequency of metric/saving callback
Browse files Browse the repository at this point in the history
Callbacks (and hence run_OSEM/BSREM) used to save images
when objective functions were computed. Now this has a separate
keyword, so use that.
  • Loading branch information
KrisThielemans committed Oct 9, 2024
1 parent 4d49f88 commit 5ffed5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SIRF_data_preparation/run_BSREM.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
algo = BSREM1(data_sub, obj_funs, initial=data.OSEM_image, initial_step_size=.3, relaxation_eta=.01,
update_objective_interval=80)
# %%
algo.run(num_updates, callbacks=[MetricsWithTimeout(**settings.slices, outdir=outdir, seconds=3600 * 100)])
algo.run(num_updates, callbacks=[MetricsWithTimeout(**settings.slices, interval=80, outdir=outdir, seconds=3600 * 100)])
# %%
fig = plt.figure()
data_QC.plot_image(algo.get_output(), **settings.slices)
Expand Down
2 changes: 1 addition & 1 deletion SIRF_data_preparation/run_OSEM.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
print("num_updates:", num_updates)
# %%
algo = main_OSEM.Submission(data, settings.num_subsets, update_objective_interval=20)
algo.run(num_updates, callbacks=[MetricsWithTimeout(**settings.slices, seconds=5000, outdir=outdir)])
algo.run(num_updates, callbacks=[MetricsWithTimeout(**settings.slices, seconds=5000, interval=20, outdir=outdir)])
# %%
fig = plt.figure()
data_QC.plot_image(algo.get_output(), **settings.slices)
Expand Down

0 comments on commit 5ffed5f

Please sign in to comment.