read.psf: Read and Process PSF FITS Image

read.psfR Documentation

Read and Process PSF FITS Image

Description

__This function is not designed to be called directly, but rather is an internal function to measure.fluxes__

Reads an input fits image for a Point Spread Function (PSF) and performs calculations needed in measure.fluxes. However, when a non-zero Gaussian FWHM (in arcsec) is provided, a Gaussian PSF will be generated. This is useful if no PSF map is present.

Usage

read.psf(outenv = parent.env(environment()), filename,
arcsec.per.pix, apsize, confidence, normalize = TRUE,
gauss.fwhm.arcsec = 0, env = NULL)

Arguments

env

environment; the environment containing the parameters used in ‘measure.fluxes’

filename

string; relative path to, and filename of, the PSF FITS file

arcsec.per.pix

numeric; width of each image pixel in arcsec

apsize

numeric; SemiMajor axis of the largest aperture in catalogue

confidence

numeric; desired maximum confidence percentage used in generating/saving the PSF and PSF convolved stamps. PSF limits beyond the radius corresponding to this confidence level will be truncated. If confidence is 1 when a non-zero gaussian FWHM is present, confidence is instead forced to be 1-(1E-16); i.e. the highest non-unity value possible.

normalize

logical; if TRUE, PSF will be normalised to a height of 1

gauss.fwhm.arcsec

numeric; FWHM of PSF gaussian. If supplied and greater than 0, PSF will be generated using a gaussian and not from input file

outenv

environment; the environment where the returned values are to be stored. If not provided, outenv defaults to the input env.

Value

numeric (n,n) array; image containing the read/generated PSF. The pixel length of each dimension of the array is floor(stampsize_as/arcsec.per.pix). The function also creates some global variables, the most useful of which is:

sumpsf

numeric; the sum of pixels that make the psf function

Note

If both a PSF map and a gaussian FWHM is provided, the procedure will generate a gaussian PSF in preference to reading a PSF from file.

Author(s)

Angus H Wright ICRAR angus.wright@icrar.org

See Also

measure.fluxes, flux.measurements


AngusWright/LAMBDAR documentation built on May 12, 2022, 1:49 a.m.