Fix inverted ratio in residual table; plot against distance, as scatter - #94
Open
Athanaseus wants to merge 1 commit into
Open
Athanaseus wants to merge 1 commit into
Athanaseus wants to merge 1 commit into
Conversation
The table row labelled Res1-to-Res2 computed mean(res2)/mean(res1) - the inverse of the per-source rms_ratio column and of the series drawn from it. On the DI/DD pair it read 0.3375 where the plot showed 2.96. The x axis was catalogue order, which is arbitrary, so a trend with off-axis distance or brightness scattered across the plot and read as noise. Order by distance from the phase centre by default and plot that distance in degrees. --sort-sources also takes flux (model flux in Jy) or none (source index, the old behaviour). The random path has no flux column and falls back to the index. Put both y axes on a log scale, with a line at 1.0. On a linear axis twice-as-bad (2.0) sits twice as far from no-change as twice-as-good (0.5), so equal changes looked unequal; and the residuals themselves span several decades. The right-hand axis needs it too: an extra range inherits the figure's scale, so a linear range there lost its tick labels. Draw the series as scatter rather than line - these are independent measurements at scattered sky positions, and a line between neighbours implies a continuity that only reflects the ordering. Distinct markers per series. Hover reported "???" on res1 and res2: they were drawn from raw arrays while the tooltip fields come from the shared ColumnDataSource. Draw them from it, and add distance to the tooltip. Report the signed statistics beside the sign-blind std, count sources whose hole exceeds 10% of model flux, and count the ratio tails at 5x and 10x each way - a mean ratio barely moves when a few sources are wrecked. Format the values, which previously rendered as 0.00018758542137220502. Tick labels were 6pt against 14pt axis titles, less than half the size of the text beside them; default them to 12pt. This affects every plot, not only this one. Also set legend click_policy, which the other three plots already had.
Athanaseus
added this pull request to stack #92
September 15, 2026 19:11
This branch has not been deployed
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.
Before / after
Same image pair and catalogue in both. (The pair is an intrinsic vs an apparent residual, so the radial trend is mostly primary-beam normalisation — it's here to show the axis working, not as a calibration result.)
Bugs fixed
Res1-to-Res2was inverted. It computedmean(res2)/mean(res1)under that label — the inverse of the per-sourcerms_ratioand of the series drawn from it. On this pair it read 0.3375 while the plot showed 2.96.???on the res1 and res2 series. They were drawn from raw arrays while the tooltip fields come from the sharedColumnDataSource. All series now draw from it, and hover also shows distance.Changes
--sort-sourcesalso takesflux(model flux in Jy) ornone(the old behaviour). The random-positions path has no flux and falls back to the index.0.00018758542137220502):The tail counts matter because a mean ratio barely moves when a few sources are wrecked. Here 5× favours res1, while 10× strongly favours res2 — invisible in the mean.