Finish the I-WLS labels: the AOA and TOA examples say what they run - #90
Merged
Conversation
The two files left out of the earlier relabel carried the same defect. `example_aoa_positioning` built `AOAPositioner(anchors)` at all seven call sites with no `sigma_*` and then said "I-WLS" fourteen times; `example_toa_positioning` solves with `method="iterative_ls"` everywhere while its module docstring claimed "using Iterative Weighted Least Squares (I-WLS)". The AOA half needed measuring rather than reading, because "uniform weights" is not obviously the same as "unweighted". It is here: a uniform W is a multiple of the identity, so it cancels out of (H' W H)^-1 H' W. Confirmed by solving the same bearings three ways -- no sigma, a scalar sigma, and a per-anchor sigma. The first two give bit-identical positions and only the third moves the answer, so those seven sites are the Eqs. (4.63)-(4.78) solver run unweighted. `example_comparison --compare-geometry` is the one place in the chapter that supplies a per-anchor sigma, and it keeps the name. The TOA half is two docstring lines. Its Example 6 was already right: it labels its own comparison "LS" against "WLS" and genuinely passes a covariance to the weighted side, which is the only `iterative_wls` in the file. Every number in both examples' output is unchanged -- verified by diffing full stdout, not just the numbers, after a scare that turned out to be my own regex reading the hyphen in "Eqs. 4.63-4.78" as a minus sign. Both committed figures are byte-identical, since neither carried the label in a tick or an axis. Worth noting what that means for coverage: `example_toa_positioning`'s stdout is the transcript pinned in the chapter README, and it did not move, because the wrong label lived only in the module docstring. A pinned transcript is no guard against a mislabelled docstring, and nothing here is. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #87, which relabelled
example_tdoa_positioning. The two files left out carried the same defect.example_aoa_positioningAOAPositioner(anchors)at all 7 sites, nosigma_*→ unweightedexample_toa_positioningmethod="iterative_ls"in 6 of 7 solvesThe AOA half needed measuring, not reading
"Uniform weights" is not obviously the same as "unweighted". It is here — a uniform W is a multiple of the identity, so it cancels out of
(H' W H)^-1 H' W. Confirmed by solving the same bearings three ways:The first two are bit-identical; only a per-anchor sigma moves the answer. So those seven sites are the Eqs. (4.63)-(4.78) solver run unweighted.
example_comparison --compare-geometryis the one place in the chapter that supplies a per-anchor sigma, and it keeps the name.The TOA half is two docstring lines
Its Example 6 was already right: it labels its own comparison "LS" against "WLS" and genuinely passes a covariance to the weighted side — the only
iterative_wlsin the file. Only the module docstring was wrong.Verification
Every number in both examples' output is unchanged. I diffed full stdout, not just extracted numbers, after a scare that turned out to be my own regex reading the hyphen in
"Eqs. 4.63-4.78"as a minus sign — every remaining difference is a label or a figure path.Both committed figures are byte-identical, since neither carried the label in a tick or an axis.
510 passed across repo conventions and the
--helpsweep; 122 passed across ch4, the new sys.path guard, the lint ratchet and console encoding; the pinned README transcript still passes; pyflakes clean.One thing this exposes
example_toa_positioning's stdout is the transcript pinned in the chapter README, and it did not move — because the wrong label lived only in the module docstring. A pinned transcript is no guard against a mislabelled docstring, and nothing in the suite is. Noted inCLAUDE.mdrather than guarded, since the invariant would be a prose claim with no precise form to check.🤖 Generated with Claude Code