PSF

class gunagala.psf.PSF(FWHM, pixel_scale=None, **kwargs)[source]

Bases: astropy.modeling.Fittable2DModel

Abstract base class representing a 2D point spread function.

Used to calculate pixelated version of the PSF and associated parameters useful for point source signal to noise and saturation limit calculations.

Parameters:
FWHM : astropy.units.Quantity

Full Width at Half-Maximum of the PSF in angle on the sky units.

pixel_scale : astropy.units.Quantity, optional

Pixel scale (angle/pixel) to use when calculating pixellated point spread functions or related parameters. Does not need to be set on object creation but must be set before before pixellation function can be used.

Attributes Summary

FWHM Full Width at Half-Maximum of the PSF.
n_pix The PSF’s effective number of pixels for the worse case where the PSF is centred on the corner of a pixel.
peak The maximum fraction of the total signal that can fall in a single pixel.
pixel_scale Pixel scale used when calculating pixellated point spread functions or related parameters.

Methods Summary

pixellated([size, offsets]) Calculates a pixellated version of the PSF.

Attributes Documentation

FWHM

Full Width at Half-Maximum of the PSF.

Returns:
FWHM : astropy.units.Quantity

Full Width at Half-Maximum in angle on the sky units.

n_pix

The PSF’s effective number of pixels for the worse case where the PSF is centred on the corner of a pixel.

The effective number of pixels is for signal to noise calculations for PSF fitting photometry. The signal to noise for PSF fitting photometry is the same as if the signal were evenly distributed over this many pixels.

Returns:
n_pix : astropy.units.Quantity

Effective number of pixels

peak

The maximum fraction of the total signal that can fall in a single pixel.

This is simply the central pixel value of the PSF when it is perfectly centred on a pixel centre. This is useful for saturation limit calculations.

Returns:
peak : astropy.units.Quantity

Maximum fraction of the total signal that can fall in a single pixel, in 1/pixel units.

pixel_scale

Pixel scale used when calculating pixellated point spread functions or related parameters.

Returns:
pixel_scale : astropy.units.Quantity

Pixel scale in angle on the sky per pixel units.

Methods Documentation

pixellated(size=21, offsets=(0.0, 0.0))[source]

Calculates a pixellated version of the PSF.

The pixel values are calculated using 10x oversampling, i.e. by evaluating the continuous PSF model at a 10 x 10 grid of positions within each pixel and averaging the results.

Parameters:
size : int, optional

Size of the pixellated PSF to calculate, the returned image will have size x size pixels. Default value 21.

offset : tuple of floats, optional

y and x axis offsets of the centre of the PSF from the centre of the returned image, in pixels.

Returns:
pixellated : numpy.array

Pixellated PSF image with size by size pixels. The PSF is normalised to an integral of 1 however the sum of the pixellated PSF will be somewhat less due to truncation of the PSF wings by the edge of the image.