Repository navigation
Conversation
e959451 to
9db7cdd
Compare
9db7cdd to
2389b6d
Compare
2389b6d to
81de0f4
Compare
81de0f4 to
eeb5981
Compare
eeb5981 to
c8e2ff5
Compare
c8e2ff5 to
db35549
Compare
db35549 to
853247f
Compare
| import spekpy as sp | ||
| import numpy as np | ||
| import xraylib as xrl |
There was a problem hiding this comment.
Required test packages are missing
Both new examples import spekpy and xraylib, but neither package is installed by the wheel-test workflows or listed in the test dependencies. Once the directory argument is fixed, both new tests fail at import spekpy. Add both packages to the test setup used by the CPU and CUDA workflows.
There was a problem hiding this comment.
They are now listed in pyproject.toml in the test group so the tests will execute fine. The user will have to install those dependencies manually if they want to run the examples which is not unreasonable.
There was a problem hiding this comment.
Thanks — adding spekpy and xraylib to the test dependency group covers installations that explicitly run pip install --group test, and it’s reasonable for users running the examples to install those separately.
However, the wheel-test jobs do not install that group: they install the wheel followed by only pytest matplotlib. Since test_SpectralOneStep and test_SpectralTwoStep import those modules, those CI jobs will still fail with ModuleNotFoundError. The workflow setup needs to install the test group or add spekpy xraylib to its existing install command.
b8a3f1c to
1c95c3c
Compare
1c95c3c to
23d6c70
Compare
Co-authored-by: Cyril Mory <cyril.mory@gmail.com>
23d6c70 to
a899cb4
Compare
Adds Simon Rit's python spectral examples from PR#635, and uses the data it generates (tweaked a bit and uploaded to Girder) to document the spectral tools' command line applications.


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues were established.Summary
Adds Python examples and command-line guides for spectral CT simulation and reconstruction.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Phantom and scan geometry] --> B[Material projections] C[Spectrum and detector response] --> D[Simulated photon counts] B --> D D --> E[One-step reconstruction] D --> F[Material decomposition] F --> G[Two-step reconstruction]Reviews (10) · Last reviewed commit: "ENH: Add Python examples and associated ..." · Reviewed by Greptile