Skip to content

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

Open
robbietuk wants to merge 1 commit intomasterfrom
ExposingPriorParabolicSurrogateFunctions
Open

Add method stir.ToPriorWithParabolicSurrogate() to python.#10
robbietuk wants to merge 1 commit intomasterfrom
ExposingPriorParabolicSurrogateFunctions

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