display_coadd_coverage#

lsst.analysis.ap.display_coadd_coverage(butler, visit, detector, backend='firefly', *, patch_extent='full', patch_margin=100, show_diffim_outline=True, show_patch_outlines=True, diffim_ctype='red', label_size=1.5, mask_transparency=80, strip_metadata=True, align='Standard', skymap_name=None, image_datasets={'difference': 'difference_image', 'science': 'preliminary_visit_image', 'template': 'template_detector'}, coadd_dataset='template_coadd', dry_run=False)#

Display a difference image alongside every coadd patch that went into its template.

Frame 0 shows the difference image, with the outline of each contributing patch drawn and labeled tract,patch. Frames 1..N show the coadd patches themselves, one per frame in (tract, patch) order, each with the difference image’s footprint outlined on it.

The contributing patches are read from the template’s coaddInputs, which GetTemplateTask fills with one record per patch that supplied valid pixels. That is a stricter set than a skymap lookup would give: patches that overlap the detector geometrically but contributed nothing were already dropped when the template was built.

Parameters#

butlerlsst.daf.butler.Butler

Butler to load data from.

visit, detectorint

Visit and detector ids to load data for.

backendstr, optional

afw display backend (typically “firefly” or “ds9”).

patch_extent{“full”, “overlap”}, optional

How much of each coadd to display. "full" (default) shows the whole patch, which is what puts the detector’s footprint in context but sends a full-size coadd to the backend per frame; "overlap" trims each patch to the difference image’s footprint plus patch_margin, which is much faster to display but makes every frame look alike.

patch_marginint, optional

Pixels of coadd to keep around the difference image’s footprint when patch_extent="overlap". Ignored for "full".

show_diffim_outlinebool, optional

If True, outline the difference image’s footprint on each coadd frame, labeled visit,detector.

show_patch_outlinesbool, optional

If True, outline each contributing patch on the difference-image frame, labeled tract,patch. Outlines are drawn for missing coadds too, since the geometry comes from the template’s records rather than from the coadd itself.

diffim_ctypestr, optional

Display color for the difference-image outline. The patch outlines cycle through a fixed palette instead, so that a patch’s color on frame 0 identifies its own frame in the printed legend.

label_sizefloat, optional

Text size for the outline labels.

mask_transparencyint or None, optional

Mask-plane transparency forwarded to the display (0 = opaque, 100 = fully transparent). Pass None to leave the backend’s current setting untouched.

strip_metadatabool, optional

Drop LTV1/LTV2 keywords from each exposure’s metadata before sending to the backend. Needed for ds9 to align frames.

alignstr or None, optional

match_type passed to alignImages. Defaults to "Standard" (align by WCS) rather than the pixel matching display_images uses, because these frames do not share a pixel grid. Pass None to leave the frames unaligned.

skymap_namestr, optional

Skymap the coadds live in. Only needed when the contributing tracts and patches match coadds in more than one skymap, which is an error otherwise.

image_datasetsdict [str, str], optional

Mapping from image-type key ("science", "template", "difference") to butler dataset name. Only the "template" and "difference" entries are used here; the template is read as a .coaddInputs component, so its pixels are never loaded.

coadd_datasetstr, optional

Dataset name of the coadds the template was built from. The default matches what ApPipe.yaml binds to the template task’s coaddExposures input.

dry_runbool, optional

If True, work out which patches contributed and print the legend, but skip constructing the afw display and loading any pixels. Useful for checking a template’s provenance without a viewer. Default False.