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

TOF #543

Merged
merged 7 commits into from
Jan 6, 2021
Merged

TOF #543

merged 7 commits into from
Jan 6, 2021

Conversation

ALEXJAZZ008008
Copy link
Member

partially addresses issues in #315 and #390

Copy link
Member

@KrisThielemans KrisThielemans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Hopefully you're getting better results now...

I think we'll need to do the same as in STIR: get_num_sinograms is as it is now, but add get_num_non_TOF_sinograms (in SIRF with capital, as we're using get_num_TOF_bins). Will need some doxygen on the C++-side then to clarify. Will also need to be exposed to Python and MATLAB (with appropriate doc).

I found a few other places where the documentation will have to say something like number of (non-TOF) sinograms. Search for TOF in:

  • src/xSTIR/mSTIR/+sirf/+STIR/AcquisitionData.m
  • examples/Python/PET/input_output.py
  • examples/Matlab/PET/acquisition_data_from_scanner_info.m

@evgueni-ovtchinnikov, could you help with that?

This isn't urgent of course, as we cannot merge this until STIR TOF has been merged.

Potential strategy: add dummy TOF functions (get_num_tof_poss and get_num_non_tof_sinograms) on STIR master, such that this could be merged already. Good idea?

@KrisThielemans
Copy link
Member

will have to modify .travis.yml to use the TOF STIR branch I guess

travis pulls stir tof branch
updated docs to refelct change to get_num_sinograms
@KrisThielemans
Copy link
Member

Potential strategy: add dummy TOF functions (get_num_tof_poss and get_num_non_tof_sinograms) on STIR master, such that this could be merged already. Good idea?

I am doing this on release_4. UCL/STIR#762

This should allow us to merge this SIRF PR

@KrisThielemans
Copy link
Member

UCL/STIR#762 is merged on STIR release_4. This now needs to be merged to master. I've pushed my updates here already anyway, so expect the Travis job that uses STIR master to fail. Otherwise, I think this is ready.

@KrisThielemans
Copy link
Member

Happy to say that all builds succeeded, except when DEVEL_BUILD=ON.

Of course, none of the builds actually test TOF functionality.

@KrisThielemans
Copy link
Member

pending UCL/STIR#764

@KrisThielemans
Copy link
Member

This should be fine now but running one more check.

@evgueni-ovtchinnikov do we need any (urgent) changes on the MATLAB side?

@KrisThielemans
Copy link
Member

@evgueni-ovtchinnikov I'll merge this. Please make any urgent changes for MATLAB separately. Otherwise, add them to #555

@KrisThielemans KrisThielemans merged commit 8267f3c into SyneRBI:master Jan 6, 2021
@evgueni-ovtchinnikov
Copy link
Contributor

@KrisThielemans MATLAB scripts run ok except for osem_reconstruction.m (cf. #687) and reconstruct_from_listmode.m, which throws ChainedBinNormalisation: both first and second have a calibration. The factor would be applied twice (and so does respective Python script).

@KrisThielemans
Copy link
Member

@danieldeidda This will be due to UCL/STIR#672 I guess. this shouldn't have happened I believe

@danieldeidda
Copy link
Collaborator

Mh yes definetely because of UCL/STIR#672

@danieldeidda
Copy link
Collaborator

@danieldeidda This will be due to UCL/STIR#672 I guess. this shouldn't have happened I believe

I think the problem is that I check that calib_factor>0 but than set it to one for ECAT etc.

@KrisThielemans
Copy link
Member

@evgueni-ovtchinnikov could you confirm which commit you are on in STIR when this happens? We think that it shouldn't happen (on current master). (you could go to sources/STIR and go git log for instance)

@KrisThielemans
Copy link
Member

@evgueni-ovtchinnikov also, can you give some more output to tell us when this happened

@evgueni-ovtchinnikov
Copy link
Contributor

commit fe1af133aee5c44ce9fecd50993612f47d274b44
Merge: e6d40fe 9eb4aef
Author: Kris Thielemans KrisThielemans@users.noreply.github.com
Date: Tue Jan 5 20:13:13 2021 +0000

Merge pull request #787 from danieldeidda/isotopeInInterfile785

fixes #785: moving isotope name to `InterfileHeader`

@evgueni-ovtchinnikov
Copy link
Contributor

reconstruct_from_listmode
loading miutilities library...
loading msirf library...
loading mstir library...

WARNING: KeyParser: keyword 'isotope name' already registered for parsing, overwriting previous value

WARNING: KeyParser: keyword '%comment' already registered for parsing, overwriting previous value
LmToProjData NOT Using FRAME_BASED_DT_CORR
converting raw data to sinograms...

Processing time frame 1

500000 events stored
1000000 events stored
1500000 events stored
Number of prompts stored in this time period : 1560300
Number of delayeds stored in this time period: 0
Last stored event was recorded before time-tick at 50 secs
Total number of counts (either prompts/trues/delayeds) stored: 1560300

This took 4.34375s CPU time.
estimating randoms...
processed frame 1
Last stored event was recorded after time-tick at 49.999 secs
Total number of prompts/trues/delayed stored: 410099

This took 2.40625s CPU time.
Starting iteration 1 KL 247.329
Starting iteration 2 KL 18.2321
Starting iteration 3 KL 0.663053
Starting iteration 4 KL 0.0278851
Starting iteration 5 KL 0.00129212
Starting iteration 6 KL 4.15109e-05
Starting iteration 7 KL 2.26989e-06
Starting iteration 8 KL 3.85613e-08
Starting iteration 9 KL 4.10926e-09
Starting iteration 10 KL 5.79696e-10
CPU time 42.9844 secs
acquisition data dimensions: 344 x 126 x 357 x 1
image dimensions: 127 x 127 x 127
applying attenuation (please wait, may take a while)...

ERROR: ChainedBinNormalisation: both first and second have a calibration factor. The factor would be applied twice
??? ??? ChainedBinNormalisation: both first and second have a calibration factor. The factor would be applied twice exception thrown at line 457 of C:\Users\wps46139\Documents\GitHub\build\SIRF-SuperBuild\sources\SIRF\src\xSTIR\cSTIR\cstir.cpp,
the reconstruction engine output may provide more information
error id is AcquisitionSensitivityModel:ctor:error

@SyneRBI SyneRBI deleted a comment from evgueni-ovtchinnikov Jan 11, 2021
@SyneRBI SyneRBI deleted a comment from evgueni-ovtchinnikov Jan 11, 2021
@danieldeidda
Copy link
Collaborator

danieldeidda commented Jan 19, 2021

@KrisThielemans MATLAB scripts run ok except for osem_reconstruction.m (cf. #687) and reconstruct_from_listmode.m, which throws ChainedBinNormalisation: both first and second have a calibration. The factor would be applied twice (and so does respective Python script).

The issue has been fixed by UCL/STIR#800

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.

None yet

4 participants