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

Add method stir.ToPriorWithParabolicSurrogate() to python. #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robbietuk
Copy link
Owner

Input is a GeneralisedPrior. This will give access to methods such as parabolic_surrogate_curvature and add_multiplication_with_approximate_Hessian from the objective function object.

This would be a temporary fix for part of UCL#707

This doesnt expose non-parabolic surrogate type function methods (e.g. get_gamma() and get_epsilon() in the RDP)

@robbietuk
Copy link
Owner Author

robbietuk commented Oct 15, 2020

I have tested this method on the QP. The code was

para=image.get_empty_copy()
stir.ToPriorWithParabolicSurrogate(self.recon.get_objective_function().get_prior()).parabolic_surrogate_curvature(para, image)
from show_estimate import *
show_estimate(image, title="image")
show_estimate(para, title="parabolic_surrogate_curvature")
stir.ToPriorWithParabolicSurrogate(self.recon.get_objective_function().get_prior()).add_multiplication_with_approximate_Hessian(para, image)
show_estimate(para, title="add_multiplication_with_approximate_Hessian")

which assumes the image is a STIR container, and self.recon is an OSMAPOSL object.

The primary STIR method is stir.ToPriorWithParabolicSurrogate() which accepts a GeneralisedPrior object. This then gives access to parabolic_surrogate_curvature() and add_multiplication_with_approximate_Hessian() methods.
image
image
image

Input is a GeneralisedPrior. This will give access to methods such as `parabolic_surrogate_curvature` and `add_multiplication_with_approximate_Hessian` from the objective function object.
@robbietuk robbietuk force-pushed the ExposingPriorParabolicSurrogateFunctions branch from d257848 to 5237ef1 Compare November 26, 2020 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant