Changeset 5802 for trunk/psphot/src/modelTestFitSource.c
- Timestamp:
- Dec 17, 2005, 10:26:59 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/modelTestFitSource.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/modelTestFitSource.c
r5755 r5802 67 67 source->peak->counts = source->moments->Peak; 68 68 69 fprintf (stderr, "sum: %f\n", source->moments->Sum); 70 69 71 // get the initial model parameter guess 70 72 pmModel *model = pmSourceModelGuess (source, modelType); … … 73 75 psF32 *params = model->params->data.F32; 74 76 for (int i = 0; i < nParams; i++) { 77 if (i == 2) { 78 params[i] = xObj; 79 continue; 80 } 81 if (i == 3) { 82 params[i] = yObj; 83 continue; 84 } 75 85 sprintf (name, "TEST_FIT_PAR%d", i); 76 86 value = psMetadataLookupF32 (&status, config, name); 77 87 if (status) { 88 fprintf (stderr, "using supplied value %f for PAR %d\n", value, i); 78 89 params[i] = value; 90 } else { 91 fprintf (stderr, "using guessed value %f for PAR %d\n", params[i], i); 79 92 } 80 93 } 94 95 float area = params[4]*params[5]; 96 fprintf (stderr, "peak: %f\n", source->moments->Sum*area); 81 97 82 98 // what fitting mode to use? … … 98 114 pmSourceSubModel (source->pixels, source->mask, model, false, false); 99 115 116 for (int i = 0; i < nParams; i++) { 117 fprintf (stderr, "result value %f for PAR %d\n", params[i], i); 118 } 119 100 120 // write out 101 121 DumpImage (source->pixels, "resid.fits");
Note:
See TracChangeset
for help on using the changeset viewer.
