[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Waldhäuser Str. 64, D-72076 Tübingen, Germany
[Uni logo]


GETPSF Source code in getpsf.pro

GETPSF

Name
       GETPSF
Purpose
       To generate a point-spread function (PSF) from observed stars.
Explanation
       The PSF is represented as a 2-dimensional Gaussian
       (integrated over each pixel) and a lookup table of residuals.
       The lookup table and Gaussian parameters are output in a FITS
       image file.   The PSF FITS file created by GETPSF can be
       read with the procedure RDPSF.      Adapted from the 1986 STSDAS
       version of DAOPHOT
Calling Sequence
       GETPSF, image, xc, yc, apmag, sky, [ronois, phpadu, gauss, psf,
                       idpsf, psfrad, fitrad, psfname, /DEBUG ]
Input Parameters
       IMAGE  - input image array
       XC     - input vector of x coordinates (from FIND), these should be
               IDL (first pixel is (0,0)) convention.
       YC     - input vector of y coordinates (from FIND)
       APMAG  - vector of magnitudes (from APER), used for initial estimate
               of gaussian intensity.  If APMAG is multidimensional, (more
               than 1 aperture was used in APER) then the first aperture
               is used.
       SKY    - vector of sky values (from APER)
Optional Input Parameters
       The user will be prompted for the following parameters if not supplied.
       RONOIS - readout noise per pixel, (in electrons, or equivalent photons)
       PHPADU - photons per analog digital unit, used to scale the data
               numbers in IMAGE into photon units
       IDPSF  - subscripts of the list of stars created by
               APER which will be used to define the PSF.   Stars whose
               centroid does not fall within PSFRAD of the edge of the frame,
               or for which a Gaussian fit requires more than 25 iterations,
               will be ignored when creating the final PSF.
       PSFRAD - the scalar radius, in pixels, of the circular area within
               which the PSF will be defined.   This should be slightly larger
               than the radius of the brightest star that one will be
               interested in.
       FITRAD - the scalar radius, in pixels of the circular area used in the
               least-square star fits.  Stetson suggest that FITRAD should
               approximately equal to the FWHM, slightly less for crowded
               fields.  (FITRAD must be smaller than PSFRAD.)
       PSFNAME- Name of the FITS file that will contain the table of residuals,
               and the best-fit Gaussian parameters.    This file is
               subsequently required for use by NSTAR.
Optional Output
       GAUSS  - 5 element vector giving parameters of gaussian fit to the
               first PSF star
               GAUSS(0) - height of the gaussian (above sky)
               GAUSS(1) - the offset (in pixels) of the best fitting gaussian
                       and the original X centroid
               GAUSS(2) - similiar offset from the Y centroid
               GAUSS(3) - Gaussian sigma in X
               GAUSS(4) - Gaussian sigma in Y
       PSF    - 2-d array of PSF residuals after a Gaussian fit.
Procedure
       GETPSF fits a Gaussian profile to the core of the first PSF star
       and generates a look-up table of the residuals of the
       actual image data from the Gaussian fit.  If desired, it will then
       fit this PSF to another star (using PKFIT) to determine its precise
       centroid, scale the same Gaussian to the new star's core, and add the
       differences between the actual data and the scaled Gaussian to the
       table of residuals.   (In other words, the Gaussian fit is performed
       only on the first star.)
Keyword Parameters
       DEBUG - if this keyword is set and non-zero, then the result of each
               fitting iteration will be displayed.
Procedures Used
       DAOERF, MAKE_2D, MKHDR, RINTER(), PKFIT, STRNUMBER(), STRN(), WRITEFITS
Revision History
       Adapted from the 1986 version of DAOPHOT in STSDAS
       IDL Version 2  W Landsman           November 1988
       Use DEBUG keyword instead of !DEBUG  W. Landsman       May 1996
       Converted to IDL V5.0   W. Landsman   September 1997

Last modified by pro2html on 2001 April 26 at 03:13 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically