IRAF help page for package noao.digiphot.daophot, program allstar

from NOAO allstar -- group and fit psf to multiple stars simultaneouslyUSAGEPARAMETERSDESCRIPTIONOUTPUTERRORSEXAMPLESTIME REQUIREMENTSBUGSSEE ALSO

allstar -- group and fit psf to multiple stars simultaneously


USAGE

allstar image photfile psfimage allstarfile rejfile subimage


PARAMETERS

image

The list of images containing the stars to be fit

photfile

The input photometry file list or directory containing the initial estimates of the positions, sky values, and magnitudes of the stars to be fit. If photfile is "default", "dir$default", or a directory specification, then ALLSTAR looks for a file with the name image.mag.? where ? is the highest existing version number. Otherwise photfile must specify one photometry file for every image in image. Photfile is usually the output of the DAOPHOT PHOT task but may also be the output of the PSF, PEAK and NSTAR tasks, or the ALLSTAR task itself.

psfimage

The list of images or directory containing the PSF computed by the DAOPHOT PSF task. If psfimage is "default", "dir$default", or a directory specification, then ALLSTAR will look for an image with the name image.psf.? where ? is the highest existing version number. Otherwise psfimage must specify one PSF image for every image in image.

allstarfile

The list of output photometry files. If allstarfile is "default", "dir$default", or a directory specification then ALLSTAR will write an output file with the name image.als.? where ? is the next available version number. Otherwise allstarfile must specify one output photometry file for every image in image. Allstarfile is a text database if the DAOPHOT package parameter text is "yes", an STSDAS table database if it is "no".

rejfile

The list of output rejected photometry files. If rejfile is null (""), results for all the stars in photfile are written to allstarfile, otherwise only the stars which were successfully fit are written to allstarfile and the remainder are written to rejfile. If rejfile is "default", "dir$default", or a directory specification then ALLSTAR will write an output file with the name image.arj.? where ? is the next available version number. Otherwise rejfile must specify one output photometry file for every image in image. Rejfile is a text database if the DAOPHOT package parameter text is "yes", an STSDAS table database if it is "no".

subimage

The list of output images or directory containing the data with the fitted stars subtracted. If subimage is "default", "dir$default", or a directory specification, then ALLSTAR will create an image with the name image.sub.? where ? is the next available version number. Otherwise subimage must specify one output image for every image in image.

cache = yes

Cache all the data in memory ? If cache is "yes", then ALLSTAR attempts to preallocate sufficient space to store the input image plus the two image-sized working arrays it requires, plus space for the starlist, in memory. This can significantly reduce the total execution time. Users should however beware of creating a situation where excessive paging occurs. If cache = "no", ALLSTAR operates on subrasters containing the group currently being reduced, and writes the intermediate results to temporary scratch images. This option will work on any-sized image (unless a single group becomes the size of the entire image!) but can become slow of there are a large number of disk accesses. Users may wish to experiment to see which mode of operation suits their system best.

datapars =

The name of the file containing the DAOPHOT data dependent parameters. If datapars is null ("") then the default parameter set in the user's uparm directory is used.

daopars =

The name of the file containing the DAOPHOT fitting parameters. If daopars is null ("") then the default parameter set in the user's uparm directory is used.

verbose = )_.verbose

Print messages about the progress of the task. Verbose can be set to the daophot package parameter value (the default), "yes", or "no".

verify = )_.verify

Verify critical ALLSTAR task parameters. Verify can be set to the daophot package parameter value (the default), "yes", or "no".

update = )_.update

Update the critical ALLSTAR task parameters if verify = "yes". Update can be set to the daophot package parameter value (the default), "yes", or "no".


DESCRIPTION

ALLSTAR computes x and y centers, sky values, and magnitudes for the stars in photfile by fitting the PSF psfimage to groups of stars in the IRAF image image. Initial estimates of the centers, sky values, and magnitudes, are read from the photometry list photfile. ALLSTAR groups the stars dynamically, performing a regrouping operation after every iteration. The new computed centers, sky values, and magnitudes are written to allstarfile along with the number of iterations it took to fit the star, the goodness of fit statistic chi, and the image sharpness statistic sharp. If rejfile is not null (""), only stars that are successfully fit are written to allstarfile, and the remainder are written to rejfile. Otherwise all the stars are written to allstarfile. Allstarfile and rejfile are text databases if the DAOPHOT package parameter text is "yes", STSDAS table databases if it is "no". An image with all the fitted stars subtracted out is written to subimage. In effect ALLSTAR performs the combined operations of GROUP, GRPSELECT, NSTAR, and SUBSTAR.

