idlastro / DAOPHOT-Type Photometry Procedures: T_NSTAR

[Source code]

NAME
T_NSTAR
PURPOSE
Driver procedure (for NSTAR) for simultaneous PSF fitting.  
EXPLANATION
Input and output are to disk FITS ASCII tables.
CALLING SEQUENCE
T_NSTAR, image, fitsfile, [psfname, groupsel, /SILENT, /PRINT
                        NEWTABLE = , /VARSKY ]
INPUTS
IMAGE - 2-d image array
FITSFILE  - scalar string giving name of disk FITS ASCII table.  Must 
        contain the keywords 'X','Y' (from T_FIND) 'AP1_MAG','SKY'
        (from T_APER) and 'GROUP_ID' (from T_GROUP).   This table
        will be updated with the results of T_NSTAR, unless the 
        keyword NEWTABLE is supplied.   
OPTIONAL INPUTS
PSFNAME - Name of the FITS file created by T_GETPSF containing
        PSF residuals, scalar string
GROUPSEL - Scalar or vector listing the groups to process.  For
        example, to process stars in groups 2 and 5 set
        GROUPSEL = [2,5].  If omitted, or set equal to -1,
        then NSTAR will process all groups.
OPTIONAL KEYWORD INPUTS
VARSKY - If this keyword is set and non-zero, then the mean sky level
        in each group of stars, will be fit along with the brightness
        and positions.
/SILENT - if set and non-zero, then NSTAR will not display its results
        at the terminal
/PRINT - if set and non-zero then NSTAR will also write its results to
        a file NSTAR.PRT.   One can specify the output file name by
        setting PRINT = 'filename'.
NEWTABLE  - Name of output disk FITS ASCII table to contain the results
        of NSTAR.   If not supplied, then the input FITSFILE will be 
        updated.  
DEBUG - if this keyword is set and non-zero, then the result of each
        fitting iteration will be displayed.
PROCEDURES CALLED
FTADDCAL, FTINFO, FTGET(), FTPUT, NSTAR, SXADDHIST, 
SXADDPAR, SXPAR(), READFITS(), WRITEFITS
REVISION HISTORY
Written        W. Landsman         STX Co.    May, 1988
Check for CCDGAIN, ATODGAIN keywords to get PHPADU  W. Landsman May 1997
Fixed typo preventing compilation, groupsel parameter W.L. July 1997
Converted to IDL V5.0   W. Landsman   September 1997
Update for new FTINFO call    W. Landsman   May 2000