If prior keyword not found reconstructions should throw error not a warning.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 160
- Forks
- 113
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Description
I force a mistake by using prior type := Logcosha in an OSMAPOSL parameter file
prior type := Logcosha
Logcosh Prior Parameters:=
penalisation factor := 1
scalar := 1.0
only 2D:= 0
END LogCosh Prior Parameters:=
This results in the following warnings, which are generally not obvious during algorithm initialisation:
FactoryRegistry: key Logcosha not found in current registry
6 possible values are:
FilterRootPrior
Logcosh
None
PLS
Quadratic
Relative Difference Prior
Using value corresponding to key "None"
WARNING: KeyParser warning: unrecognized keyword: logcosh prior parameters
WARNING: KeyParser warning: unrecognized keyword: penalisation factor
WARNING: KeyParser warning: unrecognized keyword: scalar
WARNING: KeyParser warning: unrecognized keyword: only 2d
WARNING: KeyParser warning: unrecognized keyword: end logcosh prior parameters
Furthermore, the algorthm continues and outputs images (without penalty) but gives no further indication of the lack of prior.
Instead of this, STIR should throw some form of error, especially for major mistakes, e.g. FactoryRegistry: key Logcosha not found in current registry.
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
Reproduce the OSMAPOSL parameter example with the misspelled Logcosha prior type, then trace the FactoryRegistry lookup and the KeyParser warnings described in the issue. Done means an invalid prior key produces an explicit error and the reconstruction does not continue as though the prior were None; add or run coverage for this failure path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100