NAME:
	pdm2dis
 PURPOSE: (one line)
	Phase disconnect shift search by phase dispersion minimization ($\theta$ based).
 DESCRIPTION:
	This routine computes the Theta statistic to look for the optimum
	zero-point shift between two datasets for a given period.
	The theta statistic is the same as used for period searching
	in time-series data using the technique described by Stellingwerf,
	ApJ, 224, pp. 953-960 (1978).  The shift reported is that which
	is added to the phase of x2 to register with respect to x1.
 CATEGORY:
       Photometry
 CALLING SEQUENCE:
	pdm2dis,t1,x1,sig1,t2,x2,sig2,period,shif1,shif2,dshif,shiftv,chi2
 INPUTS:
	t1    - independent variable for first dataset (usually time)
	x1    - dependent variable for first dataset
                   (usually magnitude or intensity)
	sig1  - Uncertainty on x for first dataset.
	t2    - independent variable for first dataset (usually time)
	x2    - dependent variable for first dataset
                   (usually magnitude or intensity)
	sig2  - Uncertainty on x for first dataset.
	period - Lightcurve period. (same units as t1 and t2).
	shif1 - Lower limit to phase shift in fractional rotations
	shif2 - Upper limit to phase shift in fractional rotations
	dshif - phase shift interval.
 OPTIONAL INPUT PARAMETERS:
 KEYWORD PARAMETERS:
 OUTPUTS:
	shiftv  - Zero-point shift vector.
	chi2    - PDM statistic (1 ==> perfect, >>1 is bad).
	avgyes  - Average number of points contained within non-empty bins.
	nempty  - Total number of empty bins.
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
	Written 1992 Feb 13, by Marc W. Buie, Lowell Observatory
  95/02/23 - MWB - added NBINS keyword
  95/08/03 - MWB, cloned from pdm2shif