Repository navigation
FIX: unify propagator photon-count normalization - #89
Conversation
|
Thanks, Ming! I reviewed the branch against the discussion post, and the core change looks right to me. What I verified
Items the discussion doesn't cover
|
|
Thanks for reviewing the changes and putting together these comments! As I understand it, the goals we are pursuing are:
Regarding comment 1, I've removed the preconditioner_seed = illumination_mapThe previous factor came from our adaptation of PtychoShelves. Its Under a consistent change of field units, scaling the probe by This intentionally changes the initialization heuristic for both far-field and near-field runs. Although LSQML's fitted step size compensates for a scalar change in the preconditioner, averaging maps from an evolving probe can change the spatial weighting and reconstruction trajectory. Angular-spectrum probes require no amplitude conversion, but their iteration histories can change through this initialization. I'll clarify in the announcement that the seed change affects both geometries. For comment 2, I've removed For comment 3, I agree that position-gradient preconditioning belongs in a follow-up. The existing These changes are pushed in 370c625. All 72 focused tests pass, including checks of actual object/probe updates across equivalent field representations. The GPU regression run has 21 passes and the existing affine-position failure, with a relative L2 error of 0.306% against its reference. Among the passing reconstruction comparisons, the largest relative L2 error is 0.0171%; object RMS amplitudes differ from the references by less than 0.001% across the run. |
|
Thanks, Ming. What I verified
Reference tests (current CI data at Thirteen tests fail on the branch that pass at its base,
|
Use unitary detector propagation, remove obsolete normalization corrections, and migrate reconstruction test settings. Document saved-probe conversion and verify power conservation, adjoints, and reconstruction behavior. Validation: 516 focused CPU tests passed. GPU rerun after test migration: 8 passed, with affine-position LSQML and autodiff OPR reference mismatches remaining at approximately 0.31% and 0.33% relative L2 error.
370c625 to
ed5d89c
Compare
Features/fixes
Standardize propagation so squared wavefield magnitudes represent counts per pixel and lossless propagation preserves their sum.
Remove obsolete power-conversion helpers and FFT gradient corrections, simplify probe rescaling, and update preconditioner initialization. Document saved-probe migration and power-constraint units. Migrate BH and autodiff test settings and remove the incorrectly specified power constraints from the DM tests.
Related issues (optional)
#83
Mentions
@stevehenke
Checklist (Don't skip!)
To check a checklist item, change the space in the backets with an
x, i.e.,[ ] -> [x].Have you...