recompute sensitivity if it doesn't exist yet?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 160
- Forks
- 113
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Description
Current logic of recompute_sensitivity says that if it's off, then
if (no filename set)
recompute anyway
else
read from file and fail if that doesn't work
If we'd change this to
if (no filename set)
recompute anyway
else if(this->subsensitivity_sptrs is empty)
read from file and fail if that doesn't work
we could re-use the same object for further iterations/reconstructions without penalty even when calling set_up.
A further change could be
if (no filename set)
recompute anyway
else if(this->subsensitivity_sptrs is empty)
try
read from file
catch (...)
recompute anyway
Then we'd gain the capability to run multiple recons with the same sensitivity where the first one would compute and save it, and future recons would read it, all without changing the parameter files (or recon object).
Of course, anything with `recompute_sensitivities==false` is dangerous, as it assumes the one you have/read from file is ok. I would therefore recommend setting its default to `true`.
Ideally we'd gain the capabilities to check if a `set_up` is necessary, (or even in `set_up` silently proceed if it thinks it's not necessary, although that is scary), but that requires a substantial amount of work.
Opinions anyone?
PS: This would for instance be useful in the scatter PR #44 which runs multiple reconstructions without changing attenuation etc.
Contributor guide
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 at src/recon_buildblock/PoissonLogLikelihoodWithLinearModelForMean.cxx around recompute_sensitivity and trace how set_up uses subsensitivity_sptrs. Compare the proposed reuse, file-loading fallback, and default-value changes, then identify the existing reconstruction scenarios that would need validation. Done requires an agreed behavior and evidence that repeated reconstructions preserve correct sensitivity handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100