IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 1, 2009, 4:03:58 PM (17 years ago)
Author:
Paul Price
Message:

Merging stack development branch (implement lax and strict PSF model limits) from branches/pap

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/psModules/src/imcombine/pmPSFEnvelope.c

    r25491 r25738  
    149149        }
    150150
     151        // Test PSF
     152        {
     153            bool goodPSF = true;                                                                // Good PSF?
     154            pmModelClassSetLimits(PM_MODEL_LIMITS_IGNORE);
     155            pmModel *model = pmModelFromPSFforXY(psf, numCols / 2.0, numRows / 2.0, PEAK_FLUX); // Test model
     156            model->modelSetLimits(PM_MODEL_LIMITS_STRICT);
     157            for (int j = 0; j < model->params->n && goodPSF; j++) {
     158                if (!model->modelLimits(PS_MINIMIZE_PARAM_MIN, j, model->params->data.F32, NULL) ||
     159                    !model->modelLimits(PS_MINIMIZE_PARAM_MAX, j, model->params->data.F32, NULL)) {
     160                    goodPSF = false;
     161                }
     162            }
     163            psFree(model);
     164            if (!goodPSF) {
     165                psWarning("PSF %d is bad --- not including in envelope calculation.", i);
     166                continue;
     167            }
     168        }
     169
    151170        pmResiduals *resid = psf->residuals;// PSF residuals
    152171        psf->residuals = NULL;
    153172        if (!pmReadoutFakeFromSources(fakeRO, fakeSize, fakeSize, fakes, 0, xOffset, yOffset, psf,
    154                                       NAN, radius, true, true)) {
     173                                      NAN, radius, true, false)) {
    155174            psError(PS_ERR_UNKNOWN, false, "Unable to generate fake readout.");
    156175            psFree(envelope);
Note: See TracChangeset for help on using the changeset viewer.