Changeset 4398
- Timestamp:
- Jun 25, 2005, 9:23:18 AM (21 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 2 added
- 4 edited
-
basic_classes.c (added)
-
choose_psf_model.c (modified) (2 diffs)
-
output.c (added)
-
psphot-utils.c (modified) (1 diff)
-
psphot.c (modified) (1 diff)
-
source_moments.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/choose_psf_model.c
r4375 r4398 7 7 bool status; 8 8 char *modelName; 9 char key[64] ;9 char key[64], filename[64]; 10 10 pmPSF_Test *test = NULL; 11 11 psArray *stars = NULL; … … 35 35 tests->data[i] = pmPSF_TestModel (stars, modelName, RADIUS); 36 36 37 // dump psf test data to file: 38 { 39 sprintf (key, "metric.%d.dat", i); 40 FILE *f = fopen (key, "w"); 41 test = tests->data[i]; 42 43 44 for (int j = 0; j < test->sources->n; j++) { 45 psSource *source = test->sources->data[j]; 46 psModel *model = test->modelPSF->data[j]; 47 float sky = 0; 48 49 if (model != NULL) sky = model->params->data.F32[0]; 50 51 fprintf (f, "%3d %6.1f %6.1f %7.4f %7.4f %8.4f\n", 52 j, source->moments->x, source->moments->y, 53 test->metric->data.F64[j], test->fitMag->data.F64[j], sky); 54 } 55 fclose (f); 56 } 37 sprintf (filename, "metric.%d.dat", i); 38 DumpPSFTestData (tests->data[i], filename); 57 39 } 58 40 -
trunk/psphot/src/psphot-utils.c
r4375 r4398 52 52 fclose (f); 53 53 return true; 54 } 55 56 bool DumpPSFTestData (pmPSF_Test *test, char *filename) 57 { 58 59 FILE *f = fopen (key, "w"); 60 61 for (int j = 0; j < test->sources->n; j++) { 62 63 psSource *source = test->sources->data[j]; 64 psModel *model = test->modelPSF->data[j]; 65 66 float sky = 0; 67 if (model != NULL) sky = model->params->data.F32[0]; 68 69 fprintf (f, "%3d %6.1f %6.1f %7.4f %7.4f %8.4f\n", 70 j, source->moments->x, source->moments->y, 71 test->metric->data.F64[j], test->fitMag->data.F64[j], sky); 72 } 73 fclose (f); 54 74 } 55 75 -
trunk/psphot/src/psphot.c
r4375 r4398 24 24 // construct sources and measure basic stats 25 25 sources = source_moments (imdata, config, peaks); 26 27 basic_classes (sources, config); 26 28 27 29 // source analysis is done in S/N order (brightest first) -
trunk/psphot/src/source_moments.c
r4375 r4398 35 35 } 36 36 37 // group into STAR, COSMIC, GALAXY, SATURATED38 psfClump = pmSourcePSFClump (sources, config);39 pmSourceRoughClass (sources, config, psfClump);40 41 // make this optional42 // DumpMoments (sources, "moments.dat");43 44 37 psLogMsg ("psphot", 3, "moments: %f sec\n", psTimerMark ("psphot")); 45 38 psLogMsg ("psphot", 3, "%d sources\n", sources->n);
Note:
See TracChangeset
for help on using the changeset viewer.
