Changeset 12807 for trunk/ppImage/src/ppImageAstrom.c
- Timestamp:
- Apr 11, 2007, 2:01:11 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageAstrom.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageAstrom.c
r11352 r12807 17 17 // find or define a pmFPAfile PSPHOT.INPUT 18 18 pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PSASTRO.INPUT"); 19 if (!status) { 20 // psphotReadout requires a pmFPAfile supplied with the name PSASTRO.INPUT 21 // create a pmFPAfile which points at PSPHOT.OUTPUT 22 // mode is 'REFERENCE' to prevent double frees of the fpa 23 pmFPAfile *output = psMetadataLookupPtr (&status, config->files, "PSPHOT.OUTPUT"); 24 input = pmFPAfileDefineInput (config, output->fpa, "PSASTRO.INPUT"); 25 input->mode = PM_FPA_MODE_REFERENCE; 26 27 pmFPAfileDefineOutput (config, input->fpa, "PSASTRO.OUTPUT"); 28 } 19 PS_ASSERT (input, false); 29 20 30 21 // convert the output sources created by psphot into astrometry objects 31 22 if (!psastroConvertFPA (input->fpa, recipe)) { 32 psError StackPrint(stderr, "error loading input data\n");33 exit (1);23 psError (PSASTRO_ERR_UNKNOWN, false, "error reading input data\n"); 24 return false; 34 25 } 35 26 36 // interpret the available initial astrometric information 37 // apply the initial guess 38 if (!psastroAstromGuess (config)) { 39 psErrorStackPrint(stderr, "failed to determine initial astrometry guess\n"); 40 exit (1); 27 if (!psastroAnalysis (config)) { 28 psError (PSASTRO_ERR_UNKNOWN, false, "failure in psastro analysis\n"); 29 return false; 41 30 } 42 31 43 // load the reference stars overlapping the data stars44 psArray *refs = psastroLoadRefstars(config);45 if (!refs) {46 psErrorStackPrint(stderr, "failed to load reference data\n");47 exit (1);48 }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?77 psastroDataSave (config);78 79 psFree (refs);80 32 return true; 81 33 }
Note:
See TracChangeset
for help on using the changeset viewer.
