Add side-by-side map and cutout grid to --compare-residuals - #95
Open
Athanaseus wants to merge 2 commits into
Open
Athanaseus wants to merge 2 commits into
Athanaseus wants to merge 2 commits into
Conversation
Numbers alone could not show what changed or where. --compare-residuals now also writes <kind>ResidualCutouts.html: both images side by side, each marking only where it is deeper than the other (block minima, so downsampling cannot erase a hole), and the 18 biggest changes as touching stamp pairs. With -catalog these are the sources whose deepest negative changed most; without, the biggest pixel changes anywhere. Ranked by size of change either way, so image order does not matter. Needs both images on one pixel grid, otherwise skipped with a warning. --reference-position adds a stamp pair at that spot. -cr combines everything into ResidualReport.html. -svg writes the map and grid via matplotlib. The CLI never passed -svg or -cr to --compare-residuals. Passing -svg exposed bokeh's SVG export, which aborts without a browser driver; it now warns and continues. Rows carry ra_deg/dec_deg, and the off-image check is shared with image_dynamic_range.
Athanaseus
added this pull request to stack #92
September 15, 2026 19:24
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.
Numbers alone can't show what changed between two images or where.
--compare-residualsnow also writesSourceResidualCutouts.html(with-catalog) orRandomResidualCutouts.html(without): a side-by-side map, then a grid of the 18 biggest changes as stamp pairs. The existing noise-ratio plot is unchanged. Image-agnostic: two self-cal rounds, DI vs DD, anything on the same pixel grid.Side-by-side map
Cutout grid — with a catalogue
--reference-positionadds one extra pair at that position, on its own row above the grid (top row here).Cutout grid — without a catalogue
brighptsrc5). Bright sources saturate on the negative-driven colour scale, so the size of each drop is in the title.Options
-cr: everything in one tabbedResidualReport.html(Noise ratio · Cutouts).-crpreviously covered only catalogue comparisons.-svg: also writes the map (…_map.svg) and grid (….svg) through matplotlib, which is optional; a warning if it's missing.--reference-positionis checked before any work: a position off either image or on blanked pixels raises immediately, as it already does for dynamic range. That check is now one shared helper.Also fixed
-svgor-crto--compare-residuals.-svgreached it, bokeh's SVG export of the noise-ratio plot aborted the run on machines without a browser driver. It now warns and continues; the matplotlib SVGs need no browser.--reference-positionhelp didn't mention that sexagesimal is accepted.Notes
ra_deganddec_deg, appended at the end, so stamps don't rely on catalogue names being unique.