By default ALLSTAR computes new centers for all the stars in photfile. However if the DAOPARS parameter recenter is "no", ALLSTAR assumes that the x and y centers in photfile are the true centers and does not refit them. This option can be quite useful in cases where accurate center values have been derived from an image that has been through some non-linear image restoration algorithm, but the photometry must be derived from the original unrestored image.

By default (groupsky = "yes") ALLSTAR computes the sky value for each group by averaging the individual sky values in photfile for all the stars in the group. If groupsky = "no", the sky value for each pixel which contributes to the group fit is set equal to the mean of the sky values for those stars for which the pixel falls within one fitting radius. If the DAOPARS parameter fitksy is "yes", then ALLSTAR recomputes the individual sky values before averaging over the group, by, every third iteration, subtracting off the current best fit for the star and using the pixel values in the annulus defined by the DAOPARS parameters sannulus and wsannulus to recompute the sky. The actual sky recomputation is done by averaging forty percent of the sky pixels centered on the median of the distribution. Recomputing the sky can significantly reduce the scatter in the magnitudes in regions where the sky background is varying rapidly.

Only pixels within the good data range defined by the DATAPARS task parameters datamin and datamax are included in the fit. Most users set datamin and datamax so as to exclude pixels outside the linearity regime of the detector. By default all the data is fit. Users are advised to determine accurate values for these parameters for their detector and set the values in DATAPARS before beginning any DAOPHOT reductions.

Only pixels within the fitting radius parameter fitrad / scale are included in the fit for each star. Fitrad is located in the DAOPARS task and scale is located in the DATAPARS task. Since the non-linear least-squares fits normally compute three unknowns, the x and y position of the star's centroid and its brightness, the value of fitrad must be sufficiently large to include at least three pixels in the fit for each star. To accelerate the convergence of the non-linear least-squares fitting algorithm pixels within fitrad are assigned weights which are inversely proportional to the radial distance of the pixel from the x and y centroid of the star, falling from a maximum at the centroid to zero at the fitting radius. Fitrad must be sufficiently large to include at least three pixels with non-zero radial weights in the fit for each star. ALLSTAR arbitrarily imposes a minimum number of good pixels limit of four. Values of fitrad close to the full-width at half-maxima of the PSF are recommended.

ALLSTAR computes a weighted fit to the PSF. The weight of each pixel is computed by combining, the radial weighting function described above, with weights derived from the random errors ALLSTAR predicts based on the detector noise characteristics specified by the DATAPARS parameters readnoise and epadu, and the flat-fielding and profile interpolation errors specified by the DAOPARS task flaterr and proferr parameters. Both to obtain optimal fits, and because ALLSTAR employs a conservative formula for reducing the weights of deviant pixels (parametrized by the clipexp and cliprange parameters in the DAOPARS task) which do not approach the model as the fit proceeds, which depends on readnoise, epadu, flaterr, and proferr, users are strongly advised to determine those parameters accurately and to enter their values in DATAPARS and DAOPARS before beginning any DAOPHOT reductions.

By default for each group of stars to be fit during each iteration, ALLSTAR extracts a subraster from image which extends approximately fitrad / scale + 1 pixels wide past the limiting values of x and y coordinates of the stars in the group. Fitrad is the fitting radius specified in the DAOPARS task. Scale is the image scale specified by the DATAPARS task. Fitrad may be less than or equal to but can never exceed the value of the image header parameter "PSFRAD" in psfimage.

If the cache parameter is set to "yes" then ALLSTAR attempts to store all the vectors and arrays in memory. This can significantly reduce the system overhead but may cause excessive paging on machines with a small amount of memory. For large images it may be necessary to set cache to "no", and use the disk for scratch storage. Users should experiment to see what suits them best.

As well as the computed x and y centers, sky values, and magnitudes, ALLSTAR outputs the number of times the PSF fit had to be iterated before convergence was achieved. The minimum number of iterations is four. The maximum number of iteration permitted is specified by the maxiter parameter in the DAOPARS task. Obviously the results for stars which have reached the maximum iteration count should be viewed with suspicion. However since the convergence criteria are quite strict, (the computed magnitude must change by less than .0005 magnitudes or 0.10 sigma whichever is larger and the x and y centroids must change by less than 0.002 pixels from one iteration to the next), even these stars may be reasonably well measured.

