Changeset 26834
- Timestamp:
- Feb 9, 2010, 6:24:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/psModules/src/imcombine/pmPSFEnvelope.c
r26594 r26834 66 66 const char *modelName,// Name of PSF model to use 67 67 int xOrder, int yOrder, // Order for PSF variation fit 68 psImageMaskType maskVal68 psImageMaskType maskVal 69 69 ) 70 70 { … … 155 155 pmModelClassSetLimits(PM_MODEL_LIMITS_IGNORE); 156 156 pmModel *model = pmModelFromPSFforXY(psf, numCols / 2.0, numRows / 2.0, PEAK_FLUX); // Test model 157 model->modelSetLimits(PM_MODEL_LIMITS_STRICT); 158 for (int j = 0; j < model->params->n && goodPSF; j++) { 159 if (!model->modelLimits(PS_MINIMIZE_PARAM_MIN, j, model->params->data.F32, NULL) || 160 !model->modelLimits(PS_MINIMIZE_PARAM_MAX, j, model->params->data.F32, NULL)) { 161 goodPSF = false; 157 if (!model) { 158 goodPSF = false; 159 } else { 160 model->modelSetLimits(PM_MODEL_LIMITS_STRICT); 161 for (int j = 0; j < model->params->n && goodPSF; j++) { 162 if (!model->modelLimits(PS_MINIMIZE_PARAM_MIN, j, model->params->data.F32, NULL) || 163 !model->modelLimits(PS_MINIMIZE_PARAM_MAX, j, model->params->data.F32, NULL)) { 164 goodPSF = false; 165 } 162 166 } 163 }164 psFree(model);167 psFree(model); 168 } 165 169 if (!goodPSF) { 166 170 psWarning("PSF %d is bad --- not including in envelope calculation.", i); … … 361 365 362 366 // measure the source moments: tophat windowing, no pixel S/N cutoff 363 // XXX probably should be passing the maskVal to this function so we can pass it along here...367 // XXX probably should be passing the maskVal to this function so we can pass it along here... 364 368 if (!pmSourceMoments(source, maxRadius, 0.0, 1.0, maskVal)) { 365 369 // Can't do anything about it; limp along as best we can
Note:
See TracChangeset
for help on using the changeset viewer.
