Here's my current method for making masks in 17 easy steps.

1) cd to the temp directory and 'source ~frank/Research/aliases'.
2) zcat in the appropriate files (image and reference), 
	e.g. aw0.rast.Z as w0.rast and refa.rast.Z as refa.rast.
3) makemask w0.rast refa.rast w0.mask 40
	(40 is a good starting place, try +/- 10 as well)
4) view the result with 'xv2 w0.mask'.  Repeat Step 3 until satisfied.
5) rtox w0.mask (this is an alias setup from Step 1 that creates w0.mask.xbm).
6) bitmap w0.mask.xbm.  Invert the image (reverse video) and then use
	the 'diamond-z' key to zoom in on an area and using 'curve', 'flood 
	'fill' and 'filled rectangle' make it into a mask.  Save and exit.
	I find it helps to have the original image up next to the mask
	(xv2 w0.rast).
7) xbmtopbm w0.mask.xbm >! w0.mask
8) rastotopnm w0.rast >w0.ppm
9) arith w0 (another alias to test the masking, creates 'blahw0').
10) view the result (xv2 blahw0).  Repeat Step 6 until satisfied.
11) bring up the mask (xv2 w0.mask) and find the (x,y) values of the corners
12) cut xTopLeft yTopLeft xBottomRight yBottomRight w0.mask
	where the first 4 parameters are the values determined in Step 11
13) cut xTopLeft yTopLeft xBottomRight yBottomRight w0.ppm
	where the first 4 parameters are the values determined in Step 11
14) pbmtoxbm w0.mask > ../done-cam/w0.m
15) ptox w0.ppm
16) mv w0.ppm.xbm ../done-cam/w0.xbm
17) rm *w0*

note: steps 14-16 are now performed by the alias 'done'.
