Changeset 14338 for trunk/psphot/src/psphotPSFConvModel.c
- Timestamp:
- Jul 20, 2007, 10:34:30 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotPSFConvModel.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotPSFConvModel.c
r13983 r14338 7 7 // static bool PM_SOURCE_FIT_MODEL_PIX_WEIGHTS = true; 8 8 9 // input source has both modelPSF and modelEXT. on successful exit, we set the 10 // modelConv to contain the fitted parameters, and the modelFlux to contain the 11 // convolved model image. 9 12 bool psphotPSFConvModel (pmSource *source, psMetadata *recipe, psMaskType maskVal) { 10 13 11 // XXX make sure we save a cached copy of the source psf 14 // make sure we save a cached copy of the psf flux 15 pmSourceCachePSF (source, maskVal); 12 16 13 17 // convert the cached cached psf model for this source to a psKernel 14 psKernel *psf = psphotKernelFromPSF (source); 18 // XXX for the moment, hard-wire the kernel to be 5x5 (2 pix radius) 19 psKernel *psf = psphotKernelFromPSF (source, 2); 15 20 16 21 // generate copy of the model … … 48 53 } 49 54 55 // set up the minimization process 50 56 psMinimization *myMin = psMinimizationAlloc (PM_SOURCE_FIT_MODEL_NUM_ITERATIONS, PM_SOURCE_FIT_MODEL_TOLERANCE); 51 57 … … 54 60 bool fitStatus = psphotModelWithPSF_LMM (myMin, covar, params, constraint, source, psf, modelFunc); 55 61 for (int i = 0; i < dparams->n; i++) { 56 if (psTraceGetLevel("ps Modules.objects") >= 4) {62 if (psTraceGetLevel("psphot") >= 4) { 57 63 fprintf (stderr, "%f ", params->data.F32[i]); 58 64 } … … 61 67 dparams->data.F32[i] = sqrt(covar->data.F32[i][i]); 62 68 } 63 psTrace ("ps Modules.objects", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value);69 psTrace ("psphot", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value); 64 70 65 71 // save the resulting chisq, nDOF, nIter … … 91 97 92 98 bool retval = (onPic && fitStatus); 93 psTrace("ps Modules.objects", 5, "---- %s(%d) end ----\n", __func__, retval);99 psTrace("psphot", 5, "---- %s(%d) end ----\n", __func__, retval); 94 100 return(retval); 95 101 }
Note:
See TracChangeset
for help on using the changeset viewer.
