Changeset 5628 for trunk/psphot/src/psphotOutput.c
- Timestamp:
- Nov 30, 2005, 7:04:58 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotOutput.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotOutput.c
r5617 r5628 364 364 fprintf (f, "%5d %5d %7.1f\n", 365 365 peak->x, peak->y, peak->counts); 366 }367 fclose (f);368 return true;369 }370 371 // write the moments to an output file372 bool pmMomentsWriteText (psArray *sources, char *filename) {373 374 int i;375 FILE *f;376 pmSource *source;377 378 f = fopen (filename, "w");379 if (f == NULL) {380 psLogMsg ("pmMomentsWriteText", 3, "can't open output file for moments%s\n", filename);381 return false;382 }383 384 for (i = 0; i < sources->n; i++) {385 source = (pmSource *) sources->data[i];386 if (source->moments == NULL) continue;387 fprintf (f, "%5d %5d %7.1f %7.1f %7.1f %6.3f %6.3f %8.1f %7.1f %7.1f %7.1f %4d %2d\n",388 source->peak->x, source->peak->y, source->peak->counts,389 source->moments->x, source->moments->y,390 source->moments->Sx, source->moments->Sy,391 source->moments->Sum, source->moments->Peak,392 source->moments->Sky, source->moments->SN,393 source->moments->nPixels, source->type);394 366 } 395 367 fclose (f);
Note:
See TracChangeset
for help on using the changeset viewer.
