Index: trunk/ppTranslate/src/ppMops.h
===================================================================
--- trunk/ppTranslate/src/ppMops.h	(revision 29567)
+++ trunk/ppTranslate/src/ppMops.h	(revision 32406)
@@ -62,4 +62,5 @@
 
 typedef struct {
+  psString component;                 // skycell_id for these detections
   psString raBoresight, decBoresight; // RA,Dec of telescope boresight
   psString filter;                    // Filter for exposure
@@ -70,53 +71,16 @@
   double mjd;                         // Modified Julian Date
   float seeing;                       // Seeing of exposure
+  int   naxis1, naxis2;               // size of the image
   long num;                           // Number of detections
+  long numGood;                       // Number of "good" detections
+  psS64 diffSkyfileId;                // unique id for input skyfile
+  psMetadata *table;                  // Columns from the input file
   psVector *x, *y;                    // Image coordinates
   psVector *ra, *dec;                 // Sky coordinates
   psVector *raErr, *decErr;           // Error in sky coordinates
-  psVector *mag, *magErr;             // Magnitude and associated error
-  psVector *chi2, *dof;               // Chi^2 from fitting, with associated degrees of freedom
-  psVector *cr, *extended;            // Measures of CR-ness and extendedness
-  psVector *psfMajor, *psfMinor, *psfTheta; // PSF major and minor axes, and position angle
-  psVector *quality, *numPix;               // PSF quality factor and number of pixels
-  psVector *xxMoment, *xyMoment, *yyMoment; // Moments
-  psVector *flags;                    // psphot flags
-  psVector *diffSkyfileId;            // Identifier for source image
-  psVector *naxis1, *naxis2;          // Size of image
   psVector *mask;                     // Mask for detections
-  psVector *nPos;                     // Number of positive pixels
-  psVector *fPos;                     // Fraction of positive flux
-  psVector *nRatioBad;                // Fraction of positive pixels to negative
-  psVector *nRatioMask;               // Fraction of positive pixels to masked
-  psVector *nRatioAll;                // Fraction of positive pixels to all
-  psVector *psfInstFlux;              // PSF fit instrumental magnitude
-  psVector *psfInstFluxSig;           // Sigma of PSF instrumental magnitude
-  psVector *apMag;                    // Magnitude in standard aperture
-  psVector *apMagRadius;              // Radius used for aperture mags
-  psVector *apMagRaw;                 // Magnitude in real aperture
-  psVector *apFlux;                   // Instrumental flux in standard aperture
-  psVector *apFluxSig;                // Aperture flux error
-  psVector *peakFluxAsMag;            // Peak flux expressed as magnitude
-  psVector *calPsfMag;                // PSF Magnitude using supplied calibration
-  psVector *calPsfMagSig;             // Measured scatter of zero point calibration
-  psVector *sky;                      // Sky level
-  psVector *skySig;                   // Sigma of sky level
-  psVector *qualityPerfect;           // PSF coverage/quality factor (poor)
-  psVector *momentsR1;                // First radial moment
-  psVector *momentsRH;                // Half radial moment
-  psVector *kronFlux;                 // Kron Flux (in 2.5 R1)
-  psVector *kronFluxErr;              // Kron Flux Error
-  psVector *kronFluxInner;            // Kron Flux (in 1.0 R1)
-  psVector *kronFluxOuter;            // Kron Flux (in 4.0 R1)
-  psVector *diffRP;                   // Distance to positive match source
-  psVector *diffSnP;                  // Signal-to-noise of pos match src
-  psVector *diffRM;                   // Distance to negative match source
-  psVector *diffSnM;                  // Signal-to-noise of neg match src
-  psVector *flags2;                   // psphot flags (group 2)
-  psVector *ippIdet;                  // IPP detection identifier index
-  psVector *nFrames;                  // Number of frames overlapping source center
-  psVector *padding;                  // Padding
 } ppMopsDetections;
 
-ppMopsDetections *ppMopsDetectionsAlloc(long num);
+ppMopsDetections *ppMopsDetectionsAlloc();
 
 /// Copy a detection
@@ -130,8 +94,9 @@
 
 /// Merge detections
-ppMopsDetections *ppMopsMerge(const psArray *detections);
+// ppMopsDetections *ppMopsMerge(const psArray *detections);
+bool ppMopsPurgeDuplicates(const psArray *detections);
 
 /// Write detections
-bool ppMopsWrite(const ppMopsDetections *detections, const ppMopsArguments *args);
+bool ppMopsWrite(const psArray *detections, const ppMopsArguments *args);
 
 /// Get the version contained in EXTTYPE of the "SkyChip.psf" table:
