LLNL / LEAP

comprehensive library of 3D transmission Computed Tomography (CT) algorithms with Python API and fully integrated with PyTorch
https://leapct.readthedocs.io
MIT License
74 stars 8 forks source link

Bug related to subsets partition #51

Closed oooo1114 closed 3 weeks ago

oooo1114 commented 4 weeks ago

Hello, In class subsetParameters and function breakIntoSubsets, subsets are defined like g[m:-1:numSubsets,:,:]. However, for the last subset, the last element will be dropped in python, which makes an inconsistent subset. For example,

x = range(16)
print(list(x[3:-1:4]))

gives [3, 7, 11].

kylechampley commented 3 weeks ago

You are absolutely correct, thanks for pointing this out!

I found and fixed this issue in the breakIntoSubsets function and the subsetParameters class. If you want early access to these changes, you can pull from the champley_dev branch. Otherwise this'll get merged into the main branch for the next release.