Changeset 27838 for branches/tap_branches/psastro/src/psastroMosaicAstrom.c
- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psastro/src/psastroMosaicAstrom.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/psastro/src/psastroMosaicAstrom.c
r21409 r27838 1 1 /** @file psastroMosaicAstrom.c 2 2 * 3 * @brief 3 * @brief 4 4 * 5 5 * @ingroup libpsastro … … 20 20 21 21 bool status; 22 char filename[256];23 22 24 23 // select the current recipe … … 38 37 pmFPA *fpa = input->fpa; 39 38 40 // before we do object matches, we need to (optionally) fix failed chips. We compare chips with41 // the supplied mosaic model. Adjust significant outliers to match model.42 # if (0)43 if (!psastroFixChips (config, recipe)) {44 psError(PSASTRO_ERR_UNKNOWN, false, "failed to align problematic chips");45 return false;46 }47 if (!psastroFixChipsTest (config, recipe)) {48 psError(PSASTRO_ERR_UNKNOWN, false, "failed to align problematic chips");49 return false;50 }51 # endif52 53 39 char *outroot = psMetadataLookupStr (&status, config->arguments, "OUTPUT"); 54 40 if (!status || !outroot) psAbort ("Can't find outroot on config->arguments"); 55 41 56 if (!psastroMosaicFit (fpa, recipe, outroot, 0)) return false; 57 if (!psastroMosaicFit (fpa, recipe, outroot, 1)) return false; 58 if (!psastroMosaicFit (fpa, recipe, outroot, 2)) return false; 59 if (!psastroMosaicFit (fpa, recipe, outroot, 3)) return false; 42 int nIter = psMetadataLookupS32 (&status, recipe, "PSASTRO.MOSAIC.CHIP.NITER"); 43 if (!status) psAbort ("missing config value"); 44 45 // this should be in a loop with nIter = 46 for (int iter = 0; iter < nIter; iter++) { 47 if (!psastroMosaicFit (fpa, recipe, outroot, iter)) return false; 48 } 60 49 61 50 // now fit the chips under the common distortion with higher-order terms 62 51 // first, re-perform the match with a slightly tighter circle 63 if (!psastroMosaicSetMatch (fpa, recipe, 4)) {52 if (!psastroMosaicSetMatch (fpa, recipe, nIter)) { 64 53 psError(PSASTRO_ERR_UNKNOWN, false, "failed to match raw and ref stars for mosaic (4th pass)"); 65 54 return false; 66 55 } 67 if (!psastroMosaicChipAstrom (fpa, recipe, 4)) {56 if (!psastroMosaicChipAstrom (fpa, recipe, nIter)) { 68 57 psError(PSASTRO_ERR_UNKNOWN, false, "failed to measure chip astrometry in mosaic mode (4th pass)"); 69 58 return false; 70 59 } 60 71 61 if (psTraceGetLevel("psastro.dump") > 0) { 72 snprintf (filename, 256, "%s.10.dat", outroot); 62 // the last filename (see filenames in psastroMosaicFit) 63 char filename[256]; 64 snprintf (filename, 256, "%s.%d.dat", outroot, 2*nIter + 2); 73 65 psastroDumpMatches (fpa, filename); 74 66 } … … 83 75 } 84 76 if (!pmAstromWriteBilevelMosaic (updates, fpa, NONLIN_TOL)) { 85 psAbort ("failed to save header terms"); 77 psError(psErrorCodeLast(), false, "Failed to save header terms"); 78 return false; 86 79 } 87 80
Note:
See TracChangeset
for help on using the changeset viewer.
