merge changes from eam_branch_20080229: better flag definitions, cleanup footprint code (move into psphotFindDetections), push mask selection into called functions