ExtendedPsf

class lsst.pipe.tasks.extended_psf.ExtendedPsf(default_extended_psf=None)

Bases: object

Extended PSF model.

Each instance may contain a default extended PSF, a set of extended PSFs that correspond to different focal plane regions, or both. At this time, focal plane regions are always defined as a subset of detectors.

Parameters:
default_extended_psflsst.afw.image.MaskedImageF

Extended PSF model to be used as default (or only) extended PSF model.

Methods Summary

__call__([detector])

Return the appropriate extended PSF.

add_regional_extended_psf(...)

Add a new focal plane region, along with its extended PSF, to the ExtendedPsf instance.

get_extended_psf(region_name)

Returns the extended PSF for a focal plane region or detector.

readFits(filename)

Alias for readFits; exists for compatibility with the Butler.

read_fits(filename)

Build an instance of this class from a file.

writeFits(filename)

Alias for write_fits; for compatibility with the Butler.

write_fits(filename)

Write this object to a file.

Methods Documentation

__call__(detector=None)

Return the appropriate extended PSF.

If the instance contains no extended PSF defined over focal plane regions, the default extended PSF will be returned regardless of whether a detector ID was passed as argument.

Parameters:
detectorint, optional

Detector ID. If focal plane region PSFs are defined, is used to determine which model to return.

Returns:
extendedPsfImagelsst.afw.image.MaskedImageF

The extended PSF model. If this instance contains extended PSFs defined over focal plane regions, the extended PSF model for the region that contains detector is returned. If not, the default extended PSF is returned.

add_regional_extended_psf(extended_psf_image, region_name, region_detectors)

Add a new focal plane region, along with its extended PSF, to the ExtendedPsf instance.

Parameters:
extended_psf_imagelsst.afw.image.MaskedImageF

Extended PSF model for the region.

region_namestr

Name of the focal plane region. Will be converted to all-uppercase.

region_detectorslsst.pipe.tasks.extended_psf.DetectorsInRegion

List of detector IDs for the detectors that define a region on the focal plane.

get_extended_psf(region_name)

Returns the extended PSF for a focal plane region or detector.

This method takes either a region name or a detector ID as input. If the input is a str type, it is assumed to be the region name and if the input is a int type it is assumed to be the detector ID.

Parameters:
region_namestr or int

Name of the region (str) or detector (int) for which the extended PSF should be retrieved.

Returns:
extended_psf_image: lsst.afw.image.MaskedImageF

The extended PSF model for the requested region or detector.

Raises:
ValueError

Raised if the input is not in the correct type.

classmethod readFits(filename)

Alias for readFits; exists for compatibility with the Butler.

classmethod read_fits(filename)

Build an instance of this class from a file.

Parameters:
filenamestr

Name of the file to read.

writeFits(filename)

Alias for write_fits; for compatibility with the Butler.

write_fits(filename)

Write this object to a file.

Parameters:
filenamestr

Name of file to write.