DonutBlitzCornerTask#
- class lsst.ts.wep.blitz.DonutBlitzCornerTask(**kwargs)#
Bases:
PipelineTaskBlitz WEP task for the corner wavefront sensors.
Runs ISR, blitz donut detection, WCS refit, catalog-based donut selection, and stamp cutting on whichever corner detector raws are present, in parallel using a multiprocessing pool. Reference catalogs are loaded in the parent process before forking and inherited by workers via copy-on-write. A second pool runs the wavefront fitting, also parallelized by wavefront group. The outputs are a per-donut catalog with all the selection and fitting results, plus optional per-corner Zernike tables and the detector-image and selection-overlay tables that feed the focal-plane selection plot. See the config for how to disable the Zernike and selection outputs, or to save the diagnostic plots.
- Parameters:
kwargs (
Any)
Methods Summary
run(raws, ptc, flat, linearizer, crosstalk, ...)Run ISR, WCS refit, catalog selection, and stamp cutting on the corner raws that are present, in parallel.
runQuantum(butlerQC, inputRefs, outputRefs)Fetch this quantum's inputs, run the task, and write its outputs.
Methods Documentation
- run(raws, ptc, flat, linearizer, crosstalk, ref_cat, intrinsic_zernikes=None, butler_elapsed=0.0, butler_times=None, num_cores=1, exposure_group='', instrument='')#
Run ISR, WCS refit, catalog selection, and stamp cutting on the corner raws that are present, in parallel. The cutouts run in one pool over the corner detectors; a second pool then fits the wavefronts, parallelized by wavefront group.
- Parameters:
raws (list of lsst.afw.image.Exposure) – Corner wavefront sensor raws. Any subset of the 8 corner detectors is accepted; processing covers exactly the detectors supplied here. Calibrations must be complete for every detector present.
ptc (list of lsst.ip.isr.PhotonTransferCurveDataset) – Photon transfer curve calibrations, one per detector.
flat (list of lsst.afw.image.ExposureF) – Flat-field calibrations, one per detector.
linearizer (list of lsst.ip.isr.Linearizer) – Linearity corrections, one per detector.
crosstalk (list of lsst.ip.isr.CrosstalkCalib) – Crosstalk coefficients, one per detector.
ref_cat (list of DeferredDatasetHandle or SimpleCatalog) – Shards used for both WCS fitting and donut selection, loaded once per detector. The WCS fit reads
astromRefFilter(resolved as the load’sfluxField) and donut selection reads the per-bandphotoRefFilter/photoRefFilterPrefixcolumn off the same catalog.intrinsic_zernikes (list of IntrinsicZernikes, optional) – One calibration per corner detector. None or empty when absent.
butler_elapsed (float, optional) – Total butlerQC.get() wall time in seconds, for logging and plot.
butler_times (dict, optional) – Per-dataset butlerQC.get() times keyed by dataset type name.
num_cores (int, optional) – Number of cores for the cutout and wavefront pools; 1 runs everything inline.
exposure_group (str, optional) – Butler
groupof the corner exposure, for output meta.instrument (str, optional) – Butler
instrumentdimension, for output meta. Taken from the dataId rather thanvisit_info.instrumentLabelbecause the dimension is authoritative where the header field can be blank.
- Returns:
Struct with fields
donuts(selected donuts),wfResults(per-group fit results),cornerResults(the per-donut catalog),zernikes(per-corner tables, empty unlessdoZernikesOutput),detectorImagesandselectionOverlays(focal-plane plot inputs), andplots(the diagnostic figures, None unlesssavePlots).- Return type:
lsst.pipe.base.Struct
- runQuantum(butlerQC, inputRefs, outputRefs)#
Fetch this quantum’s inputs, run the task, and write its outputs.
Narrows the per-detector calibration refs to the detectors the raws actually cover, fetches each input dataset type separately so the I/O can be timed per type, then calls
runand persists whichever outputs the config enables.- Parameters:
butlerQC (lsst.pipe.base.QuantumContext) – The quantum context used to fetch inputs and put outputs.
inputRefs (lsst.pipe.base.InputQuantizedConnection) – References to this quantum’s input datasets.
outputRefs (lsst.pipe.base.OutputQuantizedConnection) – References to this quantum’s output datasets.
- Return type: