add fixed-position fitting

add fixed-position atom fitting to GaussianFit and GaussianFitStack.
Works better for GaussianFitStack because it's less sensitive to the
noise in each frame.
update lattice finding & fitting in Grid.ipf

Major update to Grid.ipf, routines for finding the 2D lattice from a set
of fitted atom positions.  New methods for deriving lattice parameters,
adding basis atoms to the 2D unit cell, and refining the registration of
the lattice to the atom positions.  Mostly by Andy Yankovich.
add Voronoi cell segmentation of lattice images

routines for Voronoi cell segmentation of lattice images based on a set
of fitted positions.  Capabilities:
1. Find Voronoi cells from atom positions.
2. create a stack of mask waves to analyze each cell one at a time.
3. Apply the mask waves to calculate, e.g. the mean inside each cell for
a single image or an entire registered image stack.
Bugfix for PeakPositions

Modify PeakPositions to find the thresholded image in the current data
folder, not just the root data folder.
change SortGrid to eliminate false-positive matches

Modified SortGrid to eliminate return of atom fit positions when a
matching grid atom is not found.  Now returns NaN instead.
enable many basis atoms

Modify BasisParameters and CreateGridWithBasis to allow any number of
basis atoms, not just one.  The vectors from a lattice point to each
basis atom are stored in the columns of c_params.

Also fixed a fencepost error in the number of atoms in
CreateGridWithBasis and added EstimateVector to pre-calculate the inputs
to BasisParameters from the cursors on a grid.
CreateGridWithBasis updates

bugfix in the number of atoms for CreateGridWithBasis.

changed centering behavior for created grid.  Previous behavior was to
match the grid to the atom closest to (0, 0).  Now the grid is shifted
so it's center is the same as the center of the x0, y0 atom list, then
shifted again to match up exactly the closest positions in the two
lists.  This behavior DOES NOT WORK for complicated atom bases.
added CreateGridFromPoint

add CreateGridFromPoint.  Creates a 2D lattice with basis starting from
a specified point.  Useful as a replacement for CreateGridWithBasis for
complicated lattices.

bugfix in SortGrid for generated lattices that are larger than the list
of fitted atom positions.
ignore NaNs in PeakPositions

modified PeakPositions to ignore NaNs in the input image using a ROI
wave.  NaNs can be used to mark parts of the input image where there is
no data.

Also added some additional deletion of internal processing waves.  This
change may break some of the other functions.  I didn't test it
thoroughly.
added TruncateGrid

added function TruncateGrid which takes a large grid generated by e.g.
CreateGridFromPoint and cuts it down to fit inside a rectangular box (an
image).
removed unnecessary argument to MakeAllMasks

remove unused M_VoronoiEdges argument to MakeAllMasks.
bugfix in GaussianFit

I added too many waves to the delete list in GaussianFit.  Now I've
removed some that didn't need to be there.
ignore .ipfT0 files

stop syncing of .ipfT0 files to GitHUB.  .ipfT0 are temporary procedure
files generated by Igor when there is a file locking problem.  Usually
problem is caused by having multiple instances of Igor open at one time.
finish v1 Lattice Image Segmentation

finished first version of Lattice Image Segmentation.

Added MaskZ0 and MaskSubGauss.  MaskZ0 sets each masked area to the
value of the Gaussian fit z0 parameter for that lattice point.
MaskSubGauss subtracts the Gaussian peak, then calculates the average.

A few more small changes for speed up.
add StackMean function

add function to calculate the mean of each image in a stack of images
and store the results.
added "no noise" option to GaussianFit

Added "no noise" optional parameter to GaussianFit and GausianFitStack.
Noise is calculated as the sqrt of the input image, assuming that the
input is in detected electrons.  If that is not true, using this
definition for the noise leads to spurious results.  If some pixels in
the input image are negative, the fit will fail because some of the
noise pixels are NaN.

Not all combination of input parameters and optional parameters are
coded.  For example, neither "no noise" nor "fix xy" works with a
non-zero "wiggle" parameter for the fit.  Nor does "no noise" without
"fix xy" work.
first complete version cleanup

Remove unused, incomplete, or non-working functions.  Add top comment
block with some explanation of what the functions do and how to use
them.

Add new Maskproc MaskGauss to assign each coarse-grain region to the
value of the Gaussian fit to the corresponding lattice point.
Merge pull request #2 from paul-voyles/lattice-segmentation

Lattice segmentation