display_images#

lsst.analysis.ap.display_images(butler, visit, detector, backend='firefly', *, reliability_threshold=0.1, show_unfiltered=True, show_trailed=True, show_rejected=True, show_standardized=True, show_marginal=True, show_kernel_sources=True, show_solar_system=True, show_apdb=True, show_reliability_labels=True, show_dipoles=True, show_trail_geometry=True, line_length_scale=1.0, label_size=3, color_by=None, unfiltered_style='footprint', mask_transparency=80, strip_metadata=True, skymap=None, skymap_ctype='green', skymap_label_size=1.5, image_datasets={'difference': 'difference_image', 'science': 'preliminary_visit_image', 'template': 'template_detector'}, use_fakes=False, dry_run=False)#

Display the science, template, and difference images for a given visit+detector with diagnostic catalog markers overlaid.

Three frames are produced (science, template, difference) and the same overlays are drawn on each. Catalogs that are missing from the butler are silently skipped, so the same call works against partial outputs.

Default overlay key. Rows are in AP-pipeline creation order, so the last marker drawn at any pixel reflects the latest classification the pipeline assigned. Circle sizes step by 2 so successive o markers nest rather than stack.

catalog

symbol

size

color

psf-matching kernel sources

o

12

green

unfiltered candidates

footprint

red (unfiltered_style)

rejected diaSources

+

10

orange

long-trailed sources

x

30

magenta

standardized diaSources

+

10

blue

APDB, reliability > threshold

o

14

blue (+ score text)

APDB, reliability ≤ threshold

o

14

red

solar-system matches

o

16

cyan

marginal new diaSources

+

10

yellow

By default the dia_source_unfiltered catalog is drawn as Firefly footprint outlines rather than + markers; see unfiltered_style.

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”).

reliability_thresholdfloat, optional

APDB diaSources with reliability strictly greater than this are drawn as “good” (blue); the rest as “bad” (red).

show_unfiltered, show_trailed, show_rejected, show_standardized, show_marginal, show_kernel_sources, show_solar_system, show_apdb : bool, optional

Toggle individual catalog overlays. show_kernel_sources loads difference_kernel_sources, the PSF-matching constraint sources from image subtraction — useful for seeing where the kernel was actually anchored vs extrapolated.

show_reliability_labelsbool, optional

If True, annotate each good APDB diaSource with its reliability score.

show_dipolesbool, optional

If True, draw a 10-px white line segment through each source in dia_source_unfiltered with ip_diffim_DipoleFit_classification set, oriented along ip_diffim_DipoleFit_orientation (radians, detector-frame). The length is fixed rather than measured because ip_diffim_DipoleFit_separation is sub-pixel for the vast majority of classified dipoles; the line is a fixed-size marker of orientation rather than a physical extent. Sourced from the unfiltered catalog rather than the standardized or APDB catalogs because filterDiaSource removes dipoles before those stages.

show_trail_geometrybool, optional

If True, draw a magenta line segment along ext_trailedSources_Naive_angle with length ext_trailedSources_Naive_length for every source in dia_source_unfiltered whose trail length exceeds 3 px. Long-trailed sources removed by filterDiaSource still show up separately under show_trailed as x markers.

line_length_scalefloat, optional

Multiplicative factor applied to the drawn length of the trail line segments after the 3 px trail filter, so a below-threshold trail stays hidden regardless of the scale. Does not affect the dipole marker, which is drawn at a fixed 10 px length by design. Default 1.0 (draw trails at their measured length); use larger values to make short trails easier to see against the image.

label_sizeint, optional

Text size (in pixels) for the reliability score and solar-system designation annotations.

color_bysequence of str, optional

Flag column names from dia_source_unfiltered. When supplied, the unfiltered-candidate overlay is split into buckets colored by which named flag fires first (list order = color and priority), with a residual white bucket for rows that match none of them. Unknown column names are silently skipped. Applies whether the unfiltered catalog is drawn as footprints or markers. Example:

color_by=["pixelFlags_bad", "pixelFlags_edge",
          "ip_diffim_DipoleFit_classification",
          "pixelFlags_saturated"]
unfiltered_style{“footprint”, “marker”}, optional

How to draw dia_source_unfiltered. "footprint" (default) overlays each source’s Footprint outline using Firefly’s native footprint rendering; "marker" draws the old red + markers. Footprints need the "firefly" backend, so any other backend (e.g. ds9) silently falls back to markers. Two caveats with footprints, both warned about at call time: (1) when combined with color_by, footprint layers from a previous call are not auto-erased (Firefly offers no way to delete or enumerate them), so clearing them before re-running is your responsibility; (2) switching unfiltered_style from "footprint" to "marker" leaves the previous footprints on the frame — re-run in footprint mode or reset the frame to clear them. Re-running in the default (no color_by) footprint mode overwrites the single layer in place, so it is unaffected.

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.

skymaplsst.skymap.BaseSkyMap, optional

If supplied, overlay the boundaries of every tract/patch that touches each frame, labeled tract,patch.

skymap_ctypestr, optional

Display color for the tract/patch outlines and labels.

skymap_label_sizefloat, optional

Text size for the tract,patch labels.

image_datasetsdict [str, str], optional

Mapping from image-type key ("science", "template", "difference") to butler dataset name. Override to point at alternate dataset types.

use_fakesbool, optional

If True, load the fake-source-injected versions of the science and template images: fakes_ prefix on the science dataset and injectedTemplate_ prefix on the template dataset. The difference image and every catalog keep their non-prefixed names, per the fake-source pipeline’s output convention. Default False.

dry_runbool, optional

If True, load every requested image and catalog and print the overlay/footprint legends, but skip constructing the afw display and drawing anything. Useful for sanity-checking which datasets are available for a (visit, detector) without opening a viewer. Default False.