gschramm / parallelproj

code for parallel TOF and NONTOF projections
MIT License
27 stars 8 forks source link

Number of bins in TOF Projectors #44

Closed lukepolson closed 8 months ago

lukepolson commented 8 months ago

I may have missed some stuff in the documentation, but I suspect the following may be valuable to specify:

The reason I say this is I was using float values for the tof_bins argument (namely ...-1.5,-0.5, 0.5, 1.5,...) as I was binning using an even number of bins, and so there was no "central" bin. In the C implementation, I see that that the tof_bins must have been converted to shorts. So I think an error should be thrown if the datatype of tof_bins is not integer.

gschramm commented 8 months ago

Hi Luke, thanks for spotting this! I fixed this in a commit for the upcoming v1.7 release here.

In LM you can use any number (even or odd) of TOF bins. The only important thing to remember is that the center of the bin labeled as "0" is in the center of the LOR by default. It can be shifted using the tofcenter_offset (which can be even LOR / event dependent) but that create some overhead ... (more array need to be copied ...)