PRELIMINARY TESTS OF ACTIVE DEBLENDING
       ======================================

		K. A. Marsh
		IPAC
		kam@ipac.caltech.edu

		May 26, 2000


Active deblending has now been implemented in the development version of
PROPHOT, and this memo describes some tests designed primarily to assess 
the impact on run time.  Before presenting the results, however, here is
a brief description of the deblending procedure:

An important ingredient in active deblending in PROPHOT is a scheme for
arriving at a set of initial guesses for the component positions;  if these
initial positions are too far off, then the minimization algorithm will
start off in the wrong valley and consequently diverge.  The adopted
scheme is one suggested by D. Elliot (JPL), whereby when a new source is
added to a blend, a chi squared minimization is performed by varying the
position of the new source on a predefined grid, keeping the positions of 
the previous components fixed.  A full maximum likelihood solution is
then performed.

This scheme is implemented in PROPHOT as follows: For each candidate source, 
PROPHOT attempts a single-point-source fit.  If the fit is successful (as 
determined by the criterion RCHISQ < CHIP, where RCHISQ is the reduced chi 
squared and CHIP is normally set at 3.0), the results are entered in the 
output file.  Otherwise, an N=2 solution is attempted, where N represents 
an assumed number of unresolved components in the blend.  In order for the 
N=2 solution to be regarded as successful, it must not only meet the 
RCHISQ < CHIP criterion, but must also have resulted in a predefined minimum 
improvement (denoted DCHI) in the reduced chi squared.  If the N=2 solution 
is unsuccessful, the algorithm may continue to higher values of N, limited 
by the predefined limit NMAX.  The complete list of input parameters which 
have a bearing on the decision whether or not to deblend is as follows:

	NMAX	=	maximum number of components in an unresolved blend

	NPCMAX	=	maximum number of passively-deblended components to
			allow and still add further components via active
			blending 

	MAGMAX	=	maximum magnitude of the unresolved blend

	DCHI	=	minimum improvement in the reduced chi squared in order
			to regard the active deblending as successful

	CHIP	=	maximum acceptable value for the reduced chi squared

	SXBLND	=	maximum acceptable value of the seeing shape parameter


The preliminary tests were performed on 990928n/j084, a relatively high-density
scan through the Galactic plane, for which PROPHOT finds a total of 37228
sources when no active deblending is performed (i.e., NMAX=1).  For the purpose
of these tests, the following parameters were held constant:

	NPCMAX	=  3
	CHIP	=  3.0
	DCHI	=  1.0
	SXBLND	=  1.5

The other parameters were varied, as specified in the table below.  The
tabulated results consist of the following quantities:

	Attempted deblends (%)	=	the pecentage of candidate sources for
					which an active deblend was attempted

	Acceptance rate (%)	=	the percentage of attempted deblends
					which resulted in an apparently
					satisfactory solution, as define above

	RCHISQ (mean)		=	mean reduced chi squared of the
					apparently successful solutions

	Run time 		=	PROPHOT run time for the whole scan, 


The results were as follows:


NMAX	MAGMAX	Attempted   Acceptance	RCHISQ	Run time 
		deblends(%) rate(%)    	(mean)   [mm:ss] 

 1						15:20

 2	12	0.7	    46		1.5	15:46
 3	12	0.7	    51		1.6	15:22
 4	12	0.7	    55		1.5	15:31

 2	13	1.6	    53		1.6	15:35
 3	13	1.6	    59		1.6	16:20
 4	13	1.6	    63		1.5	18:18

 2      14	3.2	    58		1.6	16:36
 3	14	3.2	    64		1.6	16:40
 4	14	3.2	    67		1.6	16:14

 2   no limit	8.8	    53		1.6	19:54
 3   no limit	8.8	    57		1.6	18:17
 4   no limit	8.8	    59		1.6	19:37	


The run times in this table are somewhat erratic since they were subject to
perturbation by other jobs running on the machine at the same time, i.e. this
was not a carefully controlled experiment.  However, conclusions which can
be drawn are:

(1) For a scan of this density, active deblending of 3 and 4 (and possibly
more) components is not precluded by run-time considerations.  Future 
experiments with synthetic data (and real data with a truth table derived 
from higher-resolution observations) will, however, shed some light on 
how many components can usefully be fit given the PSF errors.

(2) The estimated factor by which the run time is increased for an N=2
deblend with respect to a single-source fit is 4.  The fact that it is
significantly lower than the value 8 predicted in a previous memo is probably
due to the fact that the minimization involved in the maximum likelihood
procedure will require less iterations if the correct number of components
is assumed a priori;  this was not taken into account in deriving the
predicted run times.