IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 3, 2007, 10:43:21 AM (19 years ago)
Author:
eugene
Message:

failure for a chip is not a failure for the camera; temporarily turn off luminosity func test; better numbers for min Nstars

File:
1 edited

Legend:

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

    r10880 r12718  
    77   return false; }
    88
    9 bool psastroMosaicOneChip (pmChip *chip, pmReadout *readout, psMetadata *recipe, psMetadata *updates, bool nonlinear) {
     9bool psastroMosaicOneChip (pmChip *chip, pmReadout *readout, psMetadata *recipe, psMetadata *updates, int iteration) {
    1010
    1111    bool status;
     12    char errorWord[64];
    1213
    1314    PS_ASSERT_PTR_NON_NULL(chip,    false);
     
    3031
    3132    // allowed limits for valid solutions
    32     REQUIRED_RECIPE_VALUE (float maxError, "PSASTRO.MOSAIC.MAX.ERROR", F32, "failed to find single-chip max allowed error\n");
     33    sprintf (errorWord, "PSASTRO.MOSAIC.MAX.ERROR.N%d", iteration);
     34    REQUIRED_RECIPE_VALUE (float maxError, errorWord, F32, "failed to find single-chip max allowed error\n");
    3335    REQUIRED_RECIPE_VALUE (int minNstar, "PSASTRO.MOSAIC.MIN.NSTAR", S32, "failed to find single-chip min allowed stars\n");
    3436
    35     // set the order of the per-chip fit (higher order only if nonlinear == true)
     37    // set the order of the per-chip fit (higher order only if iteration > 0)
    3638    int order = 1;
    37     if (nonlinear) {
     39    if (iteration > 0) {
    3840        // select the desired chip order
    3941        REQUIRED_RECIPE_VALUE (order, "PSASTRO.MOSAIC.CHIP.ORDER", S32, "failed to find mosaic chip-level fit order\n");
    4042
    4143        // modify the order to correspond to the actual number of matched stars:
    42         if ((match->n < 11) && (order >= 3)) order = 2;
    43         if ((match->n <  7) && (order >= 2)) order = 1;
    44         if ((match->n <  4) && (order >= 1)) order = 0;
     44        if ((match->n < 15) && (order >= 3)) order = 2;
     45        if ((match->n < 11) && (order >= 2)) order = 1;
     46        if ((match->n <  8) && (order >= 1)) order = 0;
    4547        if (order < 1) {
    4648            psLogMsg ("psastro", 3, "insufficient stars or invalid order: %ld stars", match->n);
     
    8486    int astNstar = results->yStats->clippedNvalues;
    8587
     88    // if we clip away too many stars, the order may be invalid
     89    if (order == 3) { minNstar = PS_MAX (15, minNstar); }
     90    if (order == 2) { minNstar = PS_MAX (11, minNstar); }
     91    if (order == 1) { minNstar = PS_MAX ( 8, minNstar); }
     92
    8693    bool validSolution = true;
    8794
     
    114121    psFree (fitStats);
    115122    psFree (results);
    116     return true;
     123    return validSolution;
    117124}
Note: See TracChangeset for help on using the changeset viewer.