Changeset 26893 for trunk/psModules/src/objects/pmSourceMoments.c
- Timestamp:
- Feb 10, 2010, 7:34:39 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourceMoments.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceMoments.c
r25979 r26893 54 54 # define VALID_RADIUS(X,Y,RAD2) (((RAD2) >= (PS_SQR(X) + PS_SQR(Y))) ? 1 : 0) 55 55 56 bool pmSourceMoments(pmSource *source, psF32 radius, psF32 sigma, psF32 minSN )56 bool pmSourceMoments(pmSource *source, psF32 radius, psF32 sigma, psF32 minSN, psImageMaskType maskVal) 57 57 { 58 58 PS_ASSERT_PTR_NON_NULL(source, false); … … 114 114 for (psS32 col = 0; col < source->pixels->numCols ; col++, vPix++, vWgt++) { 115 115 if (vMsk) { 116 if (*vMsk ) {116 if (*vMsk & maskVal) { 117 117 vMsk++; 118 118 continue; … … 135 135 // stars. 136 136 if (PS_SQR(pDiff) < minSN2*wDiff) continue; 137 if (pDiff < 0) continue; // XXX : MWV says I should include < 0.0 valued points...137 // if (pDiff < 0) continue; // XXX : MWV says I should include < 0.0 valued points... 138 138 139 139 // Apply a Gaussian window function. Be careful with the window function. S/N … … 226 226 for (psS32 col = 0; col < source->pixels->numCols ; col++, vPix++, vWgt++) { 227 227 if (vMsk) { 228 if (*vMsk ) {228 if (*vMsk & maskVal) { 229 229 vMsk++; 230 230 continue; … … 249 249 // stars. 250 250 if (PS_SQR(pDiff) < minSN2*wDiff) continue; 251 if (pDiff < 0) continue;251 // if (pDiff < 0) continue; 252 252 253 253 // Apply a Gaussian window function. Be careful with the window function. S/N … … 315 315 source->moments->Myyyy = YYYY/Sum; 316 316 317 if (source->moments->Mxx < 0) {318 fprintf (stderr, "error: neg second moment??\n");319 }320 if (source->moments->Myy < 0) {321 fprintf (stderr, "error: neg second moment??\n");322 }317 // if (source->moments->Mxx < 0) { 318 // fprintf (stderr, "error: neg second moment??\n"); 319 // } 320 // if (source->moments->Myy < 0) { 321 // fprintf (stderr, "error: neg second moment??\n"); 322 // } 323 323 324 324 psTrace ("psModules.objects", 4, "Mxx: %f Mxy: %f Myy: %f Mxxx: %f Mxxy: %f Mxyy: %f Myyy: %f Mxxxx: %f Mxxxy: %f Mxxyy: %f Mxyyy: %f Mxyyy: %f\n",
Note:
See TracChangeset
for help on using the changeset viewer.
