PixellatedPSF

class gunagala.psf.PixellatedPSF(psf_data, psf_sampling, psf_centre=None, oversampling=10, pixel_scale=None, renormalise=True, **kwargs)[source]

Bases: gunagala.psf.PSF

Class representing a 2D point spread function based on an already pixellated data, e.g. a PSF calculated with optical design software.

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

Parameters:
psf_data: numpy.array

Pixellated PSF data.

psf_sampling: astropy.units.Quantity

Pixel scale (angle/pixel) of psf_data.

psf_centre: (float, float), optional

Pixel coordinates of the PSF centre within psf_data (zero based, (y, x)). If not given psf_data.shape / 2 will be assumed.

oversampling : integer, optional

Oversampling factor used when shifting & resampling the PSF, default 10.

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.

renormalise: bool, optional

Whether to renormalise the PSF to a total of 1 during initialisation, default True. Only set to False if the psf_data is already correctly normalised.

Methods Summary

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

Methods Documentation

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

Calculates a pixellated version of the PSF.

The pixel values are calculated by shifting and resampling the original psf_data, then binning by the oversampling factor.

Parameters:
size : int, optional

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

offsets : 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.