Changeset 9627 for trunk/psastro/src/psastro.c
- Timestamp:
- Oct 18, 2006, 8:44:12 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastro.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastro.c
r9587 r9627 2 2 3 3 static void usage (void) { 4 psErrorStackPrint(stderr, "USAGE: psastro [-file image(s)] [-list imagelist] (output) ");4 psErrorStackPrint(stderr, "USAGE: psastro [-file image(s)] [-list imagelist] (output)\n"); 5 5 exit (2); 6 6 } … … 20 20 // load identify the data sources 21 21 if (!psastroParseCamera (config)) { 22 psErrorStackPrint(stderr, "error setting up the camera ");22 psErrorStackPrint(stderr, "error setting up the camera\n"); 23 23 exit (1); 24 24 } … … 27 27 // select subset of stars for astrometry 28 28 if (!psastroDataLoad (config)) { 29 psErrorStackPrint(stderr, "error loading input data ");29 psErrorStackPrint(stderr, "error loading input data\n"); 30 30 exit (1); 31 31 } … … 34 34 // apply the initial guess 35 35 if (!psastroAstromGuess (config)) { 36 psErrorStackPrint(stderr, "failed to determine initial astrometry guess ");36 psErrorStackPrint(stderr, "failed to determine initial astrometry guess\n"); 37 37 exit (1); 38 38 } … … 41 41 psArray *refs = psastroLoadRefstars (config); 42 42 if (!refs) { 43 psErrorStackPrint(stderr, "failed to load reference data ");43 psErrorStackPrint(stderr, "failed to load reference data\n"); 44 44 exit (1); 45 45 } 46 46 47 47 // choose reference stars corresponding to the selected chips 48 if ( psastroChooseRefstars (config, refs)) {49 psErrorStackPrint(stderr, "failed to select reference data for chips ");48 if (!psastroChooseRefstars (config, refs)) { 49 psErrorStackPrint(stderr, "failed to select reference data for chips\n"); 50 50 exit (1); 51 51 } … … 54 54 if (mosastro == NULL) { 55 55 if (!psastroChipAstrom (config, refs)) { 56 psErrorStackPrint(stderr, "failed to perform single chip astrometry ");56 psErrorStackPrint(stderr, "failed to perform single chip astrometry\n"); 57 57 exit (1); 58 58 } 59 59 } else { 60 60 if (!psastroMosaicAstrom (config, refs)) { 61 psErrorStackPrint(stderr, "failed to perform mosaic camera astrometry ");61 psErrorStackPrint(stderr, "failed to perform mosaic camera astrometry\n"); 62 62 exit (1); 63 63 } … … 69 69 // write out the results 70 70 if (!psastroDataSave (config)) { 71 psErrorStackPrint(stderr, "failed to write out data ");71 psErrorStackPrint(stderr, "failed to write out data\n"); 72 72 exit (1); 73 73 } … … 75 75 psLogMsg ("psastro", 3, "complete psastro run: %f sec\n", psTimerMark ("complete")); 76 76 77 psFree (refs); 78 psFree (config); 79 80 psTimerStop (); 81 psMemCheckCorruption (true); 82 pmModelGroupCleanup (); 83 psTimeFinalize (); 84 pmConceptsDone (); 85 pmConfigDone (); 86 // fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, stdout, false), "psastro"); 87 fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, NULL, false), "psastro"); 88 89 exit (0); 77 psastroCleanup (config, refs); 78 exit (EXIT_SUCCESS); 90 79 }
Note:
See TracChangeset
for help on using the changeset viewer.
