Index: /trunk/psModules/src/pmObjects.c
===================================================================
--- /trunk/psModules/src/pmObjects.c	(revision 3078)
+++ /trunk/psModules/src/pmObjects.c	(revision 3078)
@@ -0,0 +1,207 @@
+/** @file  pmObjects.c
+ *
+ *  This file will ...
+ *
+ *  @author GLG, MHPCC
+ *
+ *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-24 22:57:52 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+xd *
+ */
+
+#include<stdio.h>
+#include<math.h>
+#include "pslib.h"
+#include "psConstants.h"
+#include "pmObjects.h"
+
+/******************************************************************************
+pmFindVectorPeeks(vector, threshold): Find all local peaks in the given vector
+above the given threshold.  Returns a vector of type PS_TYPE_U32 containing
+the location (x value) of all peaks.
+ *****************************************************************************/
+psVector *pmFindVectorPeeks(const psVector *vector,
+                            psF32 threshold)
+{
+    return(NULL);
+}
+
+/******************************************************************************
+pmFindImagePeeks(image, threshold): Find all local peaks in the given psImage
+above the given threshold.  Returns a psList containing the location (x/y
+value) of all peaks.
+ *****************************************************************************/
+psList *pmFindImagePeeks(const psImage *image,
+                         psF32 threshold)
+{
+    return(NULL);
+}
+
+/******************************************************************************
+psCullPeaks(peaks, maxValue, valid): eliminate peaks from the psList that have
+a peak value above the given maximum, or fall outside the valid region.
+ 
+XXX: Do we free the psList elements of those culled peaks?
+ *****************************************************************************/
+psList *pmCullPeeks(psList *peaks,
+                    psF32 maxValue,
+                    const psRegion *valid)
+{
+    return(NULL);
+}
+
+/******************************************************************************
+psSource *pmSourceLocalSky(image, peak, innerRadius, outerRadius):
+ *****************************************************************************/
+psSource *pmSourceLocalSky(const psImage *image,
+                           const psPeak *peak,
+                           psF32 innerRadius,
+                           psF32 outerRadius)
+{
+    return(NULL);
+}
+
+/******************************************************************************
+ *****************************************************************************/
+psSource *pmSourceMoments(psSource *source,
+                          const psImage *image,
+                          psF32 radius)
+{
+    return(NULL);
+}
+
+/******************************************************************************
+pmSourceRouchClass(source, saturate, SNlim, valid): make a guessat the source
+classification.
+ *****************************************************************************/
+psSource *pmSourceRouchClass(psSource *source,
+                             psF32 saturate,
+                             float SNlim,
+                             const psRegion *valid)
+{
+    return(NULL);
+}
+
+/******************************************************************************
+pmSourceSetPixelCircle(source, image, radius)
+ *****************************************************************************/
+bool pmSourceSetPixelCircle(psSource *source,
+                            const psImage *image,
+                            psF32 radius)
+{
+    return(true);
+}
+
+
+/******************************************************************************
+ *****************************************************************************/
+bool pmSourceModelGuess(psSource *source,
+                        const psImage *image)
+{
+    return(true);
+}
+
+
+/******************************************************************************
+ *****************************************************************************/
+psArray *pmSourceContour(psSource *source,
+                         const psImage *image,
+                         psF32 level,
+                         psS32 mode)
+{
+    return(NULL);
+}
+
+/******************************************************************************
+ *****************************************************************************/
+bool pmSourceFitModel(psSource *source,
+                      const psImage *image)
+{
+    return(true);
+}
+
+/******************************************************************************
+ *****************************************************************************/
+bool pmSourceAddModel(psImage *image,
+                      psSource *source,
+                      bool center)
+{
+    return(true);
+}
+
+/******************************************************************************
+ *****************************************************************************/
+bool pmSourceSubModel(psSource *source)
+{
+    return(true);
+}
+
+/******************************************************************************
+XXX: Why only *x argument?
+ *****************************************************************************/
+psF32 pmMinLM_Gauss2D(psVector *deriv,
+                      psVector *params,
+                      psVector *x)
+{
+    return(0.0);
+}
+
+/******************************************************************************
+XXX: Why only *x argument?
+ *****************************************************************************/
+psF32 pmMinLM_PsuedoGauss2D(psVector *deriv,
+                            psVector *params,
+                            psVector *x)
+{
+    return(0.0);
+}
+
+/******************************************************************************
+ *****************************************************************************/
+psF32 pmMinLM_Wauss2D(psVector *deriv,
+                      psVector *params,
+                      psVector *x)
+{
+    return(0.0);
+}
+
+/******************************************************************************
+ *****************************************************************************/
+psF32 pmMinLM_TwistGauss2D(psVector *deriv,
+                           psVector *params,
+                           psVector *x)
+{
+    return(0.0);
+}
+
+/******************************************************************************
+ *****************************************************************************/
+psF32 pmMinLM_Sersic(psVector *deriv,
+                     psVector *params,
+                     psVector *x)
+{
+    return(0.0);
+}
+
+/******************************************************************************
+ *****************************************************************************/
+psF32 pmMinLM_SersicCore(psVector *deriv,
+                         psVector *params,
+                         psVector *x)
+{
+    return(0.0);
+}
+
+/******************************************************************************
+ *****************************************************************************/
+psF32 pmMinLM_PsuedoSersic(psVector *deriv,
+                           psVector *params,
+                           psVector *x)
+{
+    return(0.0);
+}
+
+
+
Index: /trunk/psModules/src/pmObjects.h
===================================================================
--- /trunk/psModules/src/pmObjects.h	(revision 3078)
+++ /trunk/psModules/src/pmObjects.h	(revision 3078)
@@ -0,0 +1,232 @@
+/** @file  pmObjects.h
+ *
+ *  This file will ...
+ *
+ *  @author GLG, MHPCC
+ *
+ *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-24 22:57:52 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ *
+ */
+
+#if !defined(PM_OBJECTS_H)
+#define PM_OBJECTS_H
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include<stdio.h>
+#include<math.h>
+#include "pslib.h"
+// XXX: have Desonia do this correctly.
+#include "../../psLib/src/dataManip/psConstants.h"
+
+typedef enum {
+    PM_PEAK_LONE,           // Isolated peak.
+    PM_PEAK_EDGE,           // Peak on edge.
+    PM_PEAK_FLAT            // Peak has equal-value neighbors.
+} psPeakType;
+
+typedef struct
+{
+    psS32 x;                // X-coordinate of peak pixel.
+    psS32 y;                // Y-coordinate of peak pixel.
+    psF32 counts;           // Value of peak pixel (above sky?).
+    psPeakType class;       // Description of peak.
+}
+psPeak;
+
+typedef struct
+{
+    psF32 x;                // X-coord of centroid.
+    psF32 y;                // Y-coord of centroid.
+    psF32 Sx;               // x-second moment.
+    psF32 Sy;               // y-second moment.
+    psF32 Sxy;              // xy cross moment.
+    psF32 Sum;              // Pixel sum above sky (background).
+    psF32 Peak;             // Peak counts above sky.
+    psF32 Sky;              // Sky level (background).
+    psS32 nPixels;          // Number of pixels used.
+}
+psMoments;
+
+typedef enum {
+    PS_MODEL_GAUSS,
+    PS_MODEL_PGAUSS,
+    PS_MODEL_TWIST_GAUSS,
+    PS_MODEL_WAUSS,
+    PS_MODEL_SERSIC,
+    PS_MODEL_SERSIC_CORE
+} psModelType;
+
+typedef struct
+{
+    psModelType type;       // Model to be used.
+    psS32 Nparams;          // Number of parameters.
+    psF32 *params;          // Paramater values.
+    psF32 *dparams;         // Parameter errors.
+    psF32 chisq;            // Fit chi-squared.
+}
+psModel;
+
+// XXX: What is this enum?
+typedef enum {
+    PS_SOURCE_TYPE_1,
+    PS_SOURCE_TYPE_2,
+    PS_SOURCE_TYPE_3,
+    PS_SOURCE_TYPE_4,
+    PS_SOURCE_TYPE_5,
+    PS_SOURCE_TYPE_6
+} psSourceType;
+
+typedef struct
+{
+    psPeak *peak;           // Description of peak pixel.
+    psImage *pixels;        // Rectangular region including object pixels.
+    psImage *mask;          // Mask which marks pixels associated with objects.
+    psMoments *moments;     // Basic moments measure for the object.
+    psModel *models;        // Model parameters and type.
+    psSourceType type;      // Best identification of object.
+}
+psSource;
+
+
+/******************************************************************************
+pmFindVectorPeeks(vector, threshold): Find all local peaks in the given vector
+above the given threshold.  Returns a vector of type PS_TYPE_U32 containing
+the location (x value) of all peaks.
+ *****************************************************************************/
+psVector *pmFindVectorPeeks(const psVector *vector,
+                            psF32 threshold);
+
+/******************************************************************************
+pmFindImagePeeks(image, threshold): Find all local peaks in the given psImage
+above the given threshold.  Returns a psList containing the location (x/y
+value) of all peaks.
+ *****************************************************************************/
+psList *pmFindImagePeeks(const psImage *image,
+                         psF32 threshold);
+
+/******************************************************************************
+psCullPeaks(peaks, maxValue, valid): eliminate peaks from the psList that have
+a peak value above the given maximum, or fall outside the valid region.
+ 
+XXX: Do we free the psList elements of those culled peaks?
+ *****************************************************************************/
+psList *pmCullPeeks(psList *peaks,
+                    psF32 maxValue,
+                    const psRegion *valid);
+
+//psList *pmCullPeeks(psF32 *peaks,
+//                    psF32 maxValue,
+//                    psF32 *valid);
+
+/******************************************************************************
+psSource *pmSourceLocalSky(image, peak, innerRadius, outerRadius):
+ 
+ *****************************************************************************/
+psSource *pmSourceLocalSky(const psImage *image,
+                           const psPeak *peak,
+                           psF32 innerRadius,
+                           psF32 outerRadius);
+
+/******************************************************************************
+ *****************************************************************************/
+psSource *pmSourceMoments(psSource *source,
+                          const psImage *image,
+                          psF32 radius);
+
+/******************************************************************************
+pmSourceRouchClass(source, saturate, SNlim, valid): make a guessat the source
+classification.
+ *****************************************************************************/
+psSource *pmSourceRouchClass(psSource *source,
+                             psF32 saturate,
+                             float SNlim,
+                             const psRegion *valid);
+
+
+/******************************************************************************
+pmSourceSetPixelCircle(source, image, radius)
+ *****************************************************************************/
+bool pmSourceSetPixelCircle(psSource *source,
+                            const psImage *image,
+                            psF32 radius);
+
+
+/******************************************************************************
+ *****************************************************************************/
+bool pmSourceModelGuess(psSource *source,
+                        const psImage *image);
+
+/******************************************************************************
+ *****************************************************************************/
+psArray *pmSourceContour(psSource *source,
+                         const psImage *image,
+                         psF32 level,
+                         psS32 mode);
+
+/******************************************************************************
+ *****************************************************************************/
+bool pmSourceFitModel(psSource *source,
+                      const psImage *image);
+
+/******************************************************************************
+ *****************************************************************************/
+bool pmSourceAddModel(psImage *image,
+                      psSource *source,
+                      bool center);
+
+/******************************************************************************
+ *****************************************************************************/
+bool pmSourceSubModel(psSource *source);
+
+/******************************************************************************
+XXX: Why only *x argument?
+ *****************************************************************************/
+psF32 pmMinLM_Gauss2D(psVector *deriv,
+                      psVector *params,
+                      psVector *x);
+
+/******************************************************************************
+XXX: Why only *x argument?
+ *****************************************************************************/
+psF32 pmMinLM_PsuedoGauss2D(psVector *deriv,
+                            psVector *params,
+                            psVector *x);
+
+/******************************************************************************
+ *****************************************************************************/
+psF32 pmMinLM_Wauss2D(psVector *deriv,
+                      psVector *params,
+                      psVector *x);
+
+/******************************************************************************
+ *****************************************************************************/
+psF32 pmMinLM_TwistGauss2D(psVector *deriv,
+                           psVector *params,
+                           psVector *x);
+
+/******************************************************************************
+ *****************************************************************************/
+psF32 pmMinLM_Sersic(psVector *deriv,
+                     psVector *params,
+                     psVector *x);
+
+/******************************************************************************
+ *****************************************************************************/
+psF32 pmMinLM_SersicCore(psVector *deriv,
+                         psVector *params,
+                         psVector *x);
+
+/******************************************************************************
+ *****************************************************************************/
+psF32 pmMinLM_PsuedoSersic(psVector *deriv,
+                           psVector *params,
+                           psVector *x);
+
+
+#endif
