Changeset 12492 for trunk/psastro/src/psastroDemoDump.c
- Timestamp:
- Mar 18, 2007, 12:28:16 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroDemoDump.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroDemoDump.c
r11467 r12492 1 1 # include "psastro.h" 2 3 // this function is used for test purposes (-trace psastro.dump.psastroAstromGuess 1) 4 bool psastroDumpStars (psArray *stars, char *filename) { 5 6 FILE *f = fopen (filename, "w"); 7 8 for (int i = 0; i < stars->n; i++) { 9 pmAstromObj *obj = stars->data[i]; 10 11 // write out the upward projections 12 fprintf (f, "%d %f %f %f %f %f %f %f %f %f\n", i, 13 obj->sky->r, obj->sky->d, obj->Mag, 14 obj->TP->x, obj->TP->y, 15 obj->FP->x, obj->FP->y, 16 obj->chip->x, obj->chip->y); 17 } 18 fclose (f); 19 return true; 20 } 2 21 3 22 // this function is used for test purposes (-trace psastro.dump.psastroAstromGuess 1) 4 23 bool psastroDumpRawstars (psArray *rawstars, pmFPA *fpa, pmChip *chip) { 5 24 6 FILE *f1 = fopen ("rawstars.dat", "w"); 7 FILE *f2 = fopen ("rawstars.down.dat", "w"); 25 char *filename = NULL; 26 char *chipname = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME"); 27 28 psStringAppend (&filename, "rawstars.up.%s.dat", chipname); 29 FILE *f1 = fopen (filename, "w"); 30 psFree (filename); 31 filename = NULL; 32 33 psStringAppend (&filename, "rawstars.dn.%s.dat", chipname); 34 FILE *f2 = fopen (filename, "w"); 35 psFree (filename); 36 filename = NULL; 8 37 9 38 for (int i = 0; i < rawstars->n; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.
