Skip to content

Report missing bundled head phantom data clearly - #811

Merged
AnderBiguri merged 1 commit into
CERN:masterfrom
liu005:pr/head-phantom-error-20261110
Nov 10, 2026
Merged

AnderBiguri merged 1 commit into
CERN:masterfrom
liu005:pr/head-phantom-error-20261110

Conversation

@liu005

@liu005 liu005 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

When head.mat is absent from all searched locations, load_head_phantom accesses an uninitialized test_data variable and raises UnboundLocalError.

Raise FileNotFoundError with the missing dataset path instead. Also use the public scipy.ndimage.zoom namespace, preserving the existing cubic interpolation, axis ordering and prefilter settings.

Validation: two CPU tests cover missing data and deterministic anisotropic resampling. The missing-data test fails on upstream aea5346; both tests pass with the fix. File reads are stubbed, so no bundled phantom or CUDA installation is needed for these checks.

@AnderBiguri
AnderBiguri merged commit 20040c8 into CERN:master Nov 10, 2026
2 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