-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing requirement for gradient to use sensitivity and instead does…
… proper gradient computation (#19) * Create a templated method of RPC_process_related_viewgrams_gradient * Update the standard Likelihood classes to use actual_compute_sub_gradient_without_penalty * Dynamic data actual_compute_sub_gradient_without_penalty * Gated data actual_compute_sub_gradient_without_penalty * List mode actual_compute_sub_gradient_without_penalty will error if do_subtraction is true * Remove overrides [ci skip] * Update documentation * Gradient computation will subtract normalised ones (mult_viewgrams) * [ci skip] Minor commit * If zero_seg0_end_planes and no normalisation, create mult_viewgrams so the endplanes can be zeroed * remove compute_sub_gradient_without_penalty_plus_sensitivity from child Poisson classes * Fix documentation formatting and code whitespace * Gated and Dynamic actual's should call the objective function actual * reformat do_subtraction to add_sensitivity (involves inverting cases) * Revert one too many inverts * Improve comments * List mode recon: !add_sensitivity and error if not using subset sensitivity * turn off add_sensitivity on compute_sub_gradient_without_penalty * distributable_compute_gradient: swap normalisation_sptr parsing case * Refactor actual_compute_sub_grad... to actual_compute_subset_grad... * Update OSSPS test image correct OSSPS (with actual subset sensitivity subtraction) * Add OSSPS subset sensitivity test. Results should be identical * [ci skip] Add compute_sub_gradient_without_penalty documentation * [ci skip] Documentation cleanup * [ci skip] Add to release notes
- Loading branch information
robbietuk
authored
Jun 22, 2021
1 parent
9d93017
commit ffd3ff8
Showing
17 changed files
with
301 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
OSSPSParameters := | ||
; sample file for OSSPS | ||
; parameters used here are for illustrative purposes only | ||
; i.e. they are not recommended values | ||
|
||
objective function type:= PoissonLogLikelihoodWithLinearModelForMeanAndProjData | ||
PoissonLogLikelihoodWithLinearModelForMeanAndProjData Parameters:= | ||
|
||
input file := Utahscat600k_ca_seg4.hs | ||
zero end planes of segment 0:= 1 | ||
; if disabled, defaults to maximum segment number in the file | ||
maximum absolute segment number to process := 3 | ||
|
||
; change to STIR 2.x default for compatibility | ||
use subset sensitivities:=1 | ||
sensitivity filename:= RPTsens_seg3_PM.hv | ||
|
||
projector pair type := Matrix | ||
Projector Pair Using Matrix Parameters := | ||
Matrix type := Ray Tracing | ||
Ray tracing matrix parameters := | ||
number of rays in tangential direction to trace for each bin := 2 | ||
; restrict to cylindrical fov := 0 | ||
End Ray tracing matrix parameters := | ||
End Projector Pair Using Matrix Parameters := | ||
|
||
; additive sinogram:=my_fake_randoms.hs | ||
prior type := quadratic | ||
Quadratic Prior Parameters:= | ||
penalisation factor := 0.5 | ||
; next defaults to 0, set to 1 for 2D inverse Euclidean weights, 0 for 3D | ||
only 2D:= 0 | ||
END Quadratic Prior Parameters:= | ||
|
||
End PoissonLogLikelihoodWithLinearModelForMeanAndProjData Parameters:= | ||
|
||
output filename prefix := my_test_image_OSSPS_PM_QP_subsens | ||
; iteration scheme | ||
|
||
number of subsets:= 4 | ||
;start at subset:= 0 | ||
;start at subiteration number := 1 | ||
number of subiterations:= 8 | ||
Save estimates at subiteration intervals:= 8 | ||
;write update image := 0 | ||
;report objective function values interval := 1 | ||
|
||
; if next is disabled, defaults to image full of 1s (but that's not good for OSSPS) | ||
; in particular, make sure it has the correct scale | ||
initial estimate:= test_image_PM_QP_6.hv | ||
enforce initial positivity condition := 1 | ||
|
||
; here start OSSPS specific values | ||
|
||
; values to use for the 'precomputed denominator' | ||
; specify either procomputed denomiator or normalisation type | ||
; use the following if you have it already (e.g. from previous run) | ||
; note: setting the value to 1 will use an images full of ones. | ||
; precomputed denominator := my_precomputed_denominator.hv | ||
|
||
; specify relaxation scheme | ||
; lambda = relaxation_parameter/ (1+relaxation_gamma*(subiteration_num/num_subsets) | ||
relaxation parameter := 2 | ||
relaxation gamma:=.1 | ||
|
||
|
||
END := | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.