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/psastroAstromGuess.c

    r41895 r42289  
    320320        if (!chip->process || !chip->file_exists || !chip->data_exists) { continue; }
    321321
    322         if (!chip->toFPA || !chip->fromFPA) {
     322        // if a chip fails during the calibration, the associated readout->data_exists
     323        // gets set to false.  This may be the wrong solution, but it does not break this
     324        // analysis here.  Note this is not the chip->data_exists field tested above.
     325        // chip->data_exists is only false if the chip data is missing.
     326
     327        // chip->fromFPA can be NULL if the inversion fails, but I'm not sure
     328        // chip->toFPA can be NULL unless it was not in the original model
     329        if (!chip->toFPA) {
    323330          char *name = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
    324331          fprintf (stderr, "no astrom model for %s, skipping\n", name);
    325332          continue;
    326333        }
    327 
    328         // XXX we are currently inconsistent with marking the good vs the bad data
    329         // psastroChipAstrom sets data_exists to false if the fit is bad.  this is
    330         // probably wrong since it implies there is no data!
     334        if (!chip->fromFPA) {
     335          char *name = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
     336          fprintf (stderr, "inversion faiulre for %s (%d), will be skipped\n", name, view->chip);
     337        }
    331338
    332339        // skip chips for which the astrometry failed (NASTRO == 0)
     
    350357        float astError = psMetadataLookupF32 (&status, updates, "CERROR");
    351358        if (fabs(astError) < 1e-6) goto skip_chip;
     359
     360        // XXX EAM 2022.09.22 : a more robust analysis would put the corner points
     361        // on the chip metadata so we can be certain the old and new corner values
     362        // are correctly matched.
    352363
    353364        psPlane ptCH, ptFP, ptTP;
Note: See TracChangeset for help on using the changeset viewer.