Status codes¶
This page lists the per-point status codes zvDVC records, when each is
assigned, what it corresponds to in CCPi DVC, and how it is written to the
CCPi-format .disp and .stat files. It is for anyone filtering results or
comparing them with CCPi or iDVC.
Source: status.py,
solver/gauss_newton.py,
solver/engines.py,
io/ccpi.py.
Terms¶
- Status
A small signed integer per point, stored as int8 in the
statusattribute of the results store (Results store), in thestatuscolumn of.dispfiles, and in.npzresults. The enum iszvdvc.status.PointStatus.- CCPi code
The codes 0 to −3 defined by CCPi DVC (
Core/Utility.h). zvDVC keeps their values and meaning, so exported.dispfiles read correctly in iDVC.- zvDVC-only code
A code below −3, added by zvDVC for cases CCPi does not distinguish.
Introduction¶
Only GOOD (0) points carry a trustworthy displacement. Every other status
says why a point has no result. Codes 0 to −3 are CCPi’s; −4 and −5 are
zvDVC’s. When results are exported for CCPi tools, each zvDVC-only code is
written as −3 (NOT_SEARCHED), the CCPi code for “no result”, so iDVC and
CCPi’s strain program never see a code they do not know.
Technical reference¶
Codes¶
value |
name |
CCPi equivalent |
assigned when |
|---|---|---|---|
0 |
|
0, point good |
Gauss–Newton met a stopping rule ( |
−1 |
|
−1, range fail |
The translation moved more than |
−2 |
|
−2, convergence fail |
|
−3 |
|
−3, not searched |
Never attempted: beyond |
−4 |
|
none (CCPi skips the point) |
|
−5 |
|
none |
The normal equations are ill-conditioned: a non-positive diagonal of \(\mathbf{H}\), or a Cholesky pivot of the Jacobi-scaled system at or below \(10^{-6}\) (float32 engines; \(10^{-10}\) for the float64 reference); or the target is featureless, \(\sum\lVert\nabla g\rVert^2 \le 10^{-12}\sum g^2\); or the reference subvolume has no texture, \(\max f - \min f \le \tau\max\lvert f\rvert\) with \(\tau = 10^{-5}\) (float32 engines; \(10^{-12}\) for the float64 reference), tested before any iteration for every objective (zero padding, air), and likewise the final target samples; or the parameters or the final objective are not finite. CCPi’s QR solve has no such test. |
A point’s status is set by the first failure met, in the order of the
per-point pipeline (Correlation method): reference sampling, threshold test,
reference texture test, Gauss–Newton iterations (range, singularity),
iteration limit, finite parameters, final objective (range, target texture,
finite value). No point with a non-finite result is GOOD.
PointStatus.to_ccpi() maps a code to CCPi’s range: codes \(\ge -3\) are
unchanged, codes \(< -3\) become −3.
How statuses are written¶
output |
written by |
codes |
|---|---|---|
results store |
|
zvDVC codes, unchanged |
|
|
zvDVC codes, unchanged |
|
|
mapped with |
|
|
one |
|
|
mapped with |
|
drop-in |
CCPi’s three counts, after mapping: |
progress lines on stdout |
drop-in |
|
The mapping is tested in
tests/test_ccpi_io.py:
CCPi’s codes keep their values (0, −1, −2, −3), SINGULAR.to_ccpi() is
NOT_SEARCHED, and a .disp written with SINGULAR and THRESH_FAIL points
reads back as −3 for both.
Note
Every .disp writer (zvdvc finalize --disp, zvdvc solve --disp, the
zvdvc-dvc drop-in) writes zero displacement for points that are not GOOD,
as CCPi does. The results store and the zvdvc solve .npz keep the
parameters a failed point had when it failed. Always select status == 0
before using displacements.