Custom Point Spread Function - TESScience/kabukinai GitHub Wiki

Options for psfgen

psfgen creates a model point spread function (PSF) based on a Cauchy distribution. The distribution has only one parameter, gamma. Other parameters control how far out into the wings the model extends, and the oversampling factor relative to the image pixel size.

  • -g, --gamma=double

Set the Cauchy width parameter. The default is 0.5

  • -s, --side-length=int

This is the side length of the PSF, in image pixels. The default is 32. It is useless to set this larger than 64, as kabukinai will ignore the additional pxels.

  • -o, --oversampling=int

This is the linear oversampling factor for the PSF. The default of 3 means that there are 3*3 or 9 samples of the PSF per image pixel. Note that kabukinai performs linear interpolation between these samples, so the PSF is effectively a continuous function.

If you have a measured or theoretical boresight pixel flux fraction (BPFF), the gamma parameter relates to the BPFF as follows:

GammaBPFF

Providing your own PSF

The PSF is a standard 2D FITS file (NAXIS=2) with raster data as single precision floats (BITPIX=-32). It must include the side length as a parameter (SLENGTH=32 is the default for psfgen). kabukinai implicitly determines the oversampling from the ratio of the axis lengths to the side length. The normalization should be such that the pixels for a PSF that falls entirely within the raster has pixels that sum to the square of the oversampling factor. For example, the default PSF file made by psfgen has pixels that sum to slightly less than 9. It's 9 because the oversampling is 3, and it's slightly less because part of the PSF wings falls outside the 32 pixel side length.