WfGroupResult#

class lsst.ts.wep.blitz.WfGroupResult(group_id, group_size, zk_dev, success, donut_results, det_names, imgs, model_imgs, fit_elapsed, fit_nfev, fit_cost, fit_optimality, fit_njev, fit_status, fit_message, fit_error, fit_outcome)#

Bases: object

One fit group’s outputs, produced by WavefrontFittingTask.run.

A group is what gets fit jointly – a pair in paired mode, one donut unpaired, a whole corner in corner_group mode – so everything here is a property of the fit, not of a donut. The per-donut half of the same fit is the WfDonutResult list in donut_results, one per member, each carrying its own copy of the group’s values for the output catalog’s group_* columns.

The fit_* fields are flattened from what used to be a nested fit_info dict, so a group that never fit reports typed NaN/0/"" rather than a missing key. fit_outcome is one of _FIT_OUTCOMES and says which of the mutually exclusive paths ran; it subsumes success.

imgs and model_imgs are dropped by _shed_images in full-array mode when the config says not to save them, since they dominate the size of what a worker pickles home.

group_id#

Id shared by every member of the group.

Type:

str

group_size#

Number of donuts in the group.

Type:

int

zk_dev#

Sparse wavefront deviations, one entry per fitted Noll index, in meters.

Type:

numpy.ndarray

success#

Whether the joint fit converged.

Type:

bool

donut_results#

The per-donut half of the fit, one per group member.

Type:

list of WfDonutResult

det_names#

Each member’s detector, in the same order as donut_results.

Type:

list of str

imgs#

The per-member data images.

Type:

list of numpy.ndarray

model_imgs#

The per-member model images, or None when dropped to save size.

Type:

list of numpy.ndarray or None

fit_elapsed#

Fit wall-clock in seconds.

Type:

float

fit_nfev, fit_njev

Function and Jacobian evaluation counts.

Type:

int

fit_cost, fit_optimality

Final cost and first-order optimality of the fit.

Type:

float

fit_status#

least_squares termination status, or _FIT_STATUS_ABSENT for a group that never fit.

Type:

int

fit_message, fit_error

The solver’s termination message and any error string.

Type:

str

fit_outcome#

Which mutually exclusive fit path ran; subsumes success.

Type:

FitOutcome

Parameters:

Attributes Summary

Methods Summary

dead(group, reason, n_zk)

Stand-in for a fit group whose worker was killed outright.

empty(group_id, n_zk)

Result for a group with no donuts in it.

Attributes Documentation

det_names: list[str] = <dataclasses._MISSING_TYPE object>#
donut_results: list[WfDonutResult] = <dataclasses._MISSING_TYPE object>#
fit_cost: float = <dataclasses._MISSING_TYPE object>#
fit_elapsed: float = <dataclasses._MISSING_TYPE object>#
fit_error: str = <dataclasses._MISSING_TYPE object>#
fit_message: str = <dataclasses._MISSING_TYPE object>#
fit_nfev: int = <dataclasses._MISSING_TYPE object>#
fit_njev: int = <dataclasses._MISSING_TYPE object>#
fit_optimality: float = <dataclasses._MISSING_TYPE object>#
fit_outcome: Literal['ok', 'nonconvergent', 'timeout', 'exception', 'x0_only', ''] = <dataclasses._MISSING_TYPE object>#
fit_status: int = <dataclasses._MISSING_TYPE object>#
group_id: str = <dataclasses._MISSING_TYPE object>#
group_size: int = <dataclasses._MISSING_TYPE object>#
imgs: list[ndarray[tuple[Any, ...], dtype[float64]]] = <dataclasses._MISSING_TYPE object>#
model_imgs: list[ndarray[tuple[Any, ...], dtype[float64]] | None] | None = <dataclasses._MISSING_TYPE object>#
success: bool = <dataclasses._MISSING_TYPE object>#
zk_dev: ndarray[tuple[Any, ...], dtype[float64]] = <dataclasses._MISSING_TYPE object>#

Methods Documentation

classmethod dead(group, reason, n_zk)#

Stand-in for a fit group whose worker was killed outright.

No Python runs in a process the kernel has already destroyed, so the parent reports the group as failed on its behalf and the surviving groups’ Zernikes still reach the output.

The group’s donuts are carried through even though none was fit: they still get catalog rows, and dropping them here would lose them silently. They arrive as _NULL_WF_DONUT copies rather than the Donut`s themselves, since that is what `_build_donut_catalog reads – identity and intrinsics survive, and everything the lost fit would have measured is NaN. fit_outcome is "exception" and not "", which would claim no group ever took the donut.

Parameters:
  • group (_WfGroup) – The group that was lost.

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

  • n_zk (int) – Length of the Zernike vector, so the NaN row matches its siblings and the output table stays rectangular.

Returns:

A failed result carrying the group’s donuts as _NULL_WF_DONUT copies with fit_outcome="exception".

Return type:

WfGroupResult

classmethod empty(group_id, n_zk)#

Result for a group with no donuts in it.

Nothing was fit, so every fit field takes its no-fit value and fit_outcome is "" – the same spelling _NULL_WF_DONUT uses for “no fit consumed this”.

Parameters:
  • group_id (str) – Id for the empty group.

  • n_zk (int) – Length of the Zernike vector, so the NaN zk_dev matches its siblings and the output table stays rectangular.

Returns:

A result with no donuts, all-NaN Zernikes, and every fit field at its no-fit value.

Return type:

WfGroupResult