Changeset 26259 for trunk/psastro/src/psastroMosaicAstrom.c
- Timestamp:
- Nov 22, 2009, 2:57:41 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroMosaicAstrom.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroMosaicAstrom.c
r21409 r26259 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 }
Note:
See TracChangeset
for help on using the changeset viewer.
