UCL / UCL/STIR

If prior keyword not found reconstructions should throw error not a warning.

Open
#847 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.