Changeset 9574 for trunk/psastro/src/psastro.c
- Timestamp:
- Oct 13, 2006, 5:10:34 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastro.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastro.c
r9374 r9574 1 1 # include "psastro.h" 2 3 static void usage (void) { 4 psErrorStackPrint(stderr, "USAGE: psastro [-file image(s)] [-list imagelist] (output)"); 5 exit (2); 6 } 2 7 3 8 int main (int argc, char **argv) { … … 11 16 // load configuration information 12 17 pmConfig *config = psastroArguments (argc, argv); 18 if (!config) usage (); 13 19 14 20 // load identify the data sources 15 psastroParseCamera (config); 21 if (!psastroParseCamera (config)) { 22 psErrorStackPrint(stderr, "error setting up the camera"); 23 exit (1); 24 } 16 25 17 26 // load the raw pixel data (from PSPHOT.SOURCES) 18 27 // select subset of stars for astrometry 19 psastroDataLoad (config); 28 if (!psastroDataLoad (config)) { 29 psErrorStackPrint(stderr, "error loading input data"); 30 exit (1); 31 } 20 32 21 33 // interpret the available initial astrometric information 22 34 // apply the initial guess 23 psastroAstromGuess (config); 35 if (!psastroAstromGuess (config)) { 36 psErrorStackPrint(stderr, "failed to determine initial astrometry guess"); 37 exit (1); 38 } 24 39 25 40 // load the reference stars overlapping the data stars 26 41 psArray *refs = psastroLoadReferences (config); 42 if (!refs) { 43 psErrorStackPrint(stderr, "failed to load reference data"); 44 exit (1); 45 } 27 46 47 // XXX ?? what does this do ?? 28 48 psastroMosaicGetRefstars (config, refs); 29 49 30 50 char *mosastro = psMetadataLookupStr (NULL, config->arguments, "MOSASTRO"); 31 51 if (mosastro == NULL) { 32 psastroChipAstrom (config, refs); 52 if (!psastroChipAstrom (config, refs)) { 53 psErrorStackPrint(stderr, "failed to perform single chip astrometry"); 54 exit (1); 55 } 33 56 } else { 34 psastroMosaicAstrom (config, refs); 57 if (!psastroMosaicAstrom (config, refs)) { 58 psErrorStackPrint(stderr, "failed to perform mosaic camera astrometry"); 59 exit (1); 60 } 35 61 } 36 62 … … 39 65 40 66 // write out the results 41 psastroDataSave (config); 67 if (!psastroDataSave (config)) { 68 psErrorStackPrint(stderr, "failed to write out data"); 69 exit (1); 70 } 42 71 43 72 psLogMsg ("psastro", 3, "complete psastro run: %f sec\n", psTimerMark ("complete"));
Note:
See TracChangeset
for help on using the changeset viewer.
