PyTomography / PyTomography/PyTomography
KEMSystemMatrix: get_weighting_subset aliased to get_projection_subset
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 173
- Forks
- 38
- Avg merge
- 1h 17m
- Merged PRs (30d)
- 5
Description
Hi, while reading through the KEM implementation I noticed KEMSystemMatrix sets
self.get_weighting_subset = self.system_matrix.get_projection_subset
in __init__ (projectors/shared/kem_system_matrix.py:20), but the two methods take different arguments:
get_projection_subset(projections, subset_idx)- two argumentsget_weighting_subset(subset_idx)- one argument
PreconditionedGradientAscent calls get_weighting_subset(subset_idx) with a single argument (in the prior, uncertainty, and BSREM paths), which would hit the two-argument get_projection_subset and raise TypeError. It also returns projections rather than the scalar weight that set_beta_scale / norm_BP_weight expect.
This looks like it would break any KEM reconstruction that uses a prior (or BSREM / uncertainty estimation). I think it should alias to self.system_matrix.get_weighting_subset. The signature mismatch reproduces locally. Let me know if I've misunderstood.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in projectors/shared/kem_system_matrix.py:20 and compare the delegated methods with the SystemMatrix implementation. Trace the get_weighting_subset calls from PreconditionedGradientAscent in the prior, uncertainty, and BSREM paths, then reproduce the reported call. Done means those paths no longer raise a signature error and receive the weighting value expected by set_beta_scale and norm_BP_weight.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100