IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 10, 2010, 7:34:39 PM (16 years ago)
Author:
eugene
Message:

updates from eam_branches/20091201 (substantially changes to the kernel matching code; updates to pmDetection container, added pmPattern, etc)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourceMoments.c

    r25979 r26893  
    5454# define VALID_RADIUS(X,Y,RAD2) (((RAD2) >= (PS_SQR(X) + PS_SQR(Y))) ? 1 : 0)
    5555
    56 bool pmSourceMoments(pmSource *source, psF32 radius, psF32 sigma, psF32 minSN)
     56bool pmSourceMoments(pmSource *source, psF32 radius, psF32 sigma, psF32 minSN, psImageMaskType maskVal)
    5757{
    5858    PS_ASSERT_PTR_NON_NULL(source, false);
     
    114114        for (psS32 col = 0; col < source->pixels->numCols ; col++, vPix++, vWgt++) {
    115115            if (vMsk) {
    116                 if (*vMsk) {
     116                if (*vMsk & maskVal) {
    117117                    vMsk++;
    118118                    continue;
     
    135135            // stars.
    136136            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...
    138138
    139139            // Apply a Gaussian window function.  Be careful with the window function.  S/N
     
    226226        for (psS32 col = 0; col < source->pixels->numCols ; col++, vPix++, vWgt++) {
    227227            if (vMsk) {
    228                 if (*vMsk) {
     228                if (*vMsk & maskVal) {
    229229                    vMsk++;
    230230                    continue;
     
    249249            // stars.
    250250            if (PS_SQR(pDiff) < minSN2*wDiff) continue;
    251             if (pDiff < 0) continue;
     251            // if (pDiff < 0) continue;
    252252
    253253            // Apply a Gaussian window function.  Be careful with the window function.  S/N
     
    315315    source->moments->Myyyy = YYYY/Sum;
    316316
    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    // }
    323323
    324324    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.