Changeset 3600 for trunk/psModules/src/pmObjects.h
- Timestamp:
- Mar 31, 2005, 1:45:22 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/pmObjects.h (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmObjects.h
r3510 r3600 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-03- 25 23:18:35$7 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-03-31 23:45:22 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 26 26 27 27 typedef enum { 28 PM_PEAK_LONE, // Isolated peak.29 PM_PEAK_EDGE, // Peak on edge.30 PM_PEAK_FLAT, // Peak has equal-value neighbors.31 PM_PEAK_UNDEF // Undefined.28 PM_PEAK_LONE, ///< Isolated peak. 29 PM_PEAK_EDGE, ///< Peak on edge. 30 PM_PEAK_FLAT, ///< Peak has equal-value neighbors. 31 PM_PEAK_UNDEF ///< Undefined. 32 32 } psPeakType; 33 33 34 34 typedef struct 35 35 { 36 psS32 x; // X-coordinate of peak pixel.37 psS32 y; // Y-coordinate of peak pixel.38 psF32 counts; // Value of peak pixel (above sky?).39 psPeakType class; // Description of peak.36 psS32 x; ///< X-coordinate of peak pixel. 37 psS32 y; ///< Y-coordinate of peak pixel. 38 psF32 counts; ///< Value of peak pixel (above sky?). 39 psPeakType class; ///< Description of peak. 40 40 } 41 41 psPeak; … … 43 43 typedef struct 44 44 { 45 psF32 x; // X-coord of centroid.46 psF32 y; // Y-coord of centroid.47 psF32 Sx; // x-second moment.48 psF32 Sy; // y-second moment.49 psF32 Sxy; // xy cross moment.50 psF32 Sum; // Pixel sum above sky (background).51 psF32 Peak; // Peak counts above sky.52 psF32 Sky; // Sky level (background).53 psS32 nPixels; // Number of pixels used.45 psF32 x; ///< X-coord of centroid. 46 psF32 y; ///< Y-coord of centroid. 47 psF32 Sx; ///< x-second moment. 48 psF32 Sy; ///< y-second moment. 49 psF32 Sxy; ///< xy cross moment. 50 psF32 Sum; ///< Pixel sum above sky (background). 51 psF32 Peak; ///< Peak counts above sky. 52 psF32 Sky; ///< Sky level (background). 53 psS32 nPixels; ///< Number of pixels used. 54 54 } 55 55 psMoments; 56 56 57 57 typedef enum { 58 PS_MODEL_GAUSS, 59 PS_MODEL_PGAUSS, 60 PS_MODEL_TWIST_GAUSS, 61 PS_MODEL_WAUSS, 62 PS_MODEL_SERSIC, 63 PS_MODEL_SERSIC_CORE, 64 PS_MODEL_UNDEFINED 58 PS_MODEL_GAUSS, ///< Regular 2-D Gaussian 59 PS_MODEL_PGAUSS, ///< Psuedo 2-D Gaussian 60 PS_MODEL_TWIST_GAUSS, ///< 2-D Twisted Gaussian 61 PS_MODEL_WAUSS, ///< 2-D Waussian 62 PS_MODEL_SERSIC, ///< Sersic 63 PS_MODEL_SERSIC_CORE, ///< Sersic Core 64 PS_MODEL_UNDEFINED ///< Undefined 65 65 } psModelType; 66 66 … … 68 68 typedef struct 69 69 { 70 psModelType type; // Model to be used.71 psS32 Nparams; // Number of parameters.72 psF32 *params; // Paramater values.73 psF32 *dparams; // Parameter errors.74 psF32 chisq; // Fit chi-squared.70 psModelType type; ///< Model to be used. 71 psS32 Nparams; ///< Number of parameters. 72 psF32 *params; ///< Paramater values. 73 psF32 *dparams; ///< Parameter errors. 74 psF32 chisq; ///< Fit chi-squared. 75 75 } 76 76 psModel; … … 90 90 typedef struct 91 91 { 92 psPeak *peak; // Description of peak pixel.93 psImage *pixels; // Rectangular region including object pixels.94 psImage *mask; // Mask which marks pixels associated with objects.95 psMoments *moments; // Basic moments measure for the object.96 psModel *models; // Model parameters and type.97 psSourceType type; // Best identification of object.92 psPeak *peak; ///< Description of peak pixel. 93 psImage *pixels; ///< Rectangular region including object pixels. 94 psImage *mask; ///< Mask which marks pixels associated with objects. 95 psMoments *moments; ///< Basic moments measure for the object. 96 psModel *models; ///< Model parameters and type. 97 psSourceType type; ///< Best identification of object. 98 98 } 99 99 psSource; 100 100 101 psPeak *pmPeakAlloc(psS32 x, 102 psS32 y, 103 psF32 counts, 104 psPeakType class); 101 psPeak *pmPeakAlloc(psS32 x, ///< Row-coordinate in image space 102 psS32 y, ///< Col-coordinate in image space 103 psF32 counts, ///< The value of the peak pixel 104 psPeakType class ///< The type of peak pixel 105 ); 106 105 107 psMoments *pmMomentsAlloc(); 106 108 psModel *pmModelAlloc(psModelType type); … … 112 114 the location (x value) of all peaks. 113 115 *****************************************************************************/ 114 psVector *pmFindVectorPeeks(const psVector *vector, 115 psF32 threshold); 116 psVector *pmFindVectorPeeks(const psVector *vector, ///< The input vector (psF32) 117 psF32 threshold ///< Threshold above which to find a peak 118 ); 116 119 117 120 /****************************************************************************** … … 120 123 value) of all peaks. 121 124 *****************************************************************************/ 122 psList *pmFindImagePeeks(const psImage *image, 123 psF32 threshold); 125 psList *pmFindImagePeeks(const psImage *image, ///< The input image where peaks will be found (psF32) 126 psF32 threshold ///< Threshold above which to find a peak 127 ); 124 128 125 129 /****************************************************************************** … … 129 133 XXX: Do we free the psList elements of those culled peaks? 130 134 *****************************************************************************/ 131 psList *pmCullPeeks(psList *peaks, 132 psF32 maxValue, 133 const psRegion *valid); 134 135 //psList *pmCullPeeks(psF32 *peaks, 136 // psF32 maxValue, 137 // psF32 *valid); 135 psList *pmCullPeeks(psList *peaks, ///< The psList of peaks to be culled 136 psF32 maxValue, ///< Cull peaks above this value 137 const psRegion *valid ///< Cull peaks otside this psRegion 138 ); 138 139 139 140 /****************************************************************************** … … 141 142 142 143 *****************************************************************************/ 143 psSource *pmSourceLocalSky(const psImage *image, 144 const psPeak *peak, 145 psStatsOptions statsOptions, 146 psF32 innerRadius, 147 psF32 outerRadius); 148 149 /****************************************************************************** 150 *****************************************************************************/ 151 psSource *pmSourceMoments(psSource *source, 152 psF32 radius); 144 psSource *pmSourceLocalSky(const psImage *image, ///< The input image (psF32) 145 const psPeak *peak, ///< The peak for which the psSource struct is created. 146 psStatsOptions statsOptions, ///< The statistic used in calculating the background sky 147 psF32 innerRadius, ///< The inner radius of the suqare annulus for calculating sky 148 psF32 outerRadius ///< The outer radius of the suqare annulus for calculating sky 149 ); 150 151 /****************************************************************************** 152 *****************************************************************************/ 153 psSource *pmSourceMoments(psSource *source, ///< The input psSource for which moments will be computed 154 psF32 radius ///< Use a circle of pixels around the peak 155 ); 153 156 154 157 /****************************************************************************** … … 156 159 source classification. 157 160 *****************************************************************************/ 158 bool pmSourceRoughClass(psArray *source, 159 psMetadata *metadata); 161 bool pmSourceRoughClass(psArray *source, ///< The input psSource 162 psMetadata *metadata ///< Contains classification parameters 163 ); 160 164 /****************************************************************************** 161 165 pmSourceSetPixelCircle(source, image, radius) 162 166 *****************************************************************************/ 163 bool pmSourceSetPixelCircle(psSource *source, 164 const psImage *image, 165 psF32 radius); 166 167 168 /****************************************************************************** 169 *****************************************************************************/ 170 bool pmSourceModelGuess(psSource *source, 171 const psImage *image, 172 psModelType model); 167 bool pmSourceSetPixelCircle(psSource *source, ///< The input psSource 168 const psImage *image, ///< The input image (psF32) 169 psF32 radius ///< The radius of the circle 170 ); 171 172 /****************************************************************************** 173 *****************************************************************************/ 174 bool pmSourceModelGuess(psSource *source, ///< The input psSource 175 const psImage *image, ///< The input image (psF32) 176 psModelType model ///< The type of model to be created. 177 ); 173 178 174 179 /****************************************************************************** … … 178 183 } pmContourType; 179 184 180 psArray *pmSourceContour(psSource *source, 181 const psImage *image, 182 psF32 level, 183 pmContourType mode); 184 185 /****************************************************************************** 186 *****************************************************************************/ 187 bool pmSourceFitModel(psSource *source, 188 const psImage *image); 189 190 /****************************************************************************** 191 *****************************************************************************/ 192 bool pmSourceAddModel(psImage *image, 193 psSource *source, 194 bool center); 195 196 /****************************************************************************** 197 *****************************************************************************/ 198 bool pmSourceSubModel(psImage *image, 199 psSource *source, 200 bool center); 185 psArray *pmSourceContour(psSource *source, ///< The input psSource 186 const psImage *image, ///< The input image (psF32) (this arg should be removed) 187 psF32 level, ///< The level of the contour 188 pmContourType mode ///< Currently this must be PS_CONTOUR_CRUDE 189 ); 190 191 /****************************************************************************** 192 *****************************************************************************/ 193 bool pmSourceFitModel(psSource *source, ///< The input psSource 194 const psImage *image ///< The input image (psF32) 195 ); 196 197 /****************************************************************************** 198 *****************************************************************************/ 199 bool pmSourceAddModel(psImage *image, ///< The opuut image (psF32) 200 psSource *source, ///< The input psSource 201 bool center ///< A boolean flag that determines whether pixels are centered 202 ); 203 204 /****************************************************************************** 205 *****************************************************************************/ 206 bool pmSourceSubModel(psImage *image, ///< The output image (psF32) 207 psSource *source, ///< The input psSource 208 bool center ///< A boolean flag that determines whether pixels are centered 209 ); 201 210 202 211 /****************************************************************************** 203 212 XXX: Why only *x argument? 204 213 *****************************************************************************/ 205 psF32 pmMinLM_Gauss2D(psVector *deriv, 206 psVector *params, 207 psVector *x); 214 psF32 pmMinLM_Gauss2D(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 215 psVector *params, ///< A psVector which holds the parameters of this function 216 psVector *x ///< A psVector which holds the row/col coordinate 217 ); 208 218 209 219 /****************************************************************************** 210 220 XXX: Why only *x argument? 211 221 *****************************************************************************/ 212 psF32 pmMinLM_PsuedoGauss2D(psVector *deriv, 213 psVector *params, 214 psVector *x); 215 216 /****************************************************************************** 217 *****************************************************************************/ 218 psF32 pmMinLM_Wauss2D(psVector *deriv, 219 psVector *params, 220 psVector *x); 221 222 /****************************************************************************** 223 *****************************************************************************/ 224 psF32 pmMinLM_TwistGauss2D(psVector *deriv, 225 psVector *params, 226 psVector *x); 227 228 /****************************************************************************** 229 *****************************************************************************/ 230 psF32 pmMinLM_Sersic(psVector *deriv, 231 psVector *params, 232 psVector *x); 233 234 /****************************************************************************** 235 *****************************************************************************/ 236 psF32 pmMinLM_SersicCore(psVector *deriv, 237 psVector *params, 238 psVector *x); 239 240 /****************************************************************************** 241 *****************************************************************************/ 242 psF32 pmMinLM_PsuedoSersic(psVector *deriv, 243 psVector *params, 244 psVector *x); 222 psF32 pmMinLM_PsuedoGauss2D(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 223 psVector *params, ///< A psVector which holds the parameters of this function 224 psVector *x ///< A psVector which holds the row/col coordinate 225 ); 226 227 /****************************************************************************** 228 *****************************************************************************/ 229 psF32 pmMinLM_Wauss2D(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 230 psVector *params, ///< A psVector which holds the parameters of this function 231 psVector *x ///< A psVector which holds the row/col coordinate 232 ); 233 234 /****************************************************************************** 235 *****************************************************************************/ 236 psF32 pmMinLM_TwistGauss2D(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 237 psVector *params, ///< A psVector which holds the parameters of this function 238 psVector *x ///< A psVector which holds the row/col coordinate 239 ); 240 241 /****************************************************************************** 242 *****************************************************************************/ 243 psF32 pmMinLM_Sersic(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 244 psVector *params, ///< A psVector which holds the parameters of this function 245 psVector *x ///< A psVector which holds the row/col coordinate 246 ); 247 248 /****************************************************************************** 249 *****************************************************************************/ 250 psF32 pmMinLM_SersicCore(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 251 psVector *params, ///< A psVector which holds the parameters of this function 252 psVector *x ///< A psVector which holds the row/col coordinate 253 ); 254 255 /****************************************************************************** 256 *****************************************************************************/ 257 psF32 pmMinLM_PsuedoSersic(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 258 psVector *params, ///< A psVector which holds the parameters of this function 259 psVector *x ///< A psVector which holds the row/col coordinate 260 ); 245 261 246 262
Note:
See TracChangeset
for help on using the changeset viewer.
