FittablePSF

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

Bases: gunagala.psf.PSF, astropy.modeling.Fittable2DModel

Base class representing a 2D point spread function based on a Fittable2DModel from astropy.modelling.

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.

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.

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.