IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 22, 2009, 2:57:41 PM (17 years ago)
Author:
eugene
Message:

various fixes to psastro:

1) added bootstrap resampling to zero point error analysis
2) added iterative clump removal from refstars and rawstars
3) added unique reference match option
4) some improved visualizations
5) improved mosaic iterations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroMosaicAstrom.c

    r21409 r26259  
    2020
    2121    bool status;
    22     char filename[256];
    2322
    2423    // select the current recipe
     
    3837    pmFPA *fpa = input->fpa;
    3938
    40     // before we do object matches, we need to (optionally) fix failed chips.  We compare chips with
    41     // 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     # endif
    52 
    5339    char *outroot = psMetadataLookupStr (&status, config->arguments, "OUTPUT");
    5440    if (!status || !outroot) psAbort ("Can't find outroot on config->arguments");
    5541
    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    }
    6049
    6150    // now fit the chips under the common distortion with higher-order terms
    6251    // first, re-perform the match with a slightly tighter circle
    63     if (!psastroMosaicSetMatch (fpa, recipe, 4)) {
     52    if (!psastroMosaicSetMatch (fpa, recipe, nIter)) {
    6453        psError(PSASTRO_ERR_UNKNOWN, false, "failed to match raw and ref stars for mosaic (4th pass)");
    6554        return false;
    6655    }
    67     if (!psastroMosaicChipAstrom (fpa, recipe, 4)) {
     56    if (!psastroMosaicChipAstrom (fpa, recipe, nIter)) {
    6857        psError(PSASTRO_ERR_UNKNOWN, false, "failed to measure chip astrometry in mosaic mode (4th pass)");
    6958        return false;
    7059    }
     60
    7161    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);
    7365        psastroDumpMatches (fpa, filename);
    7466    }
Note: See TracChangeset for help on using the changeset viewer.