Closed casperdcl closed 3 years ago
This PR makes it possible to do low count reconstructions (otherwise, the whole image becomes np.nan).
np.nan
The key is to avoid np.nans due to zero division in cuda kernels. Such cases are replaced with zero.
Makes this reconstruction possible (psino.sum() == 3e6):
psino.sum() == 3e6
Similar approach to https://github.com/PET-MR/apirl/blob/04272cada75bd59584fd7c47d00cd4b6c3b00191/matlab/andrew_reader_lab_software_interface/%40classGpet/classGpet.m#L530-L536
An alternative approach would be to add a (small) constant to the denominator before dividing
This PR makes it possible to do low count reconstructions (otherwise, the whole image becomes
np.nan
).The key is to avoid
np.nan
s due to zero division in cuda kernels. Such cases are replaced with zero.Makes this reconstruction possible (
psino.sum() == 3e6
):Similar approach to https://github.com/PET-MR/apirl/blob/04272cada75bd59584fd7c47d00cd4b6c3b00191/matlab/andrew_reader_lab_software_interface/%40classGpet/classGpet.m#L530-L536
An alternative approach would be to add a (small) constant to the denominator before dividing