Changeset 13900 for trunk/psphot/src/psphotGuessModels.c
- Timestamp:
- Jun 19, 2007, 4:40:44 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotGuessModels.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotGuessModels.c
r13569 r13900 17 17 18 18 // construct an initial PSF model for each object 19 bool psphotGuessModels (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf ) {19 bool psphotGuessModels (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf, psMaskType maskVal) { 20 20 21 21 psTimerStart ("psphot"); … … 57 57 pmModel *modelPSF = pmModelFromPSF (modelEXT, psf); 58 58 if (modelPSF == NULL) { 59 psError(PSPHOT_ERR_PSF, false,60 "Failed to determine PSF model at r,c = (%d,%d); trying centre of image",61 source->peak->y, source->peak->x);62 //63 // Try the centre of the image64 //65 modelEXT->params->data.F32[PM_PAR_XPOS] = 0.5*readout->image->numCols;66 modelEXT->params->data.F32[PM_PAR_YPOS] = 0.5*readout->image->numRows;67 modelPSF = pmModelFromPSF (modelEXT, psf);68 if (modelPSF == NULL) {69 psError(PSPHOT_ERR_PSF, false,70 "Failed to determine PSF model at centre of image");71 psFree(modelEXT);72 return false;73 }59 psError(PSPHOT_ERR_PSF, false, 60 "Failed to determine PSF model at r,c = (%d,%d); trying centre of image", 61 source->peak->y, source->peak->x); 62 // 63 // Try the centre of the image 64 // 65 modelEXT->params->data.F32[PM_PAR_XPOS] = 0.5*readout->image->numCols; 66 modelEXT->params->data.F32[PM_PAR_YPOS] = 0.5*readout->image->numRows; 67 modelPSF = pmModelFromPSF (modelEXT, psf); 68 if (modelPSF == NULL) { 69 psError(PSPHOT_ERR_PSF, false, 70 "Failed to determine PSF model at centre of image"); 71 psFree(modelEXT); 72 return false; 73 } 74 74 75 source->mode |= PM_SOURCE_MODE_BADPSF;75 source->mode |= PM_SOURCE_MODE_BADPSF; 76 76 } 77 77 psFree (modelEXT); … … 85 85 source->modelPSF->residuals = psf->residuals; 86 86 87 pmSourceCacheModel (source );87 pmSourceCacheModel (source, maskVal); 88 88 } 89 89 psLogMsg ("psphot.models", 4, "built models for %ld objects: %f sec\n", sources->n, psTimerMark ("psphot"));
Note:
See TracChangeset
for help on using the changeset viewer.
