Skip to content

test: check FBP/FDK accuracy on the portable backend - #65

Merged
sypsyp97 merged 1 commit into
sypsyp97:mainfrom
cslht11:test/portable-accuracy
Nov 2, 2026
Merged

sypsyp97 merged 1 commit into
sypsyp97:mainfrom
cslht11:test/portable-accuracy

Conversation

@cslht11

@cslht11 cslht11 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

test_fbp_parallel_accuracy.py, test_fbp_fan_accuracy.py and
test_fdk_cone_accuracy.py all call _skip_if_no_cuda(), and the cpu job runs
on a runner without a GPU, so none of those bounds is checked by CI today. They
pin the analytical constant, the (sid/U)^2 FDK weight and the ramp-filter
scale.

This adds the same three bounds through the public Projector, fbp and fdk
entry points on CPU, at sizes that finish in under a minute, plus a short-scan
case that only stays inside the amplitude floor with Parker weighting.

Measured on a 64-core CPU worker: parallel 0.0495, fan 0.0251, cone 0.0376
against a 0.1 bound. 4 tests, ~55 s.

The three accuracy tests assert the RMSE, amplitude-floor and
amplitude-ceiling bounds that pin the analytical constant, the (sid/U)^2 FDK
weight and the ramp-filter scale. All three call _skip_if_no_cuda(), so the
cpu CI job -- which runs on a runner without a GPU -- never checks any of
them.

Assert the same bounds through the public Projector/fbp/fdk entry points on
CPU at sizes that finish in seconds. Measured RMSE is 0.0495 (parallel
128^2), 0.0251 (fan 96^2) and 0.0376 (cone 32^3) against the 0.1 bound the
native tests use.

Also cover Parker weighting end to end. tests/test_weights.py checks
parker_weights as a unit and the native suite checks that fbp composes it
before filtering, but nothing checks that it repairs a short scan: without it
the redundant-ray artefact drives the minimum to -0.38, past the -0.2 floor
the native tests use, and Parker brings it back to -0.10.
@sypsyp97
sypsyp97 merged commit c8df2c0 into sypsyp97:main Nov 2, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants