IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25698


Ignore:
Timestamp:
Sep 30, 2009, 2:36:31 PM (17 years ago)
Author:
eugene
Message:

test for nan values in ap resid calculation; repair NANs in map

File:
1 edited

Legend:

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

    r25651 r25698  
    190190                 source->modelPSF->params->data.F32[PM_PAR_7]);
    191191# endif
     192        if (!isfinite(source->psfMag)) psAbort ("nan in psfMag");
     193        if (!isfinite(source->errMag)) psAbort ("nan in errMag");
     194        if (!isfinite(source->apMag)) psAbort ("nan in apMag");
     195        if (!isfinite(model->params->data.F32[PM_PAR_XPOS])) psAbort ("nan in xPos");
     196        if (!isfinite(model->params->data.F32[PM_PAR_YPOS])) psAbort ("nan in yPos");
     197
    192198        psVectorAppend (mag, source->psfMag);
    193199        psVectorAppend (dMag,source->errMag);
     
    241247        }
    242248
     249        // apply ApTrend results
     250        // float xc = 0.5*readout->image->numCols + readout->image->col0 + 0.5;
     251        // float yc = 0.5*readout->image->numRows + readout->image->row0 + 0.5;
     252        // float ApResid = pmTrend2DEval (psf->ApTrend, xc, yc); // ap-fit at chip center
     253        // if (!isfinite(ApResid)) psAbort("nan apresid @ center");
     254
    243255        // store the minimum errorFloor and best ApTrend to keep
    244256        if (errorFloor < errorFloorMin) {
     
    320332        psFree (apTrend);
    321333        return NULL;
     334    }
     335    if (apTrend->mode == PM_TREND_MAP) {
     336        // p_psImagePrint (2, apTrend->map->map, "ApTrend Before"); // XXX TEST:
     337        psImageMapRepair (apTrend->map->map);
     338        // p_psImagePrint (2, apTrend->map->map, "ApTrend After"); // XXX TEST:
    322339    }
    323340
Note: See TracChangeset for help on using the changeset viewer.