Changeset 4642 for trunk/psphot/src/choose_psf_model.c
- Timestamp:
- Jul 28, 2005, 7:04:10 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/choose_psf_model.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/choose_psf_model.c
r4630 r4642 34 34 modelName = psMetadataLookupPtr (&status, config, key); 35 35 tests->data[i] = pmPSF_TestModel (stars, modelName, RADIUS); 36 psFree (modelName); 36 37 37 sprintf (filename, "metric.%d.dat", i); 38 DumpPSFTestData (tests->data[i], filename); 38 // make this an option: 39 // sprintf (filename, "metric.%d.dat", i); 40 // DumpPSFTestData (tests->data[i], filename); 39 41 } 42 psFree (stars); 40 43 41 44 // select the best of the test models … … 46 49 for (int i = 1; i < Ntest; i++) { 47 50 test = tests->data[i]; 48 int M = test->dApResid;51 float M = test->dApResid; 49 52 if (M < bestM) { 50 53 bestM = M; … … 55 58 modelName = psModelGetType (test->modelType); 56 59 psLogMsg ("psphot.pspsf", 3, "selected psf model %s, ApResid: %f +/- %f\n", modelName, test->ApResid, test->dApResid); 60 psFree (modelName); 57 61 62 // we are keeping the modelPSF fits from the PSF test, 63 // but we replace these later on (apply_psf_model) 58 64 // set source->model based on best psf model fit 59 65 for (int i = 0; i < test->sources->n; i++) { … … 67 73 } 68 74 } 69 return (test->psf); 75 pmPSF *psf = test->psf; 76 77 // free unused test models: 78 psFree (test); 79 psFree (stars); 80 81 return (psf); 70 82 }
Note:
See TracChangeset
for help on using the changeset viewer.
