IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 11, 2008, 12:38:55 PM (18 years ago)
Author:
Paul Price
Message:

Another installment in the saga to ensure pmSourceMoments doesn't go nuts: limiting the maximum radius.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmPSFEnvelope.c

    r18788 r19009  
    146146            // Get the radius
    147147            pmModel *model = pmModelFromPSFforXY(psf, x, y, PEAK_FLUX); // Model for source
    148             float srcRadius = model->modelRadius(model->params, WEIGHT_VAL); // Radius for source
     148            float srcRadius = model->modelRadius(model->params, PS_SQR(WEIGHT_VAL)); // Radius for source
    149149            if (srcRadius > maxRadius) {
    150150                maxRadius = srcRadius;
     
    167167    }
    168168    psFree(fakeRO);
     169
     170    if (maxRadius > radius) {
     171        maxRadius = radius;
     172    }
    169173
    170174#ifdef TESTING
     
    215219    // *** readout->weight = (psImage*)psBinaryOp(NULL, readout->image, "*", readout->image);
    216220    // *** readout->weight = (psImage*)psBinaryOp(NULL, readout->image, "*", psScalarAlloc(WEIGHT_FACTOR, PS_TYPE_F32));
    217     readout->weight = (psImage*)psBinaryOp(NULL, readout->image, "+", psScalarAlloc(PS_SQR(WEIGHT_VAL), PS_TYPE_F32));
     221    readout->weight = (psImage*)psBinaryOp(NULL, readout->image, "+", psScalarAlloc(WEIGHT_VAL, PS_TYPE_F32));
    218222    readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
    219223    psImageInit(readout->mask, 0);
Note: See TracChangeset for help on using the changeset viewer.