How big does a flaw have to be before an inspection can see it — and how much of what you measure is the flaw versus the measurement?
This repository contains the derivation, the reference implementation and the real-data test of a closed-form upper bound on the probability of detection (POD) of a volumetric flaw. No new imaging is required to use it: the bound is computed from three numbers that are known before any coupon is made.
d'(a) = (ΔI / σ) · √E(a/L) · √N
POD(a) ≤ Φ( d'(a) − z_{1−α} )
E(a/L) is the squared norm of the flaw image after blur, L the point-spread
width, N the number of independent looks. The bound follows from the
Neyman–Pearson lemma and the Cauchy–Schwarz inequality: the matched filter
maximises the deflection, so no detector — including any trained one — can exceed
it.
This package and AM-MultiModal-Monitoring are twins, built in the same effort and released under separate DOIs. The monitoring system measures what a sensing chain sees; this package was created to answer the question that measurement cannot: on the same chain, what could any detector see, and what would it cost to see more? The bound is the decision half of AM's monitoring loop, not an abstract add-on, and the integrated paper uses both halves.
| this package | AM-MultiModal-Monitoring | |
|---|---|---|
| role | decision and theory | measurement and application |
| answers | the ceiling and its cost | what this chain actually measured |
| version | 0.1.1, doi:10.5281/zenodo.24136698 | concept doi:10.5281/zenodo.24128937 |
| code relation | vendored into AM at src/dbound/ |
wrapped by ammonitor.decision |
In code the dependency runs one way — AM vendors a pinned copy of this package and does not edit it — but in provenance they are siblings: same author, same architecture, cross-cited. The mapping, module by module and result by result, is in AM's docs/TWIN_LIBRARIES.md.
| if you want to… | read |
|---|---|
| understand what the bound means and where it comes from | docs/使用说明.md (中文) |
| use it, command by command, with tutorials | docs/GUIDE.md |
| see what is measured, derived or synthetic | docs/PROVENANCE.md |
| check the data behind every number | data/README.md |
Sixty seconds:
pip install -e .
python -m dbound verify # check the algebra (~4 min)
python tools/make_figures.py # rebuild the four figures from results/
python -m dbound bound --a 100 --L 40 --dI-over-sigma 5 # one number, no datapython -m dbound --help lists every command; docs/GUIDE.md explains each one.
| regime | deflection | meaning |
|---|---|---|
a ≪ L |
d' ∝ (a/L)³ |
below the voxel size, a flaw is a volume: halving it costs a factor of eight |
a ≫ L |
d' ∝ (a/L)^{3/2} |
above it, the ordinary energy-versus-noise law |
Corollary: one halving of the voxel size is worth 64 repeat scans below the voxel size, and 8 above it.
Largest admissible voxel size for POD ≥ 0.90 at α = 0.01, single look:
| flaw a (µm) | ΔI/σ = 2 | 5 | 10 |
|---|---|---|---|
| 50 | 20.5 | 33.1 | 46.2 |
| 100 | 41.0 | 66.1 | 92.3 |
| 200 | 82.1 | 132.2 | 184.6 |
| 500 | 205.2 | 330.6 | 461.6 |
The admissible voxel scales nearly proportionally with the flaw and only weakly with contrast: money is better spent on resolution than on dose.
On a public X-ray CT stack of laser powder-bed AlSi10Mg (212 slices, 37 µm voxels) the geometry transfers intact but the level does not. The noise a matched filter actually sees is κ = 24 to 125 times the voxel noise, because the statistic integrates microstructure rather than voxels:
| x = a/L | 0.70 | 1.40 | 2.79 | 4.19 | 5.59 | 8.38 | 11.17 |
|---|---|---|---|---|---|---|---|
| κ | 31.2 | 24.4 | 25.9 | 38.0 | 51.0 | 87.8 | 125.2 |
κ is flat below the voxel size, so the cubic law survives with its amplitude divided by twenty-five; above it κ grows almost as fast as √E, so for flaws of equal contrast the effective exponent drops from 3/2 to about 0.3. The bound is never violated — it is slack, by a factor that is measurable and that is reported rather than absorbed.
src/dbound/ bound (E, d', inversion), psf, detectors, realdata, experiments, cli
tests/ analytic tests: asymptotes, inversion, template properties
data/ fetch.py (HTTP-range reproduction), manifest.json (SHA-256 per slice), README
results/ every number in the paper, as JSON, generated by the code
docs/PROVENANCE.md what is measured, what is derived, what is synthetic
manuscript.md/.docx the paper
pip install -e .
pytest -q # analytic tests
python -m dbound verify # check Propositions 1-2 (exact truth)
python data/fetch.py --group GD --from-manifest data/manifest.json --dest data/vol_gd
python data/fetch.py --verify --dest data/vol_gd --manifest data/manifest.json
python -m dbound measure data/vol_gd --out results/measure_vol_gd.json
python -m dbound ablate data/vol_gd --out results/ablation.json
python -m dbound compare data/vol_gd --out results/comparison.jsonEverything empirical — σ, the PSF width, κ, the measured POD — comes from the
public XCT record cited in data/README.md; the raw slices are not committed, but
every slice used is listed with its SHA-256 so the exact data set can be
re-fetched and verified.
The one injected quantity is the flaw: known spheres are placed into real metal, so the background, the noise correlation and the artefacts are the scanner's and only the defect is planted. That is stated in the paper and in the code.
python -m dbound verify runs a computation with exact truth. It checks the
algebra of Propositions 1 and 2 and is never presented as an experiment.
See data/README.md. Source: Zenodo
10.5281/zenodo.17602110, CC BY 4.0.
See CITATION.cff. If you use the integrated system, cite both this package and
AM-MultiModal-Monitoring; if you use the imaging data, cite the Zenodo record.
MIT. The data keep their own licence (CC BY 4.0).