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 wit hits extended PSF, to the ExtendedPsf instance.

get_regional_extended_psf([region_name, ...])

Returns the extended PSF for a focal plane region.

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, detector_list)

Add a new focal plane region, along wit hits 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.

detector_listlist [int]

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

get_regional_extended_psf(region_name=None, detector=None)

Returns the extended PSF for a focal plane region.

The region can be identified either by name, or through a detector ID.

Parameters:
region_namestr or None, optional

Name of the region for which the extended PSF should be retrieved. Ignored if detector is provided. Must be provided if detector is None.

detectorint or None, optional

If provided, returns the extended PSF for the focal plane region that includes this detector.

Raises:
ValueError

Raised if neither detector nor regionName is provided.

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.