[SyneRBI/SIRF] list-mode obj_fun.get_subset_sensitivity(0) returns None (Issue #1251)

0 views
Skip to first unread message

Kris Thielemans

unread,
May 9, 2024, 9:09:28 AMMay 9
to SyneRBI/SIRF, Subscribed

Example is at https://github.com/gschramm/SIRF-Exercises/blob/a581dc1e72d3cb1ff156ad88c2db770398a28c17/notebooks/Deep_Learning_listmode_PET/01_SIRF_listmode_recon.py#L176

It works fine for the "sinogram" objective function.

Found by @gschramm.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/issues/1251@github.com>

Kris Thielemans

unread,
May 10, 2024, 12:06:03 PMMay 10
to SyneRBI/SIRF, Subscribed

@evgueni-ovtchinnikov wrote in #1253 (comment)

which is due to the fact that PoissonLogLikelihoodWithLinearModelForMeanAndListModeDataWithProjMatrixByBin does not override empty ObjectiveFunction.get_subset_sensitivity().

Can you elaborate a bit? get_subset_sensitivity is implemented in PoissonLogLikelihoodWithLinearModelForMean. It also used in PoissonLogLikelihoodWithLinearModelForMeanAndListModeDataWithProjMatrixByBin::actual_compute_subset_gradient_without_penalty. It is of course entirely possible that there is a bug somewhere, but I'd like to understand what you saw.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/issues/1251/2104862012@github.com>

Evgueni Ovtchinnikov

unread,
May 10, 2024, 12:42:27 PMMay 10
to SyneRBI/SIRF, Subscribed

In STIR.py we have

class PoissonLogLikelihoodWithLinearModelForMeanAndListModeDataWithProjMatrixByBin(ObjectiveFunction):

From what you write it looks like this class should have been derived from PoissonLogLikelihoodWithLinearModelForMean, should it not?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/issues/1251/2104915064@github.com>

Kris Thielemans

unread,
May 10, 2024, 12:43:20 PMMay 10
to SyneRBI/SIRF, Subscribed

yes indeed. And it is.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/issues/1251/2104916187@github.com>

Evgueni Ovtchinnikov

unread,
May 10, 2024, 12:49:37 PMMay 10
to SyneRBI/SIRF, Subscribed

yes we do. I have just pushed the corrected STIR.py - let George try it.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/issues/1251/2104925671@github.com>

Georg Schramm

unread,
May 12, 2024, 5:15:39 AMMay 12
to SyneRBI/SIRF, Subscribed

@evgueni-ovtchinnikov @KrisThielemans was the update pushed to the master branch of SIRF?

Should I re-run the complete Super-Build with DEVEL_BUILD=ON?

I am have some time for tests this late afternoon / tomorrow morning.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/issues/1251/2106179547@github.com>

Kris Thielemans

unread,
May 12, 2024, 7:35:43 AMMay 12
to SyneRBI/SIRF, Subscribed

Not yet merged, no. You'll need to set

cmake ... -DSIRF_TAG=origin/acc-hess

you can also try UCL/STIR#1418 by adding

-DSTIR_URL=https://github.com/KrisThielemans/STIR-1.git -DSTIR_TAG=origin/ListModeObjFuncExtras

(although TBH I have never tried switch the URL like this in an existing build, so git status and git log in sources/STIR will be essential).

I'm not 100% sure that SIRF will pick up the LM Hessian, but I think it will. Comments in the respective PRs please.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/issues/1251/2106216215@github.com>

Georg Schramm

unread,
May 12, 2024, 11:56:20 AMMay 12
to SyneRBI/SIRF, Subscribed

list-mode obj_fun.get_subset_sensitivity(0) returns None is now fixed (now sure which PR fixed it).
Using the SIRF:acc-hess and STIR:master branch, the following test snippet runs without error using a
"realistic" Poisson logL objective function:

for i in range(num_subsets):
    assert np.all(np.isclose(lm_obj_fun.get_subset_sensitivity(i).as_array(), obj_fun.get_subset_sensitivity(i).as_array()))

If the listmode subsets are based on views (which I remember they should be), everything works as expected.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/issues/1251/2106298379@github.com>

Kris Thielemans

unread,
May 12, 2024, 3:29:02 PMMay 12
to SyneRBI/SIRF, Subscribed

Indeed. Listmode subsets currently reproduce those from projection data.

Excellent news!


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/issues/1251/2106351410@github.com>

Evgueni Ovtchinnikov

unread,
Jun 26, 2024, 8:25:06 AM (3 days ago) Jun 26
to SyneRBI/SIRF, Subscribed

should be fixed now that PR #1253 is merged


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/issues/1251/2191559138@github.com>

Evgueni Ovtchinnikov

unread,
Jun 26, 2024, 8:25:07 AM (3 days ago) Jun 26
to SyneRBI/SIRF, Subscribed

Closed #1251 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/issue/1251/issue_event/13297570146@github.com>

Reply all
Reply to author
Forward
0 new messages