Changeset 11352 for trunk/ppImage/src/ppImageAstrom.c
- Timestamp:
- Jan 27, 2007, 5:02:24 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageAstrom.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageAstrom.c
r10439 r11352 5 5 # include "ppImage.h" 6 6 7 // this function is mostly equivalent to the top-level of psastro, with some 8 // modifications since the data has already been loaded. 7 9 bool ppImageAstrom (pmConfig *config) { 8 10 … … 16 18 pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PSASTRO.INPUT"); 17 19 if (!status) { 18 19 20 // psphotReadout requires a pmFPAfile supplied with the name PSASTRO.INPUT 20 21 // create a pmFPAfile which points at PSPHOT.OUTPUT … … 27 28 } 28 29 29 psastroConvertFPA (input->fpa, recipe); 30 // convert the output sources created by psphot into astrometry objects 31 if (!psastroConvertFPA (input->fpa, recipe)) { 32 psErrorStackPrint(stderr, "error loading input data\n"); 33 exit (1); 34 } 30 35 31 36 // interpret the available initial astrometric information 32 37 // apply the initial guess 33 psastroAstromGuess (config); 38 if (!psastroAstromGuess (config)) { 39 psErrorStackPrint(stderr, "failed to determine initial astrometry guess\n"); 40 exit (1); 41 } 34 42 35 43 // load the reference stars overlapping the data stars 36 44 psArray *refs = psastroLoadRefstars(config); 37 38 psastroChooseRefstars(config, refs); 39 40 if (psMetadataLookupBool (NULL, recipe, "ASTROM.CHIP")) { 41 psastroChipAstrom (config, refs); 42 } 43 if (psMetadataLookupBool (NULL, recipe, "ASTROM.MOSAIC")) { 44 psastroMosaicAstrom (config, refs); 45 if (!refs) { 46 psErrorStackPrint(stderr, "failed to load reference data\n"); 47 exit (1); 45 48 } 46 49 50 if (!psastroChooseRefstars (config, refs)) { 51 psErrorStackPrint(stderr, "failed to select reference data for chips\n"); 52 exit (1); 53 } 54 55 // XXX does this check the recipe?? 56 bool chipastro = psMetadataLookupBool (NULL, config->arguments, "PSASTRO.CHIP.MODE"); 57 bool mosastro = psMetadataLookupBool (NULL, config->arguments, "PSASTRO.MOSAIC.MODE"); 58 if (!chipastro && !mosastro) { 59 psLogMsg ("psastro", 3, "no astrometry mode selected, assuming chip mode\n"); 60 chipastro= true; 61 } 62 63 if (chipastro) { 64 if (!psastroChipAstrom (config, refs)) { 65 psErrorStackPrint(stderr, "failed to perform single chip astrometry\n"); 66 exit (1); 67 } 68 } 69 if (mosastro) { 70 if (!psastroMosaicAstrom (config, refs)) { 71 psErrorStackPrint(stderr, "failed to perform mosaic camera astrometry\n"); 72 exit (1); 73 } 74 } 75 76 // XXX should this be left to the ppImageLoop? 47 77 psastroDataSave (config); 48 78
Note:
See TracChangeset
for help on using the changeset viewer.
