Changeset 26893 for trunk/psModules/src/imcombine/pmPSFEnvelope.c
- Timestamp:
- Feb 10, 2010, 7:34:39 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmPSFEnvelope.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmPSFEnvelope.c
r25754 r26893 65 65 int radius, // Radius of each PSF 66 66 const char *modelName,// Name of PSF model to use 67 int xOrder, int yOrder // Order for PSF variation fit 67 int xOrder, int yOrder, // Order for PSF variation fit 68 psImageMaskType maskVal 68 69 ) 69 70 { … … 154 155 pmModelClassSetLimits(PM_MODEL_LIMITS_IGNORE); 155 156 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; 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 } 161 166 } 162 }163 psFree(model);167 psFree(model); 168 } 164 169 if (!goodPSF) { 165 170 psWarning("PSF %d is bad --- not including in envelope calculation.", i); … … 360 365 361 366 // measure the source moments: tophat windowing, no pixel S/N cutoff 362 if (!pmSourceMoments(source, maxRadius, 0.0, 1.0)) { 367 // XXX probably should be passing the maskVal to this function so we can pass it along here... 368 if (!pmSourceMoments(source, maxRadius, 0.0, 1.0, maskVal)) { 363 369 // Can't do anything about it; limp along as best we can 364 370 psErrorClear();
Note:
See TracChangeset
for help on using the changeset viewer.
