CutoutResult#

class lsst.ts.wep.blitz.CutoutResult(det_name, catalog, rejected_catalog, isr_run, bkg_run, diam_run, detect_run, wcs_refit_run, catalog_select_run, stamp_cut_run, scatter_arcsec, wcs_refit_error, cat_select_error, selection_source, n_quarter, wcs, pair_path='n/a', visit_id=None, dispatch_to_arrival=nan, view=None)#

Bases: object

One exposure of one detector, as _cutout_one_exposure returns it.

Corner mode produces one per detector, full-array mode two – one per exposure of the pair, each tagged with its own visit_id. Consumed by both tasks’ logging and by _build_donut_catalog, which turns most of these fields into that detector’s table.meta["det_meta"] entry.

Every *_run field is seconds, and a stage that never ran is NaN rather than 0.0: a detector that bailed out early must not read as one whose remaining stages were instantaneous. The stage fields are keyed by lsst.ts.wep.blitz.utils._CUTOUT_STAGE_KEYS, which is where their order comes from – everything reporting them iterates that mapping rather than spelling them out.

det_name#

Detector name.

Type:

str

catalog#

Accepted donuts.

Type:

list of Donut

rejected_catalog#

Donuts that failed a selection or quality cut.

Type:

list of Donut

isr_run, bkg_run, diam_run, detect_run

Per-stage wall-clock in seconds; NaN for a stage that never ran.

Type:

float

wcs_refit_run, catalog_select_run, stamp_cut_run

Per-stage wall-clock in seconds; NaN for a stage that never ran.

Type:

float

scatter_arcsec#

On-sky scatter of the refit WCS in arcseconds, None where no refit ran.

Type:

float or None

wcs_refit_error, cat_select_error

Error messages from the WCS refit and catalog selection, empty on success.

Type:

str

selection_source#

Where this detector’s donut ids came from, and so whether they are comparable across the two exposures of a pair.

Type:

str

n_quarter#

Detector orientation, relating the CCS stamp to x_det/y_det.

Type:

int

wcs#

The WCS actually used, or None.

Type:

lsst.afw.geom.SkyWcs or None

pair_path#

Which pairing algorithm ran; overwritten by the grouping stage.

Type:

str, optional

visit_id#

The exposure this result covers, set by full-array mode; None in corner mode.

Type:

int or None, optional

dispatch_to_arrival#

Dispatch-to-arrival latency of the work unit, set in corner mode only.

Type:

float, optional

view#

The binned image and overlay sources for the focal-plane plot, or None where not built.

Type:

DetectorView or None, optional

Parameters:

Attributes Summary

Methods Summary

dead(det_name, reason)

Stand-in for a detector whose worker was killed outright.

no_detections(det_name, n_quarter, isr_run, ...)

Result for a detector on which blitz detection found nothing.

Attributes Documentation

bkg_run: float = <dataclasses._MISSING_TYPE object>#
cat_select_error: str = <dataclasses._MISSING_TYPE object>#
catalog: list[Donut] = <dataclasses._MISSING_TYPE object>#
catalog_select_run: float = <dataclasses._MISSING_TYPE object>#
det_name: str = <dataclasses._MISSING_TYPE object>#
detect_run: float = <dataclasses._MISSING_TYPE object>#
diam_run: float = <dataclasses._MISSING_TYPE object>#
dispatch_to_arrival: float = nan#
isr_run: float = <dataclasses._MISSING_TYPE object>#
n_quarter: int = <dataclasses._MISSING_TYPE object>#
pair_path: str = 'n/a'#
rejected_catalog: list[Donut] = <dataclasses._MISSING_TYPE object>#
scatter_arcsec: float | None = <dataclasses._MISSING_TYPE object>#
selection_source: str = <dataclasses._MISSING_TYPE object>#
stamp_cut_run: float = <dataclasses._MISSING_TYPE object>#
view: DetectorView | None = None#
visit_id: int | None = None#
wcs: Any = <dataclasses._MISSING_TYPE object>#
wcs_refit_error: str = <dataclasses._MISSING_TYPE object>#
wcs_refit_run: float = <dataclasses._MISSING_TYPE object>#

Methods Documentation

classmethod dead(det_name, reason)#

Stand-in for a detector whose worker was killed outright.

_cutout_one_exposure reports its own failures in wcs_refit_error / cat_select_error and always returns one of these, but it cannot report a SIGKILL – no Python runs in a process the kernel has already destroyed. So the parent synthesizes the same shape on the worker’s behalf, letting the visit proceed on the surviving detectors instead of being lost entirely.

Every timing is NaN and both catalogs empty, matching no_detections: a stage that never ran must not read as one that was instantaneous.

Parameters:
  • det_name (str) – Detector whose worker died.

  • reason (str) – Cause, from _fork_map’s _WorkerDeath.

Returns:

A result with empty catalogs, every timing NaN, and selection_source="worker_died".

Return type:

CutoutResult

classmethod no_detections(det_name, n_quarter, isr_run, bkg_run, diam_run, detect_run)#

Result for a detector on which blitz detection found nothing.

The four stages that did run are reported; the three below them never ran and stay NaN. selection_source is "no_detections", which is distinct from the selector running and rejecting everything ("blitz_failed").

Parameters:
  • det_name (str) – Detector name.

  • n_quarter (int) – Detector orientation as a count of 90-degree rotations.

  • isr_run (float) – Wall-clock in seconds for the four stages that did run.

  • bkg_run (float) – Wall-clock in seconds for the four stages that did run.

  • diam_run (float) – Wall-clock in seconds for the four stages that did run.

  • detect_run (float) – Wall-clock in seconds for the four stages that did run.

Returns:

A result with empty catalogs, the four reported timings, and every later stage NaN.

Return type:

CutoutResult