Driver procedure (for GETPSF) to generate a PSF from isolate stars.
Generates a point-spread function from one or more isolated stars.
List of stars is read from the FITS ASCII table output of T_APER.
PSF is represented as a sum of a Gaussian plus residuals.
Ouput residuals are written to a FITS image file.
T_GETPSF, image, fitsfile, [ idpsf, psfrad, fitrad, psfname,
/DEBUG, NEWTABLE =]
IMAGE - image array
FITSFILE - scalar string giving name of disk FITS ASCII table. Must
contain the keywords 'X','Y' (from T_FIND) and 'AP1_MAG','SKY'
IDPSF - vector of stellar ID indices indicating which stars are to be
used to create the PSF. Not that the PSF star should be
specified *not* by its STAR_ID value, but rather by the its
row number (starting with 0) in the FITS table
PSFRAD - the radius for which the PSF will be defined
FITRAD - fitting radius, always smaller than PSFRAD
PSFNAME - name of FITS image file to contain PSF residuals,
GETPSF will prompt for all the above values if not supplied.
Optional Keyword Input
NEWTABLE - scalar string specifying the name of the output FITS ASCII
table. If not supplied, then the input table is updated with
the keyword PSF_CODE, specifying which stars were used for the
DEBUG - if this keyword is set and non-zero, then the result of each
fitting iteration will be displayed.
T_GETPSF will prompt for the readout noise (in data numbers), and
the gain (in photons or electrons per data number) so that pixels can
be weighted during the PSF fit. To avoid the prompt, add the
keywords RONOIS and PHPADU to the FITS ASCII table header.
FTADDCOL, FTGET(), FTPUT, GETPSF, READFITS(), SXADDHIST, SXADDPAR,
SXPAR(), WRITEFITS, ZPARCHECK
Written W. Landsman STX May, 1988
Update PSF_CODE to indicate PSF stars in order used, W. Landsman Mar 96
I/O to FITS ASCII disk files W. Landsman May 96
Converted to IDL V5.0 W. Landsman September 1997
Update for new FTINFO call W. Landsman May 2000