IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25671


Ignore:
Timestamp:
Sep 29, 2009, 4:11:51 PM (17 years ago)
Author:
eugene
Message:

mask at large radius before trying to measure residual value; mask 1st as well as 0th order; mask a failed pixel fit rather than raising an error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/psphot/src/psphotMakeResiduals.c

    r25645 r25671  
    236236                }
    237237
     238                float radius = hypot((ox - 0.5*resid->Ro->numCols), (oy - 0.5*resid->Ro->numRows));
     239                if (radius > radiusMax) {
     240                  resid->mask->data.PM_TYPE_RESID_MASK_DATA[oy][ox] = 1;
     241                  continue;
     242                }
     243
    238244                resid->Ro->data.F32[oy][ox] = psStatsGetValue(fluxStats, statOption);
    239245                resid->Rx->data.F32[oy][ox] = resid->Ry->data.F32[oy][ox] = 0.0;
     
    250256                  resid->mask->data.PM_TYPE_RESID_MASK_DATA[oy][ox] = 1;
    251257                }
     258            } else {
     259                assert (SPATIAL_ORDER == 1);
    252260
    253261                float radius = hypot((ox - 0.5*resid->Ro->numCols), (oy - 0.5*resid->Ro->numRows));
    254262                if (radius > radiusMax) {
    255263                  resid->mask->data.PM_TYPE_RESID_MASK_DATA[oy][ox] = 1;
    256                 }
    257             } else {
    258                 assert (SPATIAL_ORDER == 1);
     264                  continue;
     265                }
     266
    259267                psImageInit(A, 0.0);
    260268                psVectorInit(B, 0.0);
     
    279287
    280288                if (!psMatrixGJSolve(A, B)) {
    281                     psError(PSPHOT_ERR_PSF, false, "Singular matrix solving for (y,x) = (%d,%d)'s residuals",
    282                             oy, ox);
    283                     psFree(resid); resid = NULL;
    284                     break;
     289                    resid->mask->data.PM_TYPE_RESID_MASK_DATA[oy][ox] = 1;
     290                    psWarning("Singular matrix solving for (y,x) = (%d,%d)'s residuals, masking", oy, ox);
     291                    continue;
    285292                }
    286293
Note: See TracChangeset for help on using the changeset viewer.