SyneRBI / SIRF

Main repository for the CCP SynerBI software
http://www.ccpsynerbi.ac.uk
Other
58 stars 29 forks source link

PLSPrior Python doc (and MATLAB?) contains doxygen/latex #848

Closed KrisThielemans closed 3 years ago

KrisThielemans commented 3 years ago

it's currently a straight copy of the STIR doxygen, but Python help doesn't format it, see e.g. https://github.com/SyneRBI/SIRF/blob/e43d86c685ac884594af389addb1cbd5f4931f2f/src/xSTIR/pSTIR/STIR.py#L1846-L1848

I'm not aware of any easy way to get math into "normal" Python doc (unless going via sphynx etc). I think best thing to do for now is just to replace latex-style with "hand-written" math

evgueni-ovtchinnikov commented 3 years ago

@KrisThielemans: will something like this:

The gradient of the prior at voxel r is computed as the sum of 

delta(r, s) = w(s - r)*kappa(r)*kappa(s)*(lambda(r) - lambda(s))

over all voxels s where the weight w(s - r) is non-zero, kappa being an image
used to have spatially-varying penalties such as in Jeff Fessler's papers.
phi(f) = sqrt(alpha^2 + |grad f|^2 - <grad f, xi>^2)
xi = 1/sqrt(|grad v|^2 + eta^2) grad v

do ?

KrisThielemans commented 3 years ago

Not sure where you got the first put from? It doesn't seem correct. The formula for the prior is actually phi (although there should a sum over voxel values really, I would have to check if it's inside or outside the sqrt).

evgueni-ovtchinnikov commented 3 years ago

the first one is for QuadraticPrior

evgueni-ovtchinnikov commented 3 years ago

fixed by 933630ece93ded99dffbdc60e4eef993051621b1