Changeset 5992 for branches/eam_rel9_p0/psModules/src/objects/pmPSFtry.c
- Timestamp:
- Jan 15, 2006, 8:23:13 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel9_p0/psModules/src/objects/pmPSFtry.c
r5985 r5992 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1.3.4. 2$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-01-1 4 07:02:53 $7 * @version $Revision: 1.3.4.3 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-01-15 18:23:13 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 psFree (test->psf); 34 34 psFree (test->sources); 35 psFree (test->model FLT);35 psFree (test->modelEXT); 36 36 psFree (test->modelPSF); 37 37 psFree (test->metric); … … 53 53 test->psf = pmPSFAlloc (type); 54 54 test->sources = psMemIncrRefCounter(sources); 55 test->model FLT = psArrayAlloc (sources->n);55 test->modelEXT = psArrayAlloc (sources->n); 56 56 test->modelPSF = psArrayAlloc (sources->n); 57 57 test->metric = psVectorAlloc (sources->n, PS_TYPE_F64); … … 59 59 test->mask = psVectorAlloc (sources->n, PS_TYPE_U8); 60 60 61 for (int i = 0; i < test->model FLT->n; i++) {61 for (int i = 0; i < test->modelEXT->n; i++) { 62 62 test->mask->data.U8[i] = 0; 63 test->model FLT->data[i] = NULL;63 test->modelEXT->data[i] = NULL; 64 64 test->modelPSF->data[i] = NULL; 65 65 test->metric->data.F64[i] = 0; … … 87 87 float x; 88 88 float y; 89 int N flt = 0;89 int Next = 0; 90 90 int Npsf = 0; 91 91 … … 102 102 103 103 // set temporary object mask and fit object 104 // fit model as FLT, not PSF104 // fit model as EXT, not PSF 105 105 psImageKeepCircle (source->mask, x, y, RADIUS, "OR", PSPHOT_MASK_MARKED); 106 106 status = pmSourceFitModel (source, model, false); … … 109 109 // exclude the poor fits 110 110 if (!status) { 111 psfTry->mask->data.U8[i] = PSFTRY_MASK_ FLT_FAIL;111 psfTry->mask->data.U8[i] = PSFTRY_MASK_EXT_FAIL; 112 112 psFree (model); 113 113 continue; 114 114 } 115 psfTry->model FLT->data[i] = model;116 N flt ++;117 } 118 psLogMsg ("psphot.psftry", 4, "fit flt: %f sec for %d sources\n", psTimerMark ("fit"), sources->n);119 psTrace ("psphot.psftry", 3, "keeping %d of %d PSF candidates ( FLT)\n", Nflt, sources->n);115 psfTry->modelEXT->data[i] = model; 116 Next ++; 117 } 118 psLogMsg ("psphot.psftry", 4, "fit ext: %f sec for %d sources\n", psTimerMark ("fit"), sources->n); 119 psTrace ("psphot.psftry", 3, "keeping %d of %d PSF candidates (EXT)\n", Next, sources->n); 120 120 121 121 // stage 2: construct a psf (pmPSF) from this collection of model fits 122 pmPSFFromModels (psfTry->psf, psfTry->model FLT, psfTry->mask);122 pmPSFFromModels (psfTry->psf, psfTry->modelEXT, psfTry->mask); 123 123 124 124 // stage 3: refit with fixed shape parameters … … 130 130 131 131 pmSource *source = psfTry->sources->data[i]; 132 pmModel *model FLT = psfTry->modelFLT->data[i];132 pmModel *modelEXT = psfTry->modelEXT->data[i]; 133 133 134 134 // set shape for this model based on PSF 135 pmModel *modelPSF = pmModelFromPSF (model FLT, psfTry->psf);135 pmModel *modelPSF = pmModelFromPSF (modelEXT, psfTry->psf); 136 136 x = source->peak->x; 137 137 y = source->peak->y;
Note:
See TracChangeset
for help on using the changeset viewer.
