Repository navigation
Add scripts to assess reference and difference image creation - #696
Merged
Merged
Conversation
…s references and their coverage Outside the pipeline, read-only. For a run's reference jobs (every state) or a dataset's official references, optionally of one program, it writes: - references.md: one row per reference with its outcome, grade, frames coadded beside the candidates it could have, and the real and possible fraction at min_coverage_depth; then the fields with rows to difference and no reference. - ref-<field>-<filter>-<job>.png: the published coverage map beside the full possible depth, replayed from the l2files corners with rapidpipe.products.coverage and no stop at max_frames or max_coverage_fraction, less the manifest's skipped frames. - overview-<filter>.png: the depth of the L2 footprints before the bound on the tangent plane about the scope's centre (unit-vector mean, so a scope across R.A. 0/360 is one piece), each reference outlined by outcome. Tested: 18 unit tests (geometry across R.A. 0 and at a pole, possible depth, records, figures on synthetic maps) and 3 tests/db tests (the run, dataset and program scopes and the command) pass locally. Not run against a real run or a real coverage map. The rapid_docs page is not yet updated. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s well as its RAPID one Each name goes through rapidpipe.products.filters.rapid_filter_name, so F062 and R062 select the same filter, in any case. The report's names stay the RAPID ones, as the filters table has them; a name in neither spelling is still a usage error (exit 64). Tested: a new tests/db test (F146, W146 and f146 give the same references, F062 and R062 none for a W146-only run, F999 exits 64); the script's 22 tests pass locally. The full suites were not rerun. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…iew-run-<id>-<filter>.png The overview's file name carries the scope it was drawn for, so two runs written under one --out directory keep both: run-<id> for a run, dataset-<name> or dataset-<name>-program-<id> for a dataset, a character of the dataset's name that is unsafe in a file name written as "_". The per-reference figures and references.md keep their names. Tested: the unit and tests/db tests are updated for the new names, with the dataset and program name checked; the script's 22 tests pass locally. The full suites were not rerun. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ces' coverage figures only --max-maps N reads the coverage map and draws the per-reference figure of the first N references, in the table's order (field, filter, job). Every reference keeps its row and its outline on the overview; one whose map is not read takes its real fraction from its manifest, blank when the manifest has none. It is exclusive with --no-maps, and a negative N is a usage error (exit 64). Tested: a new unit test (two references, --max-maps 1: one figure and one map-read fraction) and two usage-error cases; the script's 25 tests pass locally. The full suites were not rerun. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ram's difference images were made One figure per filter, differences-<scope>-<filter>.png: the sky under a difference image filled, each failed difference job's frame outlined in red, and the reference footprints outlined (solid bound, dashed not). A failed job whose frame another job differenced is counted as recovered and not outlined; one that names no l2files input is counted as unplaced. reference_coverage.py: the scope's names, the --filter parsing and a reference's outline are now functions both scripts call; no change in behaviour. Tested: 6 unit tests and 3 tests/db tests for the new script, with the reference script's tests, on a throwaway PostgreSQL 18. Not run against a real run. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e's title With --run the title reads "run N, dataset NAME, filter: ...". File names are unchanged. Tested: the script's 6 unit and 3 tests/db tests pass; none reads the title text. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…un, ref-run-<run>-<field>-<filter>-j<job>.png The run is the reference job's own, and the job number carries a j. Tested: the script's unit tests pass (21); its tests/db tests passed with the run number, before the j was added. Co-Authored-By: Claude Fable 5.2 <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.
For reference coverage
scripts/reference_coverage.pywill produce two maps:For difference images, the script
scripts/difference_coverage.pyplots all pixels in processed difference images, outlining failed difference image foot prints, and showing the outline of reference files (note that this isn’t the same as pixel coverage on those reference files, which may be a better metric)