IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 23, 2022, 5:57:17 AM (4 years ago)
Author:
eugene
Message:

psastroUpdateChiptoFPA can fail on the inversion leaving behind a NULL chip->fromFPA. I have added a warning message to the log in psastroUpdateChiptoFPA. In psastroOneChipFit and in psastroMosaicOneChip, I add this condition ( fromFPA is NULL ) to the failure conditions and set bad chip quality. In psastroAstromGuessCheck, the NULL was making the loop skip the entry in the list of corner vectors making this comparison invalid ( mismatch between corners ) . The code now warns on NULL fromFPA and the failed chip is handled like other failed chips. Comments added to psastroOneChipGrid.c

File:
1 edited

Legend:

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

    r41895 r42289  
    109109
    110110    psRegion *region = pmChipPixels (chip);
    111 
    112111    psFree (chip->fromFPA);
    113112    chip->fromFPA = psPlaneTransformInvert (NULL, chip->toFPA, *region, 50, 4);
    114113    psFree (region);
     114
     115    // XXX EAM 2022.09.22 : for a specific case, psPlaneTransformInvert fails.
     116    // This probably means the solution was poor in any case. 
     117    // Some options:
     118    // 1) skip the chip in psastroAstromGuessCheck (supply bad corners)
     119    // 2) mark this chip as bad (return an error here and trap in psastroMosaicOneChip)
     120    // 3) warn of the failure:
     121    if (!chip->fromFPA) {
     122        char *name = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
     123        psLogMsg ("psastro", PS_LOG_INFO, "WARNING: failure to invert toFPA for %s", name);
     124    }
    115125
    116126    // loop over cells in this chip
     
    150160                    pmAstromObj *ref = refstars->data[i];
    151161                    psPlaneTransformApply (ref->chip, chip->fromFPA, ref->FP);
     162                    // if chip->fromFPA is NULL (non-invertable), the action is skipped
    152163                }
    153164            }
Note: See TracChangeset for help on using the changeset viewer.