Vssearch searches for variable stars in a set of FITS images as follows:

    Given a set of images taken with a given filter scan each image and build
    lists of all qualifying stars found in each.
    
    Match the stars by position.

    Find the brightest star that is on the most number of images and use it as
    a calibrator star.
    
    Disregard all images which do not contain the calibrator.

    Find the magnitudes and errors of each star on each surviving image.

    Stars which have too much intrinsic error or are not on at least 3 images
    with the calibrator are discarded.

    For each remaining star, compute how well the magnitudes fit a straight
    horizontal line, allowing for their noise estimates, as follows:

	    Vbar = noise-weighted mean         = Sum(Vi/Ei)/Sum(1/Ei)
	    D    = average deviation from mean = Sum(|Vi-Vbar|)/N
	    Q    = figure of merit             = sqrt(Sum(((Vi-Vbar)/Ei)**2)/N)
    
    Stars with D below a threshold (set in config file, default is .1) are
    discarded. Remaining stars are sorted by increasing Q, ie, increasing
    likelyhood they are variable. Q is based on the mean squared error.

Usage:

vssearch [options] [files...]

    -c file:   override internal defaults with a config file (see below)
    -f file:   file of filenames
    -r RA Dec RefMag MagLim
	       Specify an explicit calibrator star:
	       RA:      H:M:S.S
	       Dec:     D:M:S
	       RefMag:  assigned absolute magnitude
	       MagLim:  dimmest abs magnitude to report
    -s:        product spreadsheet output instead.
 
Note that filenames may be given as arguments or in a separate file, but not
both.

The config file consists of the following parameters, one per line; blank
lines and lines which begin with # are ignored.

    1. max radius to search for brightest pixel, pixels, default is 4
    2. photometric aperture, pixels, default is 5
    3. max separation between images to be considered the same star, arc secs,
	default is 5
    4. filter code, default is R (all other images will be silently ignored)
    5. reject stars with more than this much noise error, default is .1
    6. reject stars with more than this much mag estimate error, default is .1
    7. reject stars with raw counts greater than this, default is 40000
    8. reject stars whose average deviation from the mean is less than this,
	default is .1
    9. reject stars which do not appear on at this many images, default is 3.

Output:

The default output of vssearch is a table with one row for each star that was
found on at least 3 images along with the calibrator star. The calibrator star
is always the first star shown. The columns are as follows:

	I	ordinal
	Q	figure of merit -- higher means more variable.
	N	Number of images in which the star was found with the
		calibrator.
	RA	RA of star (on first image encounted)
	Dec	Dec of star (on first image encounted)

Then for each image:
	V	The magnitude of the star with respect to the calibrator.
	Verr	The error in the magnitude.    

The format of the Spreadsheet output (-s) is just a huge table, one row per
image. The first column is the Heliocentric Julian date of the observation -
2450000, then follows two columns per star: the magnitude relative to the
calibrator and the estimaged error in the magnitude. If the values are not
available for any reason they are printed as 99.99 and 9.99, respectively.
Stars that were not on at least three images with the calibrator are not
listed at all.