ALLSTAR computes a goodness of fit statistic chi which is essentially the ratio of the observed pixel-to-pixel scatter in the fitting residuals to the expected scatter. Since the expected scatter is dependent on the DATAPARS task parameters readnoise and epadu, and the DAOPARS parameters flaterr and proferr, it is important for these values to be set correctly. A plot of chi versus magnitude should scatter around unity with little or no trend in chi with magnitude, except at the bright end where saturation effects may be present.

Finally ALLSTAR computes the statistic sharp which estimates the intrinsic angular size of the measured object outside the atmosphere. Sharp is roughly defined as the difference between the square of the width of the object and the square of the width of PSF. Sharp has values close to zero for single stars, large positive values for blended doubles and partially resolved galaxies and large negative values for cosmic rays and blemishes.

ALLSTAR implements a sophisticated star rejection algorithm. First of all any group of stars which is more than a certain size is not reduced. This maximum group size is specified by the maxgroup parameter in the DAOPARS task. Large groups may run into numerical precision problems during the fits, so users should increase this parameter with caution. ALLSTAR however, in contrast to NSTAR, attempts to subdivide large groups. If the group is too dense to reduce in size, ALLSTAR throws out the faintest star in the group and tries to rereduce it. If two stars in a group have centroids separated by a critical distance currently set arbitrarily to 0.37 * the FWHM of the stellar core and their photocentric position and combined magnitude is assigned to the brighter of the two and the fainter is eliminated. Any star which converges to magnitude 12.5 magnitudes greater than the magnitude of the PSF is considered to be non-existent and eliminated from the group.

After iteration 5, if the faintest star in the group has a brightness less than one sigma above zero it is eliminated. After iteration 10 if the faintest star in the group has a brightness less than 1.5 sigma above zero it is eliminated. After iteration 15, or whenever the solutions has converged whichever comes first, if the faintest star in the group has a brightness less than 2.0 sigma above zero it is eliminated. After iterations 5, 10 and 15 if two stars are separated by more than 0.37 * FWHM and less than 1.0 * FWHM and if the fainter of the two is more uncertain than 1.0, 1.5 or 2.0 sigma respectively the fainter one is eliminated.

ALLSTAR replaces the functionality of the GROUP, GRPSELECT, NSTAR and SUBSTAR task. However the user has little control over the grouping process and does not know at the end which stars were fit together. The grouping process is dynamic, as the groups are recomputed after each iteration, and stars can be fit and leave the group at any point after the fourth iteration. Therefore the quality of the fits may vary over the image as a function of crowding in an unknown way. However ALLSTAR is in most cases the routine of choice. NSTAR is the task of choice when a user wants to maintain control over the composition of the stellar groups.


OUTPUT

If verbose = yes, a single line is output to the terminal for each star fit or rejected. Full output is written to allstarfile and rejfile. At the beginning of these two files a header listing the current values of the parameters is written. For each star fit/rejected the following quantities are written to the output file.

	id  xcenter  ycenter  mag  merr  msky  niter  sharpness  chi
	    pier  perr

Id is the id number of the star. Xcenter and ycenter are the fitted coordinates in pixels. Mag and merr are the fitted magnitude and magnitude error respectively. Msky is the individual sky value for the star. Niter is the number of iterations it took to fit the star and sharpness and chi are the sharpness and goodness of fit statistic respectively. Pier and perror are the photometry error code and accompanying error message respectively.


ERRORS

If no errors occur during the fitting process then pier is 0. Non-zero values of pier flag the following error conditions.

	0		# No error
	1		# The star is in a group too large to fit
	2		# The sky is undefined
	3		# There are too few good pixels to fit the star
	4		# The fit is singular
	5		# The star is too faint
	6		# The star has merged with a brighter star
	7		# The star is off the image


EXAMPLES

1. Fit the PSF to a list stars in a crowded field near M92.

    da> allstar m92 m92.mag.1 m92.psf.1 default "" default verb+ veri+

2. Fit the PSF to a list stars exactly as in example one but place the successfully fit stars in one file and the rejected stars in another.

    da> allstar m92 m92.mag.1 m92.psf.1 default default default verb+ veri+

3. Run ALLSTAR exactly as in example 1 but submit the task to the background saving all the verbose output in a file called allstar.out. Remember to turn the verify switch off.

    da> allstar m92 m92.mag.1 m92.psf.1 default "" default verb+ veri- 
        > allstar.out & 

4. Run ALLSTAR exactly as in example 3 but turn cacheing off.

    da> allstar m92 m92.grp.1 m92.psf.1 default "" default verb+ veri- 
        cache- > allstar.out & 


TIME REQUIREMENTS


BUGS


SEE ALSO

datapars, daopars, peak, nstar,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu