lsst.pipe.tasks g5b638a483d+296d17aeab
Loading...
Searching...
No Matches
lsst.pipe.tasks.extended_psf.extended_psf_subtract.ExtendedPsfSubtractTask Class Reference
Inheritance diagram for lsst.pipe.tasks.extended_psf.extended_psf_subtract.ExtendedPsfSubtractTask:

Public Member Functions

 __init__ (self, initInputs=None, *args, **kwargs)
 runQuantum (self, butlerQC, inputRefs, outputRefs)
 run (self, ExposureF preliminary_visit_image, ExtendedPsfImage extended_psf, ReferenceObjectLoader ref_obj_loader, BackgroundList|None preliminary_visit_image_background=None)

Static Public Attributes

 ConfigClass = ExtendedPsfSubtractConfig

Protected Member Functions

Table _get_subtraction_star_table (self, ReferenceObjectLoader ref_obj_loader, ExposureF exposure)
float _subtract_one_star (self, ExposureF exposure, ImageF model_image_legacy, WarpingControl warp_control, Table star)

Protected Attributes

list _bg_powers

Static Protected Attributes

str _DefaultName = "extendedPsfSubtract"

Detailed Description

Subtract a fitted extended PSF model from stars in a detector image.

Definition at line 240 of file extended_psf_subtract.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.pipe.tasks.extended_psf.extended_psf_subtract.ExtendedPsfSubtractTask.__init__ ( self,
initInputs = None,
* args,
** kwargs )

Definition at line 247 of file extended_psf_subtract.py.

Member Function Documentation

◆ _get_subtraction_star_table()

Table lsst.pipe.tasks.extended_psf.extended_psf_subtract.ExtendedPsfSubtractTask._get_subtraction_star_table ( self,
ReferenceObjectLoader ref_obj_loader,
ExposureF exposure )
protected
Build a table of subtraction stars from the reference catalog.

Parameters
----------
ref_obj_loader : `~lsst.meas.algorithms.ReferenceObjectLoader`
    Loader used to query reference objects in the detector footprint.
exposure : `~lsst.afw.image.ExposureF`
    Exposure used to define the detector bounding box, WCS, and focal
    plane geometry for star selection.

Returns
-------
star_table : `~astropy.table.Table`
    Table of selected subtraction stars after magnitude, isolation,
    detector-footprint, and focal-plane-radius filtering.
    Includes per-star pixel and focal-plane coordinates.

Definition at line 366 of file extended_psf_subtract.py.

◆ _subtract_one_star()

float lsst.pipe.tasks.extended_psf.extended_psf_subtract.ExtendedPsfSubtractTask._subtract_one_star ( self,
ExposureF exposure,
ImageF model_image_legacy,
WarpingControl warp_control,
Table star )
protected
Warp, fit, and subtract one star model in detector coordinates.

Parameters
----------
exposure : `~lsst.afw.image.ExposureF`
    Exposure to update in place by subtracting the fitted PSF model.
model_image_legacy : `~lsst.afw.image.ImageF`
    Empirical extended-PSF model image in the model frame.
warp_control : `~lsst.afw.math.WarpingControl`
    Warping configuration used to map the model into detector
    coordinates.
star : `~astropy.table.Row`
    Row containing per-star subtraction metadata, including pixel
    coordinates and focal-plane angle.

Returns
-------
amplitude : `float`
    Fitted PSF amplitude if subtraction succeeds. Returns `numpy.nan`
    when no valid fit is obtained or subtraction is rejected.

Notes
-----
This method modifies ``exposure`` in place for the selected local
bounding box by subtracting the fitted PSF model from the image plane.

Definition at line 458 of file extended_psf_subtract.py.

◆ run()

lsst.pipe.tasks.extended_psf.extended_psf_subtract.ExtendedPsfSubtractTask.run ( self,
ExposureF preliminary_visit_image,
ExtendedPsfImage extended_psf,
ReferenceObjectLoader ref_obj_loader,
BackgroundList | None preliminary_visit_image_background = None )
Subtract fitted extended-PSF models from selected stars.

This method clones the input exposure, optionally restores the
associated background model for fitting, selects subtraction stars from
the reference catalog, and fits/subtracts the warped extended-PSF
model for each star in sequence.
Stars are always processed in magnitude order from brightest to
faintest, and ``max_stars_per_detector`` (if non-zero) is applied after
sorting so only the brightest stars are retained.
After per-star subtraction, the method optionally re-estimates the
background model. When re-estimation is enabled, both updated
exposure and background outputs are returned.

Parameters
----------
preliminary_visit_image : `lsst.afw.image.ExposureF`
    Background-subtracted image.
extended_psf : `ExtendedPsfImage`
    Extended PSF model to be warped and fit per star.
ref_obj_loader : `lsst.meas.algorithms.ReferenceObjectLoader`
    Reference object loader used for star selection.
preliminary_visit_image_background :
    `lsst.afw.math.BackgroundList`, optional
    Supplied input background model associated with the input image.
    This is restored onto the working exposure when
    ``do_restore_background`` is True.

Definition at line 270 of file extended_psf_subtract.py.

◆ runQuantum()

lsst.pipe.tasks.extended_psf.extended_psf_subtract.ExtendedPsfSubtractTask.runQuantum ( self,
butlerQC,
inputRefs,
outputRefs )

Definition at line 257 of file extended_psf_subtract.py.

Member Data Documentation

◆ _bg_powers

list lsst.pipe.tasks.extended_psf.extended_psf_subtract.ExtendedPsfSubtractTask._bg_powers
protected
Initial value:
= [
(i, j)
for i in range(self.config.bg_order + 1)
for j in range(self.config.bg_order + 1)
if i + j <= self.config.bg_order
]

Definition at line 249 of file extended_psf_subtract.py.

◆ _DefaultName

str lsst.pipe.tasks.extended_psf.extended_psf_subtract.ExtendedPsfSubtractTask._DefaultName = "extendedPsfSubtract"
staticprotected

Definition at line 244 of file extended_psf_subtract.py.

◆ ConfigClass

lsst.pipe.tasks.extended_psf.extended_psf_subtract.ExtendedPsfSubtractTask.ConfigClass = ExtendedPsfSubtractConfig
static

Definition at line 243 of file extended_psf_subtract.py.


The documentation for this class was generated from the following file: