CutDonutStampsTask#

class lsst.ts.wep.blitz.CutDonutStampsTask(config=None, *, name=None, parentTask=None, log=None)#

Bases: Task

Cut donut stamps and evaluate rejection criteria.

For each measured candidate, cuts a stamp centered on the centroid, computes per-stamp geometry (field angle, nearby refcat sources) and the SAT flag, then applies the quality cuts (SAT, inner/outer flux fraction, SNR) to split accepted from rejected.

Candidates are sorted flux-descending internally, so both output lists are filled brightest-first and the cut loop early-exits once both the accepted (maxDonuts) and rejected (maxRejectDonuts) buckets are full – avoiding stamp cuts on the faint tail that would be discarded anyway.

Donut radius comes from the module-level instrument (_LSSTCAM), not config.

Parameters:
  • config (Config | None, default: None)

  • name (str | None, default: None)

  • parentTask (Task | None, default: None)

  • log (Logger | LsstLogAdapter | None, default: None)

Methods Summary

run(exposure, measurements, refcat[, ...])

Cut stamps and split accepted vs.

Methods Documentation

run(exposure, measurements, refcat, donut_radius=None)#

Cut stamps and split accepted vs. quality-rejected donuts.

Parameters:
  • exposure (Exposure) – Background-subtracted post-ISR science exposure.

  • measurements (QTable) – Measured candidates from the measurement task, with columns donut_id, centroid_x, centroid_y, flux, inner_frac, outer_frac, outer_asym, snr, bkg_std, bkg, plus every column in lsst.ts.wep.blitz.utils._REFCAT_COLUMNS – present whichever selection path ran, NaN-valued on the blitz-detection one. Photometric metrics are carried onto the Donut objects as-is; only geometry and the SAT flag are computed here. Row order is not assumed – the table is sorted flux-descending internally before stamps are cut.

  • refcat (QTable or None) – Full refcat with donut_id, centroid_x, centroid_y, photo_mag, astrom_mag, or None in the blitz-detection fallback. Supplies the nearby-source lists; donut_id is what excludes each donut from its own neighbor list.

  • donut_radius (float or None, optional) – Measured donut radius in un-binned pixels, or None/NaN if unmeasured. If None, the nominal _LSSTCAM.donut_radius is used.

Returns:

donutslist of Donut

Accepted donuts, brightest-first, at most maxDonuts.

rejected_donutslist of Donut

Quality-rejected donuts, brightest-first, at most maxRejectDonuts.

Return type:

pipeBase.Struct