FamDetectorResult#

class lsst.ts.wep.blitz.FamDetectorResult(det_id, det_name, results, wf_results, donuts, unmatched_donuts, error, skipped, pid, dispatch_to_arrival, io_run, refcat_run, cutout_run, fit_run, worker_wall, pair_path='n/a')#

Bases: object

One full-array detector, as _fam_detector_worker returns it.

The envelope around the pair of CutoutResult`s in ``results`: a full-array worker fuses cutting, pairing and fitting into one work unit, so everything the parent needs about that detector has to come back through here. Corner mode has no counterpart – its work unit ends at the CutoutResult, and the fields below it would carry are parent-side locals in DonutBlitzCornerTask.run instead.

Every *_run field is seconds and per detector, and NaN means the worker never reached that phase. refcat_run in particular is not per exposure: one refcat load covers both sides of focus, so it belongs here and not on the two results, where summing it across the quantum would double-count every detector.

A worker that failed reports it in error rather than raising, so that one bad detector out of 189 cannot take down the pool. skipped separates the expected no-work outcome – a dead CCD, which ip_isr raises NoWorkFound for – from a genuine fault; both leave error set, so test skipped first.

det_id#

Detector identifier.

Type:

int

det_name#

Detector name; empty until the worker has read a raw.

Type:

str

results#

The pair of cutout results, intra-focal first.

Type:

list of CutoutResult

wf_results#

One per fit group.

Type:

list of WfGroupResult

donuts#

Accepted donuts, both sides of focus.

Type:

list of Donut

unmatched_donuts#

Donuts with no partner on the other side.

Type:

list of Donut

error#

Failure message, empty on success.

Type:

str

skipped#

True for an expected no-work outcome such as a dead CCD.

Type:

bool

pid#

The worker process id, or -1 when the parent synthesized the record.

Type:

int

dispatch_to_arrival#

Dispatch-to-arrival latency of the work unit, in seconds.

Type:

float

io_run, refcat_run, cutout_run, fit_run, worker_wall

Per-detector phase wall-clock in seconds; NaN for a phase the worker never reached. refcat_run covers both sides of focus.

Type:

float

pair_path#

Which pairing algorithm ran; "n/a" for a detector that failed or was skipped before grouping.

Type:

str, optional

Parameters:

Attributes Summary

Methods Summary

dead(det_id, reason)

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

started(det_id, dispatch_to_arrival)

The result a worker starts from and fills in as it goes.

Attributes Documentation

cutout_run: float = <dataclasses._MISSING_TYPE object>#
det_id: int = <dataclasses._MISSING_TYPE object>#
det_name: str = <dataclasses._MISSING_TYPE object>#
dispatch_to_arrival: float = <dataclasses._MISSING_TYPE object>#
donuts: list[Donut] = <dataclasses._MISSING_TYPE object>#
error: str = <dataclasses._MISSING_TYPE object>#
fit_run: float = <dataclasses._MISSING_TYPE object>#
io_run: float = <dataclasses._MISSING_TYPE object>#
pair_path: str = 'n/a'#
pid: int = <dataclasses._MISSING_TYPE object>#
refcat_run: float = <dataclasses._MISSING_TYPE object>#
results: list[CutoutResult] = <dataclasses._MISSING_TYPE object>#
skipped: bool = <dataclasses._MISSING_TYPE object>#
unmatched_donuts: list[Donut] = <dataclasses._MISSING_TYPE object>#
wf_results: list[WfGroupResult] = <dataclasses._MISSING_TYPE object>#
worker_wall: float = <dataclasses._MISSING_TYPE object>#

Methods Documentation

classmethod dead(det_id, reason)#

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

_fam_detector_worker catches BaseException so that it always returns one of these, but that cannot cover a SIGKILL: no Python runs in a process the kernel has already destroyed. The parent fills in the same shape so one dead detector costs one detector, not the other 188 and the hours already spent on them.

Recorded as an error rather than a skip: skipped means an expected no-work outcome such as a dead CCD, whereas a killed worker is a fault.

Parameters:
  • det_id (int) – Detector whose worker died.

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

Returns:

A result with error set and pid -1, marking it as a fault the parent synthesized on the worker’s behalf.

Return type:

FamDetectorResult

classmethod started(det_id, dispatch_to_arrival)#

The result a worker starts from and fills in as it goes.

Every phase timing is NaN and every list empty, so a worker that dies part way through reports exactly the phases it reached. pid is the worker’s own, which is what ties a log line to a process.

Parameters:
  • det_id (int) – Detector this worker is processing.

  • dispatch_to_arrival (float) – Dispatch-to-arrival latency of the work unit, in seconds.

Returns:

A fresh result with empty lists, NaN timings and the worker’s own pid, ready to be filled in as the worker progresses.

Return type:

FamDetectorResult