Changeset 17786 for trunk/psastro/src/psastroAnalysis.c
- Timestamp:
- May 23, 2008, 3:04:23 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroAnalysis.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroAnalysis.c
r17675 r17786 12 12 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSASTRO_RECIPE); 13 13 if (!recipe) { 14 psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe");15 return false;14 psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe"); 15 return false; 16 16 } 17 17 18 18 if (!psastroUseModel (config, recipe)) { 19 psError (PSASTRO_ERR_UNKNOWN, false, "failed to set model astrometry\n");20 return false;19 psError (PSASTRO_ERR_UNKNOWN, false, "failed to set model astrometry\n"); 20 return false; 21 21 } 22 22 … … 24 24 // apply the initial guess 25 25 if (!psastroAstromGuess (&nStars, config)) { 26 psError (PSASTRO_ERR_UNKNOWN, false, "failed to determine initial astrometry guess\n");27 return false;26 psError (PSASTRO_ERR_UNKNOWN, false, "failed to determine initial astrometry guess\n"); 27 return false; 28 28 } 29 29 if (nStars == 0) { 30 psLogMsg ("psastro", 2, "skipping astrometry analysis : no stars\n");31 return true;30 psLogMsg ("psastro", 2, "skipping astrometry analysis : no stars\n"); 31 return false; 32 32 } 33 33 … … 35 35 psArray *refs = psastroLoadRefstars(config); 36 36 if (!refs) { 37 psError (PSASTRO_ERR_UNKNOWN, false, "failed to load reference data\n");38 return false;37 psError (PSASTRO_ERR_UNKNOWN, false, "failed to load reference data\n"); 38 return false; 39 39 } 40 40 if (refs->n == 0) { 41 41 psError(PSASTRO_ERR_REFSTARS, true, "no reference stars found"); 42 42 psFree(refs); 43 return NULL;43 return false; 44 44 } 45 45 46 46 if (!psastroChooseRefstars (config, refs)) { 47 psError (PSASTRO_ERR_UNKNOWN, false, "failed to select reference data for chips\n");47 psError (PSASTRO_ERR_UNKNOWN, false, "failed to select reference data for chips\n"); 48 48 psFree(refs); 49 return false;49 return false; 50 50 } 51 51 … … 53 53 bool chipastro = psMetadataLookupBool (&status, config->arguments, "PSASTRO.CHIP.MODE"); 54 54 if (!status) { 55 chipastro = psMetadataLookupBool (&status, recipe, "PSASTRO.CHIP.MODE");55 chipastro = psMetadataLookupBool (&status, recipe, "PSASTRO.CHIP.MODE"); 56 56 } 57 57 bool mosastro = psMetadataLookupBool (&status, config->arguments, "PSASTRO.MOSAIC.MODE"); 58 58 if (!status) { 59 mosastro = psMetadataLookupBool (&status, recipe, "PSASTRO.MOSAIC.MODE");59 mosastro = psMetadataLookupBool (&status, recipe, "PSASTRO.MOSAIC.MODE"); 60 60 } 61 61 if (!chipastro && !mosastro) { 62 psLogMsg ("psastro", 3, "no astrometry mode selected, assuming chip astrometry\n");63 chipastro = true;62 psLogMsg ("psastro", 3, "no astrometry mode selected, assuming chip astrometry\n"); 63 chipastro = true; 64 64 } 65 65 66 66 if (chipastro) { 67 if (!psastroChipAstrom (config)) {68 psError (PSASTRO_ERR_UNKNOWN, false, "failed to perform single chip astrometry\n");69 psFree(refs);70 return false;71 }72 } 67 if (!psastroChipAstrom (config)) { 68 psError (PSASTRO_ERR_UNKNOWN, false, "failed to perform single chip astrometry\n"); 69 psFree(refs); 70 return false; 71 } 72 } 73 73 if (mosastro) { 74 if (!psastroMosaicAstrom (config)) {75 psError (PSASTRO_ERR_UNKNOWN, false, "failed to perform mosaic camera astrometry\n");76 psFree(refs);77 return false;78 }74 if (!psastroMosaicAstrom (config)) { 75 psError (PSASTRO_ERR_UNKNOWN, false, "failed to perform mosaic camera astrometry\n"); 76 psFree(refs); 77 return false; 78 } 79 79 } 80 80
Note:
See TracChangeset
for help on using the changeset viewer.
