Skip to content

Commit

Permalink
fix prior
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Aug 28, 2024
1 parent e114f21 commit 3eec68c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main_ISTA.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def __init__(self, data: Dataset, num_subsets: int = 7, step_size: float = 0.1,
initial_image=data.OSEM_image)
for f in obj_funs: # add prior to every objective function
f.set_prior(data.prior)
data.prior.set_penalisation_factor(data.prior.get_penalisation_factor() / len(obj_funs))
data.prior.set_up(data.OSEM_image)

sampler = Sampler.random_without_replacement(len(obj_funs))
f = -SGFunction(obj_funs, sampler=sampler) # negative to turn minimiser into maximiser
Expand Down

0 comments on commit 3eec68c

Please sign in to comment.