IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26196


Ignore:
Timestamp:
Nov 19, 2009, 11:31:19 AM (17 years ago)
Author:
eugene
Message:

respect PSASTRO.MOSAIC.CHIP.NITER for looping

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091113/psastro/src/psastroMosaicAstrom.c

    r21409 r26196  
    2020
    2121    bool status;
    22     char filename[256];
    2322
    2423    // select the current recipe
     
    5453    if (!status || !outroot) psAbort ("Can't find outroot on config->arguments");
    5554
    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;
     55    int nIter = psMetadataLookupS32 (&status, recipe, "PSASTRO.MOSAIC.CHIP.NITER");
     56    if (!status) psAbort ("missing config value");
     57
     58    // this should be in a loop with nIter =
     59    for (int iter = 0; iter < nIter; iter++) {
     60        if (!psastroMosaicFit (fpa, recipe, outroot, iter)) return false;
     61    }
    6062
    6163    // now fit the chips under the common distortion with higher-order terms
    6264    // first, re-perform the match with a slightly tighter circle
    63     if (!psastroMosaicSetMatch (fpa, recipe, 4)) {
     65    if (!psastroMosaicSetMatch (fpa, recipe, nIter)) {
    6466        psError(PSASTRO_ERR_UNKNOWN, false, "failed to match raw and ref stars for mosaic (4th pass)");
    6567        return false;
    6668    }
    67     if (!psastroMosaicChipAstrom (fpa, recipe, 4)) {
     69    if (!psastroMosaicChipAstrom (fpa, recipe, nIter)) {
    6870        psError(PSASTRO_ERR_UNKNOWN, false, "failed to measure chip astrometry in mosaic mode (4th pass)");
    6971        return false;
    7072    }
     73
    7174    if (psTraceGetLevel("psastro.dump") > 0) {
    72         snprintf (filename, 256, "%s.10.dat", outroot);
     75        // the last filename (see filenames in psastroMosaicFit)
     76        char filename[256];
     77        snprintf (filename, 256, "%s.%d.dat", outroot, 2*nIter + 2);
    7378        psastroDumpMatches (fpa, filename);
    7479    }
Note: See TracChangeset for help on using the changeset viewer.