Changeset 6753 for trunk/psphot/src/psphotRadiusChecks.c
- Timestamp:
- Mar 31, 2006, 4:58:31 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotRadiusChecks.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotRadiusChecks.c
r6715 r6753 1 1 # include "psphot.h" 2 # define RADIUS_TYPE float 2 3 3 4 static float PSF_FIT_NSIGMA; … … 23 24 24 25 // set the fit radius based on the object flux limit and the model 25 model->radius = modelRadiusPSF (model->params, PSF_FIT_NSIGMA*moments->dSky) + PSF_FIT_PADDING;26 if (isnan(model->radius )) psAbort ("apply_psf_model", "error in radius");26 model->radiusTMP = (RADIUS_TYPE) (modelRadiusPSF (model->params, PSF_FIT_NSIGMA*moments->dSky) + PSF_FIT_PADDING); 27 if (isnan(model->radiusTMP)) psAbort ("apply_psf_model", "error in radius"); 27 28 28 if (source->mode & PM_SOURCE_MODE_SATSTAR) {29 model->radius *= 2;29 if (source->mode & PM_SOURCE_MODE_SATSTAR) { 30 model->radiusTMP *= 2; 30 31 } 31 32 32 bool status = pmSourceRedefinePixels (source, readout, model->params->data.F32[2], model->params->data.F32[3], model->radius );33 bool status = pmSourceRedefinePixels (source, readout, model->params->data.F32[2], model->params->data.F32[3], model->radiusTMP); 33 34 return status; 34 35 } … … 40 41 41 42 // set the fit radius based on the object flux limit and the model 42 model->radius = modelRadiusPSF (model->params, PSF_FIT_NSIGMA*moments->dSky) + dR + PSF_FIT_PADDING;43 if (isnan(model->radius )) psAbort ("apply_psf_model", "error in radius");43 model->radiusTMP = (RADIUS_TYPE) (modelRadiusPSF (model->params, PSF_FIT_NSIGMA*moments->dSky) + dR + PSF_FIT_PADDING); 44 if (isnan(model->radiusTMP)) psAbort ("apply_psf_model", "error in radius"); 44 45 45 46 if (source->mode & PM_SOURCE_MODE_SATSTAR) { 46 model->radius *= 2;47 model->radiusTMP *= 2; 47 48 } 48 49 49 bool status = pmSourceRedefinePixels (source, readout, model->params->data.F32[2], model->params->data.F32[3], model->radius );50 bool status = pmSourceRedefinePixels (source, readout, model->params->data.F32[2], model->params->data.F32[3], model->radiusTMP); 50 51 return status; 51 52 } … … 73 74 74 75 // set the fit radius based on the object flux limit and the model 75 model->radius = modelRadiusEXT (model->params, EXT_FIT_NSIGMA*moments->dSky) + EXT_FIT_PADDING;76 if (isnan(model->radius )) psAbort (__func__, "error in radius");76 model->radiusTMP = (RADIUS_TYPE) (modelRadiusEXT (model->params, EXT_FIT_NSIGMA*moments->dSky) + EXT_FIT_PADDING); 77 if (isnan(model->radiusTMP)) psAbort (__func__, "error in radius"); 77 78 78 79 // redefine the pixels if needed 79 bool status = pmSourceRedefinePixels (source, readout, model->params->data.F32[2], model->params->data.F32[3], model->radius );80 bool status = pmSourceRedefinePixels (source, readout, model->params->data.F32[2], model->params->data.F32[3], model->radiusTMP); 80 81 return status; 81 82 }
Note:
See TracChangeset
for help on using the changeset viewer.
