UCL / STIR

Software for Tomographic Image Reconstruction
http://stir.sourceforge.net/
Other
111 stars 93 forks source link

TOF ProjData obj-function gradient calculation can fail due to wrong set_up #1431

Closed KrisThielemans closed 4 months ago

KrisThielemans commented 4 months ago

We have https://github.com/UCL/STIR/blob/5e4fd8c24b889ad666464911c5f150c4bf9271f7/src/recon_buildblock/PoissonLogLikelihoodWithLinearModelForMeanAndProjData.cxx#L709-L711 The name add_sensitivity is a bit confusing, but if we compute the gradient, it will be set to false: https://github.com/UCL/STIR/blob/5e4fd8c24b889ad666464911c5f150c4bf9271f7/src/recon_buildblock/PoissonLogLikelihoodWithLinearModelForMean.cxx#L333-L340

This means the ensure_norm_is_set_up() will currently NOT be called when we need the gradient, which is incorrect.

Also, the comments here are wrong: https://github.com/UCL/STIR/blob/5e4fd8c24b889ad666464911c5f150c4bf9271f7/src/recon_buildblock/PoissonLogLikelihoodWithLinearModelForMeanAndProjData.cxx#L1196-L1